From dd28852ec328335ac7b8f78c68ab1804ac19bee7 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 6 Feb 2017 13:48:23 -0500 Subject: [PATCH 001/187] - added start ortc IDL files --- ortc/idl/Ortc.idl | 71 +++++++++++++++++++ ortc/idl/config.json | 28 ++++++++ .../msvs/ortclib.Universal/ortclib.vcxproj | 1 + .../ortclib.Universal/ortclib.vcxproj.filters | 6 ++ 4 files changed, 106 insertions(+) create mode 100644 ortc/idl/Ortc.idl create mode 100644 ortc/idl/config.json diff --git a/ortc/idl/Ortc.idl b/ortc/idl/Ortc.idl new file mode 100644 index 00000000..d5f976b5 --- /dev/null +++ b/ortc/idl/Ortc.idl @@ -0,0 +1,71 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + using namespace zs; + using namespace zs::Log; + + //!EXCLUSIVE WINRT + struct Dispatcher {}; + //!EXCLUSIVE x + + interface Ortc + { + [constructor, altname(createWithQueue)] + void Ortc(MessageQueue queue); + + //!EXCLUSIVE WINRT + [constructor, default, altname(createWithDispatcher)] + void Ortc(Dispatcher dispatcher); + //!EXCLUSIVE x + + [altname(getNtpServerTime)] + Milliseconds ntpServerTime(); + [altname(setNtpServerTime)] + void ntpServerTime(Milliseconds value); + + void setDefaultLogLevel(Level level); + void setLogLevel(string componenet, Level level); + + void setDefaultEventingLevel(Level level); + void setEventingLevel(string componenet, Level level); + + void startMediaTracing(); + void stopMediaTracing(); + bool isMediaTracing(); + bool saveMediaTrace(String filename); + bool saveMediaTrace(String host, int port); + }; + } +} diff --git a/ortc/idl/config.json b/ortc/idl/config.json new file mode 100644 index 00000000..bee07990 --- /dev/null +++ b/ortc/idl/config.json @@ -0,0 +1,28 @@ +{ + "project": { + "name": "ortc", + "aliases": { + "alias": [ + { + "in": "bogus_ortc_test_alias", + "out": "bogus" + } + ] + }, + "exclusives": { + "exclusive": [ + "xplatform" + ] + }, + "includes": { + "include": [ + "../../../zsLib/zsLib/idl/config.json" + ] + } + "sources": { + "source": [ + "Ortc.idl" + ] + } + } +} diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj b/projects/msvs/ortclib.Universal/ortclib.vcxproj index 91d68064..420dae5e 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj @@ -46,6 +46,7 @@ + diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters index 07100303..6703ba30 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters @@ -19,6 +19,9 @@ {a46272cc-d4bc-45f1-9353-82cc226e179e} + + {9ceab807-59c7-48a2-b3e6-101f52afbe9e} + @@ -279,6 +282,9 @@ ortc\internal + + ortc\idl + From 11a70bca4a5b9bebc9497b30d7525aedb83a87ae Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 8 Feb 2017 22:16:23 -0500 Subject: [PATCH 002/187] - added start ortc IDL files and fixed a lot of IDL compilation bugs --- ortc/ICertificate.h | 2 +- ortc/IICEGatherer.h | 2 +- ortc/IIdentity.h | 2 +- ortc/cpp/ortc_Identity.cpp | 2 +- ortc/idl/Capabilities.idl | 81 +++ ortc/idl/Certificate.idl | 78 +++ ortc/idl/Constraints.idl | 208 +++++++ ortc/idl/DataChannel.idl | 137 +++++ ortc/idl/DtlsTransport.idl | 96 ++++ ortc/idl/DtmfSender.idl | 69 +++ ortc/idl/IceGatherer.idl | 169 ++++++ ortc/idl/IceTransport.idl | 115 ++++ ortc/idl/IceTransportController.idl | 56 ++ ortc/idl/IceTypes.idl | 141 +++++ ortc/idl/Identity.idl | 85 +++ ortc/idl/MediaDevices.idl | 101 ++++ ortc/idl/MediaStreamTrack.idl | 251 +++++++++ ortc/idl/Ortc.idl | 10 +- ortc/idl/RtpListener.idl | 71 +++ ortc/idl/RtpReceiver.idl | 98 ++++ ortc/idl/RtpSender.idl | 82 +++ ortc/idl/RtpTypes.idl | 529 ++++++++++++++++++ ortc/idl/SctpTransport.idl | 124 ++++ ortc/idl/SrtpSdesTransport.idl | 143 +++++ ortc/idl/StatsProvider.idl | 43 ++ ortc/idl/StatsReport.idl | 510 +++++++++++++++++ ortc/idl/adapter/MediaStream.idl | 75 +++ ortc/idl/adapter/PeerConnection.idl | 235 ++++++++ ortc/idl/adapter/SessionDescription.idl | 334 +++++++++++ ortc/idl/adapter/enums.idl | 129 +++++ ortc/idl/config.json | 31 +- ortc/idl/enums.idl | 250 +++++++++ ortc/idl/error.idl | 50 ++ ortc/internal/ortc_Identity.h | 2 +- .../msvs/ortclib.Universal/ortclib.vcxproj | 235 +++++++- .../ortclib.Universal/ortclib.vcxproj.filters | 89 +++ 36 files changed, 4625 insertions(+), 10 deletions(-) create mode 100644 ortc/idl/Capabilities.idl create mode 100644 ortc/idl/Certificate.idl create mode 100644 ortc/idl/Constraints.idl create mode 100644 ortc/idl/DataChannel.idl create mode 100644 ortc/idl/DtlsTransport.idl create mode 100644 ortc/idl/DtmfSender.idl create mode 100644 ortc/idl/IceGatherer.idl create mode 100644 ortc/idl/IceTransport.idl create mode 100644 ortc/idl/IceTransportController.idl create mode 100644 ortc/idl/IceTypes.idl create mode 100644 ortc/idl/Identity.idl create mode 100644 ortc/idl/MediaDevices.idl create mode 100644 ortc/idl/MediaStreamTrack.idl create mode 100644 ortc/idl/RtpListener.idl create mode 100644 ortc/idl/RtpReceiver.idl create mode 100644 ortc/idl/RtpSender.idl create mode 100644 ortc/idl/RtpTypes.idl create mode 100644 ortc/idl/SctpTransport.idl create mode 100644 ortc/idl/SrtpSdesTransport.idl create mode 100644 ortc/idl/StatsProvider.idl create mode 100644 ortc/idl/StatsReport.idl create mode 100644 ortc/idl/adapter/MediaStream.idl create mode 100644 ortc/idl/adapter/PeerConnection.idl create mode 100644 ortc/idl/adapter/SessionDescription.idl create mode 100644 ortc/idl/adapter/enums.idl create mode 100644 ortc/idl/enums.idl create mode 100644 ortc/idl/error.idl diff --git a/ortc/ICertificate.h b/ortc/ICertificate.h index 35aa2c93..f2381134 100644 --- a/ortc/ICertificate.h +++ b/ortc/ICertificate.h @@ -82,7 +82,7 @@ namespace ortc //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- #pragma mark - #pragma mark IDTLSTransport + #pragma mark ICertificate #pragma mark interaction ICertificate : public ICertificateTypes, diff --git a/ortc/IICEGatherer.h b/ortc/IICEGatherer.h index e1945cb4..a9d3b24e 100644 --- a/ortc/IICEGatherer.h +++ b/ortc/IICEGatherer.h @@ -101,7 +101,7 @@ namespace ortc FilterPolicy_NoPrflx = (FilterPolicy_NoIPv4Prflx | FilterPolicy_NoIPv6Prflx), FilterPolicy_NoRelay = (FilterPolicy_NoIPv4Relay | FilterPolicy_NoIPv6Relay), FilterPolicy_NoPrivate = (FilterPolicy_NoIPv4Private | FilterPolicy_NoIPv6Private), - FilterPolicy_RelayOnly = (FilterPolicy_NoIPv4Host | FilterPolicy_NoSrflx | FilterPolicy_NoPrflx), + FilterPolicy_RelayOnly = (FilterPolicy_NoHost | FilterPolicy_NoSrflx | FilterPolicy_NoPrflx), FilterPolicy_NoCandidates = (0x7FFFFFFF) }; diff --git a/ortc/IIdentity.h b/ortc/IIdentity.h index bc4e2ce2..7de54fb0 100644 --- a/ortc/IIdentity.h +++ b/ortc/IIdentity.h @@ -111,7 +111,7 @@ namespace ortc virtual PromiseWithResultPtr getIdentityAssertion( const char *provider, - const char *protoocl = "default", + const char *protocol = "default", const char *username = NULL ) throw (InvalidStateError) = 0; diff --git a/ortc/cpp/ortc_Identity.cpp b/ortc/cpp/ortc_Identity.cpp index a0a78796..670b8bef 100644 --- a/ortc/cpp/ortc_Identity.cpp +++ b/ortc/cpp/ortc_Identity.cpp @@ -209,7 +209,7 @@ namespace ortc //------------------------------------------------------------------------- IIdentityTypes::PromiseWithResultPtr Identity::getIdentityAssertion( const char *provider, - const char *protoocl, + const char *protoocol, const char *username ) throw (InvalidStateError) { diff --git a/ortc/idl/Capabilities.idl b/ortc/idl/Capabilities.idl new file mode 100644 index 00000000..5a499b56 --- /dev/null +++ b/ortc/idl/Capabilities.idl @@ -0,0 +1,81 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct LongRange + { + long min; + long max; + + [constructor, default] + void LongRange(); + + [constructor, default, altname(LongRangeWithValue)] + void LongRange(long value); + + [constructor, default, altname(LongRangeWithLimits)] + void LongRange(long min, long max); + + [constructor, altname(LongRangeWithJson)] + void LongRange(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct DoubleRange + { + double min; + double max; + + [constructor, default] + void DoubleRange(); + + [constructor, default, altname(DoubleRangeWithValue)] + void DoubleRange(long value); + + [constructor, default, altname(DoubleRangeWithLimits)] + void DoubleRange(long min, long max); + + [constructor, altname(DoubleRangeWithJson)] + void DoubleRange(Json json); + + Json toJson(); + string hash(); + } + + } +} diff --git a/ortc/idl/Certificate.idl b/ortc/idl/Certificate.idl new file mode 100644 index 00000000..38d8b5af --- /dev/null +++ b/ortc/idl/Certificate.idl @@ -0,0 +1,78 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct RTCDtlsFingerprint + { + string algorithm; + string value; + + [constructor] + void RTCDtlsFingerprint(); + + [constructor, altname(RTCDtlsFingerprintClone)] + void RTCDtlsFingerprint(RTCDtlsFingerprint source); + + [constructor, default, altname(RTCDtlsFingerprintWithJson)] + void RTCDtlsFingerprint(Json json); + + Json toJson(); + string hash(); + }; + + interface RTCCertificate + { + typedef zs::Promise PromiseWithCertificate; + + [static] + PromiseWithCertificate generateCertificate(); + + [static, default, altname(generateCertificateWithAlgorithm)] + PromiseWithCertificate generateCertificate(string keygenAlgorithm); + + [static, altname(generateCertificateWithJson)] + PromiseWithCertificate generateCertificate(Json keygenAlgorithm); + + [getter] + puid id; + + [getter] + Time expires; + + [getter] + RTCDtlsFingerprint fingerprint; + }; + } +} diff --git a/ortc/idl/Constraints.idl b/ortc/idl/Constraints.idl new file mode 100644 index 00000000..f40e69c8 --- /dev/null +++ b/ortc/idl/Constraints.idl @@ -0,0 +1,208 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct ConstrainBooleanParameters { + [optional] + bool exact; + [optional] + bool ideal; + + [constructor, default] + void ConstrainBooleanParameters(); + [constructor, altname(ConstrainBooleanParametersClone)] + void ConstrainBooleanParameters(ConstrainBooleanParameters source); + [constructor, default, altname(ConstrainBooleanParametersWithJson)] + void ConstrainBooleanParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct ConstrainBoolean + { + [optional] + bool value; + [optional] + ConstrainBooleanParameters parameters; + + [constructor, default] + void ConstrainBoolean(); + [constructor, altname(ConstrainBooleanClone)] + void ConstrainBoolean(ConstrainBoolean source); + [constructor, default, altname(ConstrainBooleanWithJson)] + void ConstrainBoolean(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct ConstrainLongRange { + [optional] + long min; + [optional] + long max; + [optional] + long exact; + [optional] + long ideal; + + [constructor, default] + void ConstrainLongRange(); + [constructor, altname(ConstrainLongRangeClone)] + void ConstrainLongRange(ConstrainLongRange source); + [constructor, default, altname(ConstrainLongRangeWithJson)] + void ConstrainLongRange(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct ConstrainLong { + [optional] + long value; + [optional] + ConstrainLongRange range; + + [constructor, default] + void ConstrainLong(); + [constructor] + void ConstrainLong(ConstrainLong source); + [constructor, default, altname(ConstrainLongWithJson)] + void ConstrainLong(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct ConstrainDoubleRange { + [optional] + double min; + [optional] + double max; + [optional] + double exact; + [optional] + double ideal; + + [constructor, default] + void ConstrainDoubleRange(); + [constructor, altname(ConstrainDoubleRangeClone)] + void ConstrainDoubleRange(ConstrainDoubleRange source); + [constructor, default, altname(ConstrainDoubleRangeWithJson)] + void ConstrainDoubleRange(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct ConstrainDouble { + [optional] + double value; + [optional] + ConstrainDoubleRange range; + + [constructor, default] + void ConstrainDouble(); + [constructor, altname(ConstrainDoubleClone)] + void ConstrainDouble(ConstrainDouble source); + [constructor, default, altname(ConstrainDoubleWithJson)] + void ConstrainDouble(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct StringOrStringList { + [optional] + string value; + [optional] + StringList values; + + [constructor, default] + void StringOrStringList(); + [constructor, altname(StringOrStringListClone)] + void StringOrStringList(StringOrStringList source); + [constructor, default, altname(StringOrStringListWithJson)] + void StringOrStringList(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct ConstrainStringParameters { + [optional] + StringOrStringList exact; + [optional] + StringOrStringList ideal; + + [constructor, default] + void ConstrainStringParameters(); + [constructor, altname(ConstrainStringParametersClone)] + void ConstrainStringParameters(ConstrainStringParameters source); + [constructor, default, altname(ConstrainStringParametersWithJson)] + void ConstrainStringParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct ConstrainString { + [optional] + StringOrStringList value; + [optional] + ConstrainStringParameters parameters; + + [constructor, default] + void ConstrainString(); + [constructor, altname(ConstrainStringClone)] + void ConstrainString(ConstrainString source); + [constructor, default, altname(ConstrainStringWithJson)] + void ConstrainString(Json json); + + Json toJson(); + string hash(); + }; + + } +} diff --git a/ortc/idl/DataChannel.idl b/ortc/idl/DataChannel.idl new file mode 100644 index 00000000..b914d55d --- /dev/null +++ b/ortc/idl/DataChannel.idl @@ -0,0 +1,137 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + interface RTCDataTransport + { + }; + + [dictionary] + struct RTCDataChannelParameters + { + string label; + bool ordered = true; + Milliseconds maxPacketLifetime; + uint32 maxRetransmits; + string protocol; + bool negotiated; + [optional] + uint16 id; + + [constructor, default] + void Parameters(); + [constructor, altname(ParametersClone)] + void Parameters(Parameters source); + [constructor, default, altname(ParametersWithJson)] + void Parameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCMessageEventData + { + [getter] + binary binary; + + [getter] + string text; + }; + + struct RTCDataChannelStateChangeEvent + { + [getter] + RTCDataChannelState state; + }; + + struct RTCMessageEvent + { + [getter] + RTCMessageEventData data; + }; + + interface RTCDataChannel : RTCStatsProvider + { + [constructor] + void RTCDataChannel(RTCDataTransport transport, RTCDataChannelParameters params) throws (InvalidParameters, InvalidStateError); + + [getter] + puid id; + + [getter] + RTCDataTransport transport; + + [getter] + RTCDataChannelParameters parameters; + + [getter] + RTCDataChannelState readyState; + + [getter] + size_t bufferedAmount; + + [getter, setter] + size_t bufferedAmountLowThreshold; + + [getter, setter] + string binaryType; + + void close(); + + [default, altname(sendWithString)] + void send(string text); + [altname(sendWithBinary)] + void send(binary data); + + [event] + void onOpen(); + + [event] + void onClose(); + + [event] + void onStateChanged(RTCDataChannelStateChangeEvent event); + + [event] + void onError(ErrorEvent event); + + [event] + void onBufferedAmountLow(); + + [event] + void onMessage(RTCMessageEvent event); + }; + } +} diff --git a/ortc/idl/DtlsTransport.idl b/ortc/idl/DtlsTransport.idl new file mode 100644 index 00000000..f5359db3 --- /dev/null +++ b/ortc/idl/DtlsTransport.idl @@ -0,0 +1,96 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct RTCDtlsParameters + { + typedef std::list FingerprintList; + + RTCDtlsRole role = auto; + FingerprintList fingerprints; + + [constructor, default] + void RTCDtlsParameters(); + [constructor, altname(RTCDtlsParametersClone)] + void RTCDtlsParameters(RTCDtlsParameters source); + [constructor, default, altname(RTCDtlsParametersWithJson)] + void RTCDtlsParameters(Json json); + + Json toJson(); + string hash(); + }; + + struct RTCDtlsTransportStateChangeEvent + { + [getter] + RTCDtlsTransportState state; + }; + + + interface RTCDtlsTransport : RTCDataTransport, + RTCRtpTransport, + RTCRtcpTransport, + RTCStatsProvider + { + typedef std::list CertificateList; + + [getter] + puid id; + + [getter] + CertificateList certificates; + + [getter] + RTCIceTransport transport; + + [getter] + RTCDtlsTransportState state; + + RTCDtlsParameters getLocalParameters(); + RTCDtlsParameters getRemoteParameters(); + + binary getRemoteCertificates(); + + void start(RTCDtlsParameters remoteParameters) throws (InvalidStateError, InvalidParameters); + void stop(); + + [event] + void onStateChange(RTCDtlsTransportStateChangeEvent event); + + [event] + void onError(ErrorEvent event); + }; + } +} diff --git a/ortc/idl/DtmfSender.idl b/ortc/idl/DtmfSender.idl new file mode 100644 index 00000000..10e732e3 --- /dev/null +++ b/ortc/idl/DtmfSender.idl @@ -0,0 +1,69 @@ +/* + +Copyright (c) 2017, Optical Tone Ltd. +All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + + +namespace org +{ + namespace ortc + { + interface RTCRtpDtmfSender + { + [constructor] + void RTCRtpDTMFSender(RTCRtpSender sender); + + [getter] + puid id; + + bool canInsertDtmf(); + + void insertDtmf( + string tones, + [optional] + Milliseconds duration, + [optional] + Milliseconds interToneGap + ) throws (InvalidStateError, InvalidParameters); + + [getter] + RTCRtpSender sender; + + [getter] + string toneBuffer; + + [getter] + Milliseconds duration; + + [getter] + Milliseconds interToneGap; + }; + + } +} diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl new file mode 100644 index 00000000..455b81cd --- /dev/null +++ b/ortc/idl/IceGatherer.idl @@ -0,0 +1,169 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct RTCIceGathererInterfacePolicy + { + string interfaceType; + RTCIceGathererFilterPolicy gatherPolicy = none; + + [constructor, default] + void RTCIceGathererInterfacePolicy(); + [constructor, altname(RTCIceGathererInterfacePolicyClone)] + void RTCIceGathererInterfacePolicy(RTCIceGathererInterfacePolicy source); + [constructor, default, altname(RTCIceGathererInterfacePolicyWithJson)] + void RTCIceGathererInterfacePolicy(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCIceServer + { + StringList urls; + string userName; + string credential; + RTCIceCredentialType credentialType = password; + + [constructor, default] + void RTCIceServer(); + [constructor, altname(RTCIceServerClone)] + void RTCIceServer(RTCIceServer source); + [constructor, default, altname(RTCIceServerWithJson)] + void RTCIceServer(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCIceGathererOptions + { + typedef std::list InterfacePolicyList; + typedef std::list ServerList; + + bool continuousGathering = true; + InterfacePolicyList interfacePolicies; + ServerList iceServers; + + [constructor, default] + void RTCIceGathererOptions(); + [constructor, altname(RTCIceGathererOptionsClone)] + void RTCIceGathererOptions(RTCIceGathererOptions source); + [constructor, default, altname(RTCIceGathererOptionsWithJson)] + void RTCIceGathererOptions(ElementPtr elem); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCIceGathererIceErrorEvent + { + [nullable] + RTCIceCandidate hostCandidate; + string url; + uint16 errorCode; + string errorText; + }; + + + struct RTCIceGathererStateChangeEvent + { + [getter] + RTCIceGathererState state; + }; + + struct RTCIceGathererCandidateEvent + { + [getter] + RTCIceCandidate candidate; + [getter] + string url; + }; + + struct RTCIceGathererCandidateCompleteEvent + { + [getter] + RTCIceCandidateComplete candidate; + }; + + interface RTCIceGatherer : RTCStatsProvider + { + typedef std::list CandidateList; + + [constructor] + void RTCIceGatherer(RTCIceGathererOptions options); + + [getter] + puid id; + + [getter] + RTCIceComponent component; + + [getter] + RTCIceGathererState state; + + RTCIceParameters getLocalParameters(); + CandidateList getLocalCandidates(); + + RTCIceGatherer createAssociatedGatherer(); + + void gather( + [optional] + RTCIceGathererEvent options + ); + + void close(); + + [event] + void onStateChange(RTCIceGathererStateChangeEvent event); + + [event] + void onLocalCandidate(RTCIceGathererCandidateEvent event); + + [event] + void onLocalCandidateComplete(RTCIceGathererCandidateCompleteEvent event); + + [event] + void onLocalCandidateGone(RTCIceGathererCandidateEvent event); + + [event] + void onError(RTCIceGathererIceErrorEvent event); + }; + + } +} diff --git a/ortc/idl/IceTransport.idl b/ortc/idl/IceTransport.idl new file mode 100644 index 00000000..6b36afe0 --- /dev/null +++ b/ortc/idl/IceTransport.idl @@ -0,0 +1,115 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + interface RTCRtpTransport {}; + interface RTCRtcpTransport {}; + + struct RTCIceTransportStateChangeEvent + { + [getter] + RTCIceTransportState state; + }; + + struct RTCIceCandidatePairChangeEvent + { + [getter] + RTCIceCandidatePair candidatePair; + }; + + interface RTCIceTransport : RTCRtcpTransport, + RTCStatsProvider + { + typedef std::list CandidateList; + + [constructor, default] + void RTCIceTransport(RTCIceGatherer gatherer); + + [getter] + puid id; + + [getter] + RTCIceGatherer gatherer; + + [getter] + RTCIceRole role; + + [getter] + RTCIceComponent component; + + [getter] + RTCIceTransportState state; + + CandidateList getRemoteCandidates(); + CandidateList getSelectedCandidatePair(); + + void start( + RTCIceGatherer gatherer, + RTCIceParameters remoteParameters, + [optional] + RTCIceTransportOptions options + ); + + void stop(); + + RTCIceParameters getRemoteParameters(); + + RTCIceTransport createAssociatedTransport(); + + void addRemoteCandidate(RTCIceCanddiate remoteCandidate) throws (InvalidStateError, InvalidParameters); + void setRemoteCandidates(CandidateList remoteCandidates) throws (InvalidStateError, InvalidParameters); + void removeRemoteCandidate(RTCGatherCandidate remoteCandidate) throws (InvalidStateError, InvalidParameters); + + void keepWarm( + RTCIceCandidatePair candidatePair, + [optional] + bool keepWarm + ) throws (InvalidStateError); + + [event] + void onStateChange(RTCIceTransportStateChangeEvent event); + + [event] + void onCandidatePairAvailable(RTCIceCandidatePairChangeEvent event); + + [event] + void onCandidatePairGone(RTCIceCandidatePairChangeEvent event); + + [event] + void onCandidatePairChange(RTCIceCandidatePairChangeEvent event); + }; + + } +} + diff --git a/ortc/idl/IceTransportController.idl b/ortc/idl/IceTransportController.idl new file mode 100644 index 00000000..cc7e44fc --- /dev/null +++ b/ortc/idl/IceTransportController.idl @@ -0,0 +1,56 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + interface RTCIceTransportController + { + typedef std::list IceTransportList; + + [constructor] + void RTCIceTransportController(); + + [getter] + puid id; + + [getter] + IceTransportList transports; + + void addTransport( + RTCIceTransport transport, + [optional] + size_t index + ) throws (InvalidParameters, InvalidStateError); + }; + } +} diff --git a/ortc/idl/IceTypes.idl b/ortc/idl/IceTypes.idl new file mode 100644 index 00000000..45975435 --- /dev/null +++ b/ortc/idl/IceTypes.idl @@ -0,0 +1,141 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + struct RTCIceGatherCandidate + { + [getter] + RTCIceComponent component; + + [static, default] + RTCIceGatherCandidate create(Json json); + }; + + struct RTCIceCandidate : RTCIceGatherCandidate + { + [getter] + string interfaceType; + [getter] + string foundation; + [getter] + uint32 priority; + [getter] + uint32 unfreezePriority; + [getter] + RTCIceProtocol protocol; + [getter] + string ip; + [getter] + uint16 port; + [getter] + RTCIceCandidateType candidateType; + [getter] + RTCIceTcpCandidateType tcpType; + [getter] + string relatedAddress; + [getter] + uint16 relatedPort; + + [static] + RTCIceCandidate convert(RTCIceGatherCandidate candidate); + + Json toJson(); + string hash(); + }; + + struct RTCIceCandidateComplete : RTCIceGatherCandidate + { + [getter] + bool complete; + + [static] + RTCIceCandidateComplete convert(RTCIceGatherCandidate candidate); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCIceParameters + { + bool useUnfreezePriority; + string usernameFragment; + string password; + bool iceLite; + + [constructor, default] + void RTCIceParameters(); + [constructor, altname(RTCIceParametersClone)] + void RTCIceParameters(RTCIceParameters source); + [constructor, default, altname(RTCIceParametersWithJson)] + void RTCIceParameters(Json json); + + Json toJson(); + string hash(); + }; + + struct RTCIceCandidatePair + { + RTCIceCandidate local; + RTCIceCandidate remote; + + [constructor, default] + void RTCIceCandidatePair(); + [constructor, altname(RTCIceCandidatePairClone)] + void RTCIceCandidatePair(RTCIceCandidatePair source); + [constructor, default, altname(RTCIceCandidatePairWithJson)] + void RTCIceCandidatePair(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCIceTransportOptions + { + bool aggressiveIce; + RTCIceRole role = controlled; + + [constructor, default] + void RTCIceTransportOptions(); + [constructor, altname(RTCIceTransportOptionsClone)] + void RTCIceTransportOptions(RTCIceTransportOptions source); + [constructor, altname(RTCIceTransportOptionsWithJson)] + void RTCIceTransportOptions(Json json); + + Json toJson(); + string hash(); + }; + } +} diff --git a/ortc/idl/Identity.idl b/ortc/idl/Identity.idl new file mode 100644 index 00000000..dd603895 --- /dev/null +++ b/ortc/idl/Identity.idl @@ -0,0 +1,85 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct RTCIdentityAssertion + { + string idp; + string name; + }; + + [dictionary] + struct RTCIdentityResult + { + string assertion; + }; + + [dictionary] + struct RTCIdentityError + { + string idp; + string protocol; + string loginUrl; + }; + + interface RTCIdentity + { + typedef PromiseWith PromiseWithResult; + typedef PromiseWith PromiseWithAssertion; + + [constructor] + void RTCIdentity(RTCDtlsTransport transport); + + [getter] + puid id; + + [getter] + RTCIdentityAssertion peerIdentity; + + [getter] + RTCDtlsTransport transport; + + PromiseWithResult getIdentityAssertion( + string provider, + [optional] + string protocol, + [optional] + string username + ); + + PromiseWithAssertion setIdentityAssertion(string assertion); + }; + } +} diff --git a/ortc/idl/MediaDevices.idl b/ortc/idl/MediaDevices.idl new file mode 100644 index 00000000..75813e87 --- /dev/null +++ b/ortc/idl/MediaDevices.idl @@ -0,0 +1,101 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct MediaTrackSupportedConstraints + { + bool width; + bool height; + bool aspectRatio; + bool frameRate; + bool facingMode; + bool volume; + bool sampleRate; + bool sampleSize; + bool echoCancellation; + bool latency; + bool deviceId; + bool groupId; + + [constructor, default] + void MediaTrackSupportedConstraints(); + [constructor, altname(MediaTrackSupportedConstraintsClone)] + void MediaTrackSupportedConstraints(MediaTrackSupportedConstraints source); + [constructor, default, altname(MediaTrackSupportedConstraintsWithJson)] + void MediaTrackSupportedConstraints(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct MediaDeviceInfo + { + MediaDeviceKind kind = audioInput; + string label; + string deviceId; + string groupId; + + MediaTrackSupportedConstraints supportedConstraints; + + [constructor, default] + void MediaDeviceInfo(); + [constructor, altname(MediaDeviceInfoClone)] + void MediaDeviceInfo(MediaDeviceInfo source); + [constructor, default, altname(MediaDeviceInfoWithJson)] + void MediaDeviceInfo(Json json); + + Json toJson(); + string hash(); + }; + + interface MediaDevices + { + typedef std::list DeviceList; + typedef std::list TrackList; + typedef zs::PromiseWith PromiseWithDeviceList; + typedef zs::PromiseWith PromiseWithTrackList; + + [static] + MediaTrackSupportedConstraints getSupportedConstraints(); + + [static] + PromiseWithDeviceList enumerateDevices(); + + [static] + PromiseWithTrackList getUserMedia(MediaStreamConstraints constraints); + }; + } +} diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl new file mode 100644 index 00000000..7531afda --- /dev/null +++ b/ortc/idl/MediaStreamTrack.idl @@ -0,0 +1,251 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct MediaTrackCapabilities + { + typedef std::list BoolList; + + [optional] + LongRange width; + [optional] + LongRange height; + [optional] + DoubleRange aspectRatio; + [optional] + DoubleRange fameRate; + StringList facingMode; + [optional] + DoubleRange volume; + [optional] + LongRange sampleRate; + [optional] + LongRange sampleSize; + BoolList echoCancellation; + [optional] + DoubleRange latency; + [optional] + LongRange channelCount; + + string deviceID; + string groupID; + + [constructor, default] + void MediaTrackCapabilities(); + [constructor, altname(MediaTrackCapabilitiesClone)] + void MediaTrackCapabilities(MediaTrackCapabilities source); + [constructor, default, altname(MediaTrackCapabilitiesWithJson)] + void MediaTrackCapabilities(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct MediaTrackSettings + { + [optional] + long width; + [optional] + long height; + [optional] + double aspectRatio; + [optional] + double frameRate; + [optional] + string facingMode; + [optional] + string orientation; + [optional] + double volume; + [optional] + long sampleRate; + [optional] + long sampleSize; + [optional] + bool echoCancellation; + [optional] + double latency; + [optional] + long channelCount; + [optional] + string deviceId; + [optional] + string groupId; + + [constructor, default] + void MediaTrackSettings(); + [constructor, altname(MediaTrackSettingsClone)] + void MediaTrackSettings(MediaStreamTrackSettings source); + [constructor, default, altname(MediaTrackSettingsWithJson)] + void MediaTrackSettings(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct MediaTrackConstraintSet + { + ConstrainLong width; + ConstrainLong height; + ConstrainDouble aspectRatio; + ConstrainDouble frameRate; + ConstrainString facingMode; + ConstrainString orientation; + ConstrainDouble volume; + ConstrainLong sampleRate; + ConstrainLong sampleSize; + ConstrainBoolean echoCancellation; + ConstrainDouble latency; + ConstrainLong cannelCount; + ConstrainString deviceId; + ConstrainString groupId; + + [constructor, default] + void MediaTrackConstraintSet(); + [constructor, altname(MediaTrackConstraintSetClone)] + void MediaTrackConstraintSet(MediaTrackConstraintSet source); + [constructor, default, altname(MediaTrackConstraintSetWithJson)] + void MediaTrackConstraintSet(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct MediaTrackConstraints : MediaTrackConstraintSet + { + typedef std::list ConstraintSetList; + + ConstraintSetList advanced; + + [constructor, default] + void MediaTrackConstraints(); + [constructor, altname(MediaTrackConstraintsClone)] + void MediaTrackConstraints(MediaTrackConstraints source); + [constructor, default, altname(MediaTrackConstraintsWithJson)] + void MediaTrackConstraints(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct MediaStreamConstraints + { + [optional, nullable] + MediaTrackConstraints audio; + [optional, nullable] + MediaTrackConstraints video; + + [constructor, default] + void MediaStreamConstraints(); + [constructor, altname(MediaStreamConstraintsClone)] + void MediaStreamConstraints(MediaStreamConstraints source); + [constructor, default, altname(MediaStreamConstraintsWithJson)] + void MediaStreamConstraints(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct OverconstrainedError + { + string name; + string constraint; + string message; + }; + + struct OverconstrainedErrorEvent + { + [getter] + OverconstrainedError error; + }; + + interface MediaStreamTrack + { + [getter] + puid id; + + [getter] + MediaStreamTrackKind kind; + + [getter] + string identifier; + + [getter] + string deviceId; + + [getter] + string label; + + [getter, setter] + bool enabled; + + [getter, setter] + bool muted; + + [getter] + bool remote; + + [getter] + MediaStreamTrackState readyState; + + MediaStreamTrack clone(); + + void stop(); + + MediaTrackCapabilities getCapabilities(); + MediaTrackConstraints getConstraints(); + MediaTrackSettings getSettings(); + + zs::Promise applyConstraints(MediaTrackConstraints constraints); + + [event] + void onMute(); + + [event] + void onUnmute(); + + [event] + void onEnded(); + + [event] + void onOverConstrained(OverconstrainedErrorEvent event); + }; + } +} diff --git a/ortc/idl/Ortc.idl b/ortc/idl/Ortc.idl index d5f976b5..4cbc61ea 100644 --- a/ortc/idl/Ortc.idl +++ b/ortc/idl/Ortc.idl @@ -36,17 +36,23 @@ namespace org using namespace zs; using namespace zs::Log; + typedef zs::exceptions::InvalidParameters InvalidParameters; + typedef zs::exceptions::InvalidState InvalidStateError; + typedef zs::exceptions::NotSupported NotSupported; + typedef zs::exceptions::NotImplemented NotImplemented; + typedef zs::exceptions::Unexpected Unexpected; + //!EXCLUSIVE WINRT struct Dispatcher {}; //!EXCLUSIVE x interface Ortc { - [constructor, altname(createWithQueue)] + [constructor, altname(OrtcWithQueue)] void Ortc(MessageQueue queue); //!EXCLUSIVE WINRT - [constructor, default, altname(createWithDispatcher)] + [constructor, default, altname(OrtcWithDispatcher)] void Ortc(Dispatcher dispatcher); //!EXCLUSIVE x diff --git a/ortc/idl/RtpListener.idl b/ortc/idl/RtpListener.idl new file mode 100644 index 00000000..2c66cf16 --- /dev/null +++ b/ortc/idl/RtpListener.idl @@ -0,0 +1,71 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + struct RTCRtpUnhandledEvent + { + [getter] + SsrcType ssrc; + [getter] + PayloadType payloadType; + [getter] + string muxId; + [getter] + string rid; + }; + + interface RTCRtpListener : RTCStatsProvider + { + typedef std::list HeaderExtensionParametersList; + + [constructor] + void RTCRtpListener( + RTCRtpTransport transport, + [optional] + HeaderExtensionParametersList headerExtensions + ); + + [getter] + puid id; + + [getter] + RTCRtpTransport transport; + + void setHeaderExtensions(HeaderExtensionParametersList headerExtensions); + + [event] + void onUnhandled(RTCRtpUnhandledEvent event); + }; + } +} diff --git a/ortc/idl/RtpReceiver.idl b/ortc/idl/RtpReceiver.idl new file mode 100644 index 00000000..4231ad5d --- /dev/null +++ b/ortc/idl/RtpReceiver.idl @@ -0,0 +1,98 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct RTCRtpContributingSource + { + Time timestamp; + SsrcType csrc; + uint8 audioLevel; + [optional] + bool voiceActivityFlag; + + [constructor, default] + void RTCRtpContributingSource(); + [constructor, altname(RTCRtpContributingSourceClone)] + void RTCRtpContributingSource(RTCRtpContributingSource source); + [constructor, default, altname(RTCRtpContributingSourceWithJson)] + void RTCRtpContributingSource(Json json); + + Json toJson(); + string hash(); + }; + + interaction RTCRtpReceiver : RTCStatsProvider + { + typedef std::list ContributingSourceList; + + [constructor] + void RTCRtpReceiver( + MediaStreamTrackKind kind, + RTCRtpTransport transport, + [optional] + RTCRtcpTransport rtcpTransport + ); + + [getter] + puid id; + + [getter] + MediaStreamTrack track; + + [getter] + RTCRtpTransport transport; + + [getter, nullable] + RTCRtpTransport rtcpTransport; + + void setTransport( + RTCRtpTransportPtr transport, + [optional] + RTCRtcpTransport rtcpTransport + ); + + [static] + RTCRtpCapabilities getCapabilities([optional] MediaStreamTrackKind kind); + + zs::Promise receive(RTCRtpParameters parameters); + void stop(); + + ContributingSourceList getContributingSources(); + + void requestSendCsrc(SsrcType csrc); + }; + + } +} diff --git a/ortc/idl/RtpSender.idl b/ortc/idl/RtpSender.idl new file mode 100644 index 00000000..ee07367d --- /dev/null +++ b/ortc/idl/RtpSender.idl @@ -0,0 +1,82 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + struct RTCSsrcConflictEvent + { + [getter] + SsrcType ssrc; + }; + + interface RTCRtpSender : RTCStatsProvider + { + [constructor] + void RTCRtpSender( + MediaStreamTrackPtr track, + RTCRtpTransportPtr transport, + [optional] + RTCRtcpTransportPtr rtcpTransport + ); + + [getter] + puid id; + + [getter] + MediaStreamTrack track; + + [getter] + RTCRtpTransport transport; + + [getter, nullable] + RTCRtcpTransport rtcpTransport; + + void setTransport( + RTCRtpTransport transport, + [optional] + RTCIRtcpTransport rtcpTransport + ); + + zs::Promise setTrack(MediaStreamTrack track); + + RTCRtpCapabilities getCapabilities([optional] MediaStreamTrackKind kind); + + zs::Promise send(RTCRtpParameters parameters); + + void stop(); + + [event] + void onSsrcConflict(RTCSsrcConflictEvent conflict); + }; + } +} diff --git a/ortc/idl/RtpTypes.idl b/ortc/idl/RtpTypes.idl new file mode 100644 index 00000000..df123c7e --- /dev/null +++ b/ortc/idl/RtpTypes.idl @@ -0,0 +1,529 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct RTCRtpCodecCapabilityOptions + { + }; + + [dictionary] + struct RTCRtpCodecCapabilityParameters + { + }; + + [dictionary] + struct RTCRtcpFeedback + { + string type; + string parameter; + + [constructor, default] + void RTCRtcpFeedback(); + [constructor, altname(RTCRtcpFeedbackClone)] + void RTCRtcpFeedback(RTCRtcpFeedback source); + [constructor, default, altname(RTCRtcpFeedbackWithJson)] + void RTCRtcpFeedback(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpCodecCapability + { + typedef std::list RtcpFeedbackList; + + string name; + string kind; + [optional] + unsigned long clockRate; + PayloadType peferredPayloadType; + Milliseconds pTime; + Milliseconds maxPTime; + [optional] + unsigned long numChannels; + RtcpFeedbackList rtcpFeedback; + [dynamic] + RTCRtpCodecCapabilityParameters parameters; // OpusCodecCapabilityParameters, VP8CodecCapabilityParameters, H264CodecCapabilityParameters, RTXCodecCapabilityParameters, FlexFECCodecCapabilityParameters + [dynamic] + RTCRtpCodecCapabilityOptions options; // OpusCodecCapabilityOptions + unsigned short maxTemporalLayers; + unsigned short maxSpatialLayers; + bool svcMultiStreamSupport; + + [constructor, default] + void RTCRtpCodecCapability(); + [constructor, altname(RTCRtpCodecCapabilityClone)] + void RTCRtpCodecCapability(RTCRtpCodecCapability source); + [constructor, default, altname(RTCRtpCodecCapabilityWithJson)] + void RTCRtpCodecCapability(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpHeaderExtension + { + string kind; + string uri; + uint16 preferredId; + bool preferredEncrypt; + + [constructor, default] + void RTCRtpHeaderExtension(); + [constructor, altname(RTCRtpHeaderExtensionClone)] + void RTCRtpHeaderExtension(RTCRtpHeaderExtension source); + [constructor, default, altname(RTCRtpHeaderExtensionWithJson)] + void RTCRtpHeaderExtension(Json json); + + Json toJson(); + string hash(); + }; + + + [dictionary] + struct RTCRtpCapabilities + { + typedef string FecMechanism; + typedef std::list CodecCapabilityList; + typedef std::list HeaderExtensionsList; + typedef std::list FecMechanismList; + + CodecCapabilityList codecs; + HeaderExtensionsList headerExtensions; + FecMechanismList fecMechanisms; + + [constructor, default] + void RTCRtpCapabilities(); + [constructor, altname(RTCRtpCapabilitiesClone)] + void RTCRtpCapabilities(RTCRtpCapabilities source); + [constructor, default, altname(RTCRtpCapabilitiesWithJson)] + void RTCRtpCapabilities(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpOpusCodecCapabilityOptions : RTCRtpCodecCapabilityOptions + { + // sender capabilities + [optional] + unsigned long complexity; + [optional] + RTCRtpOpusCodecCapabilityOptionsSignal signal; + [optional] + RTCRtpOpusCodecCapabilityOptionsApplication application; + [optional] + unsigned long packetLossPerc; + [optional] + bool predictionDisabled; + + [constructor, default] + void RTCRtpOpusCodecCapabilityOptions(); + [constructor, altname(RTCRtpOpusCodecCapabilityOptionsClone)] + void RTCRtpOpusCodecCapabilityOptions(RTCRtpOpusCodecCapabilityOptions source); + [constructor, default, altname(RTCRtpOpusCodecCapabilityOptionsWithJson)] + void RTCRtpOpusCodecCapabilityOptions(Json json); + + Json toJson(); + string hash(); + }; + + + // https://tools.ietf.org/html/rfc7587#section-6.1 + [dictionary] + struct RTCRtpOpusCodecCapabilityParameters : RTCRtpCodecCapabilityParameters + { + [optional] + unsigned long maxPlaybackRate; + [optional] + unsigned long maxAverageBitrate; + [optional] + bool stereo; + [optional] + bool cbr; + [optional] + bool useInbandFec; + [optional] + bool useDtx; + + // sender capability parameters + [optional] + unsigned long sPropMaxCaptureRate; + [optional] + bool sPropStereo; + + [constructor, default] + void RTCRtpOpusCodecCapabilityParameters(); + [constructor, altname(RTCRtpOpusCodecCapabilityParametersSource)] + void RTCRtpOpusCodecCapabilityParameters(RTCRtpOpusCodecCapabilityParameters source); + [constructor, default, altname(RTCRtpOpusCodecCapabilityParametersWithJson)] + void RTCRtpOpusCodecCapabilityParameters(Json json); + + Json toJson(); + string hash(); + }; + + // https://tools.ietf.org/html/rfc7741#section-6.1 + [dictionary] + struct RTCRtpVp8CodecCapabilityParameters : RTCRtpCodecCapabilityParameters + { + [optional] + unsigned long maxFr; + [optional] + unsigned long long maxFs; + + [constructor, default] + void RTCRtpVp8CodecCapabilityParameters(); + [constructor, altname(RTCRtpVp8CodecCapabilityParametersClone)] + void RTCRtpVp8CodecCapabilityParameters(RTCRtpVp8CodecCapabilityParameters source); + [constructor, default, altname(RTCRtpVp8CodecCapabilityParametersWithJson)] + void RTCRtpVp8CodecCapabilityParameters(Json json); + + Json toJson(); + string hash(); + }; + + // https://tools.ietf.org/html/rfc7742#section-6.2 + [dictionary] + struct RTCRtpH264CodecCapabilityParameters : RTCRtpCodecCapabilityParameters + { + typedef std::list PacketizationModeList; + + [optional] + unsigned long profileLevelId; + PacketizationModeList packetizationModes; + + [optional] + unsigned long long maxMnps; + [optional] + unsigned long long maxSMbps; + [optional] + unsigned long long maxFs; + [optional] + unsigned long long maxCpb; + [optional] + unsigned long long maxDpb; + [optional] + unsigned long long maxBr; + + [constructor, default] + void RTCRtpH264CodecCapabilityParameters(); + [constructor, altname(RTCRtpH264CodecCapabilityParametersClone)] + void RTCRtpH264CodecCapabilityParameters(RTCRtpH264CodecCapabilityParameters source); + [constructor, default, altname(RTCRtpH264CodecCapabilityParametersWithJson)] + void RTCRtpH264CodecCapabilityParameters(Json json); + + Json toJson(); + string hash(); + }; + + // https://tools.ietf.org/html/rfc4588#section-8.1 + [dictionary] + struct RTCRtpRtxCodecCapabilityParameters : RTCRtpCodecCapabilityParameters + { + PayloadType apt; + Milliseconds rtxTime; + + [constructor, default] + void RTCRtpRtxCodecCapabilityParameters(); + [constructor, altname(RTCRtpRtxCodecCapabilityParametersClone)] + void RTCRtpRtxCodecCapabilityParameters(RTCRtpRtxCodecCapabilityParameters source); + [constructor, default, altname(RTCRtpRtxCodecCapabilityParametersWithJson)] + void RTCRtpRtxCodecCapabilityParameters(Json json); + + Json toJson(); + string hash(); + }; + + struct RTCRtpFlexFecCodecCapabilityParameters : RTCRtpCodecCapabilityParameters + { + Microseconds repairWindow; + + [optional] + unsigned long l; + [optional] + unsigned long d; + [optional] + RTCRtpFlexFecCodecCapabilityParametersToP toP; + + [constructor, default] + void RTCRtpFlexFecCodecCapabilityParameters(); + [constructor, altname(RTCRtpFlexFecCodecCapabilityParametersClone)] + void RTCRtpFlexFecCodecCapabilityParameters(RTCRtpFlexFecCodecCapabilityParameters source); + [constructor, default, altname(RTCRtpFlexFecCodecCapabilityParametersWithJson)] + void RTCRtpFlexFecCodecCapabilityParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtcpParameters { + SsrcType ssrc; + string cName; + bool reducedSize; + bool mux = true; + + [constructor, default] + void RTCRtcpParameters(); + [constructor, altname(RTCRtcpParametersClone)] + void RTCRtcpParameters(RTCRtcpParameters source); + [constructor, default, altname(RTCRtcpParametersWithJson)] + void RTCRtcpParameters(Json json); + + Json toJson(); + string hash(); + }; + + typedef RTCRtpCodecCapabilityParameters RTCRtpCodecParameterSettings; + + [dictionary] + struct RTCRtpCodecParameters + { + typedef std::list RtcpFeedbackList; + + string name; + PayloadType payloadType; + [optional] + unsigned long clockRate; + Milliseconds pTime; + Milliseconds maxPTime; + [optional] + unsigned long numChannels; + RtcpFeedbackList rtcpFeedback; + [dynamic] + RTCRtpCodecParameterSettings parameters; // see OpusCodecParameters, RTXCodecParameters, REDCodecParameters, FlexFECCodecParameters for definitions + + [constructor, default] + void RTCRtpCodecParameters(); + [constructor, altname(RTCRtpCodecParametersClone)] + void RTCRtpCodecParameters(RTCRtpCodecParameters source); + [constructor, default, altname(RTCRtpCodecParametersWithJson)] + void RTCRtpCodecParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpHeaderExtensionParameters + { + string uri; + uint16 id; + bool encrypt; + + [constructor, default] + void RTCRtpHeaderExtensionParameters(); + [constructor, altname(RTCRtpHeaderExtensionParametersClone)] + void RTCRtpHeaderExtensionParameters(RTCRtpHeaderExtensionParameters source); + [constructor, default, altname(RTCRtpHeaderExtensionParametersWithJson)] + void RTCRtpHeaderExtensionParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpFecParameters + { + [optional] + SsrcType ssrc; + string mechanism; + + [constructor, default] + void RTCRtpFecParameters(); + [constructor, altname(RTCRtpFecParametersClone)] + void RTCRtpFecParameters(RTCRtpFecParameters source); + [constructor, default, altname(RTCRtpFecParametersWithJson)] + void RTCRtpFecParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpRtxParameters + { + [optional] + SsrcType ssrc; + + [constructor, default] + void RTCRtpRtxParameters(); + [constructor, altname(RTCRtpRtxParametersClone)] + void RTCRtpRtxParameters(RTCRtpRtxParameters source); + [constructor, default, altname(RTCRtpRtxParametersWithJson)] + void RTCRtpRtxParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpEncodingParameters + { + typedef string EncodingId; + typedef std::list EncodingIdList; + + [optional] + SsrcType ssrc; + [optional] + PayloadType codecPayloadType; + [optional] + RTCRtpFecParameters fec; + [optional] + RTCRtpRtxParameters rtx; + [optional] + RTCRtpPriorityType priority; + [optional] + unsigned long long maxBitrate; + [optional] + double minQuality; + [optional] + double resolutionScale; + [optional] + double framerateScale; + bool active = true; + EncodingId encodingId; + EncodingIdList dependencyEncodingIds; + + [constructor, default] + void RTCRtpEncodingParameters(); + [constructor, altname(RTCRtpEncodingParametersClone)] + void RTCRtpEncodingParameters(RTCRtpEncodingParameters source); + [constructor, default, altname(RTCRtpEncodingParametersWithJson)] + void RTCRtpEncodingParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpParameters + { + typedef std::list CodecParametersList; + typedef std::list HeaderExtensionParametersList; + typedef std::list EncodingParametersList; + + string muxId; + CodecParametersList codecs; + HeaderExtensionParametersList headerExtensions; + EncodingParametersList encodings; + RTCRtcpParameters rtcp; + RTCRtpDegradationPreference degredationPreference = balanced; + + [constructor, default] + void RTCRtpParameters(); + [constructor, altname(RTCRtpParametersClone)] + void RTCRtpParameters(RTCRtpParameters source); + [constructor, default, altname(RTCRtpParametersWithJson)] + void RTCRtpParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCRtpOpusCodecParameterSettings : RTCRtpCodecParameterSettings + { + // sender parameters + [optional] + unsigned long maxPlaybackRate; + [optional] + unsigned long maxAverageBitrate; + [optional] + bool stereo; + [optional] + bool cbr; + [optional] + bool useInbandFec; + [optional] + bool useDtx; + + [optional] + unsigned long complexity; + [optional] + RTCRtpOpusCodecCapabilityOptionsSignal signal; + [optional] + RTCRtpOpusCodecCapabilityOptionsApplication application; + [optional] + unsigned long packetLossPerc; + [optional] + bool predictionDisabled; + + // receiver parameters + [optional] + unsigned long sPropMaxCaptureRate; + [optional] + bool sPropStereo; + + [constructor, default] + void RTCRtpOpusCodecParametersSettings(); + [constructor, altname(RTCRtpOpusCodecParametersSettingsClone)] + void RTCRtpOpusCodecParametersSettings(RTCRtpOpusCodecParametersSettings source); + [constructor, default, altname(RTCRtpOpusCodecParametersSettingsWithJson)] + void RTCRtpOpusCodecParametersSettings(Json json); + + Json toJson(); + string hash(); + }; + + typedef RTCRtpVp8CodecCapabilityParameters RTCRtpVp8CodecParameterSettings; + typedef RTCRtpH264CodecCapabilityParameters RTCRtpH264CodecParameterSettings; + typedef RTCRtpRtxCodecCapabilityParameters RTCRtpRtxCodecParameterSettings; + typedef RTCRtpFlexFecCodecCapabilityParameters RTCRtpFlexFecCodecParameterSettings; + + [dictionary] + struct RTCRtpRedCodecParameterSettings : RTCRtpCodecParameterSettings + { + typedef std::list PayloadTypeList; + + PayloadTypeList payloadTypes; + + [constructor, default] + void RTCRtpRedCodecParameterSettings(); + [constructor, altname(RTCRtpRedCodecParameterSettingsClone)] + void RTCRtpRedCodecParameterSettings(RTCRtpRedCodecParameterSettings source); + [constructor, default, altname(RTCRtpRedCodecParameterSettingsWithJson)] + void RTCRtpRedCodecParameterSettings(Json json); + + Json toJson(); + string hash(); + }; + + } +} diff --git a/ortc/idl/SctpTransport.idl b/ortc/idl/SctpTransport.idl new file mode 100644 index 00000000..ae42aaf1 --- /dev/null +++ b/ortc/idl/SctpTransport.idl @@ -0,0 +1,124 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + interface RTCSctpTransportListener {}; + + [dictionary] + struct RTCSctpCapabilities + { + size_t maxMessageSize; + + uint16 minPort; + uint16 maxPort; + uint16 maxUsablePorts; + uint16 maxSessionsPerPort; + + [constructor, default] + void RTCSctpCapabilities(); + [constructor, altname(RTCSctpCapabilitiesClone)] + void RTCSctpCapabilities(RTCSctpCapabilities source); + [constructor, default, altname(RTCSctpCapabilitiesWithJson)] + void RTCSctpCapabilities(Json json); + + Json toJson(); + string hash(); + }; + + struct RTCSctpTransportStateChangeEvent + { + RTCSctpTransportState state; + }; + + struct RTCDataChannelEvent + { + RTCDataChannel dataChannel; + }; + + interface RTCSctpTransport : RTCStatsProvider, + RTCDataTransport + { + [static] + RTCSctpTransport convert(RTCDataTransport object); + + [constructor] + void RTCSctpTransport( + RTCDtlsTransport transport, + [optional] + uint16 localPort + ) throws (InvalidParameters, InvalidStateError); + + [static] + RTCSctpTransportListener listen( + RTCDtlsTransport transport, + RTCRtcpCapabilities remoteCapabilities + ); + + [getter] + puid id; + + [static] + RTCSctpCapabilities getCapabilities(); + + [getter] + RTCDtlsTransport transport; + + [getter] + RTCSctpTransportState state; + + [getter] + uint16 port; + + [getter] + uint16 localPort; + + [getter, optional] + uint16 remotePort; + + void start( + RTCSctpCapabilities remoteCapabilities, + [optional] + uint16 remotePort + ) throws (InvalidStateError, InvalidParameters); + + void stop(); + + [event] + void onStateChange(RTCSctpTransportStateChangeEvent state); + + [event] + void onDataChannel(RTCDataChannelEvent dataChannel); + }; + } +} diff --git a/ortc/idl/SrtpSdesTransport.idl b/ortc/idl/SrtpSdesTransport.idl new file mode 100644 index 00000000..f5956326 --- /dev/null +++ b/ortc/idl/SrtpSdesTransport.idl @@ -0,0 +1,143 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + + +namespace org +{ + namespace ortc + { + [dictionary] + struct RTCSrtpSdesKeyParameters + { // see RFC 4568 sect 9.2 + string keyMethod; // must be "inline" + string keySalt; // key + salt, base 64 encoded e.g. base64(16 bytes + 14 bytes) + string lifetime; // must be "2^n" where n is the max number of packets to flow throw the transport + string mkiValue; // base 10 expressed value of Master Key Identifier (MKI) converted to string + uint16 mkiLength; // number of bytes allocated on each SRTP packet for Master Key Identifier (MKI) [max = 128 bytes] + + [constructor, default] + void RTCSrtpSdesKeyParameters(); + [constructor, altname(RTCSrtpSdesKeyParametersClone)] + void RTCSrtpSdesKeyParameters(RTCSrtpSdesKeyParameters source); + [constructor, default, altname(RTCSrtpSdesKeyParametersWithJson)] + void RTCSrtpSdesKeyParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSrtpSdesCryptoParameters + { // see RFC 4568 sect 9.2 + typedef std::list KeyParametersList; + typedef StringList SessionParamList; + + uint16 tag; + string cryptoSuite; + KeyParametersList keyParams; + SessionParamList sessionParams; + + [constructor, default] + void RTCSrtpSdesCryptoParameters(); + [constructor, altname(RTCSrtpSdesCryptoParametersClone)] + void RTCSrtpSdesCryptoParameters(RTCSrtpSdesCryptoParameters source); + [constructor, default, altname(RTCSrtpSdesCryptoParametersWithJson)] + void RTCSrtpSdesCryptoParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSrtpSdesParameters + { + typedef std::list CryptoParametersList; + CryptoParametersList cryptoParams; + + [constructor, default] + void RTCSrtpSdesParameters(); + [constructor, altname(RTCSrtpSdesParametersClone)] + void RTCSrtpSdesParameters(RTCSrtpSdesParameters source); + [constructor, default, altname(RTCSrtpSdesParametersWithJson)] + void RTCSrtpSdesParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSrtpSdesTransportLifetimeRemaining + { + unsigned long leastLifetimeRemainingPercentageForAllKeys; + unsigned long overallLifetimeRemainingPercentage; + }; + + struct RTCSrtpSdesTransportLifetimeRemainingEvent + { + [getter] + RTCSrtpSdesTransportLifetimeRemaining data; + }; + + interface RTCSrtpSdesTransport : RTCRtpTransport, + RTCStatsProvider + { + [static] + RTCSrtpSdesTransport convert(RTCRtpTransport rtpTransport); + + [constructor] + void RTCSrtpSdesTransport( + RTCIceTransport iceTransport, + RTCSrtpSdesCryptoParameters encryptParameters, + RTCSrtpSdesCryptoParameters decryptParameters + ); + + [getter] + puid id; + + [getter] + RTCIceTransport transport; + [getter] + RTCIceTransport rtcpTransport; + + [static] + RTCSrtpSdesParameters getLocalParameters(); + + void stop(); + + [event] + void onLifetimeRemaining(RTCSrtpSdesTransportLifetimeRemainingEvent event); + + [event] + void onError(ErrorEvent event); + }; + + } +} diff --git a/ortc/idl/StatsProvider.idl b/ortc/idl/StatsProvider.idl new file mode 100644 index 00000000..e2bcc90c --- /dev/null +++ b/ortc/idl/StatsProvider.idl @@ -0,0 +1,43 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + interface RTCStatsProvider + { + typedef zs::PromiseWith PromiseWithStatsReport; + + PromiseWithStatsReport getStats(RTCStatsTypeSet statTypes); + }; + } +} diff --git a/ortc/idl/StatsReport.idl b/ortc/idl/StatsReport.idl new file mode 100644 index 00000000..048fc525 --- /dev/null +++ b/ortc/idl/StatsReport.idl @@ -0,0 +1,510 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + typedef uint32 SsrcType; + typedef uint8 PayloadType; + typedef std::list SsrcTypeList; + + struct RTCStatsTypeSet + { + typedef std::set EnumSet; + + [constructor, default] + void RTCStatsTypeSet(); + [constructor, altname(RTCStatsTypeSetWithValues)] + void RTCStatsTypeSet(EnumSet values); + + bool hasStatType(RTCStatsType type); + }; + + struct RTCStats + { + [getter] + Time timestamp; + [optional, getter] + RTCStatsType statsType; + [getter] + string statsTypeOther; + [getter] + string id; + + [constructor, default] + void RTCStats(); + [constructor, altname(RTCStatsClone)] + void RTCStats(RTCStats source); + [constructor, default, altname(RTCStatsWithJson)] + void RTCStats(Json json); + + string statsType(); + + Json toJson(); + string hash(); + + void eventTrace(); + }; + + + struct RTPStreamStats : RTCStats + { + [optional, getter] + SsrcType ssrc; + [getter] + string associatedStatId; + [getter] + bool isRemote; + [getter] + string mediaType; + [getter] + string mediaTrackId; + [getter] + string transportId; + [getter] + string codecId; + [getter] + unsigned long firCount; + [getter] + unsigned long pliCount; + [getter] + unsigned long nackCount; + [getter] + unsigned long sliCount; + + [constructor, default] + void RTPStreamStats(); + [constructor, altname(RTPStreamStatsClone)] + void RTPStreamStats(RTPStreamStats source); + [constructor, default, altname(RTPStreamStatsWithJson)] + void RTPStreamStats(Json json); + + [static] + RTPStreamStats convert(RTCStats stat); + + Json toJson(); + string hash(); + }; + + struct RTCCodec : RTCStats + { + [optional, getter] + PayloadType payloadType; + [getter] + string codec; + [getter] + unsigned long clockRate; + [optional, getter] + unsigned long channels; + [getter] + string parameters; + + [constructor, default] + void RTCCodec(); + [constructor, altname(RTCCodecClone)] + void RTCCodec(Codec source); + [constructor, default, altname(RTCCodecWithJson)] + void RTCCodec(Json json); + + [static] + RTCCodec convert(RTCStats stat); + + Json toJson(); + string hash(); + }; + + struct RTCInboundRTPStreamStats : RTPStreamStats + { + [getter] + unsigned long packetsReceived; + [getter] + unsigned long long bytesReceived; + [getter] + unsigned long packetsLost; + [getter] + double jitter; + [getter] + double fractionLost; + [getter] + Milliseconds endToEndDelay; + + [constructor, default] + void RTCInboundRTPStreamStats(); + [constructor, altname(RTCInboundRTPStreamStatsClone)] + void RTCInboundRTPStreamStats(RTCInboundRTPStreamStats source); + [constructor, default, altname(RTCInboundRTPStreamStatsWithJson)] + void RTCInboundRTPStreamStats(Json json); + + [static] + RTCInboundRTPStreamStats convert(RTCStats stat); + [static] + RTCInboundRTPStreamStats convert(RTPStreamStats stat); + + Json toJson(); + string hash(); + }; + + + struct RTCOutboundRTPStreamStats : RTPStreamStats + { + [getter] + unsigned long packetsSent; + [getter] + unsigned long long bytesSent; + [getter] + double targetBitrate; + [getter] + double roundTripTime; + + [constructor, default] + void RTCOutboundRTPStreamStats(); + [constructor, altname(RTCOutboundRTPStreamStatsClone)] + void RTCOutboundRTPStreamStats(RTCOutboundRTPStreamStats source); + [constructor, default, altname(RTCOutboundRTPStreamStatsWithJson)] + void RTCOutboundRTPStreamStats(Json json); + + [static] + RTCOutboundRTPStreamStats convert(RTCStats stat); + [static] + RTCOutboundRTPStreamStats convert(RTPStreamStats stat); + + Json toJson(); + string hash(); + }; + + struct RTCSctpTransportStats : RTCStats + { + [getter] + unsigned long dataChannelsOpened; + [getter] + unsigned long dataChannelsClosed; + + [constructor, default] + void RTCSctpTransportStats(); + [constructor, altname(RTCSCTPTransportStatsClone)] + void RTCSctpTransportStats(RTCSCTPTransportStats source); + [constructor, default, altname(RTCSCTPTransportStatsWithJson)] + void RTCSctpTransportStats(Json json); + + [static] + RTCSctpTransportStats convert(RTCStats stat); + + Json toJson(); + string hash(); + }; + + struct RTCMediaStreamStats : RTCStats + { + [getter] + string streamId; + [getter] + StringList trackIds; + + [constructor, default] + void RTCMediaStreamStats(); + [constructor, altname(RTCMediaStreamStatsClone)] + void RTCMediaStreamStats(RTCMediaStreamStats source); + [constructor, default, altname(RTCMediaStreamStatsWithJson)] + void RTCMediaStreamStats(Json json); + + [static] + RTCMediaStreamStats convert(RTCStats stat); + + Json toJson(); + string hash(); + }; + + + struct RTCMediaStreamTrackStats : RTCStats + { + [getter] + string trackId; + [getter] + bool remoteSource; + [getter] + SsrcTypeList ssrcIds; + [getter] + unsigned long frameWidth; + [getter] + unsigned long frameHeight; + [getter] + double framesPerSecond; + [getter] + unsigned long framesSent; + [getter] + unsigned long framesReceived; + [getter] + unsigned long framesDecoded; + [getter] + unsigned long framesDropped; + [getter] + unsigned long framesCorrupted; + [getter] + double audioLevel; + [getter] + double echoReturnLoss; + [getter] + double echoReturnLossEnhancement; + + [constructor, default] + void RTCMediaStreamTrackStats(); + [constructor, altname(RTCMediaStreamTrackStats)] + void RTCMediaStreamTrackStats(RTCMediaStreamTrackStats source); + [constructor, default, altname(RTCMediaStreamTrackStatsWithJson)] + void RTCMediaStreamTrackStats(Json json); + + [static] + RTCMediaStreamTrackStats convert(RTCStats stat); + + Json toJson(); + string hash(); + }; + + + struct RTCDataChannelStats : RTCStats + { + [getter] + string label; + [getter] + string protocol; + [getter] + long dataChannelId; + [getter] + RTCDataChannelState state; + [getter] + unsigned long messagesSent; + [getter] + unsigned long long bytesSent; + [getter] + unsigned long messagesReceived; + [getter] + unsigned long long bytesReceived; + + [constructor, default] + void RTCDataChannelStats(); + [constructor, altname(RTCDataChannelStatsClone)] + void RTCDataChannelStats(RTCDataChannelStats source); + [constructor, default, altname(RTCDataChannelStatsWithJson)] + void RTCDataChannelStats(Json json); + + [static] + RTCDataChannelStats convert(RTCStats stat); + + Json toJson(); + string hash(); + }; + + + struct RTCIceGathererStats : RTCStats + { + [getter] + unsigned long long bytesSent; + [getter] + unsigned long long bytesReceived; + [getter] + string rtcpGathererStatsId; + + [constructor, default] + void RTCIceGathererStats(); + [constructor, altname(RTCIceGathererStatsClone)] + void RTCIceGathererStats(RTCIceGathererStats source); + [constructor, default, altname(RTCIceGathererStatsWithJson)] + void RTCIceGathererStats(Json json); + + [static] + RTCIceGathererStats convert(RTCStats stat); + + Json toJson(); + string hash(); + }; + + struct RTCIceTransportStats : RTCStats + { + [getter] + unsigned long long bytesSent; + [getter] + unsigned long long bytesReceived; + [getter] + string rtcpTransportStatsId; + [getter] + bool activeConnection; + [getter] + string selectedCandidatePairId; + + [constructor, default] + void RTCIceTransportStats(); + [constructor, altname(RTCIceTransportStatsClone)] + void RTCIceTransportStats(constRTCIceTransportStats source); + [constructor, default, altname(RTCIceTransportStatsWithJson)] + void RTCIceTransportStats(Json json); + + [static] + RTCIceTransportStats convert(RTCStats stat); + + Json toJson(); + string hash(); + }; + + struct RTCDtlsTransportStats : RTCStats + { + [getter] + string localCertificateId; + [getter] + string remoteCertificateId; + + [constructor, default] + void RTCDtlsTransportStats(); + [constructor, altname(RTCDtlsTransportStatsClone)] + void RTCDtlsTransportStats(RTCDtlsTransportStats source); + [constructor, default, altname(RTCDtlsTransportStatsWithJson)] + void RTCDtlsTransportStats(Json json); + + [static] + RTCDtlsTransportStats convert(RTCStats stat); + }; + + struct RTCSrtpTransportStats : RTCStats + { + [constructor, default] + void RTCSrtpTransportStats(); + [constructor, altname(RTCSrtpTransportStatsClone)] + void RTCSrtpTransportStats(RTCDtlsTransportStats source); + [constructor, default, altname(RTCSrtpTransportStatsWithJson)] + void RTCSrtpTransportStats(Json json); + + [static] + RTCDtlsTransportStats convert(RTCStats stat); + }; + + struct RTCIceCandidateAttributes : RTCStats + { + [getter] + string relatedId; + [getter] + string ipAddress; + [getter] + unsigned long portNumber; + [getter] + string transport; + [getter] + RTCIceCandidateType candidateType; + [getter] + unsigned long priority; + [getter] + string addressSourceUrl; + + [constructor, default] + void RTCIceCandidateAttributes(); + [constructor, altname(RTCIceCandidateAttributesClone)] + void RTCIceCandidateAttributes(RTCIceCandidateAttributes source); + [constructor, default, altname(RTCIceCandidateAttributesWithJson)] + void RTCIceCandidateAttributes(Json json); + + [static] + RTCIceCandidateAttributes convert(RTCStats stat); + }; + + struct RTCIceCandidatePairStats : RTCStats + { + [getter] + string transportId; + [getter] + string localCandidateId; + [getter] + string remoteCandidateId; + [getter] + RTCIceCandidatePairState state; + [getter] + unsigned long long priority; + [getter] + bool nominated; + [getter] + bool writable; + [getter] + bool readable; + [getter] + unsigned long long bytesSent; + [getter] + unsigned long long bytesReceived; + [getter] + double roundTripTime; + [getter] + double availableOutgoingBitrate; + [getter] + double availableIncomingBitrate; + + [constructor, default] + void RTCIceCandidatePairStats(); + [constructor, altname(RTCIceCandidatePairStatsClone)] + void RTCIceCandidatePairStats(RTCIceCandidatePairStats source); + [constructor, default, altname(RTCIceCandidatePairStatsWithJson)] + void RTCIceCandidatePairStats(Json json); + + [static] + RTCIceCandidatePairStats convert(RTCStats stat); + }; + + + struct RTCCertificateStats : RTCStats + { + [getter] + string fingerprint; + [getter] + string fingerprintAlgorithm; + [getter] + string base64Certificate; + [getter] + string issuerCertificateId; + + [constructor, default] + void RTCCertificateStats(); + [constructor, altname(RTCCertificateStatsClone)] + void RTCCertificateStats(RTCCertificateStats source); + [constructor, default, altname(RTCCertificateStatsWithJson)] + void RTCCertificateStats(Json json); + + [static] + RTCCertificateStats convert(RTCStats stat); + }; + + interaction RTCStatsReport + { + typedef StringList IdList; + + [getter] + puid id; + + IdList getStatesIds(); + RTCStats getStats(string id); + }; + } +} diff --git a/ortc/idl/adapter/MediaStream.idl b/ortc/idl/adapter/MediaStream.idl new file mode 100644 index 00000000..0663aeac --- /dev/null +++ b/ortc/idl/adapter/MediaStream.idl @@ -0,0 +1,75 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + namespace adapter + { + interface MediaStream : RTCStatsProvider + { + typedef std::list MediaStreamTrackList; + + [constructor, default] + void MediaStream(); + [constructor, altname(MediaStreamClone)] + void MediaStream(MediaStream source); + [constructor, default, altname(MediaStreamWithTracks)] + void MediaStream(MediaStreamTrackList tracks); + + [getter] + puid id; + + [getter] + bool active; + + MediaStreamTrackList getAudioTracks(); + MediaStreamTrackList getVideoTracks(); + MediaStreamTrack getTrackById(string id); + + [getter] + size_t count; + + void addTrack(MediaStreamTrack track); + void removeTrack(MediaStreamTrack track); + + MediaStream clone(); + + [event] + void onAddTrack(MediaStreamTrack track); + [event] + void onRemoteTrack(MediaStreamTrack track); + }; + + } + } +} diff --git a/ortc/idl/adapter/PeerConnection.idl b/ortc/idl/adapter/PeerConnection.idl new file mode 100644 index 00000000..37238a4e --- /dev/null +++ b/ortc/idl/adapter/PeerConnection.idl @@ -0,0 +1,235 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + namespace adapter + { + [dictionary] + struct RTCConfiguration + { + typedef std::list CertificateList; + + RTCIceGathererOptions gatherOptions; + RTCPeerConnectionSignalingMode signalingMode = json; + bool negotiateSrtpSdes; + + RTCBundlePolicy bundlePolicy = balanced; + RTCRtcpMuxPolicy rtcpMuxPolicy = required; + CertificateList certificates; + size_t iceCandidatePoolSize; + + [constructor, default] + void RTCConfiguration(); + [constructor, altname(RTCConfigurationClone)] + void RTCConfiguration(RTCConfiguration source); + }; + + [dictionary] + struct RTCOfferAnswerOptions + { + bool voiceActivityDetection = true; + }; + + [dictionary] + struct RTCOfferOptions : RTCOfferAnswerOptions + { + bool iceRestart; + }; + + [dictionary] + struct RTCAnswerOptions : RTCOfferAnswerOptions + { + }; + + [dictionary] + struct RTCCapabilityOptions : RTCOfferAnswerOptions + { + }; + + [dictionary] + struct RTCMediaStreamTrackConfiguration + { + RTCRtpCapabilities capabilities; + RTCRtpParameters parameters; + + [constructor, default] + void RTCMediaStreamTrackConfiguration(); + [constructor, altname(RTCMediaStreamTrackConfigurationClone)] + void RTCMediaStreamTrackConfiguration(RTCMediaStreamTrackConfiguration source); + }; + + interface RTCPeerConnectionIceErrorEvent + { + string mid; + [optional] + unsigned short mLineIndex; + + RTCIceCandidate hostCandidate; + string url; + [optional] + uint16 errorCode; + string errorText; + }; + + struct RTCPeerConnectionIceEvent + { + RTCIceCandidate candidate; + string uri; + }; + + struct RTCPeerConnectionIceCompleteEvent + { + RTCIceCandidateComplete candidate; + }; + + struct RTCTrackEvent + { + typedef std::list MediaStreamList; + + RTCRtpReceiver receiver; + MediaStreamTrack track; + MediaStreamList mediaStreams; + }; + + interface RTCPeerConnection : RTCStatsProvider + { + typedef PromiseWith PromiseWithDescription; + typedef std::list ServerList; + typedef std::list SenderList; + typedef std::list ReceiverList; + typedef PromiseWith PromiseWithSender; + typedef PromiseWith PromiseWithDataChannel; + + [constructor] + void RTCPeerConnection([optional] RTCConfiguration configuration); + + PromiseWithDescription createOffer([optional] RTCOfferOptions options); + PromiseWithDescription createAnswer([optional] RTCAnswerOptions options); + + PromiseWithDescription createCapabilities([optional] RTCCapabilityOptions options); + + Promise setLocalDescription(RTCSessionDescription description); + + [getter] + RTCSessionDescription localDescription; + [getter] + RTCSessionDescription currentDescription; + [getter] + RTCSessionDescription pendingDescription; + + Promise setRemoteDescription(RTCSessionDescription description); + [getter] + RTCSessionDescription remoteDescription; + [getter] + RTCSessionDescription currentRemoteDescription; + [getter] + RTCSessionDescription pendingRemoteDescription; + void addICECandidate([dynamic] RTCIceGathererCandidate candidate); + + [getter] + RTCSignalingState signalingState; + [getter] + RTCIceGathererState iceGatheringState; + + [getter] + RTCIceConnectionState iceConnectionState; + [getter] + RTCPeerConnectionState connectionState; + [getter] + bool canTrickleCandidates; + + ServerList getDefaultIceServers(); + + RTCConfiguration getConfiguration(); + void setConfiguration(RTCConfiguration config); + + void close(); + + SenderList getSenders(); + ReceiverList getReceivers(); + + [default] + PromiseWithSender addTrack( + MediaStreamTrack track, + [optional] + RTCMediaStreamTrackConfiguration config + ); + [altname(addTrackWithStreams)] + PromiseWithSender addTrack( + MediaStreamTrack track, + MediaStreamList mediaStreams, + [optional] + RTCMediaStreamTrackConfiguration config + ); + + void removeTrack(RTCRtpSender sender); + + PromiseWithDataChannel createDataChannel(RTCDataChannelParameters parameters); + + [event] + void onNegotiationNeeded(); + + [event] + void onIceCandidate(RTCPeerConnectionIceEvent event); + + [event] + void onIceCandidateComplete(RTCPeerConnectionIceCompleteEvent event); + + [event] + void onIceCandidateError(RTCPeerConnectionIceErrorEvent event); + + [event] + void onSignalingStateChange(); + + [event] + void onIceConnectionStateChange(); + + [event] + void onIceGatheringStateChange(); + + [event] + void onConnectionStateChange(); + + [event] + void onTrack(RTCTrackEvent event); + + [event] + void onTrackGone(RTCTrackEvent event); + + [event] + void onDataChannel(RTCDataChannelEvent event); + }; + } + } +} diff --git a/ortc/idl/adapter/SessionDescription.idl b/ortc/idl/adapter/SessionDescription.idl new file mode 100644 index 00000000..466f7f0d --- /dev/null +++ b/ortc/idl/adapter/SessionDescription.idl @@ -0,0 +1,334 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + namespace adapter + { + [dictionary] + struct RTCSessionDescriptionConnectionDataDetails + { + [optional] + uint16 port; + string netType; + string addrType; + string connectionAddress; + + [constructor, default] + void RTCSessionDescriptionConnectionDataDetails(); + [constructor, altname(RTCSessionDescriptionConnectionDataDetailsClone)] + void RTCSessionDescriptionConnectionDataDetails(RTCSessionDescriptionConnectionDataDetails source); + [constructor, default, altname(RTCSessionDescriptionConnectionDataDetailsWithJson)] + void RTCSessionDescriptionConnectionDataDetails(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionConnectionData + { + RTCSessionDescriptionConnectionDataDetails rtp; + RTCSessionDescriptionConnectionDataDetails rtcp; + + [constructor, default] + void RTCSessionDescriptionConnectionData(); + [constructor, altname(RTCSessionDescriptionConnectionDataClone)] + void RTCSessionDescriptionConnectionData(RTCSessionDescriptionConnectionData source); + [constructor, default, altname(RTCSessionDescriptionConnectionDataWithJson)] + void RTCSessionDescriptionConnectionData(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionTransportParameters + { + typedef std::list CandidateList; + + RTCIceParameters iceParameters; + RTCDtlsParameters dtlsParameters; + RTCSrtpSdesParameters srtpSdesParameters; + CandidateList mICECandidates; + bool mEndOfCandidates; + + [constructor, default] + void RTCSessionDescriptionTransportParameters(); + [constructor, altname(RTCSessionDescriptionTransportParametersClone)] + void RTCSessionDescriptionTransportParameters(RTCSessionDescriptionTransportParameters source); + [constructor, default, altname(RTCSessionDescriptionTransportParametersWithJson)] + void RTCSessionDescriptionTransportParameters(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionTransport + { + string transportId; + RTCSessionDescriptionTransportParameters rtp; + RTCSessionDescriptionTransportParameters rtcp; + bool useMux; + + [constructor, default] + void RTCSessionDescriptionTransport(); + [constructor, altname(RTCSessionDescriptionTransportClone)] + void RTCSessionDescriptionTransport(RTCSessionDescriptionTransport source); + [constructor, default, altname(RTCSessionDescriptionTransportWithJson)] + void RTCSessionDescriptionTransport(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionMediaLineDetails + { + size_t internalIndex; + string privateTransportID; + + string protocol; + + RTCSessionDescriptionConnectionData connectionData; + RTCSessionDescriptionMediaDirection mediaDirection = sendReceive; + + [constructor, default] + void RTCSessionDescriptionMediaLineDetails(); + [constructor, altname(RTCSessionDescriptionMediaLineDetailsClone)] + void RTCSessionDescriptionMediaLineDetails(RTCSessionDescriptionMediaLineDetails source); + [constructor, default, altname(RTCSessionDescriptionMediaLineDetailsWithJson)] + void RTCSessionDescriptionMediaLineDetails(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionMediaLine + { + string id; + string transportId; + + string mediaType; + RTCSessionDescriptionMediaLineDetails details; + + [constructor, default] + void RTCSessionDescriptionMediaLine(); + [constructor, altname(RTCSessionDescriptionMediaLineClone)] + void RTCSessionDescriptionMediaLine(RTCSessionDescriptionMediaLine source); + [constructor, default, altname(RTCSessionDescriptionMediaLineWithJson)] + void RTCSessionDescriptionMediaLine(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionRtpMediaLine : RTCSessionDescriptionMediaLine + { + RTCRtpCapabilities senderCapabilities; + RTCRtpCapabilities receiverCapabilities; + + [constructor, default] + void RTCSessionDescriptionRtpMediaLine(); + [constructor, altname(RTCSessionDescriptionRtpMediaLineClone)] + void RTCSessionDescriptionRtpMediaLine(RTCSessionDescriptionRtpMediaLine source); + [constructor, default, altname(RTCSessionDescriptionRtpMediaLineWithJson)] + void RTCSessionDescriptionRtpMediaLine(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionSctpMediaLine : RTCSessionDescriptionMediaLine + { + RTCSctpCapabilities capabilities; + [optional] + uint16 port; + + [constructor, default] + void RTCSessionDescriptionSctpMediaLine(); + [constructor, altname(RTCSessionDescriptionSctpMediaLineClone)] + void RTCSessionDescriptionSctpMediaLine(RTCSessionDescriptionSctpMediaLine source); + [constructor, default, altname(RTCSessionDescriptionSctpMediaLineWithJson)] + void RTCSessionDescriptionSctpMediaLine(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionRtpSenderDetails + { + [optional] + size_t internalRtpMediaLineIndex; + + [constructor, default] + void RTCSessionDescriptionRtpSenderDetails(); + [constructor, altname(RTCSessionDescriptionRtpSenderDetailsClone)] + void RTCSessionDescriptionRtpSenderDetails(RTCSessionDescriptionRtpSenderDetails source); + [constructor, default, altname(RTCSessionDescriptionRtpSenderDetailsWithJson)] + void RTCSessionDescriptionRtpSenderDetails(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionRtpSender + { + typedef string MediaStreamId; + typedef std::set MediaStreamSet; + + string id; + RTCSessionDescriptionRtpSenderDetails details; + string rtpMediaLineId; + RTCRtpParameters parameters; + string mediaStreamTrackId; + MediaStreamSet mediaStreamIds; + + [constructor, default] + void RTCSessionDescriptionRtpSender(); + [constructor, altname(RTCSessionDescriptionRtpSenderClone)] + void RTCSessionDescriptionRtpSender(RTCSessionDescriptionRtpSender source); + [constructor, default, altname(RTCSessionDescriptionRtpSenderWithJson)] + void RTCSessionDescriptionRtpSender(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCIceCandidate + { + string mid; + [optional] + size_t mLineIndex; + RTCIceGatherCandidate candidate; + + [constructor, default] + void RTCIceCandidate(); + [constructor, altname(RTCIceCandidateClone)] + void RTCIceCandidate(RTCIceCandidate source); + [constructor, default, altname(RTCIceCandidateWithJson)] + void RTCIceCandidate(Json json); + [constructor, default, altname(RTCIceCandidateWithSdp)] + void RTCIceCandidate(string sdp); + + Json toJson(); + string toSdp(); + + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionDescriptionDetails + { + string username = "-"; + unsigned long long sessionId; + unsigned long long sessionVersion; + RTCSessionDescriptionConnectionDataDetails unicaseAddress; + string sessionName; + uint64 startTime; + uint64 endTime; + RTCSessionDescriptionConnectionData connectionData; // optional; can be null; + + [constructor, default] + void RTCSessionDescriptionDescriptionDetails(); + [constructor, altname(RTCSessionDescriptionDescriptionDetailsClone)] + void RTCSessionDescriptionDescriptionDetails(RTCSessionDescriptionDescriptionDetails source); + [constructor, default, altname(RTCSessionDescriptionDescriptionDetailsWithJson)] + void RTCSessionDescriptionDescriptionDetails(Json json); + + Json toJson(); + string hash(); + }; + + [dictionary] + struct RTCSessionDescriptionDescription + { + typedef std::list TransportList; + typedef std::list RtpMediaList; + typedef std::list SctpMediaList; + typedef std::list RtpSenderList; + + RTCSessionDescriptionDescriptionDetails details; + + TransportList transports; + RtpMediaList rtpMediaLines; + SctpMediaList sctpMediaLines; + RtpSenderList rtpSenders; + + [constructor, default] + void RTCSessionDescriptionDescription(); + [constructor, altname(RTCSessionDescriptionDescriptionClone)] + void RTCSessionDescriptionDescription(RTCSessionDescriptionDescription source); + [constructor, default, altname(RTCSessionDescriptionDescriptionWithJson)] + void RTCSessionDescriptionDescription(Json json); + + Json toJson(); + string hash(); + }; + + interface RTCSessionDescription + { + [constructor, default, altname(RTCSessionDescriptionWithString)] + void RTCSessionDescription( + RTCSessionDescriptionSignalingType type, + string description + ); + + [constructor, altname(RTCSessionDescriptionWithDescription)] + void RTCSessionDescription( + RTCSessionDescriptionSignalingType type, + RTCSessionDescriptionDescription description + ); + + [getter] + puid id; + + [getter] + RTCSessionDescriptionSignalingType type; + + [getter] + RTCSessionDescriptionDescription description; + + [getter] + string formattedDescription; + }; + } + } +} diff --git a/ortc/idl/adapter/enums.idl b/ortc/idl/adapter/enums.idl new file mode 100644 index 00000000..f08a306f --- /dev/null +++ b/ortc/idl/adapter/enums.idl @@ -0,0 +1,129 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + namespace adapter + { + enum RTCSdpType + { + sdpOffer, + sdpPranser, + sdpAnswer, + sdpRollback, + }; + + enum RTCSessionDescriptionSignalingType + { + json, + sdpOffer, + sdpPranser, + sdpAnswer, + sdpRollback, + }; + + enum RTCSessionDescriptionMediaType + { + unknown, + audio, + video, + text, + application, + }; + + enum RTCSessionDescriptionMediaDirection + { + sendReceive, + sendOnly, + receiveOnly, + inactive, + }; + + + enum RTCBundlePolicy + { + balanced, + maxCompat, + maxBundle, + }; + + + enum RTCRtcpMuxPolicy + { + negotiated, + require, + }; + + + enum RTCPeerConnectionSignalingMode + { + json, + sdp, + }; + + + enum RTCSignalingState + { + stable, + haveLocalOffer, + haveRemoteOffer, + haveLocalPranswer, + haveRemotePranswer, + closed, + }; + + enum RTCIceConnectionState + { + new, + checking, + connected, + completed, + disconnected, + failed, + closed, + }; + + enum RTCPeerConnectionState + { + new, + connecting, + connected, + disconnected, + failed, + closed, + }; + + } + + } +} diff --git a/ortc/idl/config.json b/ortc/idl/config.json index bee07990..2eed984a 100644 --- a/ortc/idl/config.json +++ b/ortc/idl/config.json @@ -18,10 +18,37 @@ "include": [ "../../../zsLib/zsLib/idl/config.json" ] - } + }, "sources": { "source": [ - "Ortc.idl" + "Ortc.idl", + "error.idl", + "enums.idl", + "Capabilities.idl", + "Certificate.idl", + "Constraints.idl", + "StatsReport.idl", + "StatsProvider.idl", + "DataChannel.idl", + "IceTypes.idl", + "IceGatherer.idl", + "IceTransport.idl", + "IceTransportController.idl", + "DtlsTransport.idl", + "Identity.idl", + "MediaStreamTrack.idl", + "MediaDevices.idl", + "RtpTypes.idl", + "RtpListener.idl", + "RtpReceiver.idl", + "RtpSender.idl", + "DtmfSender.idl", + "SctpTransport.idl", + "SrtpSdesTransport.idl", + "adapter/enums.idl", + "adapter/SessionDescription.idl", + "adapter/MediaStream.idl", + "adapter/PeerConnection.idl" ] } } diff --git a/ortc/idl/enums.idl b/ortc/idl/enums.idl new file mode 100644 index 00000000..1a28d823 --- /dev/null +++ b/ortc/idl/enums.idl @@ -0,0 +1,250 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + enum RTCDataChannelState + { + connecting, + open, + closing, + closed, + }; + + enum RTCSctpTransportState + { + new, + connecting, + connected, + closed, + }; + + enum RTCIceRole + { + controlling, + controlled, + }; + + enum RTCIceComponent + { + rtp, + rtcp, + }; + + enum RTCIceProtocol + { + udp, + tcp, + }; + + enum RTCIceCandidateType + { + host, + srflex, + prflx, + relay, + }; + + enum RTCIceTcpCandidateType + { + active, + passive, + so, + }; + + + enum RTCIceGathererState + { + new, + gathering, + complete, + closed, + }; + + enum RTCIceGathererFilterPolicy : uint64 + { + none = 0, + noIPv4Host = 0x00000001, + noIPv4Srflx = 0x00000002, + noIPv4Prflx = 0x00000004, + noIPv4Relay = 0x00000008, + noIPv4Private = 0x00000010, + noIPv4 = 0x000000FF, + noIPv6Host = 0x00000100, + noIPv6Srflx = 0x00000200, + noIPv6Prflx = 0x00000400, + noIPv6Relay = 0x00000800, + noIPv6Private = 0x00001000, + noIPv6Tunnel = 0x00002000, + noIPv6Permanent = 0x00004000, + noIPv6 = 0x0000FF00, + noHost = 0x00000101, + noSrflx = 0x00000202, + noPrflx = 0x00000404, + noRelay = 0x00000808, + noPrivate = 0x00001010, + relayOnly = 0x00000707, + noCandidates = 0x7FFFFFFF, + }; + + enum RTCIceCredentialType + { + password, + token, + }; + + enum RTCIceTransportState + { + new, + checking, + connected, + completed, + disconnected, + failed, + closed, + }; + + enum RTCDataChannelState + { + connecting, + open, + closing, + closed, + }; + + enum RTCDtlsTransportState + { + new, + connecting, + connected, + closed, + failed, + }; + + enum RTCDtlsRole + { + auto, + client, + server, + }; + + enum RTCStatsType + { + inboundRTP, + outboundRTP, + codec, + sctpTransport, + dataChannel, + stream, + track, + iceGatherer, + iceTransport, + dtlsTransport, + srtpTransport, + certificate, + candidate, + candidatePair, + localCandidate, + remoteCandidate, + }; + + enum RTCIceCandidatePairState + { + frozen, + waiting, + inProgress, + failed, + succeeded, + cancelled, + }; + + enum MediaStreamTrackKind + { + audio, + video + }; + + enum MediaStreamTrackState + { + live, + ended, + }; + + enum MediaDeviceKind + { + audioInput, + audioOutput, + videoInput, + }; + + + enum RTCRtpDegradationPreference + { + maintainFramerate, + maintainResolution, + balanced, + }; + + enum RTCRtpPriorityType + { + veryLow, + low, + medium, + high, + }; + + enum RTCRtpOpusCodecCapabilityOptionsSignal + { + auto, + music, + voice, + }; + + + enum RTCRtpOpusCodecCapabilityOptionsApplication + { + voip, + audio, + lowDelay, + }; + + enum RTCRtpFlexFecCodecCapabilityParametersToP + { + n1DInterleavedFEC = 0, + n1DNonInterleavedFEC = 1, + n2DParityFEEC = 2, + reserved = 3, + }; + + } +} diff --git a/ortc/idl/error.idl b/ortc/idl/error.idl new file mode 100644 index 00000000..18a49160 --- /dev/null +++ b/ortc/idl/error.idl @@ -0,0 +1,50 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [dictionary] + struct Error + { + uint16 errorCode; + string name; + string reason; + }; + + interface ErrorEvent + { + [getter] + Error error; + }; + } +} diff --git a/ortc/internal/ortc_Identity.h b/ortc/internal/ortc_Identity.h index 15037728..5480409a 100644 --- a/ortc/internal/ortc_Identity.h +++ b/ortc/internal/ortc_Identity.h @@ -106,7 +106,7 @@ namespace ortc virtual PromiseWithResultPtr getIdentityAssertion( const char *provider, - const char *protoocl = "default", + const char *protoocol = "default", const char *username = NULL ) throw (InvalidStateError) override; diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj b/projects/msvs/ortclib.Universal/ortclib.vcxproj index 420dae5e..a69363f7 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj @@ -46,7 +46,14 @@ - + + true + true + true + true + true + true + @@ -118,6 +125,14 @@ + + true + true + true + true + true + true + @@ -182,6 +197,224 @@ + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + {83e6cc72-ebc5-4c0c-b6a6-2d67a3c1e8a9} StaticLibrary diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters index 6703ba30..7b7d1025 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters @@ -22,6 +22,9 @@ {9ceab807-59c7-48a2-b3e6-101f52afbe9e} + + {77c8ce93-8bbf-4b4a-92ba-49bf839a7dd9} + @@ -323,6 +326,9 @@ ortc\internal + + ortc\idl + @@ -479,4 +485,87 @@ ortc\adapter\cpp + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl\adapter + + + ortc\idl\adapter + + + ortc\idl\adapter + + + ortc\idl\adapter + + \ No newline at end of file From 19d65e2bfe6249ca92ca36b44bfb07adcc32b985 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 11 Feb 2017 01:28:37 -0500 Subject: [PATCH 003/187] - fixed IDL types for ORTC Lib --- ortc/idl/DataChannel.idl | 10 +- ortc/idl/DtlsTransport.idl | 6 + ortc/idl/IceGatherer.idl | 4 +- ortc/idl/IceTransport.idl | 4 +- ortc/idl/IceTypes.idl | 12 +- ortc/idl/MediaStreamTrack.idl | 2 +- ortc/idl/Ortc.idl | 10 +- ortc/idl/RtpReceiver.idl | 2 +- ortc/idl/RtpSender.idl | 8 +- ortc/idl/RtpTypes.idl | 10 +- ortc/idl/SctpTransport.idl | 2 +- ortc/idl/StatsReport.idl | 10 +- ortc/idl/adapter/PeerConnection.idl | 1 + ortc/idl/adapter/SessionDescription.idl | 2 +- ortc/idl/winuwp.json | 9 ++ ortc/idl/wrapper/wrapper_Ortc.cpp | 122 ++++++++++++++++++ .../msvs/ortclib.Universal/ortclib.vcxproj | 11 ++ .../ortclib.Universal/ortclib.vcxproj.filters | 18 +++ 18 files changed, 205 insertions(+), 38 deletions(-) create mode 100644 ortc/idl/winuwp.json create mode 100644 ortc/idl/wrapper/wrapper_Ortc.cpp diff --git a/ortc/idl/DataChannel.idl b/ortc/idl/DataChannel.idl index b914d55d..fad9dbe2 100644 --- a/ortc/idl/DataChannel.idl +++ b/ortc/idl/DataChannel.idl @@ -50,11 +50,11 @@ namespace org uint16 id; [constructor, default] - void Parameters(); - [constructor, altname(ParametersClone)] - void Parameters(Parameters source); - [constructor, default, altname(ParametersWithJson)] - void Parameters(Json json); + void RTCDataChannelParameters(); + [constructor, altname(RTCDataChannelParametersClone)] + void RTCDataChannelParameters(RTCDataChannelParameters source); + [constructor, default, altname(RTCDataChannelParametersWithJson)] + void RTCDataChannelParameters(Json json); Json toJson(); string hash(); diff --git a/ortc/idl/DtlsTransport.idl b/ortc/idl/DtlsTransport.idl index f5359db3..bf25e98c 100644 --- a/ortc/idl/DtlsTransport.idl +++ b/ortc/idl/DtlsTransport.idl @@ -66,6 +66,12 @@ namespace org { typedef std::list CertificateList; + [constructor] + void RTCDtlsTransport( + RTCIceTransport iceTransport, + CertificateList certificates + ); + [getter] puid id; diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index 455b81cd..4f1a11ec 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -84,7 +84,7 @@ namespace org [constructor, altname(RTCIceGathererOptionsClone)] void RTCIceGathererOptions(RTCIceGathererOptions source); [constructor, default, altname(RTCIceGathererOptionsWithJson)] - void RTCIceGathererOptions(ElementPtr elem); + void RTCIceGathererOptions(Json json); Json toJson(); string hash(); @@ -144,7 +144,7 @@ namespace org void gather( [optional] - RTCIceGathererEvent options + RTCIceGathererOptions options ); void close(); diff --git a/ortc/idl/IceTransport.idl b/ortc/idl/IceTransport.idl index 6b36afe0..3dbbc9f3 100644 --- a/ortc/idl/IceTransport.idl +++ b/ortc/idl/IceTransport.idl @@ -87,9 +87,9 @@ namespace org RTCIceTransport createAssociatedTransport(); - void addRemoteCandidate(RTCIceCanddiate remoteCandidate) throws (InvalidStateError, InvalidParameters); + void addRemoteCandidate(RTCIceCandidate remoteCandidate) throws (InvalidStateError, InvalidParameters); void setRemoteCandidates(CandidateList remoteCandidates) throws (InvalidStateError, InvalidParameters); - void removeRemoteCandidate(RTCGatherCandidate remoteCandidate) throws (InvalidStateError, InvalidParameters); + void removeRemoteCandidate(RTCIceGathererCandidate remoteCandidate) throws (InvalidStateError, InvalidParameters); void keepWarm( RTCIceCandidatePair candidatePair, diff --git a/ortc/idl/IceTypes.idl b/ortc/idl/IceTypes.idl index 45975435..e342b61c 100644 --- a/ortc/idl/IceTypes.idl +++ b/ortc/idl/IceTypes.idl @@ -33,16 +33,16 @@ namespace org { namespace ortc { - struct RTCIceGatherCandidate + struct RTCIceGathererCandidate { [getter] RTCIceComponent component; [static, default] - RTCIceGatherCandidate create(Json json); + RTCIceGathererCandidate create(Json json); }; - struct RTCIceCandidate : RTCIceGatherCandidate + struct RTCIceCandidate : RTCIceGathererCandidate { [getter] string interfaceType; @@ -68,19 +68,19 @@ namespace org uint16 relatedPort; [static] - RTCIceCandidate convert(RTCIceGatherCandidate candidate); + RTCIceCandidate convert(RTCIceGathererCandidate candidate); Json toJson(); string hash(); }; - struct RTCIceCandidateComplete : RTCIceGatherCandidate + struct RTCIceCandidateComplete : RTCIceGathererCandidate { [getter] bool complete; [static] - RTCIceCandidateComplete convert(RTCIceGatherCandidate candidate); + RTCIceCandidateComplete convert(RTCIceGathererCandidate candidate); Json toJson(); string hash(); diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index 7531afda..ffaec0d2 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -108,7 +108,7 @@ namespace org [constructor, default] void MediaTrackSettings(); [constructor, altname(MediaTrackSettingsClone)] - void MediaTrackSettings(MediaStreamTrackSettings source); + void MediaTrackSettings(MediaTrackSettings source); [constructor, default, altname(MediaTrackSettingsWithJson)] void MediaTrackSettings(Json json); diff --git a/ortc/idl/Ortc.idl b/ortc/idl/Ortc.idl index 4cbc61ea..b26a2cfc 100644 --- a/ortc/idl/Ortc.idl +++ b/ortc/idl/Ortc.idl @@ -34,7 +34,7 @@ namespace org namespace ortc { using namespace zs; - using namespace zs::Log; + using namespace zs::log; typedef zs::exceptions::InvalidParameters InvalidParameters; typedef zs::exceptions::InvalidState InvalidStateError; @@ -42,7 +42,7 @@ namespace org typedef zs::exceptions::NotImplemented NotImplemented; typedef zs::exceptions::Unexpected Unexpected; - //!EXCLUSIVE WINRT + //!EXCLUSIVE WINUWP struct Dispatcher {}; //!EXCLUSIVE x @@ -51,7 +51,7 @@ namespace org [constructor, altname(OrtcWithQueue)] void Ortc(MessageQueue queue); - //!EXCLUSIVE WINRT + //!EXCLUSIVE WINUWP [constructor, default, altname(OrtcWithDispatcher)] void Ortc(Dispatcher dispatcher); //!EXCLUSIVE x @@ -70,8 +70,8 @@ namespace org void startMediaTracing(); void stopMediaTracing(); bool isMediaTracing(); - bool saveMediaTrace(String filename); - bool saveMediaTrace(String host, int port); + bool saveMediaTrace(string filename); + bool saveMediaTrace(string host, int port); }; } } diff --git a/ortc/idl/RtpReceiver.idl b/ortc/idl/RtpReceiver.idl index 4231ad5d..9810087a 100644 --- a/ortc/idl/RtpReceiver.idl +++ b/ortc/idl/RtpReceiver.idl @@ -78,7 +78,7 @@ namespace org RTCRtpTransport rtcpTransport; void setTransport( - RTCRtpTransportPtr transport, + RTCRtpTransport transport, [optional] RTCRtcpTransport rtcpTransport ); diff --git a/ortc/idl/RtpSender.idl b/ortc/idl/RtpSender.idl index ee07367d..25407aaf 100644 --- a/ortc/idl/RtpSender.idl +++ b/ortc/idl/RtpSender.idl @@ -43,10 +43,10 @@ namespace org { [constructor] void RTCRtpSender( - MediaStreamTrackPtr track, - RTCRtpTransportPtr transport, + MediaStreamTrack track, + RTCRtpTransport transport, [optional] - RTCRtcpTransportPtr rtcpTransport + RTCRtcpTransport rtcpTransport ); [getter] @@ -64,7 +64,7 @@ namespace org void setTransport( RTCRtpTransport transport, [optional] - RTCIRtcpTransport rtcpTransport + RTCRtcpTransport rtcpTransport ); zs::Promise setTrack(MediaStreamTrack track); diff --git a/ortc/idl/RtpTypes.idl b/ortc/idl/RtpTypes.idl index df123c7e..33023a68 100644 --- a/ortc/idl/RtpTypes.idl +++ b/ortc/idl/RtpTypes.idl @@ -492,11 +492,11 @@ namespace org bool sPropStereo; [constructor, default] - void RTCRtpOpusCodecParametersSettings(); - [constructor, altname(RTCRtpOpusCodecParametersSettingsClone)] - void RTCRtpOpusCodecParametersSettings(RTCRtpOpusCodecParametersSettings source); - [constructor, default, altname(RTCRtpOpusCodecParametersSettingsWithJson)] - void RTCRtpOpusCodecParametersSettings(Json json); + void RTCRtpOpusCodecParameterSettings(); + [constructor, altname(RTCRtpOpusCodecParameterSettingsClone)] + void RTCRtpOpusCodecParameterSettings(RTCRtpOpusCodecParameterSettings source); + [constructor, default, altname(RTCRtpOpusCodecParameterSettingsWithJson)] + void RTCRtpOpusCodecParameterSettings(Json json); Json toJson(); string hash(); diff --git a/ortc/idl/SctpTransport.idl b/ortc/idl/SctpTransport.idl index ae42aaf1..2440a053 100644 --- a/ortc/idl/SctpTransport.idl +++ b/ortc/idl/SctpTransport.idl @@ -82,7 +82,7 @@ namespace org [static] RTCSctpTransportListener listen( RTCDtlsTransport transport, - RTCRtcpCapabilities remoteCapabilities + RTCSctpCapabilities remoteCapabilities ); [getter] diff --git a/ortc/idl/StatsReport.idl b/ortc/idl/StatsReport.idl index 048fc525..7d02e471 100644 --- a/ortc/idl/StatsReport.idl +++ b/ortc/idl/StatsReport.idl @@ -131,7 +131,7 @@ namespace org [constructor, default] void RTCCodec(); [constructor, altname(RTCCodecClone)] - void RTCCodec(Codec source); + void RTCCodec(RTCCodec source); [constructor, default, altname(RTCCodecWithJson)] void RTCCodec(Json json); @@ -210,9 +210,9 @@ namespace org [constructor, default] void RTCSctpTransportStats(); - [constructor, altname(RTCSCTPTransportStatsClone)] - void RTCSctpTransportStats(RTCSCTPTransportStats source); - [constructor, default, altname(RTCSCTPTransportStatsWithJson)] + [constructor, altname(RTCSctpTransportStatsClone)] + void RTCSctpTransportStats(RTCSctpTransportStats source); + [constructor, default, altname(RTCSctpTransportStatsWithJson)] void RTCSctpTransportStats(Json json); [static] @@ -363,7 +363,7 @@ namespace org [constructor, default] void RTCIceTransportStats(); [constructor, altname(RTCIceTransportStatsClone)] - void RTCIceTransportStats(constRTCIceTransportStats source); + void RTCIceTransportStats(RTCIceTransportStats source); [constructor, default, altname(RTCIceTransportStatsWithJson)] void RTCIceTransportStats(Json json); diff --git a/ortc/idl/adapter/PeerConnection.idl b/ortc/idl/adapter/PeerConnection.idl index 37238a4e..0627fe75 100644 --- a/ortc/idl/adapter/PeerConnection.idl +++ b/ortc/idl/adapter/PeerConnection.idl @@ -124,6 +124,7 @@ namespace org interface RTCPeerConnection : RTCStatsProvider { + typedef std::list MediaStreamList; typedef PromiseWith PromiseWithDescription; typedef std::list ServerList; typedef std::list SenderList; diff --git a/ortc/idl/adapter/SessionDescription.idl b/ortc/idl/adapter/SessionDescription.idl index 466f7f0d..43741cdd 100644 --- a/ortc/idl/adapter/SessionDescription.idl +++ b/ortc/idl/adapter/SessionDescription.idl @@ -237,7 +237,7 @@ namespace org string mid; [optional] size_t mLineIndex; - RTCIceGatherCandidate candidate; + RTCIceGathererCandidate candidate; [constructor, default] void RTCIceCandidate(); diff --git a/ortc/idl/winuwp.json b/ortc/idl/winuwp.json new file mode 100644 index 00000000..1c69fbf2 --- /dev/null +++ b/ortc/idl/winuwp.json @@ -0,0 +1,9 @@ +{ + "project": { + "exclusives": { + "exclusive": [ + "WINUWP" + ] + } + } +} diff --git a/ortc/idl/wrapper/wrapper_Ortc.cpp b/ortc/idl/wrapper/wrapper_Ortc.cpp new file mode 100644 index 00000000..6027300c --- /dev/null +++ b/ortc/idl/wrapper/wrapper_Ortc.cpp @@ -0,0 +1,122 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + + +#include +#include + +#include "generated/types.h" + +#if 0 +#include "generated/org_ortc_Ortc.h" + +using std::make_shared; + +namespace wrapper +{ + namespace org + { + namespace ortc + { + ZS_DECLARE_STRUCT_PTR(Ortc); + ZS_DECLARE_STRUCT_PTR(Dispatcher); + + namespace internal + { + struct Ortc : public wrapper::org::ortc::Ortc + { + Ortc(zs::MessageQueuePtr queue); + Ortc(DispatcherPtr queue); + + virtual zs::Milliseconds ntpServerTime() override + { + } + + virtual void ntpServerTime(zs::Milliseconds value) override + { + } + + virtual void setDefaultLogLevel(zs::log::Level level) override + { + } + + virtual void setLogLevel(String componenet, zs::log::Level level) override + { + } + + virtual void setDefaultEventingLevel(zs::log::Level level) override + { + } + + virtual void setEventingLevel(String componenet, zs::log::Level level) override + { + } + + virtual void startMediaTracing() override + { + } + + virtual void stopMediaTracing() override + { + } + + virtual bool isMediaTracing() override + { + return false; + } + + virtual bool saveMediaTrace(String filename) override + { + return false; + } + + virtual bool saveMediaTrace(String host, int port) override + { + return false; + } + }; + } + + OrtcPtr Ortc::Factory::create(zs::MessageQueuePtr queue) + { + return make_shared(queue); + } + + OrtcPtr Ortc::Factory::create(DispatcherPtr dispatcher) + { + return make_shared(dispatcher); + } + + } + } +} + +#endif //0 diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj b/projects/msvs/ortclib.Universal/ortclib.vcxproj index a69363f7..8cca6fcd 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj @@ -54,6 +54,8 @@ true true + + @@ -133,6 +135,14 @@ true true + + true + true + true + true + true + true + @@ -196,6 +206,7 @@ + diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters index 7b7d1025..637f7d70 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters @@ -25,6 +25,12 @@ {77c8ce93-8bbf-4b4a-92ba-49bf839a7dd9} + + {385b270f-970b-4f88-915a-a08906d1f7df} + + + {ac3399f1-dbcd-46e4-85a1-534b91fe13d8} + @@ -288,6 +294,12 @@ ortc\idl + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + @@ -329,6 +341,9 @@ ortc\idl + + ortc\idl + @@ -484,6 +499,9 @@ ortc\adapter\cpp + + ortc\idl\wrapper + From c40d791ea8a6ce9c040d7da744914d565867a261 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 11 Feb 2017 16:53:20 -0500 Subject: [PATCH 004/187] - removed bogus wrapper object --- ortc/idl/wrapper/wrapper_Ortc.cpp | 122 ------------------------------ 1 file changed, 122 deletions(-) delete mode 100644 ortc/idl/wrapper/wrapper_Ortc.cpp diff --git a/ortc/idl/wrapper/wrapper_Ortc.cpp b/ortc/idl/wrapper/wrapper_Ortc.cpp deleted file mode 100644 index 6027300c..00000000 --- a/ortc/idl/wrapper/wrapper_Ortc.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - - Copyright (c) 2017, Optical Tone Ltd. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - - -#include -#include - -#include "generated/types.h" - -#if 0 -#include "generated/org_ortc_Ortc.h" - -using std::make_shared; - -namespace wrapper -{ - namespace org - { - namespace ortc - { - ZS_DECLARE_STRUCT_PTR(Ortc); - ZS_DECLARE_STRUCT_PTR(Dispatcher); - - namespace internal - { - struct Ortc : public wrapper::org::ortc::Ortc - { - Ortc(zs::MessageQueuePtr queue); - Ortc(DispatcherPtr queue); - - virtual zs::Milliseconds ntpServerTime() override - { - } - - virtual void ntpServerTime(zs::Milliseconds value) override - { - } - - virtual void setDefaultLogLevel(zs::log::Level level) override - { - } - - virtual void setLogLevel(String componenet, zs::log::Level level) override - { - } - - virtual void setDefaultEventingLevel(zs::log::Level level) override - { - } - - virtual void setEventingLevel(String componenet, zs::log::Level level) override - { - } - - virtual void startMediaTracing() override - { - } - - virtual void stopMediaTracing() override - { - } - - virtual bool isMediaTracing() override - { - return false; - } - - virtual bool saveMediaTrace(String filename) override - { - return false; - } - - virtual bool saveMediaTrace(String host, int port) override - { - return false; - } - }; - } - - OrtcPtr Ortc::Factory::create(zs::MessageQueuePtr queue) - { - return make_shared(queue); - } - - OrtcPtr Ortc::Factory::create(DispatcherPtr dispatcher) - { - return make_shared(dispatcher); - } - - } - } -} - -#endif //0 From 2512e2a048f622590bdfd6f9034303503d291a8a Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 15 Feb 2017 19:47:59 -0500 Subject: [PATCH 005/187] - initial set of IDL CX generation routines created --- ortc/idl/error.idl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ortc/idl/error.idl b/ortc/idl/error.idl index 18a49160..47b6c5a6 100644 --- a/ortc/idl/error.idl +++ b/ortc/idl/error.idl @@ -41,6 +41,8 @@ namespace org string reason; }; + typedef zs::PromiseRejectionReason PromiseRejectionReason; + interface ErrorEvent { [getter] From 494da3fdba3684675883ddaa8d3ca626410db910 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 16 Feb 2017 13:28:20 -0500 Subject: [PATCH 006/187] - make ORTC object idl all static methods --- .gitignore | 1 + ortc/idl/Ortc.idl | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 3cda3e54..ab2e2394 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ ortc/internal/ortc.events_win_etw.man .vs/ ipch/ *.user +ortc/idl/wrapper/generated/ diff --git a/ortc/idl/Ortc.idl b/ortc/idl/Ortc.idl index b26a2cfc..cc2c625a 100644 --- a/ortc/idl/Ortc.idl +++ b/ortc/idl/Ortc.idl @@ -48,29 +48,38 @@ namespace org interface Ortc { - [constructor, altname(OrtcWithQueue)] - void Ortc(MessageQueue queue); + [static, altname(SetupWithQueue)] + void Setup(MessageQueue queue); //!EXCLUSIVE WINUWP - [constructor, default, altname(OrtcWithDispatcher)] - void Ortc(Dispatcher dispatcher); + [static, default, altname(SetupWithDispatcher)] + void Setup(Dispatcher dispatcher); //!EXCLUSIVE x - [altname(getNtpServerTime)] + [static, altname(getNtpServerTime)] Milliseconds ntpServerTime(); - [altname(setNtpServerTime)] + [static, altname(setNtpServerTime)] void ntpServerTime(Milliseconds value); + [static] void setDefaultLogLevel(Level level); + [static] void setLogLevel(string componenet, Level level); + [static] void setDefaultEventingLevel(Level level); + [static] void setEventingLevel(string componenet, Level level); + [static] void startMediaTracing(); + [static] void stopMediaTracing(); + [static] bool isMediaTracing(); + [static] bool saveMediaTrace(string filename); + [static] bool saveMediaTrace(string host, int port); }; } From dad1d21e7a44218af2cb91371ad360fbcb98f4fb Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 20 Feb 2017 11:28:24 -0500 Subject: [PATCH 007/187] - added settings and logger IDL - fixed verious IDL mistakes - added C++ wrapper project --- ortc/idl/Certificate.idl | 2 +- ortc/idl/DtmfSender.idl | 2 +- ortc/idl/IceGatherer.idl | 32 +- ortc/idl/Identity.idl | 4 +- ortc/idl/Logger.idl | 348 ++++ ortc/idl/MediaDevices.idl | 9 + ortc/idl/MediaStreamTrack.idl | 16 +- ortc/idl/Ortc.idl | 58 +- ortc/idl/RtpSender.idl | 1 + ortc/idl/RtpTypes.idl | 4 +- ortc/idl/Settings.idl | 71 + ortc/idl/StatsReport.idl | 121 +- ortc/idl/adapter/MediaStream.idl | 8 +- ortc/idl/adapter/PeerConnection.idl | 6 +- ortc/idl/adapter/SessionDescription.idl | 12 +- ortc/idl/adapter/enums.idl | 10 +- ortc/idl/config.json | 2 + ortc/idl/enums.idl | 6 +- .../msvs/ortclib.Universal/ortclib.vcxproj | 3 - .../ortclib.Universal/ortclib.vcxproj.filters | 15 - .../ortclib.wrapper.vcxproj | 959 +++++++++++ .../ortclib.wrapper.vcxproj.filters | 1486 +++++++++++++++++ 22 files changed, 2989 insertions(+), 186 deletions(-) create mode 100644 ortc/idl/Logger.idl create mode 100644 ortc/idl/Settings.idl create mode 100644 projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj create mode 100644 projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters diff --git a/ortc/idl/Certificate.idl b/ortc/idl/Certificate.idl index 38d8b5af..ab82d032 100644 --- a/ortc/idl/Certificate.idl +++ b/ortc/idl/Certificate.idl @@ -54,7 +54,7 @@ namespace org interface RTCCertificate { - typedef zs::Promise PromiseWithCertificate; + typedef zs::PromiseWith PromiseWithCertificate; [static] PromiseWithCertificate generateCertificate(); diff --git a/ortc/idl/DtmfSender.idl b/ortc/idl/DtmfSender.idl index 10e732e3..508306a1 100644 --- a/ortc/idl/DtmfSender.idl +++ b/ortc/idl/DtmfSender.idl @@ -37,7 +37,7 @@ namespace org interface RTCRtpDtmfSender { [constructor] - void RTCRtpDTMFSender(RTCRtpSender sender); + void RTCRtpDtmfSender(RTCRtpSender sender); [getter] puid id; diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index 4f1a11ec..70ab60cc 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -34,17 +34,17 @@ namespace org namespace ortc { [dictionary] - struct RTCIceGathererInterfacePolicy + struct RTCIceGatherInterfacePolicy { string interfaceType; - RTCIceGathererFilterPolicy gatherPolicy = none; + RTCIceGatherFilterPolicy gatherPolicy = none; [constructor, default] - void RTCIceGathererInterfacePolicy(); - [constructor, altname(RTCIceGathererInterfacePolicyClone)] - void RTCIceGathererInterfacePolicy(RTCIceGathererInterfacePolicy source); - [constructor, default, altname(RTCIceGathererInterfacePolicyWithJson)] - void RTCIceGathererInterfacePolicy(Json json); + void RTCIceGatherInterfacePolicy(); + [constructor, altname(RTCIceGatherInterfacePolicyClone)] + void RTCIceGatherInterfacePolicy(RTCIceGatherInterfacePolicy source); + [constructor, default, altname(RTCIceGatherInterfacePolicyWithJson)] + void RTCIceGatherInterfacePolicy(Json json); Json toJson(); string hash(); @@ -70,9 +70,9 @@ namespace org }; [dictionary] - struct RTCIceGathererOptions + struct RTCIceGatherOptions { - typedef std::list InterfacePolicyList; + typedef std::list InterfacePolicyList; typedef std::list ServerList; bool continuousGathering = true; @@ -80,11 +80,11 @@ namespace org ServerList iceServers; [constructor, default] - void RTCIceGathererOptions(); - [constructor, altname(RTCIceGathererOptionsClone)] - void RTCIceGathererOptions(RTCIceGathererOptions source); - [constructor, default, altname(RTCIceGathererOptionsWithJson)] - void RTCIceGathererOptions(Json json); + void RTCIceGatherOptions(); + [constructor, altname(RTCIceGatherOptionsClone)] + void RTCIceGatherOptions(RTCIceGatherOptions source); + [constructor, default, altname(RTCIceGatherOptionsWithJson)] + void RTCIceGatherOptions(Json json); Json toJson(); string hash(); @@ -126,7 +126,7 @@ namespace org typedef std::list CandidateList; [constructor] - void RTCIceGatherer(RTCIceGathererOptions options); + void RTCIceGatherer(RTCIceGatherOptions options); [getter] puid id; @@ -144,7 +144,7 @@ namespace org void gather( [optional] - RTCIceGathererOptions options + RTCIceGatherOptions options ); void close(); diff --git a/ortc/idl/Identity.idl b/ortc/idl/Identity.idl index dd603895..bf5e266b 100644 --- a/ortc/idl/Identity.idl +++ b/ortc/idl/Identity.idl @@ -54,9 +54,11 @@ namespace org string loginUrl; }; + typedef zs::PromiseRejectionReason PromiseRejectionIdentityError; + interface RTCIdentity { - typedef PromiseWith PromiseWithResult; + typedef PromiseWith PromiseWithResult; typedef PromiseWith PromiseWithAssertion; [constructor] diff --git a/ortc/idl/Logger.idl b/ortc/idl/Logger.idl new file mode 100644 index 00000000..7f1afcbd --- /dev/null +++ b/ortc/idl/Logger.idl @@ -0,0 +1,348 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + using namespace zs; + + namespace log + { + /// + /// The level represents the detail level used when logging. + /// + enum Level + { + /// + /// Do not log any log messages. + /// + None, + /// + /// Log only the most important logger information. + /// + Basic, + /// + /// Log a few more details from the logger information. + /// + Detail, + /// + /// Log a level appropriate to debug the engine. + /// + Debug, + /// + /// Log a level to trace the code path within the engine. + /// + Trace, + /// + /// Log every possible mundane detail possible. + /// + Insane + }; + + /// + /// The component represents the area of code that is capable of + /// logging. + /// + enum Component + { + /// + /// The low level socket, aynchronous eventing, and OS abstraction + /// library. + /// + ZsLib, + /// + /// The socket monitor within the low level socket abstraction + /// library. + /// + ZsLibSocket, + /// + /// The servers support library for the ORTC library. + /// + Services, + /// + /// The DNS services support library for the ORTC library. + /// + ServicesDns, + /// + /// The TURN services support library for the ORTC library. + /// + ServicesTurn, + /// + /// The HTTP services support library for the ORTC library. + /// + ServicesHttp, + /// + /// The wire level tracing of services support for the ORTC library. + /// This component also includes the details of the STUN packet(s). + /// + ServicesWire, + /// + /// All STUN related request processing (minus the STUN on the wire). + /// + ServicesStun, + /// + /// The C++ ORTC library (for all objects who don't have their own + /// trace level). + /// + OrtcLib, + /// + /// The C++ ORTC media area. + /// + OrtcLibWebrtc, + /// + /// The C++ ORTC DTLS transport object. + /// + OrtcLibDtlsTransport, + /// + /// The C++ ORTC ICE gatherer object. + /// + OrtcLibIceGatherer, + /// + /// The C++ ORTC ICE gatherer router object. + /// + OrtcLibIceGathererRouter, + /// + /// The C++ ORTC ICE transport object. + /// + OrtcLibIceTransport, + /// + /// The C++ ORTC ICE transport controller object. + /// + OrtcLibIceTransportController, + /// + /// The C++ ORTC media devices object. + /// + OrtcLibMediaDevices, + /// + /// The C++ ORTC media stream track object. + /// + OrtcLibMediaStreamTrack, + /// + /// The C++ ORTC rtp / rtcp packet related traces. + /// + OrtcLibRtpRtcpPacket, + /// + /// The C++ ORTC rtp listener object. + /// + OrtcLibRtpListener, + /// + /// The C++ ORTC rtp listener object. + /// + OrtcLibRtpMediaEngine, + /// + /// The C++ ORTC rtp receiver object. + /// + OrtcLibRtpReceiver, + /// + /// The C++ ORTC rtp sender object. + /// + OrtcLibRtpSender, + /// + /// The C++ ORTC rtp type structure tracing (parsers, helpers and + /// other). + /// + OrtcLibRtpTypes, + /// + /// The C++ SCTP and data channel related objects. + /// + OrtcLibSctpDataChannel, + /// + /// The C++ SRTP related objects. + /// + OrtcLibSrtp, + /// + /// The C++ SRTP related objects. + /// + OrtcLibStats, + /// + /// The C++ ORTC Adapter library. + /// + OrtcLibAdapter, + }; + } + + /// + /// An API used to control the logging engine within the ORTC library. + /// + interface Logger + { + /// + /// Set the default log level for all componenets. + /// + [static] + void setDefaultLogLevel(log::Level level); + /// + /// Set the log level for a specific component. + /// + [static, default] + void setLogLevel(log::Component component, log::Level level); + /// + /// Sets the log level for a component by its component string name. + /// + [static, altname(setLogLevelByName)] + void setLogLevel(string component, log::Level level); + + /// + /// Output log information to the standard out and optionally colorize + /// the output using ANSI color codes. + /// + [static] + void installStdOutLogger(bool colorizeOutput); + /// + /// Output the log information to a file and optional colorize the + /// file output using ANSI color codes. + /// + [static] + void installFileLogger(string fileName, bool colorizeOutput); + /// + /// Listen for an incoming telnet connections and output the logging + /// information to the incoming telnet connection. + /// + [static] + void installTelnetLogger( + uint16 listenPort, + Seconds maxWaitForSocketToBeAvailable, + bool colorizeOutput + ); + + /// + /// Create an outgoing telnet connection to connect to a telnet server + /// and output the logging information to the telnet server. + /// + [static] + void installOutgoingTelnetLogger( + string serverHostWithPort, + bool colorizeOutput, + string sendStringUponConnection + ); + /// + /// Log to the connected debugger logger instance. + /// + [static] + void installDebuggerLogger(); + + /// + /// Returns true if the telnet logger is listening. + /// + [static] + bool isTelnetLoggerListening(); + /// + /// Returns true if a telnet logger client is connected. + /// + [static] + bool isTelnetLoggerConnected(); + /// + /// Returns true if the telnet logger has an outgoing client connected + /// telnet logger session. + /// + [static] + bool isOutgoingTelnetLoggerConnected(); + + /// + /// Uninstall the logger outputing to standard out. + /// + [static] + void uninstallStdOutLogger(); + /// + /// Uninstall the logger outputing to a file. + /// + [static] + void uninstallFileLogger(); + /// + /// Uninstall the telnet listening logger. + /// + [static] + void uninstallTelnetLogger(); + /// + /// Uninstall the outgoing client telnet logger. + /// + [static] + void uninstallOutgoingTelnetLogger(); + /// + /// Uninstall the logger outputting to a connected debugger. + /// + [static] + void uninstallDebuggerLogger(); + + /// + /// Set the default eventing level for all componenets. + /// + [static] + void setDefaultEventingLevel(log::Level level); + /// + /// Set the eventing level for a specific component. + /// + [static, default] + void setEventingLevel(log::Component component, log::Level level); + /// + /// Sets the log eventing for a component by its component string name. + /// + [altname(setEventingLevelByName)] + void setEventingLevel(string component, log::Level level); + + /// + /// Listen for an incoming eventing connection and output the eventing + /// information to the incoming eventing connection. Both the eventing + /// listener and connecting to an eventing server cannot be enabled + /// at the same time. + /// + void installEventingListener( + string sharedSecret, + uint16 listenPort, + Seconds maxWaitForSocketToBeAvailable + ); + + /// + /// Create an outgoing eventing connection to an eventing server and + /// output the eventing information to the server. Both the eventing + /// listener and connecting to an eventing server cannot be enabled + /// at the same time. + /// + [static] + void connectToEventingServer( + string sharedSecret, + string serverHostWithPort + ); + + /// + /// Uninstall the eventing listener. + /// + [static] + void uninstallEventingListener(); + /// + /// Uninstall the outgoing client telnet logger. + /// + [static] + void disconnectEventingServer(); + }; + } +} diff --git a/ortc/idl/MediaDevices.idl b/ortc/idl/MediaDevices.idl index 75813e87..185b361e 100644 --- a/ortc/idl/MediaDevices.idl +++ b/ortc/idl/MediaDevices.idl @@ -88,6 +88,12 @@ namespace org typedef zs::PromiseWith PromiseWithDeviceList; typedef zs::PromiseWith PromiseWithTrackList; + [constructor, delete] + void MediaDevices(); + + [static, getter] + MediaDevices singleton; + [static] MediaTrackSupportedConstraints getSupportedConstraints(); @@ -96,6 +102,9 @@ namespace org [static] PromiseWithTrackList getUserMedia(MediaStreamConstraints constraints); + + [event] + void onDeviceChange(); }; } } diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index ffaec0d2..33fa9ada 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -158,9 +158,6 @@ namespace org void MediaTrackConstraints(MediaTrackConstraints source); [constructor, default, altname(MediaTrackConstraintsWithJson)] void MediaTrackConstraints(Json json); - - Json toJson(); - string hash(); }; [dictionary] @@ -196,6 +193,16 @@ namespace org OverconstrainedError error; }; + [special] + struct MediaSource + { + [getter, setter] + zs::Any source; + + [getter, setter] + zs::Any track; + }; + interface MediaStreamTrack { [getter] @@ -225,6 +232,9 @@ namespace org [getter] MediaStreamTrackState readyState; + [getter] + MediaSource source; + MediaStreamTrack clone(); void stop(); diff --git a/ortc/idl/Ortc.idl b/ortc/idl/Ortc.idl index cc2c625a..06349a9d 100644 --- a/ortc/idl/Ortc.idl +++ b/ortc/idl/Ortc.idl @@ -34,43 +34,39 @@ namespace org namespace ortc { using namespace zs; - using namespace zs::log; - typedef zs::exceptions::InvalidParameters InvalidParameters; - typedef zs::exceptions::InvalidState InvalidStateError; + typedef zs::exceptions::InvalidArgument InvalidParameters; + typedef zs::exceptions::BadState InvalidStateError; typedef zs::exceptions::NotSupported NotSupported; typedef zs::exceptions::NotImplemented NotImplemented; - typedef zs::exceptions::Unexpected Unexpected; + typedef zs::exceptions::UnexpectedError Unexpected; //!EXCLUSIVE WINUWP - struct Dispatcher {}; + [special, platform(webhidden)] + interface Dispatcher + { + [constructor] + void Dispatcher(Any source); + + [static] + Any source; + }; //!EXCLUSIVE x - interface Ortc + [static] + interface OrtcLib { - [static, altname(SetupWithQueue)] - void Setup(MessageQueue queue); + [static, default] + void setup(); - //!EXCLUSIVE WINUWP - [static, default, altname(SetupWithDispatcher)] - void Setup(Dispatcher dispatcher); - //!EXCLUSIVE x + [static, altname(SetupWithQueue)] + void setup(MessageQueue queue); [static, altname(getNtpServerTime)] Milliseconds ntpServerTime(); [static, altname(setNtpServerTime)] void ntpServerTime(Milliseconds value); - [static] - void setDefaultLogLevel(Level level); - [static] - void setLogLevel(string componenet, Level level); - - [static] - void setDefaultEventingLevel(Level level); - [static] - void setEventingLevel(string componenet, Level level); - [static] void startMediaTracing(); [static] @@ -81,6 +77,24 @@ namespace org bool saveMediaTrace(string filename); [static] bool saveMediaTrace(string host, int port); + + [static] + zs::Promise notifyGoingToBackground(); + + [static] + void notifyGoingToBackgroundNow(); + + [static] + void notifyReturningFromBackground(); }; + + //!EXCLUSIVE WINUWP + [static, platform(webhidden)] + interface OrtcLibWithDispatcher + { + [static, default, altname(SetupWithDispatcher)] + void setup(Dispatcher dispatcher); + }; + //!EXCLUSIVE x } } diff --git a/ortc/idl/RtpSender.idl b/ortc/idl/RtpSender.idl index 25407aaf..4b6afcb4 100644 --- a/ortc/idl/RtpSender.idl +++ b/ortc/idl/RtpSender.idl @@ -69,6 +69,7 @@ namespace org zs::Promise setTrack(MediaStreamTrack track); + [static] RTCRtpCapabilities getCapabilities([optional] MediaStreamTrackKind kind); zs::Promise send(RTCRtpParameters parameters); diff --git a/ortc/idl/RtpTypes.idl b/ortc/idl/RtpTypes.idl index 33023a68..111ff673 100644 --- a/ortc/idl/RtpTypes.idl +++ b/ortc/idl/RtpTypes.idl @@ -69,7 +69,7 @@ namespace org string kind; [optional] unsigned long clockRate; - PayloadType peferredPayloadType; + PayloadType preferredPayloadType; Milliseconds pTime; Milliseconds maxPTime; [optional] @@ -133,6 +133,8 @@ namespace org [constructor, default, altname(RTCRtpCapabilitiesWithJson)] void RTCRtpCapabilities(Json json); + RTCRtpCapabilities clone(); + Json toJson(); string hash(); }; diff --git a/ortc/idl/Settings.idl b/ortc/idl/Settings.idl new file mode 100644 index 00000000..1b8e453a --- /dev/null +++ b/ortc/idl/Settings.idl @@ -0,0 +1,71 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +namespace org +{ + namespace ortc + { + [static] + interface Settings + { + [static] + void applyDefaults(); + + [static] + bool apply(string jsonSettings); + + [static] + void setString(string key, string value); + + [static] + void setInt(string key, int64 value); + + [static] + void setUInt(string key, uint64 value); + + [static] + void setBool(string key, bool value); + + [static] + void setFloat(string key, float value); + + [static] + void setDouble(string key, double value); + + [static] + void clear(string key); + + [static] + void clearAll(); + }; + + } +} diff --git a/ortc/idl/StatsReport.idl b/ortc/idl/StatsReport.idl index 7d02e471..4514b993 100644 --- a/ortc/idl/StatsReport.idl +++ b/ortc/idl/StatsReport.idl @@ -67,8 +67,6 @@ namespace org [constructor, default, altname(RTCStatsWithJson)] void RTCStats(Json json); - string statsType(); - Json toJson(); string hash(); @@ -76,7 +74,7 @@ namespace org }; - struct RTPStreamStats : RTCStats + struct RTCRtpStreamStats : RTCStats { [optional, getter] SsrcType ssrc; @@ -102,17 +100,11 @@ namespace org unsigned long sliCount; [constructor, default] - void RTPStreamStats(); - [constructor, altname(RTPStreamStatsClone)] - void RTPStreamStats(RTPStreamStats source); - [constructor, default, altname(RTPStreamStatsWithJson)] - void RTPStreamStats(Json json); - - [static] - RTPStreamStats convert(RTCStats stat); - - Json toJson(); - string hash(); + void RTCRtpStreamStats(); + [constructor, altname(RTCRtpStreamStatsClone)] + void RTCRtpStreamStats(RTCRtpStreamStats source); + [constructor, default, altname(RTCRtpStreamStatsWithJson)] + void RTCRtpStreamStats(Json json); }; struct RTCCodec : RTCStats @@ -134,15 +126,9 @@ namespace org void RTCCodec(RTCCodec source); [constructor, default, altname(RTCCodecWithJson)] void RTCCodec(Json json); - - [static] - RTCCodec convert(RTCStats stat); - - Json toJson(); - string hash(); }; - struct RTCInboundRTPStreamStats : RTPStreamStats + struct RTCInboundRtpStreamStats : RTCRtpStreamStats { [getter] unsigned long packetsReceived; @@ -158,23 +144,14 @@ namespace org Milliseconds endToEndDelay; [constructor, default] - void RTCInboundRTPStreamStats(); - [constructor, altname(RTCInboundRTPStreamStatsClone)] - void RTCInboundRTPStreamStats(RTCInboundRTPStreamStats source); - [constructor, default, altname(RTCInboundRTPStreamStatsWithJson)] - void RTCInboundRTPStreamStats(Json json); - - [static] - RTCInboundRTPStreamStats convert(RTCStats stat); - [static] - RTCInboundRTPStreamStats convert(RTPStreamStats stat); - - Json toJson(); - string hash(); + void RTCInboundRtpStreamStats(); + [constructor, altname(RTCInboundRtpStreamStatsClone)] + void RTCInboundRtpStreamStats(RTCInboundRtpStreamStats source); + [constructor, default, altname(RTCInboundRtpStreamStatsWithJson)] + void RTCInboundRtpStreamStats(Json json); }; - - struct RTCOutboundRTPStreamStats : RTPStreamStats + struct RTCOutboundRtpStreamStats : RTCRtpStreamStats { [getter] unsigned long packetsSent; @@ -186,19 +163,11 @@ namespace org double roundTripTime; [constructor, default] - void RTCOutboundRTPStreamStats(); - [constructor, altname(RTCOutboundRTPStreamStatsClone)] - void RTCOutboundRTPStreamStats(RTCOutboundRTPStreamStats source); - [constructor, default, altname(RTCOutboundRTPStreamStatsWithJson)] - void RTCOutboundRTPStreamStats(Json json); - - [static] - RTCOutboundRTPStreamStats convert(RTCStats stat); - [static] - RTCOutboundRTPStreamStats convert(RTPStreamStats stat); - - Json toJson(); - string hash(); + void RTCOutboundRtpStreamStats(); + [constructor, altname(RTCOutboundRtpStreamStatsClone)] + void RTCOutboundRtpStreamStats(RTCOutboundRtpStreamStats source); + [constructor, default, altname(RTCOutboundRtpStreamStatsWithJson)] + void RTCOutboundRtpStreamStats(Json json); }; struct RTCSctpTransportStats : RTCStats @@ -214,12 +183,6 @@ namespace org void RTCSctpTransportStats(RTCSctpTransportStats source); [constructor, default, altname(RTCSctpTransportStatsWithJson)] void RTCSctpTransportStats(Json json); - - [static] - RTCSctpTransportStats convert(RTCStats stat); - - Json toJson(); - string hash(); }; struct RTCMediaStreamStats : RTCStats @@ -235,12 +198,6 @@ namespace org void RTCMediaStreamStats(RTCMediaStreamStats source); [constructor, default, altname(RTCMediaStreamStatsWithJson)] void RTCMediaStreamStats(Json json); - - [static] - RTCMediaStreamStats convert(RTCStats stat); - - Json toJson(); - string hash(); }; @@ -281,12 +238,6 @@ namespace org void RTCMediaStreamTrackStats(RTCMediaStreamTrackStats source); [constructor, default, altname(RTCMediaStreamTrackStatsWithJson)] void RTCMediaStreamTrackStats(Json json); - - [static] - RTCMediaStreamTrackStats convert(RTCStats stat); - - Json toJson(); - string hash(); }; @@ -315,12 +266,6 @@ namespace org void RTCDataChannelStats(RTCDataChannelStats source); [constructor, default, altname(RTCDataChannelStatsWithJson)] void RTCDataChannelStats(Json json); - - [static] - RTCDataChannelStats convert(RTCStats stat); - - Json toJson(); - string hash(); }; @@ -339,12 +284,6 @@ namespace org void RTCIceGathererStats(RTCIceGathererStats source); [constructor, default, altname(RTCIceGathererStatsWithJson)] void RTCIceGathererStats(Json json); - - [static] - RTCIceGathererStats convert(RTCStats stat); - - Json toJson(); - string hash(); }; struct RTCIceTransportStats : RTCStats @@ -366,12 +305,6 @@ namespace org void RTCIceTransportStats(RTCIceTransportStats source); [constructor, default, altname(RTCIceTransportStatsWithJson)] void RTCIceTransportStats(Json json); - - [static] - RTCIceTransportStats convert(RTCStats stat); - - Json toJson(); - string hash(); }; struct RTCDtlsTransportStats : RTCStats @@ -387,9 +320,6 @@ namespace org void RTCDtlsTransportStats(RTCDtlsTransportStats source); [constructor, default, altname(RTCDtlsTransportStatsWithJson)] void RTCDtlsTransportStats(Json json); - - [static] - RTCDtlsTransportStats convert(RTCStats stat); }; struct RTCSrtpTransportStats : RTCStats @@ -400,9 +330,6 @@ namespace org void RTCSrtpTransportStats(RTCDtlsTransportStats source); [constructor, default, altname(RTCSrtpTransportStatsWithJson)] void RTCSrtpTransportStats(Json json); - - [static] - RTCDtlsTransportStats convert(RTCStats stat); }; struct RTCIceCandidateAttributes : RTCStats @@ -428,9 +355,6 @@ namespace org void RTCIceCandidateAttributes(RTCIceCandidateAttributes source); [constructor, default, altname(RTCIceCandidateAttributesWithJson)] void RTCIceCandidateAttributes(Json json); - - [static] - RTCIceCandidateAttributes convert(RTCStats stat); }; struct RTCIceCandidatePairStats : RTCStats @@ -468,9 +392,6 @@ namespace org void RTCIceCandidatePairStats(RTCIceCandidatePairStats source); [constructor, default, altname(RTCIceCandidatePairStatsWithJson)] void RTCIceCandidatePairStats(Json json); - - [static] - RTCIceCandidatePairStats convert(RTCStats stat); }; @@ -491,9 +412,6 @@ namespace org void RTCCertificateStats(RTCCertificateStats source); [constructor, default, altname(RTCCertificateStatsWithJson)] void RTCCertificateStats(Json json); - - [static] - RTCCertificateStats convert(RTCStats stat); }; interaction RTCStatsReport @@ -503,7 +421,8 @@ namespace org [getter] puid id; - IdList getStatesIds(); + [getter] + IdList statsIds; RTCStats getStats(string id); }; } diff --git a/ortc/idl/adapter/MediaStream.idl b/ortc/idl/adapter/MediaStream.idl index 0663aeac..432ddd96 100644 --- a/ortc/idl/adapter/MediaStream.idl +++ b/ortc/idl/adapter/MediaStream.idl @@ -52,8 +52,12 @@ namespace org [getter] bool active; - MediaStreamTrackList getAudioTracks(); - MediaStreamTrackList getVideoTracks(); + [getter] + MediaStreamTrackList tracks; + [getter] + MediaStreamTrackList audioTracks; + [getter] + MediaStreamTrackList videoTracks; MediaStreamTrack getTrackById(string id); [getter] diff --git a/ortc/idl/adapter/PeerConnection.idl b/ortc/idl/adapter/PeerConnection.idl index 0627fe75..e7f2c9c2 100644 --- a/ortc/idl/adapter/PeerConnection.idl +++ b/ortc/idl/adapter/PeerConnection.idl @@ -40,12 +40,12 @@ namespace org { typedef std::list CertificateList; - RTCIceGathererOptions gatherOptions; + RTCIceGatherOptions gatherOptions; RTCPeerConnectionSignalingMode signalingMode = json; bool negotiateSrtpSdes; RTCBundlePolicy bundlePolicy = balanced; - RTCRtcpMuxPolicy rtcpMuxPolicy = required; + RTCRtcpMuxPolicy rtcpMuxPolicy = require; CertificateList certificates; size_t iceCandidatePoolSize; @@ -93,7 +93,7 @@ namespace org { string mid; [optional] - unsigned short mLineIndex; + unsigned short sdpMLineIndex; RTCIceCandidate hostCandidate; string url; diff --git a/ortc/idl/adapter/SessionDescription.idl b/ortc/idl/adapter/SessionDescription.idl index 43741cdd..c1033240 100644 --- a/ortc/idl/adapter/SessionDescription.idl +++ b/ortc/idl/adapter/SessionDescription.idl @@ -167,9 +167,6 @@ namespace org void RTCSessionDescriptionRtpMediaLine(RTCSessionDescriptionRtpMediaLine source); [constructor, default, altname(RTCSessionDescriptionRtpMediaLineWithJson)] void RTCSessionDescriptionRtpMediaLine(Json json); - - Json toJson(); - string hash(); }; [dictionary] @@ -185,9 +182,6 @@ namespace org void RTCSessionDescriptionSctpMediaLine(RTCSessionDescriptionSctpMediaLine source); [constructor, default, altname(RTCSessionDescriptionSctpMediaLineWithJson)] void RTCSessionDescriptionSctpMediaLine(Json json); - - Json toJson(); - string hash(); }; [dictionary] @@ -234,16 +228,16 @@ namespace org [dictionary] struct RTCIceCandidate { - string mid; + string sdpMid; [optional] - size_t mLineIndex; + size_t sdpMLineIndex; RTCIceGathererCandidate candidate; [constructor, default] void RTCIceCandidate(); [constructor, altname(RTCIceCandidateClone)] void RTCIceCandidate(RTCIceCandidate source); - [constructor, default, altname(RTCIceCandidateWithJson)] + [constructor, altname(RTCIceCandidateWithJson)] void RTCIceCandidate(Json json); [constructor, default, altname(RTCIceCandidateWithSdp)] void RTCIceCandidate(string sdp); diff --git a/ortc/idl/adapter/enums.idl b/ortc/idl/adapter/enums.idl index f08a306f..c1093221 100644 --- a/ortc/idl/adapter/enums.idl +++ b/ortc/idl/adapter/enums.idl @@ -37,17 +37,17 @@ namespace org { enum RTCSdpType { - sdpOffer, - sdpPranser, - sdpAnswer, - sdpRollback, + pffer, + pranswer, + answer, + rollback, }; enum RTCSessionDescriptionSignalingType { json, sdpOffer, - sdpPranser, + sdpPranswer, sdpAnswer, sdpRollback, }; diff --git a/ortc/idl/config.json b/ortc/idl/config.json index 2eed984a..c5b73ca6 100644 --- a/ortc/idl/config.json +++ b/ortc/idl/config.json @@ -22,6 +22,8 @@ "sources": { "source": [ "Ortc.idl", + "Logger.idl", + "Settings.idl", "error.idl", "enums.idl", "Capabilities.idl", diff --git a/ortc/idl/enums.idl b/ortc/idl/enums.idl index 1a28d823..90e3a7ed 100644 --- a/ortc/idl/enums.idl +++ b/ortc/idl/enums.idl @@ -91,7 +91,7 @@ namespace org closed, }; - enum RTCIceGathererFilterPolicy : uint64 + enum RTCIceGatherFilterPolicy : uint64 { none = 0, noIPv4Host = 0x00000001, @@ -160,8 +160,8 @@ namespace org enum RTCStatsType { - inboundRTP, - outboundRTP, + inboundRtp, + outboundRtp, codec, sctpTransport, dataChannel, diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj b/projects/msvs/ortclib.Universal/ortclib.vcxproj index 8cca6fcd..abb13b28 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj @@ -54,8 +54,6 @@ true true - - @@ -206,7 +204,6 @@ - diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters index 637f7d70..39e28506 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters @@ -25,12 +25,6 @@ {77c8ce93-8bbf-4b4a-92ba-49bf839a7dd9} - - {385b270f-970b-4f88-915a-a08906d1f7df} - - - {ac3399f1-dbcd-46e4-85a1-534b91fe13d8} - @@ -294,12 +288,6 @@ ortc\idl - - ortc\idl\wrapper\generated - - - ortc\idl\wrapper\generated - @@ -499,9 +487,6 @@ ortc\adapter\cpp - - ortc\idl\wrapper - diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj new file mode 100644 index 00000000..91b31bdc --- /dev/null +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -0,0 +1,959 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + + + true + true + true + true + true + true + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {f370ffcf-6d70-40a3-853d-a272c4df2014} + StaticLibrary + ortclib_wrapper + en-US + 14.0 + true + Windows Store + 10.0.14393.0 + 10.0.10586.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + + NotUsing + true + true + USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) + 4068;4290 + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) + 4068;4290 + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + USE_ETW;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + 4068;4290 + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + USE_ETW;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + 4068;4290 + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) + 4068;4290 + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) + 4068;4290 + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + + \ No newline at end of file diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters new file mode 100644 index 00000000..ceda6606 --- /dev/null +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -0,0 +1,1486 @@ + + + + + {b6baf693-b17a-4e11-8724-cfd637d309b6} + + + {152586c3-7ca8-4960-ab98-6cd775b89c72} + + + {2a06a640-30ed-4588-8934-f49d95168794} + + + {856ec7c4-23a4-4b0a-ae49-46a103ab4f34} + + + {8e4e19d9-65a2-4b68-9635-e2c0d194b07c} + + + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl + + + ortc\idl\adapter + + + ortc\idl\adapter + + + ortc\idl\adapter + + + ortc\idl\adapter + + + ortc\idl + + + ortc\idl + + + + + ortc\idl + + + ortc\idl + + + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + \ No newline at end of file From 1473adb2d3ade889e815b363a92b598ac9a97766 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 20 Feb 2017 14:50:37 -0500 Subject: [PATCH 008/187] - fixed IDL issues in ORTC Lib wrapper --- ortc/idl/IceGatherer.idl | 2 +- ortc/idl/Logger.idl | 3 +- ortc/idl/Ortc.idl | 24 ++++++++++--- ortc/idl/adapter/PeerConnection.idl | 17 ++++++--- ortc/idl/adapter/SessionDescription.idl | 17 ++++++--- .../ortclib.wrapper.vcxproj | 12 +++---- .../ortclib.wrapper.vcxproj.filters | 36 +++++++++---------- 7 files changed, 73 insertions(+), 38 deletions(-) diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index 70ab60cc..258ee1d7 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -54,7 +54,7 @@ namespace org struct RTCIceServer { StringList urls; - string userName; + string username; string credential; RTCIceCredentialType credentialType = password; diff --git a/ortc/idl/Logger.idl b/ortc/idl/Logger.idl index 7f1afcbd..f24c6b68 100644 --- a/ortc/idl/Logger.idl +++ b/ortc/idl/Logger.idl @@ -306,7 +306,7 @@ namespace org /// /// Sets the log eventing for a component by its component string name. /// - [altname(setEventingLevelByName)] + [static, altname(setEventingLevelByName)] void setEventingLevel(string component, log::Level level); /// @@ -315,6 +315,7 @@ namespace org /// listener and connecting to an eventing server cannot be enabled /// at the same time. /// + [static] void installEventingListener( string sharedSecret, uint16 listenPort, diff --git a/ortc/idl/Ortc.idl b/ortc/idl/Ortc.idl index 06349a9d..07712782 100644 --- a/ortc/idl/Ortc.idl +++ b/ortc/idl/Ortc.idl @@ -41,6 +41,24 @@ namespace org typedef zs::exceptions::NotImplemented NotImplemented; typedef zs::exceptions::UnexpectedError Unexpected; + interface MessageQueue + { + [constructor, delete] + void MessageQueue(); + + [static] + MessageQueue getDefaultForUi(); + }; + + interface Json + { + [constructor] + void Json(string jsonString); + + [getter, setter] + string toString(); + }; + //!EXCLUSIVE WINUWP [special, platform(webhidden)] interface Dispatcher @@ -62,10 +80,8 @@ namespace org [static, altname(SetupWithQueue)] void setup(MessageQueue queue); - [static, altname(getNtpServerTime)] - Milliseconds ntpServerTime(); - [static, altname(setNtpServerTime)] - void ntpServerTime(Milliseconds value); + [static] + Milliseconds ntpServerTime; [static] void startMediaTracing(); diff --git a/ortc/idl/adapter/PeerConnection.idl b/ortc/idl/adapter/PeerConnection.idl index e7f2c9c2..34877e4c 100644 --- a/ortc/idl/adapter/PeerConnection.idl +++ b/ortc/idl/adapter/PeerConnection.idl @@ -135,10 +135,19 @@ namespace org [constructor] void RTCPeerConnection([optional] RTCConfiguration configuration); - PromiseWithDescription createOffer([optional] RTCOfferOptions options); - PromiseWithDescription createAnswer([optional] RTCAnswerOptions options); + [default] + PromiseWithDescription createOffer(); + [altname(createOfferWithOptions)] + PromiseWithDescription createOffer(RTCOfferOptions options); + [default] + PromiseWithDescription createAnswer(); + [altname(createAnswerWithOptions)] + PromiseWithDescription createAnswer(RTCAnswerOptions options); - PromiseWithDescription createCapabilities([optional] RTCCapabilityOptions options); + [default] + PromiseWithDescription createCapabilities(); + [altname(createCapabilitiesWithOptions)] + PromiseWithDescription createCapabilities(RTCCapabilityOptions options); Promise setLocalDescription(RTCSessionDescription description); @@ -156,7 +165,7 @@ namespace org RTCSessionDescription currentRemoteDescription; [getter] RTCSessionDescription pendingRemoteDescription; - void addICECandidate([dynamic] RTCIceGathererCandidate candidate); + void addIceCandidate(RTCIceCandidate candidate); [getter] RTCSignalingState signalingState; diff --git a/ortc/idl/adapter/SessionDescription.idl b/ortc/idl/adapter/SessionDescription.idl index c1033240..b8002d22 100644 --- a/ortc/idl/adapter/SessionDescription.idl +++ b/ortc/idl/adapter/SessionDescription.idl @@ -80,8 +80,8 @@ namespace org RTCIceParameters iceParameters; RTCDtlsParameters dtlsParameters; RTCSrtpSdesParameters srtpSdesParameters; - CandidateList mICECandidates; - bool mEndOfCandidates; + CandidateList iceCandidates; + bool endOfCandidates; [constructor, default] void RTCSessionDescriptionTransportParameters(); @@ -239,8 +239,17 @@ namespace org void RTCIceCandidate(RTCIceCandidate source); [constructor, altname(RTCIceCandidateWithJson)] void RTCIceCandidate(Json json); - [constructor, default, altname(RTCIceCandidateWithSdp)] - void RTCIceCandidate(string sdp); + + [static] + RTCIceCandidate fromSdpStringWithMLineIndex( + string sdp, + size_t mlineIndex + ); + [static] + RTCIceCandidate fromSdpStringWithMid( + string sdp, + string mid + ); Json toJson(); string toSdp(); diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 91b31bdc..802d1092 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -325,6 +325,7 @@ + @@ -337,6 +338,7 @@ + @@ -436,8 +438,6 @@ - - @@ -478,6 +478,7 @@ + @@ -489,6 +490,7 @@ + @@ -589,8 +591,6 @@ - - @@ -629,6 +629,7 @@ + @@ -641,6 +642,7 @@ + @@ -740,8 +742,6 @@ - - diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index ceda6606..a04018d7 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -529,12 +529,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - - - ortc\idl\wrapper - ortc\idl\wrapper @@ -571,6 +565,12 @@ ortc\idl\wrapper + + ortc\idl\wrapper + + + ortc\idl\wrapper + @@ -984,12 +984,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - - - ortc\idl\wrapper - ortc\idl\wrapper @@ -1014,12 +1008,6 @@ ortc\idl\wrapper\generated - - ortc\idl\wrapper\generated - - - ortc\idl\wrapper\generated - ortc\idl\wrapper\generated @@ -1482,5 +1470,17 @@ ortc\idl\wrapper + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + \ No newline at end of file From a658997b0d15d912d84253fd57662187a94c7e75 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 21 Feb 2017 18:26:13 -0500 Subject: [PATCH 009/187] - added IDL definition documentation --- ortc/idl/Capabilities.idl | 54 ++ ortc/idl/Certificate.idl | 70 +- ortc/idl/Constraints.idl | 236 +++++ ortc/idl/DataChannel.idl | 155 +++- ortc/idl/DtlsTransport.idl | 101 ++- ortc/idl/DtmfSender.idl | 75 +- ortc/idl/IceGatherer.idl | 244 ++++- ortc/idl/IceTransport.idl | 179 +++- ortc/idl/IceTransportController.idl | 37 +- ortc/idl/IceTypes.idl | 192 +++- ortc/idl/Identity.idl | 68 +- ortc/idl/MediaDevices.idl | 171 +++- ortc/idl/MediaStreamTrack.idl | 528 ++++++++++- ortc/idl/Ortc.idl | 76 +- ortc/idl/RtpListener.idl | 60 +- ortc/idl/RtpReceiver.idl | 154 +++- ortc/idl/RtpSender.idl | 124 ++- ortc/idl/RtpTypes.idl | 806 ++++++++++++++++- ortc/idl/SctpTransport.idl | 119 ++- ortc/idl/Settings.idl | 36 +- ortc/idl/SrtpSdesTransport.idl | 150 +++- ortc/idl/StatsProvider.idl | 11 + ortc/idl/StatsReport.idl | 609 ++++++++++++- ortc/idl/adapter/MediaStream.idl | 79 +- ortc/idl/adapter/PeerConnection.idl | 397 ++++++++- ortc/idl/adapter/SessionDescription.idl | 832 +++++++++++++++++- ortc/idl/adapter/enums.idl | 241 ++++- ortc/idl/enums.idl | 601 ++++++++++++- ortc/idl/error.idl | 19 + .../ortclib.wrapper.vcxproj | 3 + .../ortclib.wrapper.vcxproj.filters | 9 + 31 files changed, 6313 insertions(+), 123 deletions(-) diff --git a/ortc/idl/Capabilities.idl b/ortc/idl/Capabilities.idl index 5a499b56..660e6fd1 100644 --- a/ortc/idl/Capabilities.idl +++ b/ortc/idl/Capabilities.idl @@ -33,47 +33,101 @@ namespace org { namespace ortc { + /// + /// The minimum and maximum legal values for an interger value. + /// [dictionary] struct LongRange { + /// + /// Gets or sets the minimum value of this property. + /// long min; + /// + /// Gets or sets the maximum legal value of this property. + /// long max; + /// + /// Constructs a new minimum and maximum legal range for an integer value. + /// [constructor, default] void LongRange(); + /// + /// Constructs a minimum and maximum legal range given an integer value. + /// [constructor, default, altname(LongRangeWithValue)] void LongRange(long value); + /// + /// Constructs a minimum and maximum legal range given an integer minimum and maximum value. + /// [constructor, default, altname(LongRangeWithLimits)] void LongRange(long min, long max); + /// + /// Constructs a minimum and maximum legal range given a JSON object. + /// [constructor, altname(LongRangeWithJson)] void LongRange(Json json); + /// + /// Convert the integer range into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the integer range. + /// string hash(); }; + /// + /// The minimum and maximum legal values for an real value. + /// [dictionary] struct DoubleRange { + /// + /// Gets or sets the minimum value of this property. + /// double min; + /// + /// Gets or sets the maximum legal value of this property. + /// double max; + /// + /// Constructs a new minimum and maximum legal range for a real value. + /// [constructor, default] void DoubleRange(); + /// + /// Constructs a minimum and maximum legal range given a real value. + /// [constructor, default, altname(DoubleRangeWithValue)] void DoubleRange(long value); + /// + /// Constructs a minimum and maximum legal range given a real minimum and maximum value. + /// [constructor, default, altname(DoubleRangeWithLimits)] void DoubleRange(long min, long max); + /// + /// Constructs a minimum and maximum legal range given a JSON object. + /// [constructor, altname(DoubleRangeWithJson)] void DoubleRange(Json json); + /// + /// Convert the real number range into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of a real value range. + /// string hash(); } diff --git a/ortc/idl/Certificate.idl b/ortc/idl/Certificate.idl index ab82d032..1aa40619 100644 --- a/ortc/idl/Certificate.idl +++ b/ortc/idl/Certificate.idl @@ -33,44 +33,110 @@ namespace org { namespace ortc { + /// + /// The RTCDtlsFingerprint object includes the hash function algorithm and + /// certificate fingerprint as described in [RFC4572]. + /// [dictionary] struct RTCDtlsFingerprint { + /// + /// Gets or sets one of the the hash function algorithms defined in the + /// 'Hash function Textual Names' registry, initially specified in + /// [RFC4572] Section 8. As noted in [draft-ietf-rtcweb-jsep] Section + /// 5.2.1, the digest algorithm used for the fingerprint matches that + /// used in the certificate signature. + /// string algorithm; + /// + /// The value of the certificate fingerprint in lowercase hex string as + /// expressed utilizing the syntax of 'fingerprint' in [RFC4572] Section + /// 5. + /// string value; + /// + /// Construct a new empty fingerprint instance. + /// [constructor] void RTCDtlsFingerprint(); + /// + /// Construct a new fingerprint instance by cloning existing fingerprint. + /// [constructor, altname(RTCDtlsFingerprintClone)] void RTCDtlsFingerprint(RTCDtlsFingerprint source); + /// + /// Construct a new fingerprint instance from a JSON object. + /// [constructor, default, altname(RTCDtlsFingerprintWithJson)] void RTCDtlsFingerprint(Json json); + /// + /// Convert a fingerprint to a JSON object. + /// Json toJson(); + /// + /// Get a hash of the fingerprint. + /// string hash(); }; + /// + /// The RTCCertificate interface enables the certificates used by an + /// RTCDtlsTransport in its constructor. + /// interface RTCCertificate { typedef zs::PromiseWith PromiseWithCertificate; + /// + /// The GenerateCertificate method causes the user agent to create and + /// store an X.509 certificate [ISO/IEC 9594-8:1997] and corresponding + /// private key. + /// + /// An awaitable newly generated certificate. [static] PromiseWithCertificate generateCertificate(); + /// + /// The GenerateCertificate method causes the user agent to create and + /// store an X.509 certificate [ISO/IEC 9594-8:1997] and corresponding + /// private key. + /// + /// An awaitable newly generated certificate. [static, default, altname(generateCertificateWithAlgorithm)] - PromiseWithCertificate generateCertificate(string keygenAlgorithm); + PromiseWithCertificate generateCertificate( + /// + //// This argument is used to control how the private key associated + /// with the certificate is generated. + /// + string keygenAlgorithm + ); [static, altname(generateCertificateWithJson)] PromiseWithCertificate generateCertificate(Json keygenAlgorithm); + /// + /// Gets the unique object identifier for the certificate object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the expiry after which the certificate will be considered + /// invalid by the browser. After this time, attempts to construct an + /// RTCDtlsTransport object using this certificate will fail. + /// [getter] Time expires; + /// + /// Gets the fingerprint of the certificate. As noted in + /// [draft-ietf-rtcweb-jsep] Section 5.2.1, the digest algorithm used + /// for the fingerprint matches that used in the certificate signature. + /// [getter] RTCDtlsFingerprint fingerprint; }; diff --git a/ortc/idl/Constraints.idl b/ortc/idl/Constraints.idl index f40e69c8..bcb5cf14 100644 --- a/ortc/idl/Constraints.idl +++ b/ortc/idl/Constraints.idl @@ -33,174 +33,410 @@ namespace org { namespace ortc { + /// + /// This object represents the constrainable boolean parameters. + /// [dictionary] struct ConstrainBooleanParameters { + /// + /// Gets or sets the exact required value for this property. + /// [optional] bool exact; + /// + /// Gets or sets the ideal (target) value for this property. + /// [optional] bool ideal; + /// + /// Constructs a new constrainable boolean parameters. + /// [constructor, default] void ConstrainBooleanParameters(); + /// + /// Constructs a new constrainable boolean parameters by cloning existing constrainable parameters. + /// [constructor, altname(ConstrainBooleanParametersClone)] void ConstrainBooleanParameters(ConstrainBooleanParameters source); + /// + /// Constructs a new constrainable boolean parameters from a JSON object. + /// [constructor, default, altname(ConstrainBooleanParametersWithJson)] void ConstrainBooleanParameters(Json json); + /// + /// Convert the constrainable boolean parameters into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the contrainable boolean parameters. + /// string hash(); }; + /// + /// This object represents the constrainable boolean values. + /// [dictionary] struct ConstrainBoolean { + /// + /// Gets or sets the exact boolean value requried. Use this value must + /// be mutually exclusively set from Parameters. + /// [optional] bool value; + /// + /// Gets or sets the boolean constrainable value parameters. + /// [optional] ConstrainBooleanParameters parameters; + /// + /// Constructs a new constrainable boolean value. + /// [constructor, default] void ConstrainBoolean(); + /// + /// Constructs a new constrainable boolean value by cloning existing constrainable parameters. + /// [constructor, altname(ConstrainBooleanClone)] void ConstrainBoolean(ConstrainBoolean source); + /// + /// Constructs a new constrainable boolean value from a JSON object. + /// [constructor, default, altname(ConstrainBooleanWithJson)] void ConstrainBoolean(Json json); + /// + /// Convert the constrainable boolean value into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the contrainable boolean value. + /// string hash(); }; + /// + /// This object represents the constrainable minimum, maximum, exact, or + /// ideal integer values. + /// [dictionary] struct ConstrainLongRange { + /// + /// Gets or sets the minimum value of this property. + /// [optional] long min; + /// + /// Gets or sets the maximum legal value of this property. + /// [optional] long max; + /// + /// Gets or sets the exact required value for this property. + /// [optional] long exact; + /// + /// Gets or sets the ideal (target) value for this property. + /// [optional] long ideal; + /// + /// Constructs a new constrainable long range. + /// [constructor, default] void ConstrainLongRange(); + /// + /// Constructs a new constrainable long range by cloning existing constrainable range. + /// [constructor, altname(ConstrainLongRangeClone)] void ConstrainLongRange(ConstrainLongRange source); + /// + /// Constructs a new constrainable long range from a JSON object. + /// [constructor, default, altname(ConstrainLongRangeWithJson)] void ConstrainLongRange(Json json); + /// + /// Convert the constrainable long range into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the contrainable long range. + /// string hash(); }; + /// + /// This object represents the constrainable integer values. + /// [dictionary] struct ConstrainLong { + /// + /// Gets or sets the exact integer value requried. This value must be + /// mutually exclusively set from Range. + /// [optional] long value; + /// + /// Gets or sets the constrainable integer range values. + /// [optional] ConstrainLongRange range; + /// + /// Constructs a new constrainable long value. + /// [constructor, default] void ConstrainLong(); + /// + /// Constructs a new constrainable long value by cloning existing constrainable value. + /// [constructor] void ConstrainLong(ConstrainLong source); + /// + /// Constructs a new constrainable long value from a JSON object. + /// [constructor, default, altname(ConstrainLongWithJson)] void ConstrainLong(Json json); + /// + /// Convert the constrainable long value into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the contrainable long value. + /// string hash(); }; + /// + /// This object represents the constrainable minimum, maximum, exact, or + /// ideal real values. + /// [dictionary] struct ConstrainDoubleRange { + /// + /// Gets or sets the minimum value of this property. + /// [optional] double min; + /// + /// Gets or sets the maximum legal value of this property. + /// [optional] double max; + /// + /// Gets or sets the exact required value for this property. + /// [optional] double exact; + /// + /// Gets or sets the ideal (target) value for this property. + /// [optional] double ideal; + /// + /// Constructs a new constrainable real range. + /// [constructor, default] void ConstrainDoubleRange(); + /// + /// Constructs a new constrainable real range by cloning existing constrainable range. + /// [constructor, altname(ConstrainDoubleRangeClone)] void ConstrainDoubleRange(ConstrainDoubleRange source); + /// + /// Constructs a new constrainable real range from a JSON object. + /// [constructor, default, altname(ConstrainDoubleRangeWithJson)] void ConstrainDoubleRange(Json json); + /// + /// Convert the constrainable real range into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the contrainable real range. + /// string hash(); }; + /// + /// This object represents the constrainable real values. + /// [dictionary] struct ConstrainDouble { + /// + /// Gets or sets the exact real value requried. This value must be + /// mutually exclusively set from Range. + /// [optional] double value; + /// + /// Gets or sets the constrainable real range values. + /// [optional] ConstrainDoubleRange range; + /// + /// Constructs a new constrainable real value. + /// [constructor, default] void ConstrainDouble(); + /// + /// Constructs a new constrainable real value by cloning existing constrainable value. + /// [constructor, altname(ConstrainDoubleClone)] void ConstrainDouble(ConstrainDouble source); + /// + /// Constructs a new constrainable real value from a JSON object. + /// [constructor, default, altname(ConstrainDoubleWithJson)] void ConstrainDouble(Json json); + /// + /// Convert the constrainable real value into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the contrainable real value. + /// string hash(); }; + /// + /// This object represents a single string value or a list of string + /// values. + /// [dictionary] struct StringOrStringList { + /// + /// Gets or sets a specific constrainable string value. This value must + /// be mutally exclusively set from Values; + /// [optional] string value; + /// + /// Gets or sets the constrainable string values. + /// [optional] StringList values; + /// + /// Constructs a new string or string list. + /// [constructor, default] void StringOrStringList(); + /// + /// Constructs a new string or string list from an existing string or string list. + /// [constructor, altname(StringOrStringListClone)] void StringOrStringList(StringOrStringList source); + /// + /// Constructs a new string or string list from a JSON object. + /// [constructor, default, altname(StringOrStringListWithJson)] void StringOrStringList(Json json); + /// + /// Convert the string or string list into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the string or string list. + /// string hash(); }; + /// + /// This object represents the constrainable string parameters. + /// [dictionary] struct ConstrainStringParameters { + /// + /// Gets or sets the exact required value for this property. + /// [optional] StringOrStringList exact; + /// + /// Gets or sets the ideal (target) value for this property. + /// [optional] StringOrStringList ideal; + /// + /// Constructs a new constrainable string parameters. + /// [constructor, default] void ConstrainStringParameters(); + /// + /// Constructs a new constrainable string parameters from an existing constrainable parameters. + /// [constructor, altname(ConstrainStringParametersClone)] void ConstrainStringParameters(ConstrainStringParameters source); + /// + /// Constructs a new constrainable string parameters from a JSON object. + /// [constructor, default, altname(ConstrainStringParametersWithJson)] void ConstrainStringParameters(Json json); + /// + /// Convert the constrainable string parameters into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the constrainable string parameters. + /// string hash(); }; + /// + /// This object represents the constrainable string values. + /// [dictionary] struct ConstrainString { + /// + /// Gets or sets the exact string value(s) requried. This value must be + /// mutually exclusively set from Parameters. + /// [optional] StringOrStringList value; + /// + /// Gets or sets the string constrainable value parameters. + /// [optional] ConstrainStringParameters parameters; + /// + /// Constructs a new constrainable string value. + /// [constructor, default] void ConstrainString(); + /// + /// Constructs a new constrainable string value from an existing constrainable value. + /// [constructor, altname(ConstrainStringClone)] void ConstrainString(ConstrainString source); + /// + /// Constructs a new constrainable string value from a JSON object. + /// [constructor, default, altname(ConstrainStringWithJson)] void ConstrainString(Json json); + /// + /// Convert the constrainable string value into a JSON object. + /// Json toJson(); + /// + /// Get a hash value of the constrainable string value. + /// string hash(); }; diff --git a/ortc/idl/DataChannel.idl b/ortc/idl/DataChannel.idl index fad9dbe2..a4db0770 100644 --- a/ortc/idl/DataChannel.idl +++ b/ortc/idl/DataChannel.idl @@ -37,99 +37,252 @@ namespace org { }; + /// + /// An RTCDataChannel can be configured to operate in different + /// reliability modes. A reliable channel ensures that the data is + /// delivered at the other peer through retransmissions. An unreliable + /// channel is configured to either limit the number of retransmissions + /// (maxRetransmits ) or set a time during which transmissions (including + /// retransmissions) are allowed (maxPacketLifeTime). These properties + /// can not be used simultaneously and an attempt to do so will result in + /// an error. Not setting any of these properties results in a reliable + /// channel. + /// [dictionary] struct RTCDataChannelParameters { + /// + /// Gets or sets a label that can be used to distinguish this + /// RTCDataChannel object from other RTCDataChannel objects. + /// string label; + /// + /// Gets or sets the if the RTCDataChannel is ordered, and false if out + /// of order delivery is allowed. + /// bool ordered = true; + /// + /// Gets or sets the maxPacketLifetime attribute represents the length + /// of the time window (in milliseconds) during which retransmissions + /// may occur in unreliable mode. A value of 0 means not used. + /// Milliseconds maxPacketLifetime; + /// + /// Gets or sets the maxRetransmits attribute returns the maximum number + /// of retransmissions that are attempted in unreliable mode if set. + /// uint32 maxRetransmits; + /// + /// Custom definition of the protocol being carried over the data channel. + /// string protocol; + /// + /// Gets or sets an indicator if the this RTCDataChannel was negotiated + /// by the application. If true, the application negotiated the + /// RTCDataChannel, otherwise the value is false. + /// bool negotiated; + /// + /// The id attribute returns the id for this RTCDataChannel if set. + /// [optional] uint16 id; + /// + /// Constructs an instance of an RTCDataChannelParameters instance. + /// [constructor, default] void RTCDataChannelParameters(); + /// + /// Constructs an instance of an RTCDataChannelParameters instance cloning from an existing instance. + /// [constructor, altname(RTCDataChannelParametersClone)] void RTCDataChannelParameters(RTCDataChannelParameters source); + /// + /// Constructs an instance of an RTCDataChannelParameters instance from a JSON object. + /// [constructor, default, altname(RTCDataChannelParametersWithJson)] void RTCDataChannelParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// RTCMessageEventData represents data arriving from the RTCDataChannel. + /// [dictionary] struct RTCMessageEventData { + /// + /// Gets the binary message being sent. Only set if the data was binary. + /// [getter] binary binary; + /// + /// Gets the binary message being sent. Only set if the data was text. + /// [getter] string text; }; + /// + /// RTCDataChannelStateChangeEvent represents the ready state event + /// fired when the RTCDataChannel state is changed. + /// struct RTCDataChannelStateChangeEvent { + /// + /// The RTCDataChannelState that cased the event to fire. + /// [getter] RTCDataChannelState state; }; + /// + /// RTCMessageEvent represents the event data when a message from the + /// RTCDataChannel is fired. + /// struct RTCMessageEvent { + /// + /// Gets the binary message being sent. + /// [getter] RTCMessageEventData data; }; + /// + /// An RTCDataChannel class instance allows sending data messages to/from + /// the remote peer. + /// interface RTCDataChannel : RTCStatsProvider { + /// + /// Constructs an instance of RTCDataChannel object from a + /// RTCDataTransport object and an RTCDataChannelParameters object. + /// [constructor] void RTCDataChannel(RTCDataTransport transport, RTCDataChannelParameters params) throws (InvalidParameters, InvalidStateError); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets or sets the related transport object. + /// [getter] RTCDataTransport transport; + /// + /// Gets or sets the parameters applying to this data channel. + /// [getter] RTCDataChannelParameters parameters; + /// + /// Gets or sets the state of the RTCDataChannel object. It must return + /// the value to which the user agent last set it (as defined by the + /// processing model algorithms). + /// [getter] RTCDataChannelState readyState; + /// + /// Gets the number of bytes of application data (UTF-8 text and binary + /// data) that have been queued using send() but that, as of the last + /// time the event loop started executing a task, had not yet been + /// transmitted to the network. + /// [getter] size_t bufferedAmount; + /// + /// Gets or sets the threshold at which the BufferedAmount is considered + /// to be low. When the bufferedAmount decreases from above this + /// threshold to equal or below it, the bufferedamountlow event fires. + /// The bufferedAmountLowThreshold is initially zero on each new + /// RTCDataChannel, but the application may change its value at any + /// time. + /// [getter, setter] size_t bufferedAmountLowThreshold; + /// + /// Gets or sets the binaryType attribute. On getting, return the value + /// to which it was last set. On setting, the user agent must set the + /// IDL attribute to the new value. When an RTCDataChannel object is + /// constructed, the binaryType attribute must be initialized to the + /// string 'blob'. This attribute controls how binary data is exposed to + /// scripts. + /// [getter, setter] string binaryType; + /// + /// Closes the RTCDataChannel. + /// void close(); + /// + /// The Send() method is overloaded to handle different data argument + /// types. This Send() method transmits a string to the remote peer. + /// [default, altname(sendWithString)] void send(string text); + /// + /// The Send() method is overloaded to handle different data argument + /// types. This Send() method transmits a binary blob to the remote + /// peer. + /// [altname(sendWithBinary)] void send(binary data); + /// + /// The event handler when the state of the RTCDataChannel is open. + /// [event] void onOpen(); + /// + /// The event handler when the state of the RTCDataChannel is closed. + /// [event] void onClose(); + /// + /// The event handler when the state of the RTCDataChannel object + //// changes. + /// [event] void onStateChanged(RTCDataChannelStateChangeEvent event); + /// + /// The error event handler for the RTCDataChannel. + /// [event] void onError(ErrorEvent event); + /// + /// The event handler when the BufferedAmount falls below the + /// BufferedAmountLowThreshold. + /// [event] void onBufferedAmountLow(); + /// + /// The event handler when data from the remote peer arrives. + /// [event] void onMessage(RTCMessageEvent event); }; diff --git a/ortc/idl/DtlsTransport.idl b/ortc/idl/DtlsTransport.idl index bf25e98c..52c9ba4a 100644 --- a/ortc/idl/DtlsTransport.idl +++ b/ortc/idl/DtlsTransport.idl @@ -33,32 +33,67 @@ namespace org { namespace ortc { + /// + /// The RTCDtlsParameters object includes information relating to DTLS + /// configuration. + /// [dictionary] struct RTCDtlsParameters { typedef std::list FingerprintList; + /// + /// The DTLS role, with a default of Auto. + /// RTCDtlsRole role = auto; + /// + /// Sequence of fingerprints, one fingerprint for each certificate. + /// FingerprintList fingerprints; + /// + /// Construct a new empty RTCDtlsParameters object. + /// [constructor, default] void RTCDtlsParameters(); + /// + /// Construct a new RTCDtlsParameters object by cloning the contents of an existing object. + /// [constructor, altname(RTCDtlsParametersClone)] void RTCDtlsParameters(RTCDtlsParameters source); + /// + /// Construct an RTCDtlsParameters from a JSON object. + /// [constructor, default, altname(RTCDtlsParametersWithJson)] void RTCDtlsParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The OnStateChange event of the RTCDtlsTransport object uses the + /// RTCDtlsTransportStateChangeEvent interface. + /// struct RTCDtlsTransportStateChangeEvent { + /// + /// Gets the new RTCDtlsTransportState that caused the event. + /// [getter] RTCDtlsTransportState state; }; - + /// + /// The RTCDtlsTransport object includes information relating to Datagram + /// Transport Layer Security (DTLS) transport. + /// interface RTCDtlsTransport : RTCDataTransport, RTCRtpTransport, RTCRtcpTransport, @@ -66,35 +101,91 @@ namespace org { typedef std::list CertificateList; + /// + /// A RTCDtlsTransport instance is constructed using an RTCIceTransport + /// and a sequence of RTCCertificate objects. If certificates is + /// non-empty, check that the expires attribute of each RTCCertificate + /// object is in the future. If a certificate has expired, throw an + /// InvalidParameter exception; otherwise, store the certificates. + /// [constructor] void RTCDtlsTransport( RTCIceTransport iceTransport, CertificateList certificates ); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the certificates provided in the constructor. + /// [getter] CertificateList certificates; + /// + /// The associated RTCIceTransport instance. + /// [getter] RTCIceTransport transport; + /// + /// The current state of the DTLS transport. + /// [getter] RTCDtlsTransportState state; - RTCDtlsParameters getLocalParameters(); - RTCDtlsParameters getRemoteParameters(); - + /// + /// Gets the DTLS parameters of the local RTCDtlsTransport. If multiple + /// certificates were provided in the constructor, then multiple + /// fingerprints will be returned, one for each certificate. + /// + [getter] + RTCDtlsParameters localParameters; + /// + /// Gets the remote DTLS parameters passed in the Start() method. + /// Prior to calling start(), null is returned. + /// + [getter] + RTCDtlsParameters remoteParameters(); + + /// + /// Returns the certificate chain in use by the remote side, with each + /// certificate encoded in binary Distinguished Encoding Rules (DER) + /// [X690]. GetRemoteCertificates() returns an empty list prior to + /// selection of the remote certificate, which is completed once + /// RTCDtlsTransportState transitions to "Connected". + /// binary getRemoteCertificates(); + /// + /// Start DTLS transport negotiation with the parameters of the remote + /// DTLS transport, including verification of the remote fingerprint, + /// then once the DTLS transport session is established, negotiate a + /// DTLS-SRTP [RFC5764] session to establish keys so as protect media + /// using SRTP [RFC3711]. Since symmetric RTP [RFC4961] is utilized, + /// the DTLS-SRTP session is bi-directional. + /// void start(RTCDtlsParameters remoteParameters) throws (InvalidStateError, InvalidParameters); + /// + /// Stops and closes the RTCDtlsTransport object. Calling stop() when + /// state is "closed" has no effect. + /// void stop(); + /// + /// This event handler, uses the RTCDtlsTransportStateChangedEvent + /// interface. It is called any time the RTCDtlsTransportState changes. + /// [event] void onStateChange(RTCDtlsTransportStateChangeEvent event); + /// + /// This event is fired on reception of a DTLS error alert. + /// [event] void onError(ErrorEvent event); }; diff --git a/ortc/idl/DtmfSender.idl b/ortc/idl/DtmfSender.idl index 508306a1..208db15a 100644 --- a/ortc/idl/DtmfSender.idl +++ b/ortc/idl/DtmfSender.idl @@ -34,35 +34,104 @@ namespace org { namespace ortc { + /// + /// An RTCDtmfSender instance allows sending DTMF tones to/from the remote + /// peer, as per [RFC4733]. + /// interface RTCRtpDtmfSender { + /// + /// Construct an instance of the RTCDtmfSender associated to an + /// RTCRtpSender. + /// [constructor] void RTCRtpDtmfSender(RTCRtpSender sender); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets whether the RTCDtmfSender is capable of sending DTMF. + /// bool canInsertDtmf(); + /// + /// The InsertDTMF() method is used to send DTMF tones. Since DTMF tones + /// cannot be sent without configuring the DTMF codec, if InsertDTMF() + /// is called prior to sender.Send(parameters), or if + /// sender.Send(parameters) was called but parameters did not include + /// the DTMF codec, throw an InvalidStateError exception. + /// + [default] + void insertDtmf(string tones) throws(InvalidStateError, InvalidParameters); + + /// + /// The InsertDTMF() method is used to send DTMF tones. Since DTMF tones + /// cannot be sent without configuring the DTMF codec, if InsertDTMF() + /// is called prior to sender.Send(parameters), or if + /// sender.Send(parameters) was called but parameters did not include + /// the DTMF codec, throw an InvalidStateError exception. + /// + [altname(insertDtmfWithDuration)] + void insertDtmf( + string tones, + Milliseconds duration + ) throws (InvalidStateError, InvalidParameters); + + /// + /// The InsertDTMF() method is used to send DTMF tones. Since DTMF tones + /// cannot be sent without configuring the DTMF codec, if InsertDTMF() + /// is called prior to sender.Send(parameters), or if + /// sender.Send(parameters) was called but parameters did not include + /// the DTMF codec, throw an InvalidStateError exception. + /// + [altname(insertDtmfWithDurationAndGap)] void insertDtmf( string tones, - [optional] Milliseconds duration, - [optional] Milliseconds interToneGap ) throws (InvalidStateError, InvalidParameters); + /// + /// Gets the RTCRtpSender instance. + /// [getter] RTCRtpSender sender; + /// + /// Gets the toneBuffer attribute returns a list of the tones remaining + /// to be played out. + /// [getter] string toneBuffer; + /// + /// Get the duration attribute returns the current tone duration value + /// in milliseconds. This value will be the value last set via the + /// InsertDTMF() method, or the default value of 100 ms if + /// InsertDTMF() was called without specifying the duration. + /// [getter] Milliseconds duration; + /// + /// Gets the interToneGap attribute returns the current value of the + /// between-tone gap. This value will be the value last set via the + /// InsertDTMF() method, or the default value of 70 ms if InsertDTMF() + /// was called without specifying the interToneGap. + /// [getter] Milliseconds interToneGap; + + /// + /// The OnToneChange event handler uses the RTCDTMFToneChangeEvent + /// interface to return the character for each tone as it is played out. + /// + [event] + void onToneChange(); }; } diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index 258ee1d7..7df88684 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -33,134 +33,356 @@ namespace org { namespace ortc { + /// + /// ICE interface policy information. + /// [dictionary] struct RTCIceGatherInterfacePolicy { + /// + /// Gets or sets the string form of the RTCIceGatherInterfaceType enums + /// to specify which interface types this policy object applies. + /// string interfaceType; + /// + /// Gets or sets the candidate filter policy to apply to the specified + /// interface types. + /// RTCIceGatherFilterPolicy gatherPolicy = none; + /// + /// Constructs a new empty RTCIceGatherInterfacePolicy object. + /// [constructor, default] void RTCIceGatherInterfacePolicy(); + /// + /// Constructs a new RTCIceGatherInterfacePolicy object cloning the data from an existing object. + /// [constructor, altname(RTCIceGatherInterfacePolicyClone)] void RTCIceGatherInterfacePolicy(RTCIceGatherInterfacePolicy source); + /// + /// Constructs a new RTCIceGatherInterfacePolicy object extracing the data from a JSON object. + /// [constructor, default, altname(RTCIceGatherInterfacePolicyWithJson)] void RTCIceGatherInterfacePolicy(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// ICE server information. + /// [dictionary] struct RTCIceServer { + /// + /// Gets or sets the STUN or TURN URI(s) as defined in [RFC7064] and [RFC7065] or other + /// URI types. + /// StringList urls; + /// + /// Gets or sets the username to use with that TURN server, if this + /// RTCIceServer object represents a TURN Server. + /// string username; + /// + /// Gets or sets the TURN server credential, if this RTCIceServer object + /// represents a TURN Server. + /// string credential; + /// + /// Gets or sets how credential should be used when that TURN server + /// requests authorization, if this RTCIceServer object represents a + /// TURN Server. + /// RTCIceCredentialType credentialType = password; + /// + /// Constructs an empty instance of an RTCIceServer object. + /// [constructor, default] void RTCIceServer(); + /// + /// Constructs an instance of an RTCIceServer object by cloning the data from an existing object. + /// [constructor, altname(RTCIceServerClone)] void RTCIceServer(RTCIceServer source); + /// + /// Constructs an instance of an RTCIceServer object by extracting the data from a JSON object. + /// [constructor, default, altname(RTCIceServerWithJson)] void RTCIceServer(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// RTCIceGatherOptions provides options relating to the gathering of ICE + /// candidates. + /// [dictionary] struct RTCIceGatherOptions { typedef std::list InterfacePolicyList; typedef std::list ServerList; + /// + /// Gets or sets the option to specify continous gathering mode. + /// + /// If true, then the RTCIceGatherer will gather all candidates + /// available "for now" and fire a RTCIceGathererCandidateCompleteEvent. + /// However, should more candidates be discovered or Gather() get called + /// again after the the RTCIceGathererCandidateCompleteEvent then the + /// RTCIceGatherer is allowed to go back into the Gatherering state and + /// fire newly discovered candidates until another fired + /// RTCIceGathererCandidateCompleteEvent occurs. + /// + /// If false, then the RTCIceGatherer will not be able to discover any + /// new candidates after going into the Complete state, or go back + /// into the Gatherering state. + /// bool continuousGathering = true; + /// + /// Gets or sets the ICE gather policy per interface type. + /// InterfacePolicyList interfacePolicies; + /// + /// Gets or sets additional ICE servers to be configured. Since + /// implementations may provide default ICE servers, and applications + /// can desire to restrict communications to the local LAN, iceServers + /// need not be set. + /// ServerList iceServers; + /// + /// Constructs a new instance of an empty RTCIceGatherOptions object. + /// [constructor, default] void RTCIceGatherOptions(); + /// + /// Constructs a new instance of an RTCIceGatherOptions object by cloning the contents of an existing object. + /// [constructor, altname(RTCIceGatherOptionsClone)] void RTCIceGatherOptions(RTCIceGatherOptions source); + /// + /// Constructs a new instance of an RTCIceGatherOptions object by extracting the data from a JSON object. + /// [constructor, default, altname(RTCIceGatherOptionsWithJson)] void RTCIceGatherOptions(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// This object represents the error event when the RTCIceGatherer object + /// has experienced an ICE gathering failure (such as an authentication + /// failure with TURN credentials). + /// [dictionary] struct RTCIceGathererIceErrorEvent { + /// + /// Gets the RTCIceCandidate used to communicate with the STUN or TURN + /// server. On a multihomed system, multiple interfaces may be sed to + /// contact the server, and this attribute allows the application to + /// figure out on which one the failure occurred. + /// [nullable] RTCIceCandidate hostCandidate; + /// + /// Gets the STUN or TURN URL identifying the server on which the + /// failure ocurred. + /// string url; + /// + /// Gets the numeric STUN error code returned by the STUN or TURN + /// server. If the server could not be reached on all interfaces, + /// ErrorCode will be set to a TBD value in the 7XX range, as this does + /// not conflict with the STUN error code range, and HostCandidate will + /// be null. + /// uint16 errorCode; + /// + /// Gets the STUN reason text returned by the STUN or TURN server. + /// string errorText; }; - + /// + /// This object represents the event for when the RTCIceGathererState + /// changed. + /// struct RTCIceGathererStateChangeEvent { + /// + /// Gets the new RTCIceGathererState that caused the event. + /// [getter] RTCIceGathererState state; }; + /// + /// This object represents the event for when a new RTCIceGathererCandidate + /// is made available (or is gone). + /// struct RTCIceGathererCandidateEvent { + /// + /// Gets the ICE candidate that caused the event. + /// [getter] RTCIceCandidate candidate; + /// + /// Gets the URL of the server from which the candidate was obtained. + /// [getter] string url; }; + /// + /// This object represents the event for when a new + /// RTCIceCandidateComplete is made available. + /// struct RTCIceGathererCandidateCompleteEvent { + /// + /// Gets the ICE candidate that caused the event. + /// [getter] RTCIceCandidateComplete candidate; }; + /// + /// The RTCIceGatherer gathers local host, server reflexive and relay + /// candidates, as well as enabling the retrieval of local Interactive + /// Connectivity Establishment (ICE) parameters which can be exchanged in + /// signaling. By enabling an endpoint to use a set of local candidates to + /// construct multiple RTCIceTransport objects, the RTCIceGatherer enables + /// support for scenarios such as parallel forking. + /// interface RTCIceGatherer : RTCStatsProvider { typedef std::list CandidateList; + /// + /// Constructs an instance of an RTCIceGatherer. + /// [constructor] void RTCIceGatherer(RTCIceGatherOptions options); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; - + puid objectId; + + /// + /// Gets the component-id of the RTCIceGatherer object. In + /// RTCIceGatherer objects returned by createAssociatedGatherer() the + /// value of component is "RTCP". In all other RTCIceGatherer objects, + /// the value of component is "RTP". + /// [getter] RTCIceComponent component; + /// + /// Gets the current state of the ICE gatherer. + /// [getter] RTCIceGathererState state; - RTCIceParameters getLocalParameters(); - CandidateList getLocalCandidates(); - + /// + /// Obtain the ICE parameters of the RTCIceGatherer. + /// + [getter] + RTCIceParameters localParameters; + /// + /// Retrieve the sequence of valid local candidates associated with the + /// RTCIceGatherer. This retrieves all unpruned local candidates + /// currently known (except for peer reflexive candidates), even if an + /// onlocalcandidate event hasn't been processed yet. Prior to calling + /// Gather() an empty list will be returned. + /// + [getter] + CandidateList localCandidates; + + /// + /// Create an associated RTCIceGatherer for RTCP, with the same + /// RTCIceParameters and RTCIceGatherOptions. If state is "closed", + /// throw an InvalidStateError exception. If an RTCIceGatherer calls the + /// method more than once, or if component is "RTCP", throw an + /// InvalidStateError exception. + /// RTCIceGatherer createAssociatedGatherer(); - void gather( - [optional] - RTCIceGatherOptions options - ); - + /// + /// Gather ICE candidates. Utilize the value of options passed in the constructor. + /// + [default] + void gather(); + + /// + /// Gather ICE candidates with the options specified. + /// + void gather(RTCIceGatherOptions options); + + /// + /// Prunes all local candidates, and closes the port. Associated + /// RTCIceTransport objects transition to the "disconnected" state + /// (unless they were in the "failed" state). Calling close() when state + /// is "closed" has no effect. + /// void close(); + /// + /// The RTCIceGathererState changed. + /// [event] void onStateChange(RTCIceGathererStateChangeEvent event); + /// + /// A new RTCIceGathererCandidate is made available. + /// [event] void onLocalCandidate(RTCIceGathererCandidateEvent event); + /// + /// A new RTCIceCandidateComplete is made available. + /// [event] void onLocalCandidateComplete(RTCIceGathererCandidateCompleteEvent event); + /// + /// A new RTCIceGathererCandidate is no longer available. + /// [event] void onLocalCandidateGone(RTCIceGathererCandidateEvent event); + /// + /// The RTCIceGatherer object has experienced an ICE gathering failure + /// (such as an authentication failure with TURN credentials). + /// [event] void onError(RTCIceGathererIceErrorEvent event); }; diff --git a/ortc/idl/IceTransport.idl b/ortc/idl/IceTransport.idl index 3dbbc9f3..a819f2e2 100644 --- a/ortc/idl/IceTransport.idl +++ b/ortc/idl/IceTransport.idl @@ -33,79 +33,244 @@ namespace org { namespace ortc { + /// + /// An abstract object representing an RTP transport. + /// interface RTCRtpTransport {}; + /// + /// An abstract object representing an RTCP transport. + /// interface RTCRtcpTransport {}; + /// + /// This object represents the event data associated when the + /// RTCIceTransportState changes. + /// struct RTCIceTransportStateChangeEvent { + /// + /// Gets the RTCIceTransportState state at the time the event fired. + /// [getter] RTCIceTransportState state; }; + /// + /// This object represents the candidate pair events changes the + /// RTCIceTransport object uses the RTCIceCandidatePairChangeEvent + /// interface. + /// struct RTCIceCandidatePairChangeEvent { + /// + /// Gets the selected RTCIceCandidatePair that caused the event. + /// [getter] RTCIceCandidatePair candidatePair; }; + /// + /// The RTCIceTransport allows an application access to information about + /// the Interactive Connectivity Establishment(ICE) transport over which + /// packets are sent and received. In particular, ICE manages + /// peer - to - peer connections which involve state which the + /// application may want to access. + /// interface RTCIceTransport : RTCRtcpTransport, RTCStatsProvider { typedef std::list CandidateList; + /// + /// Constructs an instance of the RTCIceTransport object. + /// [constructor, default] + void RTCIceTransport(); + + /// + /// Constructs an instance of the RTCIceTransport object using the + /// specified RTCIceGatherer. + /// + [constructor, altname(RTCIceTransportWithGatherer)] void RTCIceTransport(RTCIceGatherer gatherer); + /// + /// Gets an unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the iceGatherer attribute is set to the value of gatherer if + /// passed in the constructor or in the latest call to Start(). + /// [getter] RTCIceGatherer gatherer; + /// + /// Gets the current role of the ICE transport. + /// [getter] RTCIceRole role; + /// + /// Gets the component-id of the RTCIceTransport object. In + /// RTCIceTransport objects returned by CreateAssociatedTransport(), the + /// value of component is "RTCP". In all other RTCIceTransport objects, + /// the value of component is "RTP". + /// [getter] RTCIceComponent component; + /// + /// Gets the current state of the ICE transport. + /// [getter] RTCIceTransportState state; - CandidateList getRemoteCandidates(); - CandidateList getSelectedCandidatePair(); + /// + /// Gets the sequence of candidates associated with the remote + /// RTCIceTransport. Only returns the candidates previously added using + /// SetRemoteCandidates() or AddRemoteCandidate(). If there are no + /// remote candidates, an empty list is returned. + /// + [getter] + CandidateList remoteCandidates; + /// + /// Gets the selected candidate pair on which packets are sent. If + /// there is no selected pair yet, or consent [RFC7675] is lost on the + /// selected pair, nullptr is returned. + /// + [getter] + CandidateList selectedCandidatePair; + + /// + /// The first time Start() is called, candidate connectivity checks are + /// started and the ICE transport attempts to connect to the remote + /// RTCIceTransport. If start() is called with invalid parameters, throw + /// an InvalidParameters exception. For example, if gatherer.component + /// has a value different from iceTransport.component, throw an + /// InvalidParameters exception. If state or gatherer.state is "closed", + /// throw an InvalidStateError exception. When start() is called again, + /// RTCIceTransportState transitions to the "connected" state, all + /// remote candidates are flushed, and AddRemoteCandidate() or + /// SetRemoteCandidates() must be called to add the remote candidates + /// back or replace them. + /// + void start( + RTCIceGatherer gatherer, + RTCIceParameters remoteParameters, + ); + + /// + /// The first time Start() is called, candidate connectivity checks are + /// started and the ICE transport attempts to connect to the remote + /// RTCIceTransport. If start() is called with invalid parameters, throw + /// an InvalidParameters exception. For example, if gatherer.component + /// has a value different from iceTransport.component, throw an + /// InvalidParameters exception. If state or gatherer.state is "closed", + /// throw an InvalidStateError exception. When start() is called again, + /// RTCIceTransportState transitions to the "connected" state, all + /// remote candidates are flushed, and AddRemoteCandidate() or + /// SetRemoteCandidates() must be called to add the remote candidates + /// back or replace them. + /// + [default, altname(startWithRole)] + void start( + RTCIceGatherer gatherer, + RTCIceParameters remoteParameters, + RTCIceRole options + ); + /// + /// The first time Start() is called, candidate connectivity checks are + /// started and the ICE transport attempts to connect to the remote + /// RTCIceTransport. If start() is called with invalid parameters, throw + /// an InvalidParameters exception. For example, if gatherer.component + /// has a value different from iceTransport.component, throw an + /// InvalidParameters exception. If state or gatherer.state is "closed", + /// throw an InvalidStateError exception. When start() is called again, + /// RTCIceTransportState transitions to the "connected" state, all + /// remote candidates are flushed, and AddRemoteCandidate() or + /// SetRemoteCandidates() must be called to add the remote candidates + /// back or replace them. + /// + [altname(startWithOptions)] void start( RTCIceGatherer gatherer, RTCIceParameters remoteParameters, - [optional] RTCIceTransportOptions options ); + /// + /// Stops and closes the current object. Also removes the object from + /// the RTCIceTransportController. Calling stop() when state is "closed" + /// has no effect. + /// void stop(); - RTCIceParameters getRemoteParameters(); + /// + /// Get the current ICE parameters of the remote RTCIceTransport. + /// + [getter] + RTCIceParameters remoteParameters; + /// + /// Create an associated RTCIceTransport for RTCP. If called more than + /// once for the same component, or if state is "closed", throw an + /// InvalidStateError exception. If called when component is "RTCP", + /// throw an InvalidStateError exception. + /// RTCIceTransport createAssociatedTransport(); - void addRemoteCandidate(RTCIceCandidate remoteCandidate) throws (InvalidStateError, InvalidParameters); + /// + /// Add a remote candidate associated with the remote RTCIceTransport. + /// If state is "closed", throw an InvalidStateError exception. + /// + void addRemoteCandidate(RTCIceGathererCandidate remoteCandidate) throws (InvalidStateError, InvalidParameters); + /// + /// Set the sequence of candidates associated with the remote + /// RTCIceTransport. If state is "closed", throw an InvalidStateError + /// exception. + /// void setRemoteCandidates(CandidateList remoteCandidates) throws (InvalidStateError, InvalidParameters); void removeRemoteCandidate(RTCIceGathererCandidate remoteCandidate) throws (InvalidStateError, InvalidParameters); + /// + /// Keep a particular local/remote canadidate path alive with keep alives to ensure the path is always kept alive. + /// + [default] + void keepWarm(RTCIceCandidatePair candidatePair) throws (InvalidStateError); + /// + /// Tell engine to keep a particular local/remote canadidate path alive or not to ensure the path is always kept alive. + /// + [altname(setKeepWarm)] void keepWarm( RTCIceCandidatePair candidatePair, - [optional] bool keepWarm ) throws (InvalidStateError); + /// + /// The RTCIceTransportState changed. + /// [event] void onStateChange(RTCIceTransportStateChangeEvent event); + /// + /// A new RTCIceCandidatePair is available. + /// [event] void onCandidatePairAvailable(RTCIceCandidatePairChangeEvent event); + /// + /// A previous RTCIceCandidatePair is gone. + /// [event] void onCandidatePairGone(RTCIceCandidatePairChangeEvent event); + /// + /// The selected RTCIceCandidatePair changed. + /// [event] void onCandidatePairChange(RTCIceCandidatePairChangeEvent event); }; diff --git a/ortc/idl/IceTransportController.idl b/ortc/idl/IceTransportController.idl index cc7e44fc..5291affd 100644 --- a/ortc/idl/IceTransportController.idl +++ b/ortc/idl/IceTransportController.idl @@ -33,22 +33,55 @@ namespace org { namespace ortc { + /// + /// The RTCIceTransportController object assists in the managing of ICE + /// freezing and bandwidth estimation. + /// interface RTCIceTransportController { typedef std::list IceTransportList; + /// + /// Constructs an instance of the RTCIceTransportController. + /// [constructor] void RTCIceTransportController(); + /// + /// Get a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the RTCIceTransport with a component of "RTP". If + /// addTransport() has not been called, an empty list is returned. + /// [getter] IceTransportList transports; + /// + /// Adds transport to the RTCIceTransportController object for the + /// purposes of managing ICE freezing and sharing bandwidth estimation. + /// Since addTransport manages ICE freezing, candidate pairs that are + /// not in the frozen state maintain their state when + /// AddTransport(transport) is called. RTCIceTransport objects will be + /// unfrozen according to their index. The added transport is inserted + /// as the final index. + /// + /// If transport.state is "closed", throw an InvalidStateError + /// exception. If transport has already been added to another + /// RTCIceTransportController object, or if transport.component is + /// "RTCP", throw an InvalidStateError exception. + /// + void addTransport(RTCIceTransport transport) throws (InvalidParameters, InvalidStateError); + /// + /// The transport is inserted at index. If index is greater than the + /// current number of RTCIceTransports with a component of "RTP", + /// throw an InvalidParameters exception. + /// void addTransport( RTCIceTransport transport, - [optional] size_t index ) throws (InvalidParameters, InvalidStateError); }; diff --git a/ortc/idl/IceTypes.idl b/ortc/idl/IceTypes.idl index e342b61c..f0e3c39f 100644 --- a/ortc/idl/IceTypes.idl +++ b/ortc/idl/IceTypes.idl @@ -33,108 +33,276 @@ namespace org { namespace ortc { + /// + /// An base object representing a gathered ICE candidate. + /// struct RTCIceGathererCandidate { + /// + /// Gets or sets the the component of the ICE candidate to indicate + /// if the candidate is related to RTP or RTCP. + /// [getter] RTCIceComponent component; + /// + /// Return a new instance of an RTCIceGathererCandidate by extracting out the candidate + /// information from the JSON object. + /// [static, default] RTCIceGathererCandidate create(Json json); + + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// + Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// + string hash(); }; + /// + /// The RTCIceCandidate object includes information relating to an ICE + /// candidate. + /// struct RTCIceCandidate : RTCIceGathererCandidate { + /// + /// Gets or sets the type of interface this candidate was gathered from. + /// [getter] string interfaceType; + /// + /// Gets or sets a unique identifier that allows ICE to correlate + /// candidates that appear on multiple RTCIceTransports. + /// [getter] string foundation; + /// + /// Gets or sets the assigned usage priority of the candidate. This + /// priority represents the priority to choose this candidate over other + /// candidates as described in [RFC5245]. If + /// RTCIceParameters.UseUnfreezePriority is false then this priority + /// also represents the priority in which to unfreeze ICE candidates. + /// This is automatically populated by the RTC engine and/or browser. + /// [getter] uint32 priority; + /// + /// Gets or sets the unfreeze priority. If + /// RTCIceParameters.UseUnfreezePriority is true then this priority is + /// used to determine the unfreezing search order in which to check ICE + /// candidates. The higher priority candidates will be searched as + /// posssible pairings before lower priority candidates. This is a + /// useful option as setting up a connection via a relay may be faster + /// than exhaustively searching for the most optimal candidate pairing + /// which is determined by standard Priority. + /// + /// [getter] uint32 unfreezePriority; + /// + /// Gets or sets the protocol of the candidate (UDP/TCP). + /// [getter] RTCIceProtocol protocol; + /// + /// Gets or sets the IP address of the candidate. + /// [getter] string ip; + /// + /// Gets or sets the port for the candidate. + /// [getter] uint16 port; + /// + /// Gets or sets the type of candidate. + /// [getter] RTCIceCandidateType candidateType; + /// + /// Gets or sets the type of TCP candidate. + /// [getter] RTCIceTcpCandidateType tcpType; + /// + /// Gets or sets the related address if not a host candidate type. For + /// candidates that are derived from others, such as relay or reflexive + /// candidates, the relatedAddress refers to the candidate that these + /// are derived from. For host candidates, the RelatedAddress is set to + /// the empty string. + /// [getter] string relatedAddress; + /// + /// Gets or sets the related port if not a host candidate type. For + /// candidates that are derived from others, such as relay or reflexive + /// candidates, the relatedPort refers to the host candidate that these + /// are derived from. For host candidates, the RelatedPort is null. + /// [getter] uint16 relatedPort; - - [static] - RTCIceCandidate convert(RTCIceGathererCandidate candidate); - - Json toJson(); - string hash(); }; + /// + /// A candidate representing the completed state of the ICE gathering process + /// which can be marshalled and sent to the remote party to inform of the + /// local gathering completion process. + /// struct RTCIceCandidateComplete : RTCIceGathererCandidate { + /// + /// This attribute is always present and set to true, indicating that + /// ICE candidate gathering is complete. + /// [getter] bool complete; - - [static] - RTCIceCandidateComplete convert(RTCIceGathererCandidate candidate); - - Json toJson(); - string hash(); }; + /// + /// The local RTCIceParameters object includes the ICE username fragment + /// and password and other ICE-related parameters. The RTCIceParameters + /// object corresponding to a remote peer may also include an iceLite + /// attribute (set to "true" if the remote peer only supports ICE-lite). + /// [dictionary] struct RTCIceParameters { + /// + /// Set this value to true if the remote ICE implementation also + /// supports the separation of canddiate choise priorty versus + /// the priority to unfreeze the candidates. This allows the ICE engine + /// to search for a candidate that is more likely to work before trying + /// to find the most optimal candidate to use long term. + /// bool useUnfreezePriority; + /// + /// The ICE username fragment. + /// string usernameFragment; + /// + /// The ICE password. + /// string password; + /// + /// If only ICE-lite is supported (true) or not (false or unset). Since + /// [draft-ietf-rtcweb-transports] Section 3.4 requires client RTC + /// engines/browsers support for full ICE, IceLite will only be "true" + /// for a remote peer such as a gateway. GetLocalParameters().IceLite + /// will not return true. + /// bool iceLite; + /// + /// Constructs an empty instance of an RTCIceParameters object. + /// [constructor, default] void RTCIceParameters(); + /// + /// Constructs an instance of an RTCIceParameters object by cloning the contents of an existing object. + /// [constructor, altname(RTCIceParametersClone)] void RTCIceParameters(RTCIceParameters source); + /// + /// Constructs an instance of an RTCIceParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCIceParametersWithJson)] void RTCIceParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCIceCandidatePair contains the currently selected ICE candidate + /// pair. + /// struct RTCIceCandidatePair { + /// + /// Gets or sets the local ICE candidate. + /// RTCIceCandidate local; + /// + /// Gets or sets the remote ICE candidate. + /// RTCIceCandidate remote; + /// + /// Constructs an empty instance of an RTCIceCandidatePair object. + /// [constructor, default] void RTCIceCandidatePair(); + /// + /// Constructs an instance of an RTCIceCandidatePair object by cloning the contents of an existing object. + /// [constructor, altname(RTCIceCandidatePairClone)] void RTCIceCandidatePair(RTCIceCandidatePair source); + /// + /// Constructs an instance of an RTCIceCandidatePair object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCIceCandidatePairWithJson)] void RTCIceCandidatePair(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCIceTransportOptions represents the ICE transport options + /// specified for the RTCIceTransport object. + /// [dictionary] struct RTCIceTransportOptions { + /// + /// Gets or sets if aggressive ICE nomination should be used. If true, + /// the RTCIceTransport will use aggressive ICE nomination. If false, + /// the RTCICeTransport will use regular ICE nomination. + /// bool aggressiveIce; + /// + /// Gets of sets the ICE role to use for the ICE transport. + /// RTCIceRole role = controlled; + /// + /// Constructs an empty instance of an RTCIceTransportOptions object. + /// [constructor, default] void RTCIceTransportOptions(); + /// + /// Constructs an instance of an RTCIceTransportOptions object by cloning data from an existing object. + /// [constructor, altname(RTCIceTransportOptionsClone)] void RTCIceTransportOptions(RTCIceTransportOptions source); + /// + /// Constructs an instance of an RTCIceTransportOptions object by extracting object data from a JSON object. + /// [constructor, altname(RTCIceTransportOptionsWithJson)] void RTCIceTransportOptions(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; } diff --git a/ortc/idl/Identity.idl b/ortc/idl/Identity.idl index bf5e266b..f0f923e4 100644 --- a/ortc/idl/Identity.idl +++ b/ortc/idl/Identity.idl @@ -33,24 +33,55 @@ namespace org { namespace ortc { + /// + /// The RTCIdentityAssertion dictionary provides information about an identity assertion. + /// [dictionary] struct RTCIdentityAssertion { + /// + /// Gets or sets a domain name representing the identity provider. + /// string idp; + /// + /// Gets or sets a representation of the verified peer identity conforming to [RFC5322]. + /// This identity will have been verified via the procedures described in [RTCWEB-SECURITY-ARCH]. + /// See https://tools.ietf.org/html/draft-ietf-rtcweb-security-arch-12 for more information. + /// string name; }; + /// + /// The RTCIdentityResult is a base64 JSON encoded assertion. + /// [dictionary] struct RTCIdentityResult { + /// + /// Gets or sets the base64 and JSON encoded assertion. + /// string assertion; }; + /// + /// The RTCIdentityError dictionary provides information relating to error responses. + /// [dictionary] struct RTCIdentityError { + /// + /// Gets or sets the domain name of the identity provider that is providing the error response. + /// string idp; + /// + /// Gets or sets the IdP protocol that is in use. + /// string protocol; + /// + /// Gets or sets an IdP that is unable to generate an identity assertion due to a lack of sufficient + /// user authentication information can provide a URL to a page where the user can complete + /// authentication. If the IdP provides this URL, this attribute includes the value provided by the IdP. + /// string loginUrl; }; @@ -64,23 +95,50 @@ namespace org [constructor] void RTCIdentity(RTCDtlsTransport transport); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the peer identity assertion information if an identity assertion was provided and verified. + /// Once this value is set to a value, it cannot change. + /// [getter] RTCIdentityAssertion peerIdentity; - [getter] - RTCDtlsTransport transport; + /// + /// Sets the identity provider to be used for a given RTCIdentity object, and initiates the process of + /// obtaining an identity assertion. + /// + [default] + PromiseWithResult getIdentityAssertion(string provider); + + /// + /// Sets the identity provider to be used for a given RTCIdentity object, and initiates the process of + /// obtaining an identity assertion. + /// + [altname(getIdentityAssertionWithProtocol)] + PromiseWithResult getIdentityAssertion( + string provider, + string protocol + ); + /// + /// Sets the identity provider to be used for a given RTCIdentity object, and initiates the process of + /// obtaining an identity assertion. + /// + [altname(getIdentityAssertionWithProtocolAndUsername)] PromiseWithResult getIdentityAssertion( string provider, - [optional] string protocol, - [optional] string username ); + /// + /// Salidates the identity assertion. + /// PromiseWithAssertion setIdentityAssertion(string assertion); }; } diff --git a/ortc/idl/MediaDevices.idl b/ortc/idl/MediaDevices.idl index 185b361e..1b81c6bc 100644 --- a/ortc/idl/MediaDevices.idl +++ b/ortc/idl/MediaDevices.idl @@ -33,51 +33,177 @@ namespace org { namespace ortc { + /// + /// MediaTrackSupportedConstraints represents the list of constraints + /// recognized by a User Agent for controlling the Capabilities of a + /// MediaStreamTrack object.This dictionary is used as a function return + /// value, and never as an operation argument. + /// [dictionary] struct MediaTrackSupportedConstraints { + /// + /// The width or width range, in pixels. As a capability, the range should span the + /// video source's pre-set width values with min being the smallest width and max + /// being the largest width. + /// bool width; + /// + /// The height or height range, in pixels. As a capability, the range should span + /// the video source's pre-set height values with min being the smallest height and + /// max being the largest height. + /// bool height; + /// + /// The exact aspect ratio (width in pixels divided by height in pixels, represented + /// as a double rounded to the tenth decimal place) or aspect ratio range. + /// bool aspectRatio; + /// + /// The exact frame rate (frames per second) or frame rate range. If this frame + /// rate cannot be determined (e.g. the source does not natively provide a frame rate, + /// or the frame rate cannot be determined from the source stream), then this value + /// must refer to the User Agent's vsync display rate. + /// bool frameRate; + /// + /// This string (or each string, when a list) should be one of the members of + /// VideoFacingMode. The members describe the directions that the camera can + /// face, as seen from the user's perspective. Note that getConstraints may + /// not return exactly the same string for strings not in this enum. This + /// preserves the possibility of using a future version of enum for + /// this property. + /// bool facingMode; + /// + /// The volume or volume range, as a multiplier of the linear audio sample + /// values. A volume of 0.0 is silence, while a volume of 1.0 is the maximum + /// supported volume. A volume of 0.5 will result in an approximately 6 dBSPL + /// change in the sound pressure level from the maximum volume. Note that any + /// ConstraintSet that specifies values outside of this range of 0 to 1 can + /// never be satisfied. + /// bool volume; + /// + /// The sample rate in samples per second for the audio data. + /// bool sampleRate; + /// + /// The linear sample size in bits. This constraint can only be satisfied for + /// audio devices that produce linear samples. + /// bool sampleSize; + /// + /// When one or more audio streams is being played in the processes of + /// various microphones, it is often desirable to attempt to remove the + /// sound being played from the input signals recorded by the microphones. + /// This is referred to as echo cancellation. There are cases where it is + /// not needed and it is desirable to turn it off so that no audio artifacts + /// are introduced. This allows applications to control this behavior. + /// bool echoCancellation; + /// + /// The latency or latency range, in seconds. The latency is the time + /// between start of processing (for instance, when sound occurs in + /// the real world) to the data being available to the next step in + /// the process. Low latency is critical for some applications; high + /// latency may be acceptable for other applications because it helps + /// with power constraints. The number is expected to be the target + /// latency of the configuration; the actual latency may show some + /// variation from that. + /// bool latency; + /// + /// The number of independent channels of sound that the audio data contains, + /// i.e. the number of audio samples per sample frame. + /// + bool channelCount; + /// + /// The origin-unique identifier for the source of the MediaStreamTrack. + /// bool deviceId; + /// + /// The browsing session-unique group identifier for the source of the MediaStreamTrack. + /// bool groupId; + /// + /// Constructs an empty instance of a MediaTrackSupportedConstraints object. + /// [constructor, default] void MediaTrackSupportedConstraints(); + /// + /// Constructs an instance of a MediaTrackSupportedConstraints object by cloning an existing object. + /// [constructor, altname(MediaTrackSupportedConstraintsClone)] void MediaTrackSupportedConstraints(MediaTrackSupportedConstraints source); + /// + /// Constructs an instance of a MediaTrackSupportedConstraints object by extracting object data from a JSON object. + /// [constructor, default, altname(MediaTrackSupportedConstraintsWithJson)] void MediaTrackSupportedConstraints(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// Media device information representing the User Agent's available + /// media input and output devices. + /// [dictionary] struct MediaDeviceInfo { + /// + /// Describes the kind of the represented device. + /// MediaDeviceKind kind = audioInput; + /// + /// A label describing this device (for example "External USB Webcam"). + /// If the device has no associated label, then this attribute must + /// return the empty string. + /// string label; + /// + /// A unique identifier for the represented device. + /// string deviceId; + /// + /// Returns the group identifier of the represented device. Two devices + /// have the same group identifier if they belong to the same physical + /// device; for example a monitor with a built-in camera and microphone. + /// string groupId; - MediaTrackSupportedConstraints supportedConstraints; - + /// + /// Constructs an empty instance of a MediaDeviceInfo object. + /// [constructor, default] void MediaDeviceInfo(); + /// + /// Constructs an instance of a MediaDeviceInfo object by cloning object data from an existing object. + /// [constructor, altname(MediaDeviceInfoClone)] void MediaDeviceInfo(MediaDeviceInfo source); + /// + /// Constructs an instance of a MediaDeviceInfo object by extracting object data from a JSON object. + /// [constructor, default, altname(MediaDeviceInfoWithJson)] void MediaDeviceInfo(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; @@ -91,20 +217,61 @@ namespace org [constructor, delete] void MediaDevices(); + /// + /// Gets the media devices singleton object. + /// [static, getter] MediaDevices singleton; + /// + /// Returns a dictionary whose members are the constrainable properties + /// known to the User Agent. A supported constrainable property must be + /// represented and any constrainable properties not supported by the + /// User Agent must not be present in the returned dictionary. The + /// values returned represent what the browser implements and will not + /// change during a browsing session. + /// + /// MediaTrackSupportedConstraints [static] MediaTrackSupportedConstraints getSupportedConstraints(); + /// + /// Collects information about the User Agent's available media input + /// and output devices. + /// + /// IAsyncOperation vector list of MediaDeviceInfo [static] PromiseWithDeviceList enumerateDevices(); + /// + /// Grant access to the user for permission to use their Web cam or + /// other video or audio input. + /// [static] PromiseWithTrackList getUserMedia(MediaStreamConstraints constraints); + /// + /// The set of media devices, available to the User Agent, has changed. + /// The current list devices can be retrieved with the + /// EnumerateDevices() method. + /// + /// [event] void onDeviceChange(); }; + + /// + /// Interface for controlling the behaviour of media. + /// + [special] + interface MediaControl + { + /// + /// Gets or sets the media engine the application orientation has changed. + /// + [static, getter, setter] + Any displayOrientation; + }; + } } diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index 33fa9ada..8cacc2c8 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -33,227 +33,743 @@ namespace org { namespace ortc { + /// + /// Capabilities is a dictionary containing one or more key-value pairs, + /// where each key must be a constrainable property, and each value must + /// be a subset of the set of values allowed for that property. The exact + /// type of the value expression depends on the type of the property. + /// The Capabilities dictionary specifies which constrainable properties + /// that can be applied, as constraints, to the constrainable object. + /// [dictionary] struct MediaTrackCapabilities { typedef std::list BoolList; + /// + /// The width or width range, in pixels. As a capability, the range should span the + /// video source's pre-set width values with min being the smallest width and max + /// being the largest width. + /// [optional] LongRange width; + /// + /// The height or height range, in pixels. As a capability, the range should span + /// the video source's pre-set height values with min being the smallest height and + /// max being the largest height. + /// [optional] LongRange height; + /// + /// The exact aspect ratio (width in pixels divided by height in pixels, represented + /// as a double rounded to the tenth decimal place) or aspect ratio range. + /// [optional] DoubleRange aspectRatio; + /// + /// The exact frame rate (frames per second) or frame rate range. If this frame + /// rate cannot be determined (e.g. the source does not natively provide a frame rate, + /// or the frame rate cannot be determined from the source stream), then this value + /// must refer to the User Agent's vsync display rate. + /// [optional] DoubleRange fameRate; + /// + /// This string (or each string, when a list) should be one of the members of + /// VideoFacingMode. The members describe the directions that the camera can + /// face, as seen from the user's perspective. Note that getConstraints may + /// not return exactly the same string for strings not in this enum. This + /// preserves the possibility of using a future version of enum for + /// this property. + /// StringList facingMode; + /// + /// The volume or volume range, as a multiplier of the linear audio sample + /// values. A volume of 0.0 is silence, while a volume of 1.0 is the maximum + /// supported volume. A volume of 0.5 will result in an approximately 6 dBSPL + /// change in the sound pressure level from the maximum volume. Note that any + /// ConstraintSet that specifies values outside of this range of 0 to 1 can + /// never be satisfied. + /// [optional] DoubleRange volume; + /// + /// The sample rate in samples per second for the audio data. + /// [optional] LongRange sampleRate; + /// + /// The linear sample size in bits. This constraint can only be satisfied for + /// audio devices that produce linear samples. + /// [optional] LongRange sampleSize; + /// + /// When one or more audio streams is being played in the processes of + /// various microphones, it is often desirable to attempt to remove the + /// sound being played from the input signals recorded by the microphones. + /// This is referred to as echo cancellation. There are cases where it is + /// not needed and it is desirable to turn it off so that no audio artifacts + /// are introduced. This allows applications to control this behavior. + /// BoolList echoCancellation; + /// + /// The latency or latency range, in seconds. The latency is the time + /// between start of processing (for instance, when sound occurs in + /// the real world) to the data being available to the next step in + /// the process. Low latency is critical for some applications; high + /// latency may be acceptable for other applications because it helps + /// with power constraints. The number is expected to be the target + /// latency of the configuration; the actual latency may show some + /// variation from that. + /// [optional] DoubleRange latency; + /// + /// The number of independent channels of sound that the audio data contains, + /// i.e. the number of audio samples per sample frame. + /// [optional] LongRange channelCount; + /// + /// The origin-unique identifier for the source of the MediaStreamTrack. + /// string deviceID; + /// + /// The browsing session-unique group identifier for the source of the MediaStreamTrack. + /// string groupID; + /// + /// Constructs an empty instance of a MediaTrackCapabilities object. + /// [constructor, default] void MediaTrackCapabilities(); + /// + /// Constructs an instance of a MediaTrackCapabilities object by cloning object data from an existing object. + /// [constructor, altname(MediaTrackCapabilitiesClone)] void MediaTrackCapabilities(MediaTrackCapabilities source); + /// + /// Constructs an instance of a MediaTrackCapabilities object by extracting object data from a JSON object. + /// [constructor, default, altname(MediaTrackCapabilitiesWithJson)] void MediaTrackCapabilities(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// Settings is a dictionary containing one or more key-value pairs. + /// It must contain each key returned in GetCapabilities(). There must be + /// a single value for each key and the value must be a member of the set + /// defined for that property by getCapabilities(). The Settings + /// dictionary contains the actual values that the User Agent has chosen + /// for the object's constrainable properties. The exact syntax of the + /// value depends on the type of the property. + /// [dictionary] struct MediaTrackSettings { + /// + /// The width or width range, in pixels. As a capability, the range should span the + /// video source's pre-set width values with min being the smallest width and max + /// being the largest width. + /// [optional] long width; + /// + /// The height or height range, in pixels. As a capability, the range should span + /// the video source's pre-set height values with min being the smallest height and + /// max being the largest height. + /// [optional] long height; + /// + /// The exact aspect ratio (width in pixels divided by height in pixels, represented + /// as a double rounded to the tenth decimal place) or aspect ratio range. + /// [optional] double aspectRatio; + /// + /// The exact frame rate (frames per second) or frame rate range. If this frame + /// rate cannot be determined (e.g. the source does not natively provide a frame rate, + /// or the frame rate cannot be determined from the source stream), then this value + /// must refer to the User Agent's vsync display rate. + /// [optional] double frameRate; + /// + /// This string (or each string, when a list) should be one of the members of + /// VideoFacingMode. The members describe the directions that the camera can + /// face, as seen from the user's perspective. Note that getConstraints may + /// not return exactly the same string for strings not in this enum. This + /// preserves the possibility of using a future version of enum for + /// this property. + /// [optional] string facingMode; - [optional] - string orientation; + /// + /// The volume or volume range, as a multiplier of the linear audio sample + /// values. A volume of 0.0 is silence, while a volume of 1.0 is the maximum + /// supported volume. A volume of 0.5 will result in an approximately 6 dBSPL + /// change in the sound pressure level from the maximum volume. Note that any + /// ConstraintSet that specifies values outside of this range of 0 to 1 can + /// never be satisfied. + /// [optional] double volume; + /// + /// The sample rate in samples per second for the audio data. + /// [optional] long sampleRate; + /// + /// The linear sample size in bits. This constraint can only be satisfied for + /// audio devices that produce linear samples. + /// [optional] long sampleSize; + /// + /// When one or more audio streams is being played in the processes of + /// various microphones, it is often desirable to attempt to remove the + /// sound being played from the input signals recorded by the microphones. + /// This is referred to as echo cancellation. There are cases where it is + /// not needed and it is desirable to turn it off so that no audio artifacts + /// are introduced. This allows applications to control this behavior. + /// [optional] bool echoCancellation; + /// + /// The latency or latency range, in seconds. The latency is the time + /// between start of processing (for instance, when sound occurs in + /// the real world) to the data being available to the next step in + /// the process. Low latency is critical for some applications; high + /// latency may be acceptable for other applications because it helps + /// with power constraints. The number is expected to be the target + /// latency of the configuration; the actual latency may show some + /// variation from that. + /// [optional] double latency; + /// + /// The number of independent channels of sound that the audio data contains, + /// i.e. the number of audio samples per sample frame. + /// [optional] long channelCount; + /// + /// The origin-unique identifier for the source of the MediaStreamTrack. + /// + [optional] string deviceId; + /// + /// The browsing session-unique group identifier for the source of the MediaStreamTrack. + /// [optional] string groupId; + /// + /// Constructs an empty MediaTrackSettings object instance. + /// [constructor, default] void MediaTrackSettings(); + /// + /// Constructs an MediaTrackSettings object instance by cloning object data from an existing object. + /// [constructor, altname(MediaTrackSettingsClone)] void MediaTrackSettings(MediaTrackSettings source); + /// + /// Constructs an MediaTrackSettings object instance by extracting object data from a JSON object. + /// [constructor, default, altname(MediaTrackSettingsWithJson)] void MediaTrackSettings(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// Each member of a ConstraintSet corresponds to a constrainable property + /// and specifies a subset of the property's legal Capability values. + /// Applying a ConstraintSet instructs the User Agent to restrict the + /// settings of the corresponding constrainable properties to the + /// specified values or ranges of values. A given property may occur both + /// in the basic Constraints set and in the advanced ConstraintSets list, + /// and may occur at most once in each ConstraintSet in the advanced list. + /// [dictionary] struct MediaTrackConstraintSet { + /// + /// The width or width range, in pixels. As a capability, the range + /// should span the video source's pre-set width values with min being + /// the smallest width and max being the largest width. + /// ConstrainLong width; + /// + /// The height or height range, in pixels. As a capability, the range + /// should span the video source's pre-set height values with min being + /// the smallest height and max being the largest height. + /// ConstrainLong height; + /// + /// The exact aspect ratio (width in pixels divided by height in pixels, + /// represented as a double rounded to the tenth decimal place) or + /// aspect ratio range. + /// ConstrainDouble aspectRatio; + /// + /// The exact frame rate (frames per second) or frame rate range. If + /// this frame rate cannot be determined (e.g. the source does not + /// natively provide a frame rate, or the frame rate cannot be + /// determined from the source stream), then this value must refer to + /// the User Agent's vsync display rate. + /// ConstrainDouble frameRate; + /// + /// This string (or each string, when a list) should be one of the + /// members of VideoFacingModeEnum. The members describe the directions + /// that the camera can face, as seen from the user's perspective. Note + /// that getConstraints may not return exactly the same string for + /// strings not in this enum. This preserves the possibility of using a + /// future version of WebIDL enum for this property. + /// ConstrainString facingMode; - ConstrainString orientation; + /// + /// The volume or volume range, as a multiplier of the linear audio + /// sample values. A volume of 0.0 is silence, while a volume of 1.0 is + /// the maximum supported volume. A volume of 0.5 will result in an + /// approximately 6 dBSPL change in the sound pressure level from the + /// maximum volume. Note that any ConstraintSet that specifies values + /// outside of this range of 0 to 1 can never be satisfied. + /// ConstrainDouble volume; + /// + /// The sample rate in samples per second for the audio data. + /// ConstrainLong sampleRate; + /// + /// The linear sample size in bits. This constraint can only be + /// satisfied for audio devices that produce linear samples. + /// ConstrainLong sampleSize; + /// + /// When one or more audio streams is being played in the processes of + /// various microphones, it is often desirable to attempt to remove the + /// sound being played from the input signals recorded by the + /// microphones. This is referred to as echo cancellation. There are + /// cases where it is not needed and it is desirable to turn it off so + /// that no audio artifacts are introduced. This allows applications to + /// control this behavior. + /// ConstrainBoolean echoCancellation; + /// + /// The latency or latency range, in seconds. The latency is the time + /// between start of processing (for instance, when sound occurs in the + /// real world) to the data being available to the next step in the + /// process. Low latency is critical for some applications; high latency + /// may be acceptable for other applications because it helps with power + /// constraints. The number is expected to be the target latency of the + /// configuration; the actual latency may show some variation from that. + /// ConstrainDouble latency; - ConstrainLong cannelCount; + /// + /// The number of independent channels of sound that the audio data + /// contains, i.e. the number of audio samples per sample frame. + /// + ConstrainLong channelCount; + /// + /// The origin-unique identifier for the source of the MediaStreamTrack. + /// The same identifier must be valid between browsing sessions of this + /// origin, but must also be different for other origins. Some sort of + /// GUID is recommended for the identifier. Note that the setting of + /// this property is uniquely determined by the source that is attached + /// to the MediaStreamTrack. In particular, getCapabilities() will + /// return only a single value for deviceId. This property can therefore + /// be used for initial media selection with getUserMedia(). However, + /// it is not useful for subsequent media control with + /// applyConstraints(), since any attempt to set a different value will + /// result in an unsatisfiable ConstraintSet. + /// ConstrainString deviceId; + /// + /// The browsing session-unique group identifier for the source of the + /// MediaStreamTrack. Two devices have the same group identifier if they + /// belong to the same physical device; for example, the audio input and + /// output devices representing the speaker and microphone of the same + /// headset would have the same groupId. Note that the setting of this + /// property is uniquely determined by the source that is attached to + /// the MediaStreamTrack. In particular, getCapabilities() will return + /// only a single value for groupId. Since this property is not stable + /// between browsing sessions its usefulness for initial media selection + /// with getUserMedia() is limited. It is not useful for subsequent + /// media control with applyConstraints(), since any attempt to set a + /// different value will result in an unsatisfiable ConstraintSet. + /// ConstrainString groupId; + /// + /// Constructs an empty MediaTrackConstraintSet object instance. + /// [constructor, default] void MediaTrackConstraintSet(); + /// + /// Constructs an MediaTrackConstraintSet object instance by cloning object data an existing object. + /// [constructor, altname(MediaTrackConstraintSetClone)] void MediaTrackConstraintSet(MediaTrackConstraintSet source); + /// + /// Constructs an MediaTrackConstraintSet object instance by extracting object data from a JSON object. + /// [constructor, default, altname(MediaTrackConstraintSetWithJson)] void MediaTrackConstraintSet(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// MediaTrackConstraints represents a set of media stream track constraints to be applied to a MediaStreamTrack. + /// [dictionary] struct MediaTrackConstraints : MediaTrackConstraintSet { typedef std::list ConstraintSetList; + /// + /// Gets or sets the advanced list of ConstraintSets that the User Agent + /// must attempt to satisfy, in order, skipping only those that cannot + /// be satisfied. The order of these ConstraintSets is significant. In + /// particular, when they are passed as an argument to applyConstraints, + /// the User Agent must try to satisfy them in the order that is + /// specified. Thus if optional ConstraintSets C1 and C2 can be + /// satisfied individually, but not together, then whichever of C1 and + /// C2 is first in this list will be satisfied, and the other will not. + /// The User Agent must attempt to satisfy all optional ConstraintSets + /// in the list, even if some cannot be satisfied. Thus, in the + /// preceding example, if optional constraint C3 is specified after C1 + /// and C2, the User Agent will attempt to satisfy C3 even though C2 + /// cannot be satisfied. Note that a given property name may occur only + /// once in each ConstraintSet but may occur in more than one + /// ConstraintSet. + /// ConstraintSetList advanced; + /// + /// Constructs an empty instance of the MediaTrackConstraints object. + /// [constructor, default] void MediaTrackConstraints(); + /// + /// Constructs an instance of the MediaTrackConstraints object by cloning object data from an existing object. + /// [constructor, altname(MediaTrackConstraintsClone)] void MediaTrackConstraints(MediaTrackConstraints source); + /// + /// Constructs an instance of the MediaTrackConstraints object by extracting object data from a JSON object. + /// [constructor, default, altname(MediaTrackConstraintsWithJson)] void MediaTrackConstraints(Json json); }; + /// + /// The MediaStreamConstraints dictionary is used to instruct the User + /// Agent what sort of MediaStreamTracks to include in the MediaStream + /// returned by GetUserMedia(). + /// [dictionary] struct MediaStreamConstraints { + /// + /// If set, it requests that the returned MediaStream contain an audio + /// track. If a Constraints structure is provided, it further specifies + /// the nature and settings of the audio Track. If not set, the + /// MediaStream must not contain an audio Track. + /// [optional, nullable] MediaTrackConstraints audio; + /// + /// If set, it requests that the returned MediaStream contain a video + /// track. If a Constraints structure is provided, it further specifies + /// the nature and settings of the video Track. If not set, the + /// MediaStream must not contain a video Track. + /// [optional, nullable] MediaTrackConstraints video; + /// + /// Constructs an empty instance of the MediaStreamConstraints object. + /// [constructor, default] void MediaStreamConstraints(); + /// + /// Constructs an instance of the MediaStreamConstraints object by cloning object data from an existing object. + /// [constructor, altname(MediaStreamConstraintsClone)] void MediaStreamConstraints(MediaStreamConstraints source); + /// + /// Constructs an instance of the MediaStreamConstraints object by extracting object data from a JSON object. + /// [constructor, default, altname(MediaStreamConstraintsWithJson)] void MediaStreamConstraints(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The constraint attribute is set to the name of any one of the + /// constraints that caused the error, if any. + /// [dictionary] struct OverconstrainedError { + /// + /// Gets a string representing one of the error type names. + /// string name; + /// + /// The constraint property name where the error originated. + /// string constraint; + /// + /// A message describing the error condition for the constraint. + /// string message; }; + + /// + /// This error event fires for each affected track (when multiple tracks + /// share the same source) after the User Agent has evaluated the current + /// constraints against a given source and is not able to configure the + /// source within the limitations established by the intersection of + /// imposed constraints. + /// + /// Due to being over - constrained, the User Agent must mute each + /// affected track. + /// + /// The affected track(s) will remain muted until the application adjusts + /// the constraints to accommodate the source's current effective + /// capabilities. + /// struct OverconstrainedErrorEvent { + /// + /// Gets the OverconstrainedError describing the error associated with + /// the event (if any). + /// [getter] OverconstrainedError error; }; + /// + /// MediaSource represents an object holder for a platform specific media source. + /// [special] struct MediaSource { + /// + /// Gets or sets the platform specific media source. + /// [getter, setter] zs::Any source; + /// + /// Gets or sets the media track associated to the media source. + /// [getter, setter] zs::Any track; }; + /// + /// A MediaStreamTrack object represents a media source in the User Agent. + /// An example source is a device connected to the User Agent. Other + /// specifications may define sources for MediaStreamTrack that override + //// the behavior specified here. Several MediaStreamTrack objects can + //// represent the same media source, e.g., when the user chooses the same + //// camera in the UI shown by two consecutive calls to getUserMedia() . + /// interface MediaStreamTrack { + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets a kind attribute that must return the string "Audio" if this + /// object represents an audio track or "Video" if this object + /// represents a video track. + /// [getter] MediaStreamTrackKind kind; + /// + /// Gets a User Agent generated an identifier string. + /// [getter] - string identifier; + string id; + /// + /// Gets a unique identifier for the represented device. + /// [getter] string deviceId; + /// + /// Gets the label of the object's corresponding source, if any. If + /// the corresponding source has or had no label, the attribute must + /// instead return the empty string.. + /// User Agents may label audio and video sources (e.g., "Internal + /// microphone" or "External USB Webcam"). + /// [getter] string label; + /// + /// Gets or sets the enabled state for the object. On getting, the + /// attribute must return the value to which it was last set. On + /// setting, it must be set to the new value. + /// [getter, setter] bool enabled; + /// + /// Gets or sets the muted state of the object. + /// + /// true if the track is muted, and false otherwise. [getter, setter] bool muted; + /// + /// Gets if the track source origin is local or remote. + /// + /// true if the source origin is remote, otherwise false [getter] bool remote; + /// + /// Gets the state of the track. + /// + /// The value as most recently set by the User Agent. [getter] MediaStreamTrackState readyState; + /// + /// Gets or sets a MediaSource capable of being rendered to an output + /// window based upon the current track. + /// [getter] MediaSource source; + /// + /// Clones this MediaStreamTrack. + /// MediaStreamTrack clone(); + /// When a MediaStreamTrack object's stop() method is invoked, the User Agent must run following steps: + /// 1. Let track be the current MediaStreamTrack object. + /// 2. Notify track's source that track is ended. + /// A source that is notified of a track ending will be stopped, + /// unless other MediaStreamTrack objects depend on it + /// 3. Set track's readyState attribute to ended. void stop(); + /// + /// Returns the dictionary of the names of the constrainable propertie + /// that the object supports. MediaTrackCapabilities getCapabilities(); + /// + /// Returns the Constraints that were the argument to the most recent + /// successful call of ApplyConstraints(), maintaining the order in + /// which they were specified. Note that some of the optional + /// ConstraintSets returned may not be currently satisfied. To check + /// which ConstraintSets are currently in effect, the application should + /// use GetSettings. + /// MediaTrackConstraints getConstraints(); + /// + /// Returns the current settings of all the constrainable properties of + /// the object, whether they are platform defaults or have been set by + /// ApplyConstraints(). Note that the actual setting of a property must + /// be a single value. + /// MediaTrackSettings getSettings(); + /// + /// The User Agent may choose new settings for the constrainable + /// properties of the object at any time. When it does so it must + /// attempt to satisfy the current Constraints + /// zs::Promise applyConstraints(MediaTrackConstraints constraints); + /// + /// The MediaStreamTrack object's source is temporarily unable to + /// provide data. + /// [event] void onMute(); + /// + /// The MediaStreamTrack object's source is live again after having been + /// temporarily unable to provide data. + /// [event] void onUnmute(); + /// + /// The MediaStreamTrack object's source will no longer provide any + /// data, either because the user revoked the permissions, or because + /// the source device has been ejected, or because the remote peer + /// permanently stopped sending data. + /// [event] void onEnded(); + /// + /// This error event fires for each affected track(when multiple tracks + /// share the same source) after the User Agent has evaluated the + /// current constraints against a given source and is not able to + /// configure the source within the limitations established by the + /// intersection of imposed constraints. + /// + /// Due to being over - constrained, the User Agent must mute each + /// affected track. + /// + /// The affected track(s) will remain muted until the application + /// adjusts the constraints to accommodate the source's current + /// effective capabilities. + /// [event] void onOverConstrained(OverconstrainedErrorEvent event); }; diff --git a/ortc/idl/Ortc.idl b/ortc/idl/Ortc.idl index 07712782..aad70544 100644 --- a/ortc/idl/Ortc.idl +++ b/ortc/idl/Ortc.idl @@ -41,73 +41,145 @@ namespace org typedef zs::exceptions::NotImplemented NotImplemented; typedef zs::exceptions::UnexpectedError Unexpected; + /// + /// A message queue for receiving delegate events. + /// interface MessageQueue { [constructor, delete] void MessageQueue(); + /// + /// The default windows message queue for the system GUI thread. + /// [static] MessageQueue getDefaultForUi(); }; + /// + /// An object representation of a JSON blob. + /// interface Json { + /// + /// Construct an object representation of a JSON blob from a string. + /// [constructor] void Json(string jsonString); - [getter, setter] + /// + /// Convert the JSON object into a string. + /// string toString(); }; //!EXCLUSIVE WINUWP + /// + /// An reference holder to the system dispatcher object. + /// [special, platform(webhidden)] interface Dispatcher { + /// + /// Construct an object reference holder to the system dispatcher object. + /// [constructor] void Dispatcher(Any source); + /// + /// Gets or sets the default system dispatcher object. + /// [static] Any source; }; //!EXCLUSIVE x + /// + /// Setup methods for the ORTC Lib stack. + /// [static] interface OrtcLib { + /// + /// Initialize the ORTC stack. + /// [static, default] void setup(); - [static, altname(SetupWithQueue)] + /// + /// Initialize the ORTC stack with a target event queue for delegate events. + /// + [static, altname(setupWithQueue)] void setup(MessageQueue queue); + /// + /// Gets or sets the NTP server time discovered in milliseconds since + /// NTP epoch. This property must only be set at the actual moment when + /// the server time was discovered to ensure the NTP clock is as closed + /// to accurate as possible. + /// [static] Milliseconds ntpServerTime; + /// + /// Starts media engine trancing system. The collected traces can be + /// saved to file or sent to TCP listener. Traces can be visualised + /// further by importing the data into Chrome browser tool that can be + /// accessed using following option - chrome://tracing. + /// This method starts the tracing engine. + /// [static] void startMediaTracing(); + /// + /// Stops media tracing process. + /// [static] void stopMediaTracing(); + /// + /// Indiceates whether tracing system is activated. + /// [static] bool isMediaTracing(); + /// + /// Saves media trace data to the file specified by filename. + /// [static] bool saveMediaTrace(string filename); + /// + /// Sends all traced data to TCP listener specified by host name and port. + /// [static] bool saveMediaTrace(string host, int port); + /// + /// Notify the application is going to the background. + /// [static] zs::Promise notifyGoingToBackground(); + /// + /// Notify the application is going to the background immediately. + /// [static] void notifyGoingToBackgroundNow(); + /// + /// Notify the application is returning from the background. + /// [static] void notifyReturningFromBackground(); }; //!EXCLUSIVE WINUWP + /// + /// Setup methods for the ORTC Lib stack when using dispatcher. + /// [static, platform(webhidden)] interface OrtcLibWithDispatcher { + /// + /// Initialize the ORTC stack with a target dispatcher for delegate events. + /// [static, default, altname(SetupWithDispatcher)] void setup(Dispatcher dispatcher); }; diff --git a/ortc/idl/RtpListener.idl b/ortc/idl/RtpListener.idl index 2c66cf16..cfb334c2 100644 --- a/ortc/idl/RtpListener.idl +++ b/ortc/idl/RtpListener.idl @@ -33,37 +33,93 @@ namespace org { namespace ortc { + /// + /// This object is fired when the RTCRtpListener detects an RTP stream + /// that is not configured to be processed by an existing RTCRtpReceiver + /// object. + /// struct RTCRtpUnhandledEvent { + /// + /// Gets the SSRC in the RTP stream triggering the OnUnhandledRtp event. + /// [getter] SsrcType ssrc; + /// + /// Gets the Payload Type value in the RTP stream triggering the + /// OnUnhandledRtp event. + /// [getter] PayloadType payloadType; + /// + /// Gets the value of the MID RTP header extension [BUNDLE] in + /// the RTP stream triggering the OnUnhandledRtp event if present. + /// [getter] string muxId; + /// + /// Gets the value of the RID RTP header extension [RID] in the + /// RTP stream triggering the OnUnhandledRtp event if present. + /// [getter] string rid; }; + /// + /// The RTCRtpListener listens to RTP packets received from the + /// RTCDtlsTransport, determining whether an incoming RTP stream is + /// configured to be processed by an existing RTCRtpReceiver object. If no + /// match is found, the unhandledrtp event is fired. This can be due to + /// packets having an unknown SSRC, payload type or any other error that + /// makes it impossible to attribute an RTP packet to a specific + /// RTCRtpReceiver object. The event is not fired once for each arriving + /// packet; multiple discarded packets for the same SSRC should result in + /// a single event. + /// interface RTCRtpListener : RTCStatsProvider { typedef std::list HeaderExtensionParametersList; + /// + /// Construct an instance of RTCRtpListener from an RTCDtlsTransport + /// object. + /// [constructor] + void RTCRtpListener(RTCRtpTransport transport); + [constructor, altname(RTCRtpListenerWithHeaderExtensions)] + /// + /// Construct an instance of RTCRtpListener from an RTCDtlsTransport + /// object and the mapped header extensions to properly intepret + /// RTP header extensions. + /// void RTCRtpListener( RTCRtpTransport transport, - [optional] HeaderExtensionParametersList headerExtensions ); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the RTP RTPDtlsTransport or RTPSrtpSdesTransport instance. + /// [getter] RTCRtpTransport transport; + /// + /// Set a list of header extensions that can be interpreted by the listener + /// on incoming RTP packets. + /// void setHeaderExtensions(HeaderExtensionParametersList headerExtensions); + /// + /// The event handler emits the RTCRtpUnhandledEvent, which is fired + /// when the RTCRtpListener detects an RTP stream that is not configured + /// to be processed by an existing RTCRtpReceiver object. + /// [event] void onUnhandled(RTCRtpUnhandledEvent event); }; diff --git a/ortc/idl/RtpReceiver.idl b/ortc/idl/RtpReceiver.idl index 9810087a..bb708519 100644 --- a/ortc/idl/RtpReceiver.idl +++ b/ortc/idl/RtpReceiver.idl @@ -33,64 +33,212 @@ namespace org { namespace ortc { + /// + /// The RTCRtpContributingSource object contains information about a + /// contributing source. Each time an RTP packet is received, the + /// RTCRtpContributingSource objects are updated. If the RTP packet + /// contains CSRCs, then the RTCRtpContributingSource objects + /// corresponding to those CSRCs are updated, and the level values for + /// those CSRCs are updated based on the mixer-client header extension + /// [RFC6464] if present. If the RTP packet contains no CSRCs, then the + /// RTCRtpContributingSource object corresponding to the SSRC is updated, + /// and the level value for the SSRC is updated based on the client-mixer + /// header extension [RFC6464] if present. + /// [dictionary] struct RTCRtpContributingSource { + /// + /// Gets the timestamp indicating the time of reception of the most + /// recent RTP packet containing the source. The timestamp corresponds + /// to a local clock. + /// Time timestamp; + /// + /// Gets the CSRC or SSRC value of the contributing source. + /// SsrcType csrc; + /// + /// The audio level contained in the last RTP packet received from this + /// source. If the source was set from an SSRC, this will be the level + /// value in [RFC6464]. If the source was set from a CSRC, this will be + /// the level value in [RFC6465]. Both [RFC6464] and [RFC6465] define + /// the level as a integral value from 0 to 127 representing the audio + /// level in negative decibels relative to the loudest signal that they + /// system could possibly encode. Thus, 0 represents the loudest signal + /// the system could possibly encode, and 127 represents silence. + /// uint8 audioLevel; + /// + /// Gets whether the last RTP packet received from this source contains + /// voice activity ("true") or not ("false"). Since the "V" bit is + /// supported in [RFC6464] but not [RFC6465], the voiceActivityFlag + /// attribute will only be set when receivers enable the client-mixer + /// header extension (setting the vad attribute to "true"), and when RTP + /// packets are received from senders enabling the client-mixer header + /// extension (setting the vad attribute to "true"). + /// [optional] bool voiceActivityFlag; + /// + /// Constructs an empty instance of an RTCRtpContributingSource. + /// [constructor, default] void RTCRtpContributingSource(); + /// + /// Constructs an instance of an RTCRtpContributingSource by cloning object data from an existing object. + /// [constructor, altname(RTCRtpContributingSourceClone)] void RTCRtpContributingSource(RTCRtpContributingSource source); + /// + /// Constructs an instance of an RTCRtpContributingSource by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpContributingSourceWithJson)] void RTCRtpContributingSource(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCRtpReceiver includes information relating to the RTP receiver. + /// interaction RTCRtpReceiver : RTCStatsProvider { typedef std::list ContributingSourceList; + /// + /// Constructs an instance of RTCRtpReceiver from a value of kind and an + /// RTCDtlsTransport object. If an attempt is made to construct an + /// RTCRtpReceiver object with transport.State "closed", throw an + /// InvalidStateError exception. Upon construction, Track is set, and + /// the value of track.Kind is determined based on the value of kind + /// passed in the constructor. + /// + [constructor] + void RTCRtpReceiver( + MediaStreamTrackKind kind, + RTCRtpTransport transport, + ); + /// + /// Constructs an instance of RTCRtpReceiver from a value of kind and an + /// RTCDtlsTransport object. If an attempt is made to construct an + /// RTCRtpReceiver object with transport.State or rtcpTransport.State + /// "closed", throw an InvalidStateError exception. Upon construction, + /// Track is set, and the value of track.Kind is determined based on + /// the value of kind passed in the constructor. + /// [constructor] void RTCRtpReceiver( MediaStreamTrackKind kind, RTCRtpTransport transport, - [optional] RTCRtcpTransport rtcpTransport ); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the associated MediaStreamTrack instance. Upon construction, Track + /// is set. The value of track.kind is determined based on the value of + /// kind passed in the constructor. + /// [getter] MediaStreamTrack track; + /// + /// Gets the associated RTP RTCDtlsTransport instance. + /// [getter] RTCRtpTransport transport; + /// + /// Gets the RTCDtlsTransport instance over which RTCP is sent and + /// received. When BUNDLE is used, many RTCRtpReceiver objects will + /// share one rtcpTransport and will all send and receive RTCP over the + /// same RTCDtlsTransport. When RTCP mux is used, rtcpTransport will be + /// null, and both RTP and RTCP traffic will flow over the + /// RTCDtlsTransport transport. + /// [getter, nullable] RTCRtpTransport rtcpTransport; + /// + /// Set the RTP RTCDtlsTransport. If the last call to + /// receive(parameters) had parameters.Rtcp.Mux set to false, throw an + /// InvalidParameters exception. If SetTransport() is called and + /// transport.State is "closed", throw an InvalidParameters exception. + /// + void setTransport(RTCRtpTransport transport); + /// + /// Set the RTP RTCSrtpSdesTransport. If the last call to + /// receive(parameters) had parameters.Rtcp.Mux set to false, throw an + /// InvalidParameters exception. + /// + [altname(setTransportWithRtcpTransport)] void setTransport( RTCRtpTransport transport, - [optional] RTCRtcpTransport rtcpTransport ); + /// + /// Obtain the receiver capabilities, based on kind. Capabilities such + /// as retransmission [RFC4588], redundancy [RFC2198], and Forward Error + /// Correction that do not have an associated value of kind are always + /// included, regardless of the value of kind passed to + /// GetCapabilities(). + /// [static] RTCRtpCapabilities getCapabilities([optional] MediaStreamTrackKind kind); + /// + /// Media to be received is controlled by parameters. If + /// Receive(parameters) is called with invalid parameters, throw an + /// InvalidParameters exception. If rtcpTransport is not set and + /// Receive(parameters) is called with parameters.rtcp.mux set to false, + /// throw an InvalidParameters exception. The Receive() method does not + /// update parameters based on what is currently being received, so that + /// the value of parameters remains that last passed to the Receive() + /// method. The RTCRtpReceiver object starts receiving when Receive() is + /// called for the first time, and changes the receiving parameters when + /// Receive() is called again. The RTCRtpReceiver object stops receiving + /// when Stop() is called. For each value of i from 0 to the number of + /// codecs, check that each value of parameters.codecs[i].name not equal + /// to "red", "rtx" or a forward error correction codec is included in + /// GetCapabilities(kind).codecs[j].name, where j goes from 0 to the + /// number of codecs, and kind takes the value passed in the + /// RTCRtpReceiver constructor. If no match is found for any value of i, + /// throw an InvalidParameters exception. SSRC misusage also results in + /// an InvalidParameters exception. + /// zs::Promise receive(RTCRtpParameters parameters); + /// + /// Stops receiving the track on the wire. Stop is final like + /// MediaStreamTrack. + /// void stop(); + /// + /// Returns an RTCRtpContributingSource object for each unique CSRC or + /// SSRC received by this RTCRtpReceiver. The browser must keep + /// information from RTP packets received in the last 10 seconds. If no + /// contributing sources are available, an empty list is returned. + /// ContributingSourceList getContributingSources(); + /// + /// Solely used by the H.264/UC codec; for a receiver to request an SSRC from a sender (and not implemented by this client). + /// void requestSendCsrc(SsrcType csrc); }; diff --git a/ortc/idl/RtpSender.idl b/ortc/idl/RtpSender.idl index 4b6afcb4..0c7dc277 100644 --- a/ortc/idl/RtpSender.idl +++ b/ortc/idl/RtpSender.idl @@ -33,49 +33,167 @@ namespace org { namespace ortc { + /// + /// This object is fired if an SSRC conflict is detected within the RTP + /// session or an SSRC misconfiguration is detected after Send() or + /// Receive() returns or when SetTransport() is called. + /// struct RTCSsrcConflictEvent { + /// + /// Gets the ssrc attribute represents the conflicting SSRC that caused + /// the event. + /// [getter] SsrcType ssrc; }; + /// + /// The RTCRtpSender includes information relating to the RTP sender. + /// interface RTCRtpSender : RTCStatsProvider { + /// + /// Constructs an instance of an RTCRtpSender from an MediaStreamTrack + /// object and associated to an RTCDtlsTransport. If an attempt is made + /// to construct an RTCRtpSender object with transport.State + /// "closed", or if track.readyState is "ended", throw an + /// InvalidStateError exception. + /// + [constructor] + void RTCRtpSender( + MediaStreamTrack track, + RTCRtpTransport transport, + ); + + /// + /// Constructs an instance of an RTCRtpSender from an MediaStreamTrack + /// object and associated to an RTCDtlsTransport. If an attempt is made + /// to construct an RTCRtpSender object with transport.State or + /// rtcpTransport.State "closed", or if track.readyState is "ended", + /// throw an InvalidStateError exception. + /// [constructor] void RTCRtpSender( MediaStreamTrack track, RTCRtpTransport transport, - [optional] RTCRtcpTransport rtcpTransport ); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Get the associated MediaStreamTrack instance. + /// [getter] MediaStreamTrack track; + /// + /// Gets the RTCDtlsTransport instance over which RTCP is sent and + /// received. When BUNDLE is used, many RTCRtpSender objects will share + /// one rtcpTransport and will all send and receive RTCP over the same + // RTCDtlsTransport. When RTCP mux is used, rtcpTransport will be null, + /// and both RTP and RTCP traffic will flow over the RTCDtlsTransport + /// transport. + /// [getter] RTCRtpTransport transport; + /// + /// Gets the associated RTCP RTCDtlsTransport instance if one was + /// provided in the constructor. When RTCP mux is used, rtcpTransport + /// will be null, and both RTP and RTCP traffic will flow over the + /// RTCDtlsTransport transport. + /// [getter, nullable] RTCRtcpTransport rtcpTransport; + /// + /// Set the RTP RTCDtlsTransport. If the last call to + /// sender.Send(parameters) had parameters.rtcp.mux set to false, + /// throw an InvalidParameters exception. If SetTransport() is called + /// when transport.State is "closed", throw an InvalidStateError + /// exception. + /// + void setTransport( + RTCRtpTransport transport, + ); + /// + /// Set the RTP RTCDtlsTransport and RTCP RTCDtlsTransport. If + /// SetTransport() is called when transport.State or rtcpTransport.State + /// is "closed", throw an InvalidStateError exception. + /// void setTransport( RTCRtpTransport transport, - [optional] RTCRtcpTransport rtcpTransport ); + /// + /// Attempts to replace the track being sent with another track provided. + /// zs::Promise setTrack(MediaStreamTrack track); + /// + /// Obtain the sender capabilities, based on kind. Capabilities such as + /// retransmission [RFC4588], redundancy [RFC2198], and Forward Error + /// Correction that do not have an associated value of kind are always + /// included, regardless of the value of kind passed to + /// GetCapabilities(). + /// [static] RTCRtpCapabilities getCapabilities([optional] MediaStreamTrackKind kind); + /// + /// Media to be sent is controlled by parameters. If Send() is called + /// with invalid parameters, throw an InvalidParameters exception. If + /// rtcpTransport is not set and Send(parameters) is called with + /// parameters.rtcp.mux set to "false", throw an InvalidParameters + /// exception. For each value of i from 0 to the number of encodings, + /// check whether parameters.encodings[i].codecPayloadType corresponds + /// to a value of parameters.codecs[j].payloadType where j goes from 0 + /// to the number of codecs. If parameters.codecs[j].name is equal to + /// "red", "cn", "dtmf", "rtx" or a forward error correction codec, + /// throw an InvalidParameters exception. For each value of i from 0 to + /// the number of codecs, check that each value of + /// parameters.codecs[i].name not equal to "red", "rtx" or a forward + /// error correction codec is included in + /// GetCapabilities(track.kind).codecs[j].name, where j goes from 0 to + /// the number of codecs. If a match is not found for any value of i, + /// throw an InvalidParameters exception. If parameters.encodings is + /// unset, the browser behaves as though a single encodings[0] entry was + /// provided, with encodings[0].ssrc set to a browser-determined value, + /// encodings[0].active set to "true", encodings[0].codecPayloadType set + /// to codecs[j].payloadType where j is the index of the first codec + /// that is not "cn", "dtmf", "red", "rtx" or a forward error correction + /// codec, and all the other parameters.encodings[0] attributes (e.g. + /// fec, rtx, priority, maxBitrate, minQuality, resolutionScale,etc.) + /// unset. Calling Send(parameters) does not update parameters based on + /// what is currently being sent. The RTCRtpSender object starts sending + /// when Send() is called for the first time, and changes the sending + /// parameters when send() is called again. The RTCRtpSender object + /// stops sending when stop() is called. SSRC misusage results in an + /// InvalidParameters exception. + /// zs::Promise send(RTCRtpParameters parameters); + /// + /// Stops sending the track on the wire, and sends an RTCP BYE. Stop is + /// final as in + /// void stop(); + /// + /// The OnSsrcConflict event handler, of event handler type + /// RTCSsrcConflictEvent, is fired if an SSRC conflict is detected + /// within the RTP session or an SSRC misconfiguration is detected + /// after Send() or Receive() returns or when SetTransport() is called. + /// In this situation, the RTCRtpSender automatically sends an RTCP BYE + /// on the conflicted SSRC, if RTP packets were sent using that SSRC. + /// [event] void onSsrcConflict(RTCSsrcConflictEvent conflict); }; diff --git a/ortc/idl/RtpTypes.idl b/ortc/idl/RtpTypes.idl index 111ff673..3e68fb45 100644 --- a/ortc/idl/RtpTypes.idl +++ b/ortc/idl/RtpTypes.idl @@ -33,87 +33,254 @@ namespace org { namespace ortc { + /// + /// A base object type representing codec capability objects available for a given codec. + /// [dictionary] struct RTCRtpCodecCapabilityOptions { }; + /// + /// A base object type representing codec capability parameters for a given object. + /// [dictionary] struct RTCRtpCodecCapabilityParameters { }; + /// + /// RTCRtcpFeedback provides information on RTCP feedback messages. + /// [dictionary] struct RTCRtcpFeedback { + /// + /// Gets or sets valid values for type are the "RTCP Feedback" Attribute + /// Values enumerated in [iana.org/assignments/sdp-parameters/sdp-parameters.xhtml#sdp-parameters-14] + /// ("ack", "ccm", "nack", etc.), as well as "goog-remb" + /// [draft-alvestrand-rmcat-remb] and "transport-cc" + /// [draft-holmer-rmcat-transport-wide-cc-extensions]. + /// string type; + /// + /// Gets or sets the parameters associated with the Type. For a type of + /// "ack" or "nack", valid values for parameter are the "ack" and "nack" + /// Attribute Values enumerated in + /// [iana.org/assignments/sdp-parameters/sdp-parameters.xhtml#sdp-parameters-15] + /// ("sli", "rpsi", etc.). For the Generic NACK feedback message defined + /// in [RFC4585] Section 6.2.1, the type attribute is set to "nack" and + /// the parameter attribute is unset. For a type of "ccm", valid values + /// for parameter are the "Codec Control Messages" enumerated in + /// [iana.org/assignments/sdp-parameters/sdp-parameters.xhtml#sdp-parameters-19] + /// ("fir", "tmmbr" (includes "tmmbn"), etc.). + /// string parameter; + /// + /// Constructs an empty instance of a RTCRtcpFeedback object. + /// [constructor, default] void RTCRtcpFeedback(); + /// + /// Constructs an instance of a RTCRtcpFeedback object by cloning object data from an existing object. + /// [constructor, altname(RTCRtcpFeedbackClone)] void RTCRtcpFeedback(RTCRtcpFeedback source); + /// + /// Constructs an instance of a RTCRtcpFeedback object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtcpFeedbackWithJson)] void RTCRtcpFeedback(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// RTCRtpCodecCapability provides information on the capabilities of a + /// codec. + /// [dictionary] struct RTCRtpCodecCapability { typedef std::list RtcpFeedbackList; + /// + /// Gets or sets the MIME media type. Valid types are listed in + /// [iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2]. + /// string name; + /// + /// Gets or sets the media supported by the codec: "audio", "video" or + /// "" for both. + /// string kind; + /// + /// Gets or sets the codec clock rate expressed in Hertz. If unset, the + /// codec is applicable to any clock rate. + /// [optional] unsigned long clockRate; + /// + /// Gets or sets the preferred RTP payload type for the codec denoted by + /// RTCRtpCodecCapability.name. This attribute was added to make it + /// possible for the sender and receiver to pick a matching payload type + /// when creating sender and receiver parameters. When returned by + /// RTCRtpSender.GetCapabilities(), + /// RTCRtpCapabilities.Codecs.PreferredPayloadtype represents the + /// preferred RTP payload type for sending. When returned by + /// RTCRtpReceiver.GetCapabilities(), + /// RTCRtpCapabilities.Codecs.PreferredPayloadtype represents the + /// preferred RTP payload type for receiving. To avoid payload type + /// conflicts, each value of preferredPayloadType must be unique. + /// PayloadType preferredPayloadType; + /// + /// Gets or sets the preferred duration of media represented by a packet + /// in milliseconds for the RTCRtpSender or RTCRtpReceiver. + /// Milliseconds pTime; + /// + /// Gets or sets the maximum packetization time supported by the + /// RTCRtpReceiver. + /// Milliseconds maxPTime; + /// + /// Gets or sets the number of channels supported (e.g. two for stereo). + /// For video, this attribute is unset. + /// [optional] unsigned long numChannels; + /// + /// Gets or sets the transport layer and codec-specific feedback + /// messages for this codec. + /// RtcpFeedbackList rtcpFeedback; + /// + /// Gets or sets the codec-specific parameters that must be signaled to + /// the remote party. + /// [dynamic] RTCRtpCodecCapabilityParameters parameters; // OpusCodecCapabilityParameters, VP8CodecCapabilityParameters, H264CodecCapabilityParameters, RTXCodecCapabilityParameters, FlexFECCodecCapabilityParameters + /// + /// Gets or sets the codec-specific parameters available for signaling. + /// [dynamic] RTCRtpCodecCapabilityOptions options; // OpusCodecCapabilityOptions + /// + /// Gets or sets the maximum number of temporal layer extensions + /// supported by this codec (e.g. a value of 1 indicates support for up + /// to 2 temporal layers). A value of 0 indicates no support for + /// temporal scalability. + /// unsigned short maxTemporalLayers; + /// + /// Gets or sets the maximum number of spatial layer extensions + /// supported by this codec (e.g. a value of 1 indicates support for up + /// to 2 spatial layers). A value of 0 indicates no support for spatial + /// scalability. + /// unsigned short maxSpatialLayers; + /// + /// Gets or sets whether the implementation can send SVC layers + /// utilizing distinct SSRCs. Unset for audio codecs. For video codecs, + /// only set if the codec supports scalable video coding with multiple + /// streams. + /// bool svcMultiStreamSupport; + /// + /// Constructs an empty instance of an RTCRtpCodecCapability object. + /// [constructor, default] void RTCRtpCodecCapability(); + /// + /// Constructs an instance of an RTCRtpCodecCapability object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpCodecCapabilityClone)] void RTCRtpCodecCapability(RTCRtpCodecCapability source); + /// + /// Constructs an instance of an RTCRtpCodecCapability object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpCodecCapabilityWithJson)] void RTCRtpCodecCapability(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCRtpHeaderExtension dictionary enables a header extension to be + /// configured for use within an RTCRtpSender or RTCRtpReceiver. + /// [dictionary] struct RTCRtpHeaderExtension { + /// + /// Gets or sets the media supported by the header extension: "audio" + /// for an audio codec, "video" for a video codec, and "" for both. + /// string kind; + /// + /// Gets or sets the URI of the RTP header extension, as defined in + /// [RFC5285]. + /// string uri; + /// + /// Gets or sets the preferred ID value that goes in the packet. + /// uint16 preferredId; + /// + /// Gets or sets if it is preferred that the value in the header be + /// encrypted as per [RFC6904] if true. Default is to prefer + /// unencrypted. + /// bool preferredEncrypt; + /// + /// Constructs an empty instance of an RTCRtpHeaderExtension object. + /// [constructor, default] void RTCRtpHeaderExtension(); + /// + /// Constructs an instance of an RTCRtpHeaderExtension object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpHeaderExtensionClone)] void RTCRtpHeaderExtension(RTCRtpHeaderExtension source); + /// + /// Constructs an instance of an RTCRtpHeaderExtension object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpHeaderExtensionWithJson)] void RTCRtpHeaderExtension(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCRtpCapabilities object expresses the capabilities of + /// RTCRtpSender and RTCRtpReceiver objects. + /// [dictionary] struct RTCRtpCapabilities { @@ -122,318 +289,821 @@ namespace org typedef std::list HeaderExtensionsList; typedef std::list FecMechanismList; + /// + /// Gets or sets the supported codecs. + /// CodecCapabilityList codecs; + /// + /// HeaderExtensionsList headerExtensions; + /// + /// Gets or sets the supported Forward Error Correction (FEC) + /// mechanisms. Values include "red", "red+ulpfec" and "flexfec". + /// [draft-ietf-rtcweb-fec] summarizes requirements relating to FEC + /// mechanisms. + /// FecMechanismList fecMechanisms; + /// + /// Constructs an empty instance of an RTCRtpCapabilities object. + /// [constructor, default] void RTCRtpCapabilities(); + /// + /// Constructs an instance of an RTCRtpCapabilities object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpCapabilitiesClone)] void RTCRtpCapabilities(RTCRtpCapabilities source); + /// + /// Constructs an instance of an RTCRtpCapabilities object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpCapabilitiesWithJson)] void RTCRtpCapabilities(Json json); - RTCRtpCapabilities clone(); - + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The following capability options are defined for Opus: + /// [dictionary] struct RTCRtpOpusCodecCapabilityOptions : RTCRtpCodecCapabilityOptions { // sender capabilities + /// + /// Gets or sets the default value for the encoder's computational + /// complexity. The supported range is 0-10 with 10 representing the + /// highest complexity. + /// [optional] unsigned long complexity; + /// + /// Gets or sets the default value for the type of signal being encoded. + /// Possible values are string version of enum OpusCodecSignal. + /// [optional] RTCRtpOpusCodecCapabilityOptionsSignal signal; + /// + /// Gets or sets the default value for the encoder's intended + /// application. Possible values are string version of enum + /// OpusCodecApplication. + /// [optional] RTCRtpOpusCodecCapabilityOptionsApplication application; + /// + /// Gets or sets the default value for the encoder's expected packet + /// loss percentage. Possible values are 0-100. + /// [optional] unsigned long packetLossPerc; + /// + /// Gets or sets the default value for whether prediction is disabled, + /// making frames almost complete independent (if true) or not (if false). + /// [optional] bool predictionDisabled; + /// + /// Constructs an empty instance of an RTCRtpOpusCodecCapabilityOptions object. + /// [constructor, default] void RTCRtpOpusCodecCapabilityOptions(); + /// + /// Constructs an instance of an RTCRtpOpusCodecCapabilityOptions object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpOpusCodecCapabilityOptionsClone)] void RTCRtpOpusCodecCapabilityOptions(RTCRtpOpusCodecCapabilityOptions source); + /// + /// Constructs an instance of an RTCRtpOpusCodecCapabilityOptions object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpOpusCodecCapabilityOptionsWithJson)] void RTCRtpOpusCodecCapabilityOptions(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; // https://tools.ietf.org/html/rfc7587#section-6.1 + /// + /// The following optional capability parameters are defined for "opus", + /// as noted in [RFC7587] Section 6.1: + /// [dictionary] struct RTCRtpOpusCodecCapabilityParameters : RTCRtpCodecCapabilityParameters { + /// + /// Gets or sets a hint about the maximum output sampling rate that the + /// receiver is capable of rendering in Hz. + /// [optional] unsigned long maxPlaybackRate; + /// + /// Gets or sets the maximum average receive bitrate of a session in + /// bits per second (bits/s). + /// [optional] unsigned long maxAverageBitrate; + /// + /// Gets or sets of whether the decoder prefers receiving stereo or + /// mono signals. + /// [optional] bool stereo; + /// + /// Gets or sets if the decoder prefers the use of constant bitrate (if + /// true) or variable bitrate (if false). + /// [optional] bool cbr; + /// + /// Gets or sets if the decoder has the capability to take advantage of + /// Opus in-band fec (if true) or not (if false). + /// [optional] bool useInbandFec; + /// + /// Gets or sets if the decoder prefers the use of DTX (if true) or not + /// (if false). + /// [optional] bool useDtx; // sender capability parameters + + /// + /// A hint about the maximum input sampling rate that the sender is + /// likely to produce. + /// [optional] unsigned long sPropMaxCaptureRate; + /// + /// Gets or sets whether the sender is likely to produce stereo audio. + /// [optional] bool sPropStereo; + /// + /// Constructs an empty instance of an RTCRtpOpusCodecCapabilityParameters object. + /// [constructor, default] void RTCRtpOpusCodecCapabilityParameters(); + /// + /// Constructs an instance of an RTCRtpOpusCodecCapabilityParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpOpusCodecCapabilityParametersSource)] void RTCRtpOpusCodecCapabilityParameters(RTCRtpOpusCodecCapabilityParameters source); + /// + /// Constructs an instance of an RTCRtpOpusCodecCapabilityParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpOpusCodecCapabilityParametersWithJson)] void RTCRtpOpusCodecCapabilityParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; // https://tools.ietf.org/html/rfc7741#section-6.1 + /// + /// The following receiver capability parameters are defined for "vp8", as + /// noted in [RFC7741] Section 6.1: + /// [dictionary] struct RTCRtpVp8CodecCapabilityParameters : RTCRtpCodecCapabilityParameters { + /// + /// Gets or sets the maximum frame rate in frames per second that the + /// decoder is capable of decoding. + /// [optional] unsigned long maxFr; + /// + /// Gets or sets the maximum frame size in macroblocks that the decoder + /// is capable of decoding. + /// [optional] unsigned long long maxFs; + /// + /// Constructs an empty instance of an RTCRtpVp8CodecCapabilityParameters object. + /// [constructor, default] void RTCRtpVp8CodecCapabilityParameters(); + /// + /// Constructs an instance of an RTCRtpVp8CodecCapabilityParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpVp8CodecCapabilityParametersClone)] void RTCRtpVp8CodecCapabilityParameters(RTCRtpVp8CodecCapabilityParameters source); + /// + /// Constructs an instance of an RTCRtpVp8CodecCapabilityParameters object by extrating object data from a JSON object. + /// [constructor, default, altname(RTCRtpVp8CodecCapabilityParametersWithJson)] void RTCRtpVp8CodecCapabilityParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; // https://tools.ietf.org/html/rfc7742#section-6.2 + /// + /// The following capability parameters are defined for "h264", as noted + /// in [RFC6184] Section 8.1, and [draft-ietf-rtcweb-video] Section 6.2. + /// [dictionary] struct RTCRtpH264CodecCapabilityParameters : RTCRtpCodecCapabilityParameters { typedef std::list PacketizationModeList; + /// + /// Gets or sets the maximum capability of the decoder (for an + /// RTCRtpReceiver) or the encoder (for an RTCRtpSender). It must be + /// supported, as noted in [draft-ietf-rtcweb-video] Section 6.2. + /// [optional] unsigned long profileLevelId; + /// + /// A sequence of unsigned shorts, each ranging from 0 to 2, indicating + /// supported packetizationMode values. As noted in + /// [draft-ietf-rtcweb-video] Section 6.2, support for packetization + /// mode 1 is mandatory. + /// PacketizationModeList packetizationModes; + /// + /// Gets or sets an integer indicating the maximum macroblock processing + /// rate in units of macroblocks per second. + /// [optional] unsigned long long maxMnps; + /// + /// Gets or sets an integer indicating the maximum static macroblock + /// processing rate in units of static macroblocks per second, under the + /// hypothetical assumption that all macroblocks are static macroblocks. + /// [optional] unsigned long long maxSMbps; + /// + /// Gets or sets an integer indicating the maximum frame size in units + /// of macroblocks. + /// [optional] unsigned long long maxFs; + /// + /// Gets or sets an integer indicating the maximum coded picture buffer + /// size in units of 1000 bits for the VCL HRD parameters and in units + /// of 1200 bits for the NAL HRD parameters. + /// [optional] unsigned long long maxCpb; + /// + /// Gets or sets an integer indicating the maximum decoded picture + /// buffer size in units of 8 / 3 macroblocks. + /// [optional] unsigned long long maxDpb; + /// + /// Gets or sets an integer indicating the maximum video bitrate in + /// units of 1000 bits per second for the VCL HRD parameters and in + /// units of 1200 bits per second for the NAL HRD parameters. + /// [optional] unsigned long long maxBr; + /// + /// Constructs an empty instance of an RTCRtpH264CodecCapabilityParameters object. + /// [constructor, default] void RTCRtpH264CodecCapabilityParameters(); + /// + /// Constructs an instance of an RTCRtpH264CodecCapabilityParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpH264CodecCapabilityParametersClone)] void RTCRtpH264CodecCapabilityParameters(RTCRtpH264CodecCapabilityParameters source); + /// + /// Constructs an instance of an RTCRtpH264CodecCapabilityParameters object by extrating object data from a JSON object. + /// [constructor, default, altname(RTCRtpH264CodecCapabilityParametersWithJson)] void RTCRtpH264CodecCapabilityParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; // https://tools.ietf.org/html/rfc4588#section-8.1 + /// + /// The following capability is defined for "rtx", as noted in [RFC4588] + /// Section 8.6: + /// [dictionary] struct RTCRtpRtxCodecCapabilityParameters : RTCRtpCodecCapabilityParameters { + /// + /// Gets or sets the associated payload type of the original stream + /// being retransmitted, as defined in [RFC4588]. + /// PayloadType apt; + /// + /// Gets or sets the default time in milliseconds (measured from the + /// time a packet was first sent) that the sender keeps an RTP packet + /// in its buffers available for retransmission, as defined in + /// [RFC4588]. + /// Milliseconds rtxTime; + /// + /// Constructs an empty instance of an RTCRtpRtxCodecCapabilityParameters object. + /// [constructor, default] void RTCRtpRtxCodecCapabilityParameters(); + /// + /// Constructs an instance of an RTCRtpRtxCodecCapabilityParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpRtxCodecCapabilityParametersClone)] void RTCRtpRtxCodecCapabilityParameters(RTCRtpRtxCodecCapabilityParameters source); + /// + /// Constructs an instance of an RTCRtpRtxCodecCapabilityParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpRtxCodecCapabilityParametersWithJson)] void RTCRtpRtxCodecCapabilityParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The following capabilities are defined for "flexfec", as noted in + /// [draft-ietf-rtcweb-fec] Section 5.1.1: + /// struct RTCRtpFlexFecCodecCapabilityParameters : RTCRtpCodecCapabilityParameters { + /// + /// Gets or sets the default time that spans the source packets and the + /// corresponding repair packets, in microseconds. + /// Microseconds repairWindow; + /// + /// Gets or sets the default number of columns of the source block that + /// are protected by this FEC block. + /// [optional] unsigned long l; + /// + /// Gets or sets the default number of rows of the source block that are + /// protected by this FEC block. + /// [optional] unsigned long d; + /// + /// Gets or sets the default type of protection for the sender: 0 for + /// 1-D interleaved FEC protection, 1 for 1-D non-interleaved FEC + /// protection, and 2 for 2-D parity FEC protection. The value of 3 is + /// reserved for future use. + /// [optional] RTCRtpFlexFecCodecCapabilityParametersToP toP; + /// + /// Constructs an empty instance of an RTCRtpFlexFecCodecCapabilityParameters object. + /// [constructor, default] void RTCRtpFlexFecCodecCapabilityParameters(); + /// + /// Constructs an instance of an RTCRtpFlexFecCodecCapabilityParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpFlexFecCodecCapabilityParametersClone)] void RTCRtpFlexFecCodecCapabilityParameters(RTCRtpFlexFecCodecCapabilityParameters source); + /// + /// Constructs an instance of an RTCRtpFlexFecCodecCapabilityParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpFlexFecCodecCapabilityParametersWithJson)] void RTCRtpFlexFecCodecCapabilityParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// RTCRtcpParameters provides information on RTCP settings. + /// [dictionary] struct RTCRtcpParameters { + /// + /// Gets or sets the SSRC to be used in the "SSRC of packet sender" + /// field defined in [RFC3550] Section 6.4.2 (Receiver Report) and + /// [RFC4585] Section 6.1 (Feedback Messages), as well as the "SSRC" + /// field defined in [RFC3611] Section 2 (Extended Reports). It can only + /// be set for an RTCRtpReceiver. + /// SsrcType ssrc; + /// + /// Gets or sets the Canonical Name (CNAME) used by RTCP (e.g. in SDES + /// messages). Guidelines for CNAME generation are provided in + /// [draft-ietf-rtcweb-rtp-usage] Section 4.9 and [RFC7022]. + /// string cName; + /// + /// Gets or sets whether reduced size RTCP [RFC5506] is configured + /// (if true) or compound RTCP as specified in [RFC3550] (if false). + /// bool reducedSize; + /// + /// Gets or sets whether RTP and RTCP are multiplexed, as specified in + /// [RFC5761]. The default is true. If set to false, the RTCIceTransport + /// must have an associated RTCIceTransport object with a component of + /// "RTCP", in which case RTCP will be sent on the associated + /// RTCIceTransport. + /// bool mux = true; + /// + /// Creates an empty instance of an RTCRtcpParameters object. + /// [constructor, default] void RTCRtcpParameters(); + /// + /// Constructs an instance of an RTCRtcpParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtcpParametersClone)] void RTCRtcpParameters(RTCRtcpParameters source); + /// + /// Constructs an instance of an RTCRtcpParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtcpParametersWithJson)] void RTCRtcpParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; typedef RTCRtpCodecCapabilityParameters RTCRtpCodecParameterSettings; + /// + /// RTCRtpCodecParameters provides information on codec settings. + /// [dictionary] struct RTCRtpCodecParameters { typedef std::list RtcpFeedbackList; + /// + /// Gets or sets the MIME media type. Valid types are listed in + /// [www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2]. + /// The name must always be provided. + /// string name; + /// + /// Gets or sets the value that goes in the RTP Payload Type Field + /// [RFC3550]. The payloadType must always be provided, and must be + /// unique. + /// PayloadType payloadType; + /// + /// Gets or sets the codec clock rate expressed in Hertz, null if unset. + /// [optional] unsigned long clockRate; + /// + /// Gets or sets the duration of media represented by a packet in + /// milliseconds for the RTCRtpSender. If unset, the RTCRtpSender may + /// select any value up to maxptime. + /// Milliseconds pTime; + /// + /// Gets or sets the maximum packetization time set on the RTCRtpSender. + /// Not specified if unset. If Ptime is also set, Maxptime is ignored. + /// Milliseconds maxPTime; + /// + /// Gets or sets the number of channels supported (e.g. two for stereo). + /// If unset for audio, use the codec default. For video, this can be + /// left unset. + /// [optional] unsigned long numChannels; + /// + /// RtcpFeedbackList rtcpFeedback; + /// + /// Gets or sets the codec-specific parameters available for signaling. + /// [dynamic] RTCRtpCodecParameterSettings parameters; // see OpusCodecParameters, RTXCodecParameters, REDCodecParameters, FlexFECCodecParameters for definitions + /// + /// Constructs an empty instance of an RTCRtpCodecParameters object. + /// [constructor, default] void RTCRtpCodecParameters(); + /// + /// Constructs an instance of an RTCRtpCodecParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpCodecParametersClone)] void RTCRtpCodecParameters(RTCRtpCodecParameters source); + /// + /// Constructs an instance of an RTCRtpCodecParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpCodecParametersWithJson)] void RTCRtpCodecParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCRtpHeaderExtension dictionary configers the header extensions + /// for use within an RTCRtpSender or RTCRtpReceiver. + /// [dictionary] struct RTCRtpHeaderExtensionParameters { + /// + /// Gets or sets the URI of the RTP header extension, as defined in + /// [RFC5285]. + /// string uri; + /// + /// Gets or sets the value that goes in the packet. + /// uint16 id; + /// + /// Gets or sets the value in the header is encrypted as per [RFC6904], + /// if true. Default is unencrypted. + /// bool encrypt; + /// + /// Constructs an empty instance of an RTCRtpHeaderExtensionParameters object. + /// [constructor, default] void RTCRtpHeaderExtensionParameters(); + /// + /// Constructs an instance of an RTCRtpHeaderExtensionParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpHeaderExtensionParametersClone)] void RTCRtpHeaderExtensionParameters(RTCRtpHeaderExtensionParameters source); + /// + /// Constructs an instance of an RTCRtpHeaderExtensionParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpHeaderExtensionParametersWithJson)] void RTCRtpHeaderExtensionParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCRtpFecParameters represents the FEC sets for a particular + /// encoding. + /// [dictionary] struct RTCRtpFecParameters { + /// + /// Gets or sets the SSRC to use for FEC. If unset in an RTCRtpSender + /// object, the ORTC engine will choose. + /// [optional] SsrcType ssrc; + /// + /// Gets or sets the Forward Error Correction (FEC) mechanism to use: + /// "red", "red+ulpfec" or "flexfec". + /// string mechanism; + /// + /// Constructs an empty instance of an RTCRtpFecParameters object. + /// [constructor, default] void RTCRtpFecParameters(); + /// + /// Constructs an instance of an RTCRtpFecParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpFecParametersClone)] void RTCRtpFecParameters(RTCRtpFecParameters source); + /// + /// Constructs an instance of an RTCRtpFecParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpFecParametersWithJson)] void RTCRtpFecParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCRtpRtxParameters represents the RTX sets for a particular + /// encoding. + /// [dictionary] struct RTCRtpRtxParameters { + /// + /// Gets or sets the SSRC to use for retransmission, as specified in + /// [RFC4588]. If unset when passed to RTCRtpSender.Send(), the + /// ORTC engine will choose. + /// [optional] SsrcType ssrc; + /// + /// Constructs an empty instance of an RTCRtpRtxParameters object. + /// [constructor, default] void RTCRtpRtxParameters(); + /// + /// Constructs an instance of an RTCRtpRtxParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpRtxParametersClone)] void RTCRtpRtxParameters(RTCRtpRtxParameters source); + /// + /// Constructs an instance of an RTCRtpRtxParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpRtxParametersWithJson)] void RTCRtpRtxParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// RTCRtpEncodingParameters provides information relating to the + /// encoding. + /// [dictionary] struct RTCRtpEncodingParameters { typedef string EncodingId; typedef std::list EncodingIdList; + /// + /// Gets or sets the SSRC for this layering/encoding. + /// [optional] SsrcType ssrc; + /// + /// Gets or sets the codec payload type per-encoding. If unset, the + /// ORTC engine will choose the first codec in parameters.Codecs[] of + /// the appropriate kind. + /// [optional] PayloadType codecPayloadType; + /// + /// Gets or sets the FEC mechanism. + /// [optional] RTCRtpFecParameters fec; + /// + /// Gets or sets the RTX [RFC4588] parameters. + /// [optional] RTCRtpRtxParameters rtx; + /// + /// Gets or sets the priority of this encoding. + /// [optional] RTCRtpPriorityType priority; + /// + /// Gets or sets the maximum bitrate ramp up for resolution/quality/ + /// framerate, if set. + /// [optional] unsigned long long maxBitrate; + /// + /// Gets or sets the minimum quality to never send less than. + /// [optional] double minQuality; + /// + /// Gets or sets the video's resolution will be scaled down in each + /// dimension by the given value before sending, if the sender's kind is + /// "video". + /// [optional] double resolutionScale; + /// + /// Gets or sets the inverse of the input framerate fraction to be + /// encoded. + /// [optional] double framerateScale; + /// + /// Gets or sets an indicates whether this encoding is actively being + /// sent for the RTCRtpSender. Setting it to false causes this + /// encoding to no longer be sent. + /// bool active = true; + /// + /// Gets or sets an identifier for the encoding object. + /// EncodingId encodingId; + /// + /// Gets or sets the EncodingIds on which this layer depends. + /// EncodingIdList dependencyEncodingIds; + /// + /// Constructs an empty instance of the RTCRtpEncodingParameters. + /// [constructor, default] void RTCRtpEncodingParameters(); + /// + /// Constructs an instance of an RTCRtpEncodingParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpEncodingParametersClone)] void RTCRtpEncodingParameters(RTCRtpEncodingParameters source); + /// + /// Constructs an instance of an RTCRtpEncodingParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpEncodingParametersWithJson)] void RTCRtpEncodingParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// RTCRtpParameters contains the RTP stack settings. + /// [dictionary] struct RTCRtpParameters { @@ -441,66 +1111,173 @@ namespace org typedef std::list HeaderExtensionParametersList; typedef std::list EncodingParametersList; + /// + /// Gets or sets the muxId assigned to the RTP stream, if any. + /// string muxId; + /// + /// Gets or sets the codecs to send or receive (could include RED + /// [RFC2198], RTX [RFC4588] and CN [RFC3389]). codecs must be set for + /// an RTCRtpParameters object to be a valid argument passed to Send() + /// or Receive(). + /// CodecParametersList codecs; + /// + /// Gets or sets the header extensions. If unset, no header extensions + /// are configured. + /// HeaderExtensionParametersList headerExtensions; + /// + /// Gets or sets the "encodings" or "layers" to be used for things like + /// simulcast, Scalable Video Coding, RTX, FEC, etc. + /// EncodingParametersList encodings; + /// + /// Gets or sets the parameters to configure RTCP. + /// RTCRtcpParameters rtcp; + /// + /// Gets or sets the degradation preference when bandwidth is + /// constrained and the RTCRtpSender needs to choose between degrading + /// resolution or degrading framerate. + /// RTCRtpDegradationPreference degredationPreference = balanced; + /// + /// Constructs an empty instance of an RTCRtpParameters object. + /// [constructor, default] void RTCRtpParameters(); + /// + /// Constructs an instance of an RTCRtpParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpParametersClone)] void RTCRtpParameters(RTCRtpParameters source); + /// + /// Constructs an instance of an RTCRtpParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpParametersWithJson)] void RTCRtpParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The following settings are defined for "opus". + /// [dictionary] struct RTCRtpOpusCodecParameterSettings : RTCRtpCodecParameterSettings { // sender parameters + + /// + /// Gets or sets the maximum output sampling rate of the encoder in Hz. + /// [optional] unsigned long maxPlaybackRate; + /// + /// Gets or sets the maximum average receive bitrate of a session in bits + /// per second (bits/s). + /// [optional] unsigned long maxAverageBitrate; + /// + /// [optional] bool stereo; + /// + /// Gets or sets if the encoder is configured to generate constant + /// bitrate (if true) or variable bitrate (if false). + /// [optional] bool cbr; + /// + /// Gets or sets if the encoder is configured to generate Opus in-band + /// fec (if true) or not (if false). + /// [optional] bool useInbandFec; + /// + /// Gets or sets if the encoder is configured to use DTX (if true) or + /// not (if false). + /// [optional] bool useDtx; + /// + /// Gets or sets the encoder's computational complexity. The supported + // range is 0-10 with 10 representing the highest complexity. + /// [optional] unsigned long complexity; + /// + /// Gets or sets the type of signal being encoded. Possible values are + /// the string form of the enum OpusCodecSignal. + /// [optional] RTCRtpOpusCodecCapabilityOptionsSignal signal; + /// + /// Gets or sets the encoder's intended application. Possible values are + /// the string form of the enum OpusCodecApplication. + /// [optional] RTCRtpOpusCodecCapabilityOptionsApplication application; + /// + /// Gets or sets the encoder's expected packet loss percentage. Possible + /// values are 0-100. + /// [optional] unsigned long packetLossPerc; + /// + /// Gets or sests whether prediction is disabled, making frames almost + /// complete independent (if true) or not (if false). + /// [optional] bool predictionDisabled; // receiver parameters + + /// + /// Gets or sets the maximum input sampling rate produced by the sender. + /// [optional] unsigned long sPropMaxCaptureRate; + /// + /// Gets or sets whether the sender is likely to produce stereo audio. + /// [optional] bool sPropStereo; + /// + /// Constructs an empty instance of an RTCRtpOpusCodecParameterSettings object. + /// [constructor, default] void RTCRtpOpusCodecParameterSettings(); + /// + /// Constructs an instance of an RTCRtpOpusCodecParameterSettings object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpOpusCodecParameterSettingsClone)] void RTCRtpOpusCodecParameterSettings(RTCRtpOpusCodecParameterSettings source); + /// + /// Constructs an instance of an RTCRtpOpusCodecParameterSettings object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpOpusCodecParameterSettingsWithJson)] void RTCRtpOpusCodecParameterSettings(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; @@ -509,21 +1286,46 @@ namespace org typedef RTCRtpRtxCodecCapabilityParameters RTCRtpRtxCodecParameterSettings; typedef RTCRtpFlexFecCodecCapabilityParameters RTCRtpFlexFecCodecParameterSettings; + /// + /// The following setting is defined for "red", as noted in [RFC2198] + /// Section 5. + /// [dictionary] struct RTCRtpRedCodecParameterSettings : RTCRtpCodecParameterSettings { typedef std::list PayloadTypeList; + /// + /// Gets or sets sequence of payload types to be encapsulated in RED, + /// each of which must be unique. If payloadTypes is unset, this means + /// that any codec other than "red" or "rtx" can be encapsulsated in + /// RED. + /// PayloadTypeList payloadTypes; + /// + /// Constructs an empty instance of an RTCRtpRedCodecParameterSettings object. + /// [constructor, default] void RTCRtpRedCodecParameterSettings(); + /// + /// Constructs an instance of an RTCRtpRedCodecParameterSettings object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpRedCodecParameterSettingsClone)] void RTCRtpRedCodecParameterSettings(RTCRtpRedCodecParameterSettings source); + /// + /// Constructs an instance of an RTCRtpRedCodecParameterSettings object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpRedCodecParameterSettingsWithJson)] void RTCRtpRedCodecParameterSettings(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; diff --git a/ortc/idl/SctpTransport.idl b/ortc/idl/SctpTransport.idl index 2440a053..a01dc723 100644 --- a/ortc/idl/SctpTransport.idl +++ b/ortc/idl/SctpTransport.idl @@ -35,88 +35,197 @@ namespace org { interface RTCSctpTransportListener {}; + /// + /// The RTCSctpCapabilities represents object represents the capabilities + /// of SCTP transport. + /// [dictionary] struct RTCSctpCapabilities { + /// + /// Gets or sets the maximum message size. + /// size_t maxMessageSize; + /// + /// Gets or sets the minimum SCTP port. + /// uint16 minPort; + /// + /// Gets or sets the maximum SCTP port. + /// uint16 maxPort; + /// + /// Gets or sets the maximum SCTP ports that can be used simultaneously. + /// uint16 maxUsablePorts; + /// + /// Gets or sets the maximum sessions allowed per port. + /// uint16 maxSessionsPerPort; + /// + /// Constructs an empty instance of an RTCSctpCapabilities object. + /// [constructor, default] void RTCSctpCapabilities(); + /// + /// Constructs an instance of an RTCSctpCapabilities object by cloning object data from an existing object. + /// [constructor, altname(RTCSctpCapabilitiesClone)] void RTCSctpCapabilities(RTCSctpCapabilities source); + /// + /// Constructs an instance of an RTCSctpCapabilities object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSctpCapabilitiesWithJson)] void RTCSctpCapabilities(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// RTCSctpTransportStateChangeEvent represents the state event + /// fired when the RTCSctpTransport state is changed. + /// struct RTCSctpTransportStateChangeEvent { + /// + /// The RTCSctpTransportState that cased the event to fire. + /// RTCSctpTransportState state; }; + /// + /// If the remote peers sets RTCDataChannelParameters.Negotiated to false, + /// then the event will fire indicating a new RTCDataChannel object has + /// been constructed to connect with the RTCDataChannel constructed by the + /// remote peer. + /// struct RTCDataChannelEvent { + /// + /// Gets the RTCDataChannel that was constructed when upon receiving a + /// new RTCDataChannel from a remote peer. + /// RTCDataChannel dataChannel; }; + /// + /// The RTCSctpTransport includes information relating to Stream Control + /// Transmission Protocol (SCTP) transport. + /// interface RTCSctpTransport : RTCStatsProvider, RTCDataTransport { - [static] - RTCSctpTransport convert(RTCDataTransport object); + /// + /// Constructs an instance of RTCSctpTransport from an RTCDtlsTransport + /// object (with a default of 5000, or the next unused port). + /// + [constructor] + void RTCSctpTransport(RTCDtlsTransport transport) throws (InvalidParameters, InvalidStateError); + /// + /// Constructs an instance of RTCSctpTransport from an RTCDtlsTransport + /// object, and a port number. + /// [constructor] void RTCSctpTransport( RTCDtlsTransport transport, - [optional] uint16 localPort ) throws (InvalidParameters, InvalidStateError); + /// + /// Listen for incoming RTCSctpTransport objects port mappings for new SCTP transports. + /// [static] RTCSctpTransportListener listen( RTCDtlsTransport transport, RTCSctpCapabilities remoteCapabilities ); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Retrieves the RTCSctpCapabilities of the RTCSctpTransport instance. + /// [static] RTCSctpCapabilities getCapabilities(); + /// + /// Gets the RTCDtlsTransport instance the RTCSctpTransport object is + /// sending over. + /// [getter] RTCDtlsTransport transport; + /// + /// Gets the current state of the RTCSctpTransport object. + /// [getter] RTCSctpTransportState state; + /// + /// Gets the SCTP local port number used by the data channel. + /// [getter] uint16 port; + /// + /// Gets the SCTP local port number used by the data channel. + /// [getter] uint16 localPort; + /// + /// Gets the SCTP remote port number used by the data channel if available. + /// [getter, optional] uint16 remotePort; + /// + /// Starts the SCTP transport providing the capabilities of remote + /// SCTP transport. + /// + [default] + void start(RTCSctpCapabilities remoteCapabilities) throws (InvalidStateError, InvalidParameters); + /// + /// Starts the SCTP transport providing the capabilities of remote + /// SCTP transport and remote port. + /// + [altname(startWithPort)] void start( RTCSctpCapabilities remoteCapabilities, - [optional] uint16 remotePort ) throws (InvalidStateError, InvalidParameters); + /// + /// Stops the RTCSctpTransport instance. + /// void stop(); + /// + /// Events when the state of the RTCSctpTransport state changes. + /// [event] void onStateChange(RTCSctpTransportStateChangeEvent state); + /// + /// If the remote peers sets RTCDataChannelParameters.negotiated to + /// false, then this event will fire indicating a new RTCDataChannel + /// object has been constructed to connect with the RTCDataChannel + /// constructed by the remote peer. + /// [event] void onDataChannel(RTCDataChannelEvent dataChannel); }; diff --git a/ortc/idl/Settings.idl b/ortc/idl/Settings.idl index 1b8e453a..08178802 100644 --- a/ortc/idl/Settings.idl +++ b/ortc/idl/Settings.idl @@ -33,36 +33,70 @@ namespace org { namespace ortc { + /// + /// Controls the detailed settings of how the ORTC engine operates. + /// [static] interface Settings { + /// + /// Apply all the default settings for how the ORTC engine should + /// behave. + /// [static] void applyDefaults(); + /// + /// Apply a collection of json based settings. + /// [static] - bool apply(string jsonSettings); + bool apply(Json jsonSettings); + /// + /// Apply a specific string setting with a key and value. + /// [static] void setString(string key, string value); + /// + /// Apply a specific integer setting with a key and value. + /// [static] void setInt(string key, int64 value); + /// + /// Apply a specific unsigned integer setting with a key and value. + /// [static] void setUInt(string key, uint64 value); + /// + /// Apply a specific boolean setting with a key and value. + /// [static] void setBool(string key, bool value); + /// + /// Apply a specific floating point setting with a key and value. + /// [static] void setFloat(string key, float value); + /// + /// Apply a specific double floating point setting with a key and value. + /// [static] void setDouble(string key, double value); + /// + /// Clear a specific setting by its key. + /// [static] void clear(string key); + /// + /// Clear all known settings. + /// [static] void clearAll(); }; diff --git a/ortc/idl/SrtpSdesTransport.idl b/ortc/idl/SrtpSdesTransport.idl index f5956326..b5d784bc 100644 --- a/ortc/idl/SrtpSdesTransport.idl +++ b/ortc/idl/SrtpSdesTransport.idl @@ -34,84 +34,202 @@ namespace org { namespace ortc { + /// + /// The RTCSrtpKeyParam objects defines the keying material needed for a + /// SRTP SDES session. + /// [dictionary] struct RTCSrtpSdesKeyParameters { // see RFC 4568 sect 9.2 + /// + /// Gets or sets the key method to be utilized, in the syntax defined + /// for 'srtp-key-method' in [RFC4568] Section 9.2. + /// string keyMethod; // must be "inline" + /// + /// Gets or sets the key and salt to be utilized, in the syntax defined + /// for 'key-salt' in [RFC4568] Sections 9.2. + /// string keySalt; // key + salt, base 64 encoded e.g. base64(16 bytes + 14 bytes) + /// + /// Gets or sets the key lifetime to be utilized, in the syntax defined + /// for 'lifetime' in [RFC4568] Section 9.2. + /// string lifetime; // must be "2^n" where n is the max number of packets to flow throw the transport + /// + /// Gets or sets the master key index to be utilized, in the syntax + /// defined for 'mki-value' in [RFC4568] Section 9.2. + /// string mkiValue; // base 10 expressed value of Master Key Identifier (MKI) converted to string + /// + /// Gets or sets the master key index length to be utilized, in the + /// syntax defined for 'mki-length' in [RFC4568] Section 9.2. + /// uint16 mkiLength; // number of bytes allocated on each SRTP packet for Master Key Identifier (MKI) [max = 128 bytes] + /// + /// Constructs an empty instance of an RTCSrtpSdesKeyParameters object. + /// [constructor, default] void RTCSrtpSdesKeyParameters(); + /// + /// Constructs an instance of an RTCSrtpSdesKeyParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCSrtpSdesKeyParametersClone)] void RTCSrtpSdesKeyParameters(RTCSrtpSdesKeyParameters source); + /// + /// Constructs an instance of an RTCSrtpSdesKeyParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSrtpSdesKeyParametersWithJson)] void RTCSrtpSdesKeyParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); - string hash(); + /// + /// Return a hash of the data contained within the object. + /// + string hash(); }; + /// + /// The RTCSrtpSdesCryptoParameters object includes information relating + /// to SRTP/SDES cryptographic configuration. + /// [dictionary] struct RTCSrtpSdesCryptoParameters { // see RFC 4568 sect 9.2 typedef std::list KeyParametersList; typedef StringList SessionParamList; + /// + /// Gets or sets the tag identifying the parameters set, in the syntax + /// defined for 'tag' in [RFC4568] Section 9.1. + /// uint16 tag; + /// + /// Gets or sets the the ciphersuite to be utilized, in the syntax + /// defined for 'srtp-crypto-suite' in [RFC4568] Section 9.2; + /// string cryptoSuite; + /// + /// Gets or sets the key parameters to be utilized, as described in + /// [RFC4568] Section 6.1. Calls to + /// RTCSrtpSdesTransport.GetLocalParameters should return only a single + /// RTCSrtpKeyParam dictionary entry. + /// KeyParametersList keyParams; + /// + /// Gets or sets a sequence of session parameters to be utilized, each + /// in the syntax defined for 'session-param' in [RFC4568] Section 9.1; + /// SessionParamList sessionParams; + /// + /// Constructs an empty instance of an RTCSrtpSdesCryptoParameters object. + /// [constructor, default] void RTCSrtpSdesCryptoParameters(); + /// + /// Constructs an instance of an RTCSrtpSdesCryptoParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCSrtpSdesCryptoParametersClone)] void RTCSrtpSdesCryptoParameters(RTCSrtpSdesCryptoParameters source); + /// + /// Constructs an instance of an RTCSrtpSdesCryptoParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSrtpSdesCryptoParametersWithJson)] void RTCSrtpSdesCryptoParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCSrtpSdesParameters object includes information relating to + /// SRTP/SDES configuration. + /// [dictionary] struct RTCSrtpSdesParameters { typedef std::list CryptoParametersList; + + /// + /// Gets or sets a sequence of cryptographic parameters. + /// CryptoParametersList cryptoParams; + /// + /// Constructs an empty instance of an RTCSrtpSdesParameters object. + /// [constructor, default] void RTCSrtpSdesParameters(); + /// + /// Constructs an instance of an RTCSrtpSdesParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCSrtpSdesParametersClone)] void RTCSrtpSdesParameters(RTCSrtpSdesParameters source); + /// + /// Constructs an instance of an RTCSrtpSdesParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSrtpSdesParametersWithJson)] void RTCSrtpSdesParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; [dictionary] struct RTCSrtpSdesTransportLifetimeRemaining { + /// + /// Gets the least percentage remaining of all the keys in the + /// SDES/SRTP transport. + /// unsigned long leastLifetimeRemainingPercentageForAllKeys; + /// + /// Gets the overall percentage of life remaining of all the keys in the + /// SDES/SRTP transport. + /// unsigned long overallLifetimeRemainingPercentage; }; + /// + /// This is the event data associated with the + /// transport.OnLifetimeRemaining event handler. + /// struct RTCSrtpSdesTransportLifetimeRemainingEvent { + /// + /// Gets the lifetime remaining information associated with the transport. + /// [getter] RTCSrtpSdesTransportLifetimeRemaining data; }; + /// + /// The RTCSrtpSdesTransport includes information relating to SRTP/SDES + /// transport. + /// interface RTCSrtpSdesTransport : RTCRtpTransport, RTCStatsProvider { - [static] - RTCSrtpSdesTransport convert(RTCRtpTransport rtpTransport); - + /// + /// Constructs an instance of an RTCSrtpSdesTransport object using the specified ICE transport and cryptographic parameters. + /// [constructor] void RTCSrtpSdesTransport( RTCIceTransport iceTransport, @@ -119,22 +237,44 @@ namespace org RTCSrtpSdesCryptoParameters decryptParameters ); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the associated RTP RTCIceTransport as passed into the constructor. + /// [getter] RTCIceTransport transport; + /// + /// Gets the associated RTCP RTCIceTransport as passed into the constructor. + /// [getter] RTCIceTransport rtcpTransport; + /// + /// Obtain the local SRTP/SDES parameter sets. + /// [static] RTCSrtpSdesParameters getLocalParameters(); + /// + /// Stops sending or receiving any further encrypted RTP/RTCP data over the associated ICE transport. + /// void stop(); + /// + /// This event is fired when the lifetime of the keying material + /// percentage remaining has changed. + /// [event] void onLifetimeRemaining(RTCSrtpSdesTransportLifetimeRemainingEvent event); + /// + /// This event is fired on reception of an error. + /// [event] void onError(ErrorEvent event); }; diff --git a/ortc/idl/StatsProvider.idl b/ortc/idl/StatsProvider.idl index e2bcc90c..ff0906e4 100644 --- a/ortc/idl/StatsProvider.idl +++ b/ortc/idl/StatsProvider.idl @@ -33,10 +33,21 @@ namespace org { namespace ortc { + /// + /// The RTCStatsProvider interface enables the retrieval of statistics. + /// interface RTCStatsProvider { typedef zs::PromiseWith PromiseWithStatsReport; + /// + /// Gets an awaitable RTCStatsReport object that will contain a set of + /// statistics objects for the inspected object. A null RTCStatsReport + /// return is possible if the object declined the request to inspect + /// statistics at this time. An RTCStatsReport containing no statistics + /// objects indicates that no inspectable statistics are available at + /// this time. + /// PromiseWithStatsReport getStats(RTCStatsTypeSet statTypes); }; } diff --git a/ortc/idl/StatsReport.idl b/ortc/idl/StatsReport.idl index 4514b993..45b09d40 100644 --- a/ortc/idl/StatsReport.idl +++ b/ortc/idl/StatsReport.idl @@ -37,392 +37,991 @@ namespace org typedef uint8 PayloadType; typedef std::list SsrcTypeList; + /// + /// The RTCStatsTypeSet contains a list of stats types to be collected. + /// struct RTCStatsTypeSet { typedef std::set EnumSet; + /// + /// Constructs an empty instance of an RTCStatsTypeSet object. + /// [constructor, default] void RTCStatsTypeSet(); + /// + /// Constructs an instance of an RTCStatsTypeSet object given a set of types types to collect. + /// [constructor, altname(RTCStatsTypeSetWithValues)] void RTCStatsTypeSet(EnumSet values); bool hasStatType(RTCStatsType type); }; + /// + /// The RTCStats contains statistics information related to an inspected + /// object. + /// struct RTCStats { + /// + /// Gets or sets the timestamp when this statistic object was generated. + /// [getter] Time timestamp; + /// + /// Gets or sets the type of statistics object contained within this + /// RTCStats object. + /// [optional, getter] RTCStatsType statsType; + /// + /// Gets or sets the type of statistics object when the type is not a + /// pre-known type. + /// [getter] string statsTypeOther; + /// + /// Gets or sets the identifer for the RTCStats object. The identifer + /// is unique within a RTCStatsReport but is not guarenteed to be unique + /// across RTCStatsReports. + /// [getter] string id; + /// + /// Constructs an empty instance of an RTCStats object. + /// [constructor, default] void RTCStats(); + /// + /// Constructs an instance of an RTCStats object by cloning object data from an existing object. + /// [constructor, altname(RTCStatsClone)] void RTCStats(RTCStats source); + /// + /// Constructs an instance of an RTCStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCStatsWithJson)] void RTCStats(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); - - void eventTrace(); }; struct RTCRtpStreamStats : RTCStats { + /// + /// Gets or sets the SSRC for the RTP stream. + /// [optional, getter] SsrcType ssrc; + /// + /// Gets or sets the associated stats identifier for looking up the + /// corresponding (local/remote) RTCStats object for a given SSRC. + /// [getter] string associatedStatId; + /// + /// Gets or sets if the measurements are calculated locally ore + /// remotely. false indicates that the statistics are measured + /// locally, while true indicates that the measurements were done + /// at the remote endpoint and reported in an RTCP RR/XR. + /// [getter] bool isRemote; + /// + /// Gets or sets the media type, either "audio" or "video". This must + /// match the media type part of the information in the corresponding + /// codec member of RTCCodec. + /// [getter] string mediaType; + /// + /// Gets or sets the media stream tracks ID associated with this RTP + /// stream stats object. + /// [getter] string mediaTrackId; + /// + /// Gets or sets the transport ID associated with this RTP media + /// stream stats object. It is a unique identifier that is associated + /// to the object that was inspected to produce the RTCTransportStats + /// associated with this RTP stream. + /// [getter] string transportId; + /// + /// Gets or set the codec ID associated with this RTP media stream stats + /// object. + /// [getter] string codecId; + /// + /// Gets or sets the total number of Full Intra Request (FIR) packets + /// received by the sender. This metric is only valid for video and is + /// sent by receiver. Calculated as defined in [RFC5104] section 4.3.1. + /// and does not use the metric indicated in [RFC2032], because it was + /// deprecated by [RFC4587]. + /// [getter] unsigned long firCount; + /// + /// Gets or sets the total number of Packet Loss Indication (PLI) + /// packets received by the sender and is sent by receiver. Calculated + /// as defined in [RFC4585] section 6.3.1. + /// [getter] unsigned long pliCount; + /// + /// Gets or sets the total number of Negative ACKnowledgement (NACK) + /// packets received by the sender and is sent by receiver. Calculated + /// as defined in [RFC4585] section 6.2.1. + /// [getter] unsigned long nackCount; + /// + /// Gets or sets the total number of Slice Loss Indication (SLI) packets + /// received by the sender. This metric is only valid for video and is + /// sent by receiver. Calculated as defined in [RFC4585] section 6.3.2. + /// [getter] unsigned long sliCount; + /// + /// Constructs an empty instance of an RTCRtpStreamStats object. + /// [constructor, default] void RTCRtpStreamStats(); + /// + /// Constructs an instance of an RTCRtpStreamStats object by cloning object data from an existing object. + /// [constructor, altname(RTCRtpStreamStatsClone)] void RTCRtpStreamStats(RTCRtpStreamStats source); + /// + /// Constructs an instance of an RTCRtpStreamStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCRtpStreamStatsWithJson)] void RTCRtpStreamStats(Json json); }; + /// + /// The RTCCodec object contains information about the codec associated + /// with an RTP stream. + /// struct RTCCodec : RTCStats { + /// + /// Gets or sets the payload type as used in RTP encoding. + /// [optional, getter] PayloadType payloadType; + /// + /// Gets or sets the IANA name of the codec associated with the RTP + /// stream. For example, "vp8" for "video/vp8" or equivalent. + /// [getter] string codec; + /// + /// Gets or sets the media sampling rate. + /// [getter] unsigned long clockRate; + /// + /// Gets or sets the number of audio channels used by the codec. For + /// example, 2 for stereo, 1 for mono, and missing for non-audio codecs. + /// [optional, getter] unsigned long channels; + /// + /// Gets or sets the SDP description line. + /// [getter] string parameters; + /// + /// Constructs an empty instance of an RTCCodec object. + /// [constructor, default] void RTCCodec(); + /// + /// Constructs an instance of an RTCCodec object by cloning object data from an existing object. + /// [constructor, altname(RTCCodecClone)] void RTCCodec(RTCCodec source); + /// + /// Constructs an instance of an RTCCodec object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCCodecWithJson)] void RTCCodec(Json json); }; + /// + /// The RTCInboundRTPStreamStats object represents the measurement metrics + /// for the incoming RTP media stream. + /// struct RTCInboundRtpStreamStats : RTCRtpStreamStats { + /// + /// Gets or sets the total number of RTP packets received for this SSRC. + /// Calculated as defined in [RFC3550] section 6.4.1. + /// [getter] unsigned long packetsReceived; [getter] + /// + /// Gets or sets the total number of bytes received for this SSRC. + /// Calculated as defined in [RFC3550] section 6.4.1. + /// unsigned long long bytesReceived; + /// + /// Gets or sets the total number of RTP packets lost for this SSRC. + /// Calculated as defined in [RFC3550] section 6.4.1. + /// [getter] unsigned long packetsLost; + /// + /// Gets or sets the packet jitter measured in seconds for this SSRC. + /// Calculated as defined in [RFC3550] section 6.4.1. + /// [getter] double jitter; + /// + /// Gets or sets the fraction packet loss reported for this SSRC. + /// Calculated as defined in [RFC3550] section 6.4.1 and Appendix A.3. + /// [getter] double fractionLost; + /// + /// Gets or sets the end to end media delay in milliseconds. This value + /// represents the total duration between the time the media sampling was + /// captured to the time the media sampling was rendered. + /// [getter] Milliseconds endToEndDelay; + /// + /// Constructs an empty instance of an RTCInboundRtpStreamStats object. + /// [constructor, default] void RTCInboundRtpStreamStats(); + /// + /// Constructs an instance of an RTCInboundRtpStreamStats object by cloning object data from an existing object. + /// [constructor, altname(RTCInboundRtpStreamStatsClone)] void RTCInboundRtpStreamStats(RTCInboundRtpStreamStats source); + /// + /// Constructs an instance of an RTCInboundRtpStreamStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCInboundRtpStreamStatsWithJson)] void RTCInboundRtpStreamStats(Json json); }; + /// + /// The RTCOutboundRTPStreamStats object represents the measurement + /// metrics for the outgoing media stream. + /// struct RTCOutboundRtpStreamStats : RTCRtpStreamStats { + /// + /// Gets or sets the total number of RTP packets sent for this SSRC. + /// Calculated as defined in [RFC3550] section 6.4.1. + /// [getter] unsigned long packetsSent; + /// + /// Gets or sets the total number of bytes sent for this SSRC. + /// Calculated as defined in [RFC3550] section 6.4.1. + /// [getter] unsigned long long bytesSent; + /// + /// Gets or sets the presently configured bitrate target of this SSRC, + /// in bits per second. Typically this is a configuration parameter + /// provided to the codec's encoder. + /// [getter] double targetBitrate; + /// + /// Gets or sets the estimated round trip time (seconds) for this SSRC + /// based on the RTCP timestamp. Calculated as defined in [RFC3550] + /// section 6.4.1. + /// [getter] double roundTripTime; + /// + /// Constructs an empty instance of an RTCOutboundRtpStreamStats object. + /// [constructor, default] void RTCOutboundRtpStreamStats(); + /// + /// Constructs an instance of an RTCOutboundRtpStreamStats object by cloning object data from an existing object. + /// [constructor, altname(RTCOutboundRtpStreamStatsClone)] void RTCOutboundRtpStreamStats(RTCOutboundRtpStreamStats source); + /// + /// Constructs an instance of an RTCOutboundRtpStreamStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCOutboundRtpStreamStatsWithJson)] void RTCOutboundRtpStreamStats(Json json); }; struct RTCSctpTransportStats : RTCStats { + /// + /// Gets or sets the number of unique datachannels opened. + /// [getter] unsigned long dataChannelsOpened; + /// + /// Gets or sets the number of unique datachannels closed. + /// [getter] unsigned long dataChannelsClosed; + /// + /// Constructs an empty instance of an RTCSctpTransportStats object. + /// [constructor, default] void RTCSctpTransportStats(); + /// + /// Constructs an instance of an RTCSctpTransportStats object by cloning object data from an existing object. + /// [constructor, altname(RTCSctpTransportStatsClone)] void RTCSctpTransportStats(RTCSctpTransportStats source); + /// + /// Constructs an instance of an RTCSctpTransportStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSctpTransportStatsWithJson)] void RTCSctpTransportStats(Json json); }; + /// + /// The RTCMediaStreamStats object contains the stastics for the + /// RTCMediaStream object. + /// struct RTCMediaStreamStats : RTCStats { + /// + /// Gets or sets the stream.id property. + /// [getter] string streamId; + /// + /// Gets or sets the the id of the media stream track stats object, not + /// the track.id. + /// [getter] StringList trackIds; + /// + /// Constructs an empty instance of an RTCMediaStreamStats object. + /// [constructor, default] void RTCMediaStreamStats(); + /// + /// Constructs an instance of an RTCMediaStreamStats object by cloning object data from an existing object. + /// [constructor, altname(RTCMediaStreamStatsClone)] void RTCMediaStreamStats(RTCMediaStreamStats source); + /// + /// Constructs an instance of an RTCMediaStreamStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCMediaStreamStatsWithJson)] void RTCMediaStreamStats(Json json); }; + /// + /// The RTCMediaStreamTrackStats object contains the stastics for the + /// RTCMediaStreamTrack object. + /// struct RTCMediaStreamTrackStats : RTCStats { + /// + /// Gets or sets the track.id property. + /// [getter] string trackId; + /// + /// Gets or sets if this source represents a local or remote media + /// stream track source. The value is true for remote, false for local. + /// [getter] bool remoteSource; + /// + /// Gets or sets the SSRCs associated with this media stream track stats + /// object. + /// [getter] SsrcTypeList ssrcIds; + /// + /// Gets or sets the width value for video. The property only makes + /// sense for video media streams and represents the width of the video + /// frame for this SSRC. + /// [getter] unsigned long frameWidth; + /// + /// Gets or sets the height value for video. The property only makes + /// sense for video media streams and represents the height of the video + /// frame for this SSRC. + /// [getter] unsigned long frameHeight; + /// + /// Gets or sets the video frames per second. Only valid for video. + /// [getter] double framesPerSecond; + /// + /// Gets or sets the total number of frames sent for this SSRC. Only + /// valid for video. + /// [getter] unsigned long framesSent; + /// + /// Gets or sets the total number of frames received for this SSRC. Only + /// valid for video and when RemoteSource is set to true. + /// [getter] unsigned long framesReceived; + /// + /// Gets or sets the total number of frames correctly decoded for this + /// SSRC. Only valid for video. Same definition as totalVideoFrames in + /// Section 5 of [http://www.w3.org/TR/media-source/]. + /// [getter] unsigned long framesDecoded; + /// + /// Gets or sets the total number of frames dropped. Only valid for + /// video. Same definition as droppedVideoFrames in Section 5 of + /// [http://www.w3.org/TR/media-source/]. + /// [getter] unsigned long framesDropped; + /// + /// Gets or sets the total number of frames determined to be corrupted. + /// Only valid for video. Same definition as corruptedVideoFrames in + /// Section 5 of [http://www.w3.org/TR/media-source/]. + /// [getter] unsigned long framesCorrupted; + /// + /// Gets or sets the audio level. Only valid for audio, and the value is + /// between 0..1 (linear), where 1.0 represents 0 dBov. Calculated as + /// defined in [RFC6464]. + /// [getter] double audioLevel; + /// + /// Gets or sets the echo return loss calculated in decibels, as defined + /// in [https://www.itu.int/rec/T-REC-G.168/en] (2012) section 3.14. + /// Only present on audio tracks sourced from a microphone where echo + /// cancellation is applied. + /// [getter] double echoReturnLoss; + /// + /// Gets or sets the echo return loss enhancement as calculated in + /// decibels, as defined in [https://www.itu.int/rec/T-REC-G.168/en] + /// (2012) section 3.15.Only present on audio tracks sourced from a + /// microphone where echo cancellation is applied. + /// [getter] double echoReturnLossEnhancement; + /// + /// Constructs an empty instance of an RTCMediaStreamTrackStats object. + /// [constructor, default] void RTCMediaStreamTrackStats(); + /// + /// Constructs an instance of an RTCMediaStreamTrackStats object by cloning object data from an existing object. + /// [constructor, altname(RTCMediaStreamTrackStats)] void RTCMediaStreamTrackStats(RTCMediaStreamTrackStats source); + /// + /// Constructs an instance of an RTCMediaStreamTrackStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCMediaStreamTrackStatsWithJson)] void RTCMediaStreamTrackStats(Json json); }; - + /// + /// The RTCDataChannelStats object contains the statistics related to the + /// associated RTCDataChannel object. + /// struct RTCDataChannelStats : RTCStats { + /// + /// Gets or sets the data channle label. + /// [getter] string label; + /// + /// Gets or sets the data channel protocol. + /// [getter] string protocol; + /// + /// Gets or sets the "id" of the RTCDataChannel object. + /// [getter] long dataChannelId; + /// + /// Gets or sets the RTCDataChannelState for the RTCDataChannel object. + /// [getter] RTCDataChannelState state; + /// + /// Gets or sets the total number of API "message" events sent. + /// [getter] unsigned long messagesSent; + /// + /// Gets or sets the total number of payload bytes sent on this + /// RTCDatachannel, i.e., not including headers or padding. + /// [getter] unsigned long long bytesSent; + /// + /// Gets or sets the total number of bytes received on this + /// RTCDatachannel, i.e., not including headers or padding. + /// [getter] unsigned long messagesReceived; + /// + /// Gets or sets the total number of bytes received on this + /// RTCDatachannel, i.e., not including headers or padding. + /// [getter] unsigned long long bytesReceived; + /// + /// Constructs an empty instance of an RTCDataChannelStats object. + /// [constructor, default] void RTCDataChannelStats(); + /// + /// Constructs an instance of an RTCDataChannelStats object by cloning object data from an existing object. + /// [constructor, altname(RTCDataChannelStatsClone)] void RTCDataChannelStats(RTCDataChannelStats source); + /// + /// Constructs an instance of an RTCDataChannelStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCDataChannelStatsWithJson)] void RTCDataChannelStats(Json json); }; - + /// + /// The RTCIceGathererStats object contains the stastics information + /// related to the RTCIceGatherer object. + /// struct RTCIceGathererStats : RTCStats { + /// + /// Gets or sets the total number of bytes received on this + /// RTCIceGatherer, i.e., not including headers or padding. + /// [getter] unsigned long long bytesSent; + /// + /// Gets or sets the total number of payload bytes sent on this + /// RTCIceGatherer, i.e., not including headers or padding. + /// [getter] unsigned long long bytesReceived; + /// + /// Gets or sets the RTCIceGathererStats identifier for the associated + /// RTCP RTCIceGatherer (if applicable). + /// [getter] string rtcpGathererStatsId; + /// + /// Constructs an empty instance of an RTCIceGathererStats object. + /// [constructor, default] void RTCIceGathererStats(); + /// + /// Constructs an instance of an RTCIceGathererStats object by cloning object data from an existing object. + /// [constructor, altname(RTCIceGathererStatsClone)] void RTCIceGathererStats(RTCIceGathererStats source); + /// + /// Constructs an instance of an RTCIceGathererStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCIceGathererStatsWithJson)] void RTCIceGathererStats(Json json); }; + /// + /// The RTCIceTransportStats object contains the statistics related to the + /// RTCIceTransport object. + /// struct RTCIceTransportStats : RTCStats { + /// + /// Gets or sets the total number of bytes received on this + /// RTCIceTransport, i.e., not including headers or padding. + /// [getter] unsigned long long bytesSent; + /// + /// Gets or sets the total number of payload bytes sent on this + /// RTCIceTransport, i.e., not including headers or padding. + /// [getter] unsigned long long bytesReceived; + /// + /// Gets or sets the RTCIceGathererStats identifier for the associated + /// RTCP RTCIceTransport (if applicable). + /// [getter] string rtcpTransportStatsId; + /// + /// Gets or sets if the connection is active. Set to true when transport + /// is active. + /// [getter] bool activeConnection; + /// + /// Gets or sets a unique identifier that is associated to the object + /// that was inspected to produce the RTCIceCandidatePairStats + /// associated with this transport. + /// [getter] string selectedCandidatePairId; + /// + /// Constructs an empty instance of an RTCIceTransportStats object. + /// [constructor, default] void RTCIceTransportStats(); + /// + /// Constructs an instance of an RTCIceTransportStats object by cloning object data from an existing object. + /// [constructor, altname(RTCIceTransportStatsClone)] void RTCIceTransportStats(RTCIceTransportStats source); + /// + /// Constructs an instance of an RTCIceTransportStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCIceTransportStatsWithJson)] void RTCIceTransportStats(Json json); }; + /// + /// The RTCDtlsTransportStats object contains the statistics related to the + /// RTCDtlsTransport object. + /// struct RTCDtlsTransportStats : RTCStats { + /// + /// Gets or sets the local certificate stats object identifier. + /// [getter] string localCertificateId; + /// + /// Gets or sets the remote certificate stats object identifier. + /// [getter] string remoteCertificateId; + /// + /// Constructs an empty instance of an RTCDtlsTransportStats object. + /// [constructor, default] void RTCDtlsTransportStats(); + /// + /// Constructs an instance of an RTCDtlsTransportStats object by cloning object data from an existing object. + /// [constructor, altname(RTCDtlsTransportStatsClone)] void RTCDtlsTransportStats(RTCDtlsTransportStats source); + /// + /// Constructs an instance of an RTCDtlsTransportStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCDtlsTransportStatsWithJson)] void RTCDtlsTransportStats(Json json); }; + /// + /// The RTCSrtpTransportStats object contains the statistics related to the + /// RTCSrtpSdesTransport object. + /// struct RTCSrtpTransportStats : RTCStats { + /// + /// Constructs an empty instance of an RTCInboundRtpStreamStats object. + /// [constructor, default] void RTCSrtpTransportStats(); + /// + /// Constructs an instance of an RTCSrtpTransportStats object by cloning object data from an existing object. + /// [constructor, altname(RTCSrtpTransportStatsClone)] void RTCSrtpTransportStats(RTCDtlsTransportStats source); + /// + /// Constructs an instance of an RTCSrtpTransportStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSrtpTransportStatsWithJson)] void RTCSrtpTransportStats(Json json); }; + /// + /// RTCIceCandidateAttributes reflects the properties of a candidate in + /// Section 15.1 of [RFC5245]. + /// struct RTCIceCandidateAttributes : RTCStats { + /// + /// Gets or sets a unique identifier that is associated to the object + /// that was inspected to produce the RTCTransportStats associated with + /// this candidate. + /// [getter] string relatedId; + /// + /// Gets or sets the IP address of the candidate, allowing for IPv4 + /// addresses, IPv6 addresses, and fully qualified domain names + /// (FQDNs). See [RFC5245] section 15.1 for details. + /// [getter] string ipAddress; + /// + /// Gets or sets the port number of the candidate. + /// [getter] unsigned long portNumber; + /// + /// Gets or sets the transport type. Valid values for transport is one o + /// udp and tcp. Based on the "transport" defined in [RFC5245] section + /// 15.1. + /// [getter] string transport; + /// + /// Gets or sets the enumeration RTCStatsIceCandidateType based on the + /// cand-type defined in [RFC5245] section 15.1. + /// [getter] RTCIceCandidateType candidateType; + /// + /// Gets or sets the candidate priority as calculated as defined in + /// [RFC5245] section 15.1. + /// [getter] unsigned long priority; + /// + /// Gets or sets the URL of the TURN or STUN server indicated in the + /// RTCIceServers that translated this IP address. + /// [getter] string addressSourceUrl; + /// + /// Constructs an empty instance of an RTCIceCandidateAttributes object. + /// [constructor, default] void RTCIceCandidateAttributes(); + /// + /// Constructs an instance of an RTCIceCandidateAttributes object by cloning object data from an existing object. + /// [constructor, altname(RTCIceCandidateAttributesClone)] void RTCIceCandidateAttributes(RTCIceCandidateAttributes source); + /// + /// Constructs an instance of an RTCIceCandidateAttributes object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCIceCandidateAttributesWithJson)] void RTCIceCandidateAttributes(Json json); }; + /// + /// struct RTCIceCandidatePairStats : RTCStats { + /// + /// Gets or sets a unique identifier that is associated to the object + /// that was inspected to produce the RTCTransportStats associated with + /// this candidate pair. + /// [getter] string transportId; + /// + /// Gets or sets a unique identifier that is associated to the object + /// that was inspected to produce the RTCIceCandidateAttributes for the + /// local candidate associated with this candidate pair. + /// [getter] string localCandidateId; + /// + /// Gets or sets a unique identifier that is associated to the object + /// that was inspected to produce the RTCIceCandidateAttributes for the + /// remote candidate associated with this candidate pair. + /// [getter] string remoteCandidateId; + /// + /// Gets or sets the state of the checklist for the local and remote + /// candidates in a pair. + /// [getter] RTCIceCandidatePairState state; + /// + /// Gets or sets the calculated candidate pair priority as as defined in + /// [RFC5245] section 5.7.2. + /// [getter] unsigned long long priority; + /// + /// Gets or sets the nominated flag described in Section 7.1.3.2.4 of [RFC5245]. + /// [getter] bool nominated; + /// + /// Gets or sets if the candidate pair has received an ACK to an ICE + /// request. + /// [getter] bool writable; + /// + /// Gets or sets if the candidate pair has received a valid incoming + /// ICE request. + /// [getter] bool readable; + /// + /// Gets or sets the total number of payload bytes sent on this + /// candidate pair, i.e., not including headers or padding. + /// [getter] unsigned long long bytesSent; + /// + /// Gets or sets the total number of payload bytes received on this + /// candidate pair, i.e., not including headers or padding. + /// [getter] unsigned long long bytesReceived; + /// + /// Gets or sets the RTT computed by the STUN connectivity checks + /// [draft-reddy-tram-stun-path-data]. + /// [getter] double roundTripTime; + /// + /// Gets or sets the available outgoing bitrate measured in Bits per + /// second, and is implementation dependent. It may be calculated by the + /// underlying congestion control. + /// [getter] double availableOutgoingBitrate; + /// + /// Gets or sets the available incoming bitrate measured in Bits per + /// second, and is implementation dependent. It may be calculated by the + /// underlying congestion control. + /// [getter] double availableIncomingBitrate; + /// + /// Constructs an empty instance of an RTCIceCandidatePairStats object. + /// [constructor, default] void RTCIceCandidatePairStats(); + /// + /// Constructs an instance of an RTCIceCandidatePairStats object by cloning object data from an existing object. + /// [constructor, altname(RTCIceCandidatePairStatsClone)] void RTCIceCandidatePairStats(RTCIceCandidatePairStats source); + /// + /// Constructs an instance of an RTCIceCandidatePairStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCIceCandidatePairStatsWithJson)] void RTCIceCandidatePairStats(Json json); }; + /// + /// The RTCCertificateStats contains the statistics information related + /// to an RTCCertificate object. + /// struct RTCCertificateStats : RTCStats { + /// + /// Gets or sets the the fingerprint value as defined in Section 5 of + /// [RFC4572]. + /// [getter] string fingerprint; + /// + /// Gets or sets the fingerprint algorithm used with this certificate. + /// For instance, "sha-256". + /// [getter] string fingerprintAlgorithm; + /// + /// Gets or sets the DER-encoded, base-64 representation of a + /// certifiate. + /// [getter] string base64Certificate; + /// + /// Gets or sets the issuer certificate identifier associates with this + /// RTCCertificateStats object. + /// [getter] string issuerCertificateId; + /// + /// Constructs an empty instance of an RTCCertificateStats object. + /// [constructor, default] void RTCCertificateStats(); + /// + /// Constructs an instance of an RTCCertificateStats object by cloning object data from an existing object. + /// [constructor, altname(RTCCertificateStatsClone)] void RTCCertificateStats(RTCCertificateStats source); + /// + /// Constructs an instance of an RTCCertificateStats object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCCertificateStatsWithJson)] void RTCCertificateStats(Json json); }; + /// + /// The RTCStatsReport contains a collection of statistic object for + /// statistics for the inspected objects. + /// interaction RTCStatsReport { typedef StringList IdList; + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the list of statistics object identifiers contained within this + /// stats report. + /// [getter] IdList statsIds; + /// + /// Gets an RTCStats object for the specified statistic object + /// identifier. + /// RTCStats getStats(string id); }; } diff --git a/ortc/idl/adapter/MediaStream.idl b/ortc/idl/adapter/MediaStream.idl index 432ddd96..d7d62e9d 100644 --- a/ortc/idl/adapter/MediaStream.idl +++ b/ortc/idl/adapter/MediaStream.idl @@ -35,41 +35,118 @@ namespace org { namespace adapter { + /// + /// The two main components in the MediaStream API are the + /// MediaStreamTrack and MediaStream interfaces. The MediaStreamTrack + /// object represents media of a single type that originates from one + /// media source in the User Agent, e.g. video produced by a web camera. + /// A MediaStream is used to group several MediaStreamTrack objects into + /// one unit that can be recorded or rendered in a media element. + /// interface MediaStream : RTCStatsProvider { typedef std::list MediaStreamTrackList; + /// + /// Constructs an empty MediaStream object. + /// [constructor, default] void MediaStream(); + /// + /// Constructs an instance of an MediaStream and clones the tracks + /// from the original MediaStream. + /// [constructor, altname(MediaStreamClone)] void MediaStream(MediaStream source); + /// + /// Constructs an instance of an MediaStream containing a list of + /// MediaStreamTracks supplied. + /// [constructor, default, altname(MediaStreamWithTracks)] void MediaStream(MediaStreamTrackList tracks); + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the media stream identifier. When a MediaStream object is + /// created, the engine must generate an identifier string, and must + /// initialize the object's id attribute to that string. A good + /// practice is to use a UUID [RFC4122], which is 36 characters long + /// in its canonical form. To avoid fingerprinting, implementations + /// should use the forms in section 4.4 or 4.5 of [RFC4122] when + /// generating UUIDs. + /// + [getter] + string id; + + /// + /// Gets an indicator if this MediaStream is active. + /// [getter] bool active; + /// + /// Returns a sequence of MediaStreamTrack objects representing all + /// the tracks in this stream. + /// [getter] MediaStreamTrackList tracks; + /// + /// Gets a sequence of MediaStreamTrack objects representing the + /// audio tracks in this stream. + /// [getter] MediaStreamTrackList audioTracks; [getter] + /// + /// Gets a sequence of MediaStreamTrack objects representing the + /// video tracks in this stream. + /// MediaStreamTrackList videoTracks; + /// + /// The GetTrackById() method must return either a MediaStreamTrack + /// object from this stream's track set whose id is equal to trackId, + /// or null, if no such track exists. + /// MediaStreamTrack getTrackById(string id); + /// + /// Gets the number of media stream tracks contained within the media + /// stream. + /// [getter] size_t count; + /// + /// Adds the given MediaStreamTrack to this MediaStream. + /// void addTrack(MediaStreamTrack track); + /// + /// Removes the given MediaStreamTrack object from this MediaStream. + /// void removeTrack(MediaStreamTrack track); + /// + /// Clones the given MediaStream and all its tracks. + /// MediaStream clone(); + /// + /// This event fires when a new MediaStreamTrack has been added to + /// this stream. Note that this event is not fired when the script + /// directly modifies the tracks of a MediaStream. + /// [event] void onAddTrack(MediaStreamTrack track); + /// + /// This event fires when a MediaStreamTrack has been removed from + /// this stream. Note that this event is not fired when the script + /// directly modifies the tracks of a MediaStream. + /// [event] void onRemoteTrack(MediaStreamTrack track); }; diff --git a/ortc/idl/adapter/PeerConnection.idl b/ortc/idl/adapter/PeerConnection.idl index 34877e4c..b8c96036 100644 --- a/ortc/idl/adapter/PeerConnection.idl +++ b/ortc/idl/adapter/PeerConnection.idl @@ -35,93 +35,238 @@ namespace org { namespace adapter { + /// + /// The RTCConfiguration defines a set of parameters to configure how + /// the peer to peer communication established via RTCPeerConnection is + /// established or re-established. + /// [dictionary] struct RTCConfiguration { typedef std::list CertificateList; + /// + /// Gets or sets the ice gatherer policy as well as an array of + /// objects describing servers available to be used by ICE, such as + /// STUN and TURN server. + /// RTCIceGatherOptions gatherOptions; + /// + /// Gets or sets the signaling mode as either JSON based or SDP based. + /// The signaling type must be specified as Json, SdpOffer, or + /// SdpAnswer. + /// RTCPeerConnectionSignalingMode signalingMode = json; + /// + /// Gets or sets if the SRTP/SDES should be used with the peer + /// connection. + /// bool negotiateSrtpSdes; + /// + /// Gets or sets a media-bundling policy to use when gathering ICE. + /// candidates. + /// RTCBundlePolicy bundlePolicy = balanced; + /// + /// Gets or sets rtcp-mux policy to use when gathering ICE candidates. + /// RTCRtcpMuxPolicy rtcpMuxPolicy = require; + /// + /// Gets or sets a list of certificates that the RTCPeerConnection + /// uses to authenticate. + /// CertificateList certificates; + /// + /// Gets or sets the size of the prefetched ICE pool as defined in + /// [draft-ietf-rtcweb-jsep-14] (section 3.4.4. and section 4.1.1.). + /// size_t iceCandidatePoolSize; + /// + /// Consturcts an instance of an RTCConfiguration object. + /// authenticate. + /// [constructor, default] void RTCConfiguration(); + /// + /// Constructs an instance of an RTCConfiguration object by cloning object data from an existing object. + /// [constructor, altname(RTCConfigurationClone)] void RTCConfiguration(RTCConfiguration source); }; + /// + /// Base object for offer, answer and capability options during RTCPeerConnection exchanges. + /// [dictionary] struct RTCOfferAnswerOptions { + /// + /// Gets or sets if VAD is enabled. Many codecs and systems are + /// capable of detecting "silence" and changing their behavior in this + /// case by doing things such as not transmitting any media. In many + /// cases, such as when dealing with emergency calling or sounds other + /// than spoken voice, it is desirable to be able to turn off this + /// behavior. This option allows the application to provide + /// information about whether it wishes this type of processing + /// enabled or disabled. + /// bool voiceActivityDetection = true; }; + /// + /// The RTCOfferOptions object contains configuration options related + /// to an offer. + /// [dictionary] struct RTCOfferOptions : RTCOfferAnswerOptions { + /// + /// Gets or sets if the ice gatherer should be restarted. When the + /// value of this dictionary member is true, the generated description + /// will have ICE credentials that are different from the current + /// credentials(as visible in the localDescription attribute's SDP). + /// Applying the generated description will restart ICE. + /// bool iceRestart; }; + /// + /// The RTCAnswerOptions object contains configuration options related + /// to an answer. + /// [dictionary] struct RTCAnswerOptions : RTCOfferAnswerOptions { }; + /// + /// The RTCCapabilityOptions object contains configuration options related + /// to capability options as part of a capabilities signaling exchange. + /// [dictionary] struct RTCCapabilityOptions : RTCOfferAnswerOptions { }; + /// + /// The RTCMediaStreamTrackConfiguration contains the information needed + /// to configure the tracks to send over the RTP transport. + /// [dictionary] struct RTCMediaStreamTrackConfiguration { + /// + /// Gets or sets the RTP capabilities associated with the media + /// stream track configuration. + /// RTCRtpCapabilities capabilities; + /// + /// Gets or sets the RTP parameters associated with the media + /// stream track configuration. + /// RTCRtpParameters parameters; + /// + /// Constructs an empty instance of an RTCMediaStreamTrackConfiguration object. + /// [constructor, default] void RTCMediaStreamTrackConfiguration(); + /// + /// Constructs an instance of an RTCMediaStreamTrackConfiguration object by cloning object data from an existing object. + /// [constructor, altname(RTCMediaStreamTrackConfigurationClone)] void RTCMediaStreamTrackConfiguration(RTCMediaStreamTrackConfiguration source); }; + /// + /// The RTCPeerConnectionIceErrorEvent object is fired when an error + /// connecting to a STUN or TURN server is detected. + /// interface RTCPeerConnectionIceErrorEvent { - string mid; - [optional] - unsigned short sdpMLineIndex; - + /// + /// Gets the local candidate used to communicate with the STUN or TURN + /// server. + /// RTCIceCandidate hostCandidate; + /// + /// Gets the STUN or TURN URL that identifies the STUN or TURN server + /// for which the failure occurred. + /// string url; + /// + /// Gets the errorCode attribute is the numeric STUN error code + /// returned by the STUN or TURN server. + /// [optional] uint16 errorCode; + /// + /// Gets the errorText attribute is the STUN reason text returned by + /// the STUN or TURN server. + /// string errorText; }; + /// + /// This event fires whenever a new ICE candidate has been discovered. + /// struct RTCPeerConnectionIceEvent { + /// + /// Gets the RTCIceCandidate object with the new ICE candidate that + /// caused the event. + /// RTCIceCandidate candidate; + /// + /// Gets the STUN or TURN URL that identifies the STUN or TURN server + /// used to gather this candidate. If the candidate was not gathered + /// from a STUN or TURN server, this parameter will be set to null. + /// string uri; }; + /// + /// This event fires whenever the final ICE candidate has been + /// discovered for an ICE transport. + /// struct RTCPeerConnectionIceCompleteEvent { + /// + /// Gets the RTCIceCandidateComplete object with the final ICE + /// transport candidate that caused the event. + /// RTCIceCandidateComplete candidate; }; + /// + /// The RTCTrackEvent is fired when a new remote track is detected. + /// struct RTCTrackEvent { typedef std::list MediaStreamList; + /// + /// Gets the RTCRtpReceiver object associated with the event. + /// RTCRtpReceiver receiver; + /// + /// Gets the MediaStreamTrack object that is associated with the + /// RTCRtpReceiver identified by receiver. + /// MediaStreamTrack track; + /// + /// Gets an array of MediaStream objects representing the MediaStreams + /// that this event's track is a part of. + /// MediaStreamList mediaStreams; }; + /// + /// The general operation of the RTCPeerConnection is described in + /// [draft-ietf-rtcweb-jsep]. + /// interface RTCPeerConnection : RTCStatsProvider { typedef std::list MediaStreamList; @@ -132,111 +277,341 @@ namespace org typedef PromiseWith PromiseWithSender; typedef PromiseWith PromiseWithDataChannel; - [constructor] - void RTCPeerConnection([optional] RTCConfiguration configuration); - + /// + /// Constructs an instance of an RTCPeerConnection object. + /// + [default, constructor] + void RTCPeerConnection(); + + /// + /// Constructs an instance of an RTCPeerConnection object with + /// configuration options specified. + /// + [constructor, altname(RTCPeerConnectionWithConfiguration)] + void RTCPeerConnection(RTCConfiguration configuration); + + /// + /// Gets a unique object instance identifier for this object. + /// + [getter] + puid objectId; + + /// + /// The CreateOffer method generates a blob of SDP that contains an + /// [RFC3264] offer with the supported configurations for the session, + /// including descriptions of the local MediaStreamTracks attached to + /// this RTCPeerConnection, the codec/RTP/RTCP options supported by + /// this implementation, and any candidates that have been gathered by + /// the ICE Agent. The options parameter may be supplied to provide + /// additional control over the offer generated. + /// [default] PromiseWithDescription createOffer(); + /// + /// The CreateOffer method generates a blob of SDP that contains an + /// [RFC3264] offer with the supported configurations for the session, + /// including descriptions of the local MediaStreamTracks attached to + /// this RTCPeerConnection, the codec/RTP/RTCP options supported by + /// this implementation, and any candidates that have been gathered by + /// the ICE Agent. The options parameter may be supplied to provide + /// additional control over the offer generated. + /// [altname(createOfferWithOptions)] PromiseWithDescription createOffer(RTCOfferOptions options); + /// + /// The CreateAnswer method generates an [RFC3264] answer with the + /// supported configuration for the session that is compatible with + /// the parameters in the remote configuration. Like createOffer, the + /// returned blob contains descriptions of the local MediaStreamTracks + /// attached to this RTCPeerConnection, the codec/RTP/RTCP options + /// negotiated for this session, and any candidates that have been + /// gathered by the ICE Agent. The options parameter may be supplied + /// to provide additional control over the generated answer. + /// [default] PromiseWithDescription createAnswer(); + /// + /// The CreateAnswer method generates an [RFC3264] answer with the + /// supported configuration for the session that is compatible with + /// the parameters in the remote configuration. Like createOffer, the + /// returned blob contains descriptions of the local MediaStreamTracks + /// attached to this RTCPeerConnection, the codec/RTP/RTCP options + /// negotiated for this session, and any candidates that have been + /// gathered by the ICE Agent. The options parameter may be supplied + /// to provide additional control over the generated answer. + /// [altname(createAnswerWithOptions)] PromiseWithDescription createAnswer(RTCAnswerOptions options); + /// + /// When operating in JSON signaling type, this method gets the local + /// description which consists of ICE transport parameters, secure + /// transport parameters, and RTP/RTCP capabilities without needing + /// shared negioated state with an offer answer exchange. In this + /// signaling model, each side creates it's capabilities (and + /// parameters) and exchanges with the remote party. + /// [default] PromiseWithDescription createCapabilities(); + /// + /// When operating in JSON signaling type, this method gets the local + /// description which consists of ICE transport parameters, secure + /// transport parameters, and RTP/RTCP capabilities without needing + /// shared negioated state with an offer answer exchange. In this + /// signaling model, each side creates it's capabilities (and + /// parameters) and exchanges with the remote party. + /// [altname(createCapabilitiesWithOptions)] PromiseWithDescription createCapabilities(RTCCapabilityOptions options); + /// + /// The SetLocalDescription() method instructs the RTCPeerConnection + /// to apply the supplied RTCSessionDescriptionInit as the local + /// description. + /// Promise setLocalDescription(RTCSessionDescription description); + /// + /// Gets the PendingLocalDescription if it is not null and otherwise + /// it must return CurrentLocalDescription. + /// [getter] RTCSessionDescription localDescription; + /// + /// Gets the local RTCSessionDescription that was successfully + /// negotiated the last time theRTCPeerConnection transitioned into + /// the stable state plus any local candidates that have been + /// generated by the ICE Agent since the offer or answer was created. + /// This attribute is updated by SetLocalDescription(). + /// [getter] RTCSessionDescription currentDescription; + /// + /// Gets a local RTCSessionDescription that is in the process of being + /// negotiated plus any local candidates that have been generated by + /// the ICE Agent since the offer or answer was created. If the + /// RTCPeerConnection is in the stable state, the value is null. This + /// attribute is updated by setLocalDescription(). + /// [getter] RTCSessionDescription pendingDescription; + /// + /// The SetRemoteDescription() method instructs the RTCPeerConnection + /// to apply the supplied RTCSessionDescriptionInit as the remote + /// offer or answer (or remote description if in JSON signalling). + /// This API may change the local media state. + /// Promise setRemoteDescription(RTCSessionDescription description); + /// + /// Gets the PendingRemoteDescription if it is not null and otherwise + /// it must return currentRemoteDescription. + /// [getter] RTCSessionDescription remoteDescription; + /// + /// Gets the last remote RTCSessionDescription that was successfully + /// negotiated the last time theRTCPeerConnection transitioned into + /// the stable state plus any remote candidates that have been + /// supplied via AddIceCandidate() since the offer or answer was + /// created. This attribute is updated by SetRemoteDescription(). + /// [getter] RTCSessionDescription currentRemoteDescription; + /// + /// Gets a remote RTCSessionDescription that is in the process of + /// being negotiated, completed with any remote candidates that have + /// been supplied via AddIceCandidate() since the offer or answer was + /// created. If the RTCPeerConnection is in the stable state, the + /// value is null. This attribute is updated by + /// SetRemoteDescription(). + /// [getter] RTCSessionDescription pendingRemoteDescription; + /// + /// The AddIceCandidate() method provides a remote candidate to the + /// ICE Agent. In addition to being added to the remote description, + /// connectivity checks will be sent to the new candidates as long as + /// the ICE Transports setting is not set to none. This call will + /// result in a change to the ICE connection state, and may result in + /// a change to media state if it results in different connectivity + /// being established. The only members of candidate used by this + /// method are candidate, sdpMid and sdpMLineIndex; the rest are + /// ignored. + /// void addIceCandidate(RTCIceCandidate candidate); + /// + /// Gets the RTCPeerConnection object's signaling state. + /// [getter] RTCSignalingState signalingState; + /// + /// Gets the ICE gathering state of the RTCPeerConnection instance. + /// [getter] RTCIceGathererState iceGatheringState; + /// + /// Gets the ICE connection state of the RTCPeerConnection instance. + /// [getter] RTCIceConnectionState iceConnectionState; + /// + /// Gets the aggregate of the states of the DtlsTransports and + /// IceTransports of the RTCPeerConnection, as describe in the values + /// of the RTCPeerConnectionState enum. + /// [getter] RTCPeerConnectionState connectionState; + /// + /// Gets whether the remote peer is able to accept trickled ICE + /// candidates [draft-ietf-ice-trickle-01]. + /// [getter] bool canTrickleCandidates; + /// + /// Gets a list of ICE servers that are configured into the engine. + /// An engine/browser might be configured to use local or private + /// STUN or TURN servers. This method allows an application to learn + /// about these servers and optionally use them. + /// ServerList getDefaultIceServers(); - RTCConfiguration getConfiguration(); - void setConfiguration(RTCConfiguration config); + /// + /// Gets or sets an RTCConfiguration object representing the current + /// configuration of this RTCPeerConnection object. + /// + [getter, setter] + RTCConfiguration getConfiguration; + /// + /// Closes the RTCPeerConnection object. + /// void close(); + /// + /// Returns a sequence of RTCRtpSender objects representing the RTP + /// senders that are currently attached to this RTCPeerConnection + /// object. + /// SenderList getSenders(); + /// + /// Returns a sequence of RTCRtpReceiver objects representing the RTP + /// receivers that are currently attached to this RTCPeerConnection + /// object. + /// ReceiverList getReceivers(); + /// + /// Adds a new track to the RTCPeerConnection. + /// [default] + PromiseWithSender addTrack(MediaStreamTrack track); + /// + /// Adds a new track to the RTCPeerConnection and specifies how the + /// track must be encoded. + /// + [altname(addTrackWithConfiguration)] PromiseWithSender addTrack( MediaStreamTrack track, - [optional] RTCMediaStreamTrackConfiguration config ); + /// + /// Adds a new track to the RTCPeerConnection, and indicates that it + /// is contained in the specified MediaStreams. + /// [altname(addTrackWithStreams)] PromiseWithSender addTrack( MediaStreamTrack track, MediaStreamList mediaStreams, - [optional] RTCMediaStreamTrackConfiguration config ); + /// + /// Stops sending media from sender. The RTCRtpSender will still + /// appear in GetSenders(). + /// void removeTrack(RTCRtpSender sender); + /// + /// Creates a new RTCDataChannel object with the given data channel + /// parameters. + /// PromiseWithDataChannel createDataChannel(RTCDataChannelParameters parameters); + /// + /// The engine wishes to inform the application that session + /// negotiation needs to be done (e.g. a CreateOffer() call followed + /// by SetLocalDescription). Alternatively, CreateCapabilities() can + /// be called for JSON style signaling. + /// [event] void onNegotiationNeeded(); + /// + /// A new RTCIceCandidate is made available to the script. + /// [event] void onIceCandidate(RTCPeerConnectionIceEvent event); + /// + /// The final RTCIceCandidateComplete is discovered for a transport. + /// [event] void onIceCandidateComplete(RTCPeerConnectionIceCompleteEvent event); + /// + /// A failure occured when gathering ICE candidates. + /// [event] void onIceCandidateError(RTCPeerConnectionIceErrorEvent event); + /// + /// The signaling state has changed. This state change is the result + /// of either setLocalDescription() or setRemoteDescription() being + /// invoked. + /// [event] void onSignalingStateChange(); + /// + /// The RTCPeerConnection's ICE connection state has changed. + /// [event] void onIceConnectionStateChange(); + /// + /// The RTCPeerConnection's ICE gathering state has changed. + /// [event] void onIceGatheringStateChange(); + /// + /// The RTCPeerConnection ConnectionState has changed. + /// [event] void onConnectionStateChange(); + /// + /// A new incoming MediaStreamTrack has been created, and an + /// associated RTCRtpReceiver has been added to the set of receivers. + /// [event] void onTrack(RTCTrackEvent event); + /// + /// An incoming MediaStreamTrack has disappeared, and the associated + /// RTCRtpReceiver is now removed. + /// [event] void onTrackGone(RTCTrackEvent event); + /// + /// A new RTCDataChannel is dispatched to the script in response to + /// the other peer creating a channel. + /// [event] void onDataChannel(RTCDataChannelEvent event); }; diff --git a/ortc/idl/adapter/SessionDescription.idl b/ortc/idl/adapter/SessionDescription.idl index b8002d22..03bb3bff 100644 --- a/ortc/idl/adapter/SessionDescription.idl +++ b/ortc/idl/adapter/SessionDescription.idl @@ -35,251 +35,959 @@ namespace org { namespace adapter { + /// + /// The RTCSessionDescriptionConnectionDataDetails object describes the + /// RTP/RTCP connection data at the session or media level or the + /// unicast address information for the origin at the session level as + /// described in [RFC4566] Section 5.7 for RTP and [RFC3605] Section 2.1 + /// for RTCP and [RFC4566] Section 5.2 for the origin's unicast address. + /// + /// + /// + /// o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5 + /// + /// + /// c=IN IP4 224.2.17.12/127 + /// + /// + /// a=rtcp:53020 + /// + /// + /// a=rtcp:53020 IN IP4 126.16.64.4 + /// + /// [dictionary] struct RTCSessionDescriptionConnectionDataDetails { + /// + /// Gets or sets the port for RTP or RTCP. For RTP at the media level + /// this is the media description's port as described in [RFC4566] + /// Section 5.14. For RTCP, the port is the RTCP port to use for the + /// connection as described in [RFC3605] Section 2.1. This value is + /// null and not used for origin unicast address or at the session + /// level's connection address. + /// [optional] uint16 port; + /// + /// Gets or sets the network type as described in [RFC4566] Section + /// 8.2.6. The value "IN" represents the Internet. + /// string netType; + /// + /// Gets or sets the address type as described in [RFC4566] Section + /// 8.2.7. The value "IP4" represents the IPv4 and "IP6" represents + /// IPv6. + /// string addrType; + /// + /// Gets or sets the connection address as described in [RFC4566] + /// Section 5.7 for session or media level connection data or the + /// unicast address for the session level origin as describe in + /// [RFC4566] Section 5.2 + /// string connectionAddress; + /// + /// Constructs an empty instance of an RTCSessionDescriptionConnectionDataDetails object. + /// [constructor, default] void RTCSessionDescriptionConnectionDataDetails(); + /// + /// Constructs an instance of an RTCSessionDescriptionConnectionDataDetails object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionConnectionDataDetailsClone)] void RTCSessionDescriptionConnectionDataDetails(RTCSessionDescriptionConnectionDataDetails source); + /// + /// Constructs an instance of an RTCSessionDescriptionConnectionDataDetails object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionConnectionDataDetailsWithJson)] void RTCSessionDescriptionConnectionDataDetails(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCSessionDescriptionConnectionData object describes the + /// connection data information as described in [RFC4566] Section 5.7 + /// for RTP and [RFC3605] Section 2.1 for RTCP (at either the session + /// level or the media level). + /// [dictionary] struct RTCSessionDescriptionConnectionData { + /// + /// Gets or sets the RTP connection data information "c=" as described + /// in [RFC4566] Section 5.7. + /// RTCSessionDescriptionConnectionDataDetails rtp; + /// + /// Gets or sets the RTCP connection data information "a=rtcp" as + /// described in [RFC3605] Section 2.1. + /// RTCSessionDescriptionConnectionDataDetails rtcp; + /// + /// Constructs an empty instance of an RTCSessionDescriptionConnectionData object. + /// [constructor, default] void RTCSessionDescriptionConnectionData(); + /// + /// Constructs an instance of an RTCSessionDescriptionConnectionData object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionConnectionDataClone)] void RTCSessionDescriptionConnectionData(RTCSessionDescriptionConnectionData source); + /// + /// Constructs an instance of an RTCSessionDescriptionConnectionData object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionConnectionDataWithJson)] void RTCSessionDescriptionConnectionData(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCSessionDescriptionTransportParameters represents the ICE + /// and secure transport parameters for a transport as well as any + /// candidates that are signaled as part of the session description for + /// a given transport. + /// [dictionary] struct RTCSessionDescriptionTransportParameters { typedef std::list CandidateList; + /// + /// Gets or sets all the ICE parameters needed to configure the ICE + /// ICE transport as described in [RFC5245]. + /// RTCIceParameters iceParameters; + /// + /// Gets or sets the DTLS parameters need to configure the DTLS + /// transport as described in [RFC4572] and [RFC5763]. + /// RTCDtlsParameters dtlsParameters; + /// + /// Gets or sets the SRTP/SDES parameters as described in [RFC4568]. + /// This transport is mutually exclusive with the DTLS transport and + /// must always be set null for RTCP transports. + /// RTCSrtpSdesParameters srtpSdesParameters; + /// + /// Gets or sets the list of ICE candidates as described in [RFC5245]. + /// CandidateList iceCandidates; + /// + /// Gets or sets if the end-of-candidates flag as described in + /// [draft-ietf-ice-trickle] Section 10. + /// bool endOfCandidates; + /// + /// Constructs an empty instance of an RTCSessionDescriptionTransportParameters object. + /// [constructor, default] void RTCSessionDescriptionTransportParameters(); + /// + /// Constructs an instance of an RTCSessionDescriptionTransportParameters object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionTransportParametersClone)] void RTCSessionDescriptionTransportParameters(RTCSessionDescriptionTransportParameters source); + /// + /// Constructs an instance of an RTCSessionDescriptionTransportParameters object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionTransportParametersWithJson)] void RTCSessionDescriptionTransportParameters(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCSessionDescriptionTransport object represents the ICE and + /// secure transport parameters for RTP and optionally RTCP if non-muxed + /// RTP/RTCP data is used. + /// [dictionary] struct RTCSessionDescriptionTransport { + /// + /// Gets or sets a unique identifier for the transport. For SDP, + /// this is the mid identification tag as defined in [RFC5888] Section + /// 4 for the media line's transport or the primary bundled transport + /// transport media line identifier. + /// + /// + /// + /// m=audio 30000 RTP/AVP 0 + /// a=mid:1 + /// m=video 30002 RTP/AVP 31 + /// a=mid:2 + /// + /// string transportId; + /// + /// Gets or sets the RTP transport information for use with RTP and + /// RTCP media in the case of muxed RTP/RTCP and only the RTP media + /// in the non-muxed scenario. This contains the information for ICE + /// and the secure transport. + /// RTCSessionDescriptionTransportParameters rtp; + /// + /// Gets or sets the RTCP transport information for use with RTCP if + /// non-muxed RTCP data is used otherwise the value is null. This + /// contains the ICE transport information and secure transport + /// information for use with RTCP. + /// RTCSessionDescriptionTransportParameters rtcp; + /// + /// Gets or sets the mux policy for the transport. Mux is preferred + /// when possible. + /// bool useMux; + /// + /// Constructs an empty instance of an RTCSessionDescriptionTransport object. + /// object. + /// [constructor, default] void RTCSessionDescriptionTransport(); + /// + /// Constructs an instance of an RTCSessionDescriptionTransport object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionTransportClone)] void RTCSessionDescriptionTransport(RTCSessionDescriptionTransport source); + /// + /// Constructs an instance of an RTCSessionDescriptionTransport object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionTransportWithJson)] void RTCSessionDescriptionTransport(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// Gets or sets the media line detailed information associated with a + /// type of media and related capabilities for the media on a particular + /// transport as describe in [RFC4566] Section 5.14 as well as in + /// [draft-ietf-rtcweb-jsep-14]. + /// [dictionary] struct RTCSessionDescriptionMediaLineDetails { + /// + /// Gets or sets the internal index of a media line based upon its + /// order within the entire session. This is used only when the + /// media line has no identifier. This value is used internally + /// to coordinate matching m lines for SDP negotiation but otherwise + /// is not recommended. + /// + [optional] size_t internalIndex; + /// + /// Gets or sets the private transport to use when the media line + /// cannot be bundled withinn the session. This is allows a legacy + /// systems that are not capable of bundling media lines together an + /// option of including their own private alternative non-bundled + /// transport as described in + /// [draft-ietf-mmusic-sdp-bundle-negotiation]. If the media line's + /// TransportId and PrivateTransportId are identical then this + /// transport either is part of a bundle or the transport will be used + /// privately and exclusively by this transport depending on what is + /// negotiated. If these values differ then the media line will be + /// either bundled into a single transport or use a private transport. + /// string privateTransportID; + /// + /// Gets or sets the protocol for use with DTLS and RTP as descibed in + /// [RFC5764] Section 8 or for DTLS and SCTP as described in + /// [draft-ietf-mmusic-sctp-sdp] Section 7 and 8. The following values + /// match any values are are legal for RTP "RTP/[S]AVP[F]" and + /// "(UDP/TCP)/TLS/RTP/SAVP[F]" and for SCTP the values are + /// "UDP/DTLS/SCTP", "TCP/DTLS/SCTP", or "DTLS/SCTP + /// string protocol; + /// + /// Gets or sets the media line connection information as described in + /// [RFC4566] Section 5.7 for RTP and [RFC3605] Section 2.1 for RTCP. + /// RTCSessionDescriptionConnectionData connectionData; + /// + /// Gets or sets the media direction flow expectations for the media + /// line as described in [RFC4566] Section 6. + /// RTCSessionDescriptionMediaDirection mediaDirection = sendReceive; + /// + /// Constructs and instance of an + /// RTCSessionDescriptionMediaLineDetails object. + /// [constructor, default] void RTCSessionDescriptionMediaLineDetails(); + /// + /// Constructs an instance of an RTCSessionDescriptionMediaLineDetails object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionMediaLineDetailsClone)] void RTCSessionDescriptionMediaLineDetails(RTCSessionDescriptionMediaLineDetails source); + /// + /// Constructs an instance of an RTCSessionDescriptionMediaLineDetails object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionMediaLineDetailsWithJson)] void RTCSessionDescriptionMediaLineDetails(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; [dictionary] struct RTCSessionDescriptionMediaLine { + /// + /// Gets or sets the media identifier for the media line as described + /// in [RFC5888] Section 4. + /// string id; + /// + /// Gets or sets the transport identifier for the media line. Multiple + /// media lines can point to the same transport id so long as the + /// payload type or RTP header extension IDs are not redefined within + /// the same transport in the same direction for JSON or any direction + /// for SDP. All media lines that share the same transport id are + /// grouped together into the same bundle as described in + /// [draft-ietf-mmusic-sdp-bundle-negotiation]. + /// + /// + /// + /// v=0 + /// o=alice 2890844526 2890844526 IN IP4 atlanta.example.com + /// s= + /// c=IN IP4 atlanta.example.com + /// t=0 0 + /// a=group:BUNDLE foo bar + /// m=audio 10000 RTP/AVP 0 8 97 + /// b=AS:200 + /// a=mid:foo + /// a=rtpmap:0 PCMU/8000 + /// a=rtpmap:8 PCMA/8000 + /// a=rtpmap:97 iLBC/8000 + /// a=extmap 1 urn:ietf:params:rtp-hdrext:sdes:mid + /// m=video 10002 RTP/AVP 31 32 + /// b=AS:1000 + /// a=mid:bar + /// a=rtpmap:31 H261/90000 + /// a=rtpmap:32 MPV/90000 + /// a=extmap 1 urn:ietf:params:rtp-hdrext:sdes:mid + /// + /// string transportId; + /// + /// Gets or sets the RTP media type. This value must be either "audio" + /// or "video". + /// string mediaType; + /// + /// Gets or sets the details of the media line which are required for + /// SDP but optional for JSON based signalling. If not usedt his value + /// must be null. + /// RTCSessionDescriptionMediaLineDetails details; + /// + /// Constructs an empty instance of an RTCSessionDescriptionMediaLine object. + /// [constructor, default] void RTCSessionDescriptionMediaLine(); + /// + /// Constructs an instance of an RTCSessionDescriptionMediaLine object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionMediaLineClone)] void RTCSessionDescriptionMediaLine(RTCSessionDescriptionMediaLine source); + /// + /// Constructs an instance of an RTCSessionDescriptionMediaLine object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionMediaLineWithJson)] void RTCSessionDescriptionMediaLine(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; - [dictionary] + /// + /// The RTCSessionDescriptionRtpMediaLine object represents the media + /// capabilities and properties associated with a particular media type + /// on a given transport. Multiple media lines are legally allowed to + /// be bundled within the same transport so long as the payload type + /// and/or RTP header extension IDs are not remapped to mean + /// different codecs or header extension URIs within the same transport + /// for the same direction for JSOn or any direction for SDP. In SDP, + /// a media line is required per sender and the if the media line is + /// send receive the both sides should attempt to map their respective + /// senders to the same media line. + /// + /// + /// + /// m=audio 56500 UDP/TLS/RTP/SAVPF 96 0 8 97 98 + /// c=IN IP4 192.0.2.1 + /// a=sendrecv + /// a=mid:a1 + /// m=video 56502 UDP/TLS/RTP/SAVPF 100 101 + /// c=IN IP4 192.0.2.1 + /// a=rtcp:56503 IN IP4 192.0.2.1 + /// a=sendonly + /// a=mid:v1 + /// m=audio 56500 TCP/DTLS/RTP/SAVPF 96 0 8 97 98 + /// c=IN IP4 192.0.2.1 + /// a=sendrecv + /// a=mid:a2 + /// + /// [dictionary] struct RTCSessionDescriptionRtpMediaLine : RTCSessionDescriptionMediaLine { + /// + /// Gets or sets the sender RTP capabilities described for this media + /// line. The usage of each codec is optional within the parameters of + /// a sender within the media line but the payload type must not + /// be changed within the same media line. The RTP header extension + /// IDs specified within the capabilies do not need to be used within + /// the RTP parameters but the mapping between RTP header extension + /// ID and header extension value must not be changed within the RTP + /// parameters. + /// RTCRtpCapabilities senderCapabilities; + /// + /// Gets or sets the sender RTP capabilities described for this media + /// line. The usage of each codec is optional within the parameters of + /// a sender within the media line but the payload type must not + /// be changed within the same media line. The RTP header extension + /// IDs specified within the capabilies do not need to be used within + /// the RTP parameters but the mapping between RTP header extension + /// ID and header extension value must not be changed within the RTP + /// parameters. + /// RTCRtpCapabilities receiverCapabilities; + /// + /// Constructs an empty instance of an RTCSessionDescriptionRtpMediaLine object. + /// [constructor, default] void RTCSessionDescriptionRtpMediaLine(); + /// + /// Constructs an instance of an RTCSessionDescriptionRtpMediaLine object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionRtpMediaLineClone)] void RTCSessionDescriptionRtpMediaLine(RTCSessionDescriptionRtpMediaLine source); + /// + /// Constructs an instance of an RTCSessionDescriptionRtpMediaLine object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionRtpMediaLineWithJson)] void RTCSessionDescriptionRtpMediaLine(Json json); }; - [dictionary] + /// + /// The RTCSessionDescriptionSctpMediaLine object represents the media + /// lines related to an SCTP transport assoacated to an ICE/secure + /// transport on a given SCTP port. Multiple data channels can + /// operate over the same SCTP transport thus creating multiple + /// SCTP transports is not needed unless for application specific logic + /// reasons. + /// + /// + /// + /// m=application 0 UDP/DTLS/SCTP webrtc-datachannel + /// c=IN IP4 0.0.0.0 + /// a=bundle-only + /// a=mid:d1 + /// a=fmtp:webrtc-datachannel max-message-size=65536 + /// a=sctp-port 5000 + /// + /// [dictionary] struct RTCSessionDescriptionSctpMediaLine : RTCSessionDescriptionMediaLine { + /// + /// Gets or sets the SCTP transport's capabilities associated with + /// the SCTP transport. + /// RTCSctpCapabilities capabilities; + /// + /// Gets or sets the SCTP transport port associated with the SCTP + /// transport. This is required for SDP based singaling but is + /// optional for JSON based signaling but requires the engine support + /// listening for incoming SCTP transports on any port within the + /// transport. Only one non-specified port (null value) is allowed per + /// transport and all non-signaled SCTP transport must share the same + /// SCTP capabilities for the transport. Setting to null implies + /// the SCTP transport is capable of listening for incoming SCTP + /// transport connections. + /// [optional] uint16 port; + /// + /// Constructs an empty instance of an RTCSessionDescriptionSctpMediaLine object. + /// [constructor, default] void RTCSessionDescriptionSctpMediaLine(); + /// + /// Constructs an instance of an RTCSessionDescriptionSctpMediaLine object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionSctpMediaLineClone)] void RTCSessionDescriptionSctpMediaLine(RTCSessionDescriptionSctpMediaLine source); + /// + /// Constructs an instance of an RTCSessionDescriptionSctpMediaLine object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionSctpMediaLineWithJson)] void RTCSessionDescriptionSctpMediaLine(Json json); }; + /// + /// The RTCSessionDescriptionRtpSenderDetails object represents the + /// sender details that are typically only related to SDP properties for + /// a specific sender. + /// [dictionary] struct RTCSessionDescriptionRtpSenderDetails { + /// + /// Gets or sets the associated internal index of a media line + /// associated with a sender based upon the media line order within + /// the entire session. This is used only when the media line has no + /// identifier. This value is used internally to coordinate matching + /// m (media) lines for SDP negotiation but otherwise is not + /// recommended. + /// [optional] size_t internalRtpMediaLineIndex; + /// + /// Constructs an empty instance of an RTCSessionDescriptionRtpSenderDetails object. + /// [constructor, default] void RTCSessionDescriptionRtpSenderDetails(); + /// + /// Constructs an instance of an RTCSessionDescriptionRtpSenderDetails object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionRtpSenderDetailsClone)] void RTCSessionDescriptionRtpSenderDetails(RTCSessionDescriptionRtpSenderDetails source); + /// + /// Constructs an instance of an RTCSessionDescriptionRtpSenderDetails object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionRtpSenderDetailsWithJson)] void RTCSessionDescriptionRtpSenderDetails(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCSessionDescriptionRtpSender object represents the sender + /// parameters for an encoded audio or video media stream track. + /// [dictionary] struct RTCSessionDescriptionRtpSender { typedef string MediaStreamId; typedef std::set MediaStreamSet; + /// + /// Gets or sets the sender identifier. In the case of SDP based + /// signaling this value must correspond to the media stream track + /// identifier that the remote party will adopt as it's media + /// stream track identification as described in + /// [draft-ietf-mmusic-msid] Section 2, i.e. the "msid-appdata" value. + /// string id; + /// + /// Gets or sets the sender details associated with this sender. These + /// values are typically only used within the context of SDP and + /// thus property may be null if unused. + /// RTCSessionDescriptionRtpSenderDetails details; + /// + /// Gets or sets the associated media line. In the case of SDP + /// signaling only one sender is allowed to be associated to a single + /// media line at a time. In the case of JSON, multiple senders are + /// allowed to be associated to a single media line. The sender media + /// type and media line media type must be identical. + /// string rtpMediaLineId; + /// + /// Gets or sets the configuration parameters associated with the + /// RTCRtpSender. + /// RTCRtpParameters parameters; + /// + /// Gets or sets the media stream track id associated with the + /// sender. This property should match the media stream track object + /// associated with the RTCRtpSender unless the RTCRtpSender's + /// track was chaneged without informing the associated + /// RTCRtpPeerConnection object. + /// string mediaStreamTrackId; + /// + /// Gets or sets the media stream group IDs associated with the media + /// line [RFC5888] Section 5. All media lines that share the same + /// group identification are considered part of the same group and + /// thus are part of the same media stream. + /// + /// + /// + /// v=0 + /// o=- 6729291447651054566 1 IN IP4 0.0.0.0 + /// s=- + /// t=0 0 + /// a=group:BUNDLE a1 v1 + /// m=audio 20000 UDP/TLS/RTP/SAVPF 96 0 8 97 98 + /// c=IN IP4 192.0.2.2 + /// a=mid:a1 + /// a=rtcp:20000 IN IP4 192.0.2.2 + /// a=msid:PI39StLS8W7ZbQl1sJsWUXkr3Zf12fJUvzQ1 + /// PI39StLS8W7ZbQl1sJsWUXkr3Zf12fJUvzQ1a0 + /// a=msid:fdsafjdksajlfEjalkfjDlskajaflJakfjd1 + /// PI39StLS8W7ZbQl1sJsWUXkr3Zf12fJUvzQ1a0 + /// ... + /// m=video 20000 UDP/TLS/RTP/SAVPF 100 101 + /// c=IN IP4 192.0.2.2 + /// a=rtcp 20001 IN IP4 192.0.2.2 + /// a=mid:v1 + /// a=msid:PI39StLS8W7ZbQl1sJsWUXkr3Zf12fJUvzQ1 + /// PI39StLS8W7ZbQl1sJsWUXkr3Zf12fJUvzQ1v0 + /// + /// MediaStreamSet mediaStreamIds; + /// + /// Constructs an empty instance of an RTCSessionDescriptionRtpSender object. + /// [constructor, default] void RTCSessionDescriptionRtpSender(); + /// + /// Constructs an instance of an RTCSessionDescriptionRtpSender object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionRtpSenderClone)] void RTCSessionDescriptionRtpSender(RTCSessionDescriptionRtpSender source); + /// + /// Constructs an instance of an RTCSessionDescriptionRtpSender object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionRtpSenderWithJson)] void RTCSessionDescriptionRtpSender(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The Session description version of an RTCIceCandidate object + /// includes information relating to an ICE candidate. + /// [dictionary] struct RTCIceCandidate { + /// + /// Gets or sets the identifier of the "media stream identification" + /// as defined in [RFC5888] for the media component this candidate is + /// associated with. + /// + string mid; + /// + /// Gets or sets the identifier of the "media stream identification" + /// as defined in [RFC5888] for the media component this candidate is + /// associated with. + /// + [getter, setter] string sdpMid; + /// + /// Gets or sets the index (starting at zero) of the media description + /// in the SDP this candidate is associated with. + /// [optional] size_t sdpMLineIndex; + /// + /// Gets or sets the candidate-attribute as defined in section 15.1 of + /// [RFC5245]. + /// RTCIceGathererCandidate candidate; + /// + /// Constructs an empty instance of an RTCIceCandidate object. + /// [constructor, default] void RTCIceCandidate(); + /// + /// Constructs an instance of an RTCIceCandidate object by cloning object data from an existing object. + /// [constructor, altname(RTCIceCandidateClone)] void RTCIceCandidate(RTCIceCandidate source); + /// + /// Constructs an instance of an RTCIceCandidate object by extracting object data from a JSON object. + /// [constructor, altname(RTCIceCandidateWithJson)] void RTCIceCandidate(Json json); - [static] + /// + /// A helper routine to easily converty from a SDP-candidate string to + /// an RTCIceCandidate object. + /// + [static, obsolete("Use FromSdpStringWithMid instead.")] RTCIceCandidate fromSdpStringWithMLineIndex( - string sdp, - size_t mlineIndex - ); + string sdp, + size_t mlineIndex + ); + /// + /// A helper routine to easily converty from a SDP-candidate string to + /// an RTCIceCandidate object. + /// [static] RTCIceCandidate fromSdpStringWithMid( - string sdp, - string mid - ); + string sdp, + string mid + ); - Json toJson(); + /// + /// A helper routine to easily convert to a SDP-candidate string. + /// string toSdp(); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// + Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + + /// + /// The RTCSessionDescriptionDescriptionDetails represents the session + /// level properties typically contained within an SDP origin or + /// other session level properties. + /// + /// + /// + /// o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5 + /// t=3034423619 3042462419 + /// s=SDP Seminar + /// c=IN IP4 224.2.17.12/127 + /// a=rtcp:53020 + /// + /// + /// o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5 + /// t=0 0 + /// s=- + /// c=IN IP4 224.2.17.12/127 + /// a=rtcp:53020 IN IP4 126.16.64.4 + /// + /// [dictionary] struct RTCSessionDescriptionDescriptionDetails { + /// + /// Gets or sets the user's login on the originating host, or it is "-" + /// if the originating host does not support the concept of user IDs. + /// This is the origin's username as described in [RFC4566] Section + /// 5.2. + /// string username = "-"; + /// + /// Gets or sets a numeric string such that the tuple of username, + /// sess - id, nettype, addrtype, and unicast - address forms a + /// globally unique identifier for the session. This is the origin's + /// sess-id as described in [RFC4566] Section 5.2. + /// unsigned long long sessionId; + /// + /// Gets or sets a version number for this session description. This + /// is the origin's sess-version as described in [RFC4566] Section + /// 5.2. + /// unsigned long long sessionVersion; + /// + /// Gets or sets the unicast address information for a session. This + /// represents the origin's nettype, addrtype, unicast-address as + /// described in [RFC4566] Section 5.2. + /// RTCSessionDescriptionConnectionDataDetails unicaseAddress; + /// + /// Gets or sets the textual session name as described in [RFC4566] + /// Section 5.3. + /// string sessionName; + /// + /// Gets or sets the start time of the session in NTP format as + /// described in [RFC4566] Section 5.9. A value of 0 has an unknown + /// start time. + /// uint64 startTime; + /// + /// Gets or sets the start end of the session in NTP format as + /// described in [RFC4566] Section 5.9. A value of 0 has an unbounded + /// end time. + /// uint64 endTime; + /// + /// Gets or sets the connection data associated with the session as + /// described in [RFC4566] Section 5.7 for RTP and [RFC3605] + /// Section 2.1 for RTCP (at the session level). + /// RTCSessionDescriptionConnectionData connectionData; // optional; can be null; + /// + /// Constructs an empty instance of an RTCSessionDescriptionDescriptionDetails object. + /// [constructor, default] void RTCSessionDescriptionDescriptionDetails(); + /// + /// Constructs an instance of an RTCSessionDescriptionDescriptionDetails object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionDescriptionDetailsClone)] void RTCSessionDescriptionDescriptionDetails(RTCSessionDescriptionDescriptionDetails source); + /// + /// Constructs an instance of an RTCSessionDescriptionDescriptionDetails object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionDescriptionDetailsWithJson)] void RTCSessionDescriptionDescriptionDetails(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + + /// + /// The RTCSessionDescriptionDescription represents a descriptive + /// format capable of carrying either media SDP [RFC4566] or JSON-style + /// media descriptions. The media descriptions contain information about + /// the session, all transports, media lines with media capabilities, + /// and senders related to the media lines. This format can be + /// converted to/from SDP and JSON. + /// + /// + /// + /// { + /// "session": { + /// "transports": { + /// "transport": { + /// "id": "transport1", + /// "rtp": { + /// "ice": { + /// "parameters": { + /// "usernameFragment": "ufrag1", + /// "password": "password1", + /// "useUnfreezePriority": "true", + /// "iceLite": "false" + /// } + /// }, + /// "dtls": { + /// "parameters": { + /// "role": "auto", + /// "fingerprints": { + /// "fingerprint": [ + /// "AB:32:...", + /// "FF:EE:..." + /// ] + /// } + /// } + /// }, + /// "sdesSrtp": { "parameters": "..." }, + /// "iceCandidates": { + /// "iceCandidate": [ + /// { + /// "mid": "a1", + /// "index": "0", + /// "component": "rtp", + /// "candidate": {...} + /// }, + /// { + /// "mid": "a1", + /// "index": "0", + /// "component": "rtp", + /// "candidateComplete": { complete: "true" } + /// } + /// ] + /// } + /// }, + /// "rtcp": {...} + /// } + /// } + /// }, + /// "rtpMediaLines" : { + /// "rtpMediaLine": { + /// }, + /// ... + /// }, + /// "sctpMediaLines" : { + /// "sctpMediaLine": { + /// }, + /// ... + /// }, + /// "rtpSenders" : { + /// "rtpSender": { + /// }, + /// ... + /// }, + /// } + /// + /// [dictionary] struct RTCSessionDescriptionDescription { @@ -288,49 +996,151 @@ namespace org typedef std::list SctpMediaList; typedef std::list RtpSenderList; + /// + /// Gets or sets the detailed session information (which is typically + /// related to SDP-only [RFC4566]. This value can be null if is it + /// not needed. + /// RTCSessionDescriptionDescriptionDetails details; + /// + /// Gets or sets a list of transports associated with the session. + /// These transports include the ICE and secure transport properties. + /// TransportList transports; + /// + /// Gets or sets a list of media capabilities which are associated + /// with transports. These media lines describe the intention of the + /// media flow and the capabilities and configuration expectations of + /// the media. + /// RtpMediaList rtpMediaLines; + /// + /// Gets or sets a list of SCTP data transports associated with + /// the wire transports. + /// SctpMediaList sctpMediaLines; + /// + /// Gets or sets a list of RTP senders associated with a + /// configurated media line. + /// RtpSenderList rtpSenders; + /// + /// Constructs an empty instance of an RTCSessionDescriptionDescription object. + /// [constructor, default] void RTCSessionDescriptionDescription(); + /// + /// Constructs an instance of an RTCSessionDescriptionDescription object by cloning object data from an existing object. + /// [constructor, altname(RTCSessionDescriptionDescriptionClone)] void RTCSessionDescriptionDescription(RTCSessionDescriptionDescription source); + /// + /// Constructs an instance of an RTCSessionDescriptionDescription object by extracting object data from a JSON object. + /// [constructor, default, altname(RTCSessionDescriptionDescriptionWithJson)] void RTCSessionDescriptionDescription(Json json); + /// + /// A helper routine to convert the object's data to structured JSON object data. + /// Json toJson(); + /// + /// Return a hash of the data contained within the object. + /// string hash(); }; + /// + /// The RTCSessionDescription class is used by RTCPeerConnection to + /// expose local and remote session descriptions. + /// interface RTCSessionDescription { + /// + /// Constructs an instance of an RTCSessionDescription from a string + /// representation of the session description. + /// [constructor, default, altname(RTCSessionDescriptionWithString)] void RTCSessionDescription( RTCSessionDescriptionSignalingType type, string description ); + /// + /// Constructs an instance of an RTCSessionDescription from a + /// structured session description. + /// [constructor, altname(RTCSessionDescriptionWithDescription)] void RTCSessionDescription( RTCSessionDescriptionSignalingType type, RTCSessionDescriptionDescription description ); + /// + /// Helper routine to convert RTP capabilities into the appropriate + /// matching RTP parameters. + /// + [static] + RTCRtpParameters convertCapabilitiesToParameters(RTCRtpCapabilities capabilitites); + /// + /// Helper routine to convert existing RTP parameters into the RTP + /// capabilities. + /// + [static] + RTCRtpCapabilities ConvertParametersToCapabilitites(RTCRtpParameters parameters); + + /// + /// Gets a unique object instance identifier for this object. + /// [getter] - puid id; + puid objectId; + /// + /// Gets the SDP type of this RTCSessionDescription. This property + /// may only be obtained if the signaling type is SDP. + /// [getter] RTCSessionDescriptionSignalingType type; + /// + /// Gets the SDP type of this RTCSessionDescription. This property + /// may only be obtained if the signaling type is SDP. + /// + [getter, obsolete("Use Type or SignalingType instead.")] + RTCSdpType sdpType; + + /// + /// Gets a indiciation if the signaling type is JSON based. + /// + [getter] + bool isJsonSignalling; + + /// + /// Gets a indiciation if the signaling type is SDP based. + /// + [getter] + bool isSdpSignaling; + + /// + /// Gets the structured representation of the SDP [RFC3264] or JSON + /// contents. + /// [getter] RTCSessionDescriptionDescription description; + /// + /// Gets the string representation of the SDP [RFC3264] or JSON. + /// [getter] string formattedDescription; + + /// + /// Gets the string representation of the SDP [RFC3264] or JSON. + /// + [getter, obsolete("Use FormattedDescription instead.")] + string sdp; }; } } diff --git a/ortc/idl/adapter/enums.idl b/ortc/idl/adapter/enums.idl index c1093221..c9cadb40 100644 --- a/ortc/idl/adapter/enums.idl +++ b/ortc/idl/adapter/enums.idl @@ -35,91 +35,322 @@ namespace org { namespace adapter { + /// + /// The RTCSdpType enum describes the type of RTCSessionDescription + /// instance. + /// enum RTCSdpType { - pffer, + /// + /// An RTCSdpType of offer indicates that a description must be + /// treated as an [RTC3264] offer. + /// + offer, + /// + /// An RTCSdpType of pranswer indicates that a description must be + /// treated as an [RTC3264] answer, but not a final answer. A + /// description used as an SDP pranswer may be applied as a response + /// to an SDP offer, or an update to a previously sent SDP pranswer. + /// pranswer, + /// + /// The format of the description is that of an SDP answer. + /// answer, + /// + /// The format of the description is that of an SDP rollback. + /// rollback, }; + /// + /// Defines the session description's signalling mechanism. + /// enum RTCSessionDescriptionSignalingType { + /// + /// The format of the description is that of a JSON blob. + /// json, + /// + /// The format of the description is that of an SDP offer. + /// sdpOffer, + /// + /// The format of the description is that of an SDP pre-answer. + /// sdpPranswer, + /// + /// The format of the description is that of an SDP answer. + /// sdpAnswer, + /// + /// The format of the description is that of an SDP rollback. + /// sdpRollback, }; + /// + /// Defines the session description's media type as described in + /// [RFC4566] Section 5.14 for the media line. + /// + /// + /// + /// m=audio 49170 RTP/AVP 0 + /// m=video 51372 RTP/AVP 99 + /// + /// enum RTCSessionDescriptionMediaType { + /// + /// This object represents an unknown media type. + /// unknown, + /// + /// This object represents an audio media type. + /// audio, + /// + /// This object represents a video media type. + /// video, + /// + /// This object represents a text media type. + /// text, + /// + /// This object represents an application media type. + /// application, }; + /// + /// Defines the session description direction in which media is flowing. + /// + /// + /// + /// a=sendrecv + /// a=sendonly + /// a=recvonly + /// a=inactive + /// + /// enum RTCSessionDescriptionMediaDirection { + /// + /// As defined in [RFC4566], media should be started in send and + /// receive mode. + /// sendReceive, + /// + /// As defined in [RFC4566], media should be started in send-only mode. + /// sendOnly, + /// + /// As defined in [RFC4566], media should be started in receive-only + /// mode. + /// receiveOnly, + /// + /// As defined in [RFC4566], media should be started in inactive mode. + /// inactive, }; - + /// + /// As described in [draft-ietf-rtcweb-jsep] (section 4.1.1.), BUNDLE + /// policy affects which media tracks are negotiated if the remote + /// endpoint is not BUNDLE-aware, and what ICE candidates are gathered. + /// enum RTCBundlePolicy { + /// + /// Gather ICE candidates for each media type in use (audio, video, + /// and data). If the remote endpoint is not BUNDLE-aware, negotiate + /// only one audio and video track on separate transports. + /// balanced, + /// + /// Gather ICE candidates for each track. If the remote endpoint is + /// not BUNDLE-aware, negotiate all media tracks on separate + /// transports. + /// maxCompat, + /// + /// Gather ICE candidates for only one track. If the remote endpoint + /// is not BUNDLE-aware, negotiate only one media track. + /// maxBundle, }; - + /// + /// The RtcpMuxPolicy affects what ICE candidates are gathered to + /// support non-multiplexed RTCP. + /// enum RTCRtcpMuxPolicy { + /// + /// Gather ICE candidates for both RTP and RTCP candidates. If the + /// remote-endpoint is capable of multiplexing RTCP, multiplex RTCP on + /// the RTP candidates. If it is not, use both the RTP and RTCP + /// candidates separately. + /// negotiated, + /// + /// Gather ICE candidates only for RTP and multiplex RTCP on the RTP + /// candidates. If the remote endpoint is not capable of rtcp-mux, + /// session negotiation will fail. + /// require, }; - + /// + /// The RTCPeerConnectionSignalingMode defines the signaling type to be + /// used with signaling modes. + /// enum RTCPeerConnectionSignalingMode { + /// + /// Use JSON capabilities exchange style signaling with the peer + /// connection. + /// json, + /// + /// Use SDP offer/answer exchange style signaling with the peer + /// connection. + /// sdp, }; - + /// + /// The RTCSignalingState describes the current state of an offer / + /// answer exchanged as it relates to the SDP negotiation process. WHen + /// JSON style signaling is used the state is always Stable. + /// enum RTCSignalingState { + /// + /// There is no offer­answer exchange in progress. This is also the + /// initial state in which case the local and remote descriptions are + /// empty. + /// stable, + /// + /// A local description, of type "offer", has been successfully + /// applied. + /// haveLocalOffer, + /// + /// A remote description, of type "offer", has been successfully + /// applied. + /// haveRemoteOffer, + /// + /// A remote description of type "offer" has been successfully + /// applied and a local description of type "pranswer" has been + /// successfully applied. + /// haveLocalPranswer, + /// + /// A local description of type "offer" has been successfully applied + /// and a remote description of type "pranswer" has been successfully + /// applied. + /// haveRemotePranswer, + /// + /// The connection is closed. + /// closed, }; + /// + /// The RTCIceConnectionState indicates the combined state of all the + /// RTCIceTransport objects states. + /// enum RTCIceConnectionState { + /// + /// The ICE Agent is gathering addresses and/or waiting for remote + /// candidates to be supplied. + /// new, + /// + /// The ICE Agent has received remote candidates on at least one + /// component, and is checking candidate pairs but has not yet found a + /// connection. In addition to checking, it may also still be + /// gathering. + /// checking, + /// + /// The ICE Agent has found a usable connection for all components but + /// is still checking other candidate pairs to see if there is a + /// better connection. It may also still be gathering. + /// connected, + /// + /// The ICE Agent has finished gathering and checking and found a + /// connection for all components. Details on how the completed state + /// in ICE is reached are covered in [RFC5245]. + /// completed, + /// + /// Liveness checks have failed for one or more components. This is + /// more aggressive than failed, and may trigger intermittently (and + /// resolve itself without action) on a flaky network. + /// disconnected, + /// + /// The ICE Agent is finished checking all candidate pairs and failed + /// to find a connection for at least one component. Connections may + /// have been found for some components. + /// failed, + /// + /// The ICE Agent has shut down and is no longer responding to STUN + /// requests. + /// closed, }; + /// + /// The RTCPeerConnectionState indicates the combined state of all the + /// RTCIceTransport and RTCDtlsTransport objects states. + /// enum RTCPeerConnectionState { + /// + /// Any of the RTCIceTransports or RTCDtlsTransports are in the new + /// state and none of the transports are in the connecting, checking, + /// failed or disconnected state, or all transports are in the closed + /// state. + /// new, + /// + /// Any of the RTCIceTransports or RTCDtlsTransports are in the + /// connecting or checking state and none of them is in the failed + /// state. + /// connecting, + /// + /// All RTCIceTransports and RTCDtlsTransports are in the connected, + /// completed or closed state and at least of them is in the connected + /// or completed state. + /// connected, + /// + /// Any of the RTCIceTransports or RTCDtlsTransports are in the + /// disconnected state and none of them are in the failed or + /// connecting or checking state. + /// disconnected, + /// + /// Any of the RTCIceTransports or RTCDtlsTransports are in a failed + /// state. + /// failed, + /// + /// The RTCPeerConnection object's IsClosed slot is true. + /// closed, }; diff --git a/ortc/idl/enums.idl b/ortc/idl/enums.idl index 90e3a7ed..04ab6f8f 100644 --- a/ortc/idl/enums.idl +++ b/ortc/idl/enums.idl @@ -33,216 +33,795 @@ namespace org { namespace ortc { + /// + /// RTCDataChannelState represents the state of the RTCDataChannel object. + /// enum RTCDataChannelState { + /// + /// The user agent is attempting to establish the underlying data + /// transport. This is the initial state of an RTCDataChannel object. + /// connecting, + /// + /// The underlying data transport is established and communication is + /// possible. This is the initial state of an RTCDataChannel object + /// dispatched as a part of an RTCDataChannelEvent. + /// open, + /// + /// The procedure to close down the underlying data transport has + /// started. + /// closing, + /// + /// The underlying data transport has been closed or could not be + /// established. + /// closed, }; + /// + /// RTCSctpTransportState indicates the state of the SCTP transport. + /// enum RTCSctpTransportState { + /// + /// The RTCSctpTransport object has been created and has not started + /// negotiating yet. + /// new, + /// + /// SCTP is in the process of negotiating an association. + /// connecting, + /// + /// SCTP has completed negotiation of an association. + /// connected, + /// + /// The SCTP association has been closed intentionally via a call to + /// Stop() or receipt of a SHUTDOWN or ABORT chunk. + /// closed, }; + /// + /// RTCIceRole contains the current role of the ICE transport. + /// enum RTCIceRole { + /// + /// The controlling state, defined in [RFC5245] Section 3. + /// controlling, + /// + /// The controlled state, defined in [RFC5245] Section 3. + /// controlled, }; + /// + /// RTCIceComponent contains the component-id of the RTCIceTransport, + /// which will be "RTP" unless RTP and RTCP are not multiplexed and the + /// RTCIceTransport object was returned by createAssociatedTransport(). + /// enum RTCIceComponent { - rtp, - rtcp, + /// + /// The RTP component ID, defined (as '1') in [RFC5245] Section 4.1.1.1. + /// Protocols multiplexed with RTP (e.g. SCTP data channel) share its + /// component ID. + /// + rtp = 1, + /// + /// The RTCP component ID, defined (as '2') in [RFC5245] Section + /// 4.1.1.1. + /// + rtcp = 2, }; enum RTCIceProtocol { + /// + /// A UDP candidate, as described in [RFC5245]. + /// udp, + /// + /// A TCP candidate, as described in [RFC5245]. + /// tcp, }; + /// + /// The RTCIceCandidateType includes the type of the ICE candidate. + /// enum RTCIceCandidateType { + /// + /// A host candidate, defined in [RFC5245] Section 3. + /// host, + /// + /// A server reflexive candidate, defined in [RFC5245] Section 3. + /// srflex, + /// + /// A peer reflexive candidate, defined in [RFC5245] Section 3. + /// prflx, + /// + /// A relay candidate, defined in [RFC5245] Section 3. + /// relay, }; + /// + /// The RTCIceTcpCandidateType includes the type of the ICE TCP candidate, + /// as described in [RFC6544]. + /// enum RTCIceTcpCandidateType { + /// + /// An active TCP candidate is one for which the transport will attempt + /// to open an outbound connection but will not receive incoming + /// connection requests. + /// active, + /// + /// A passive TCP candidate is one for which the transport will receive + /// incoming connection attempts but not attempt a connection. + /// passive, + /// + /// An so candidate is one for which the transport will attempt to open + /// a connection simultaneously with its peer. + /// so, }; - + /// + /// RTCIceGathererState represents the current state of the ICE gatherer. + /// enum RTCIceGathererState { + /// + /// The object has been created but Gather() has not been called. + /// new, + /// + /// Gather() has been called, and the RTCIceGatherer is in the process + /// of gathering candidates (which includes adding new candidates and + /// removing invalidated candidates). + /// gathering, + /// + /// The RTCIceGatherer has completed gathering. Events such as adding, + /// updating or removing an interface, or adding, changing or removing a + /// TURN server will cause the state to go back to gathering before + /// re-entering "complete" once all candidate changes are finalized. + /// complete, + /// + /// The RTCIceGatherer has been closed intentionally (by calling + /// Close()) or as the result of an error. + /// closed, }; + /// + /// RTCIceGatherFilterPolicy represents the detailed gatherer filter + /// options to restrict ICE candidate discovery. + /// enum RTCIceGatherFilterPolicy : uint64 { + /// + /// No gatherer filtering is required. + /// none = 0, + /// + /// Filter all IPv4 host candidates. + /// noIPv4Host = 0x00000001, + /// + /// Filter all IPv4 server reflexive candidates. + /// noIPv4Srflx = 0x00000002, + /// + /// Filter all IPv4 peer reflexive candidates. + /// noIPv4Prflx = 0x00000004, + /// + /// Filter all IPv4 relay candidates. + /// noIPv4Relay = 0x00000008, + /// + /// Filter all IPv4 private candidates. + /// See: https://en.wikipedia.org/wiki/Private_network + /// noIPv4Private = 0x00000010, + /// + /// Filter all IPv4 candidates. + /// noIPv4 = 0x000000FF, + /// + /// Filter all IPv6 host candidates. + /// noIPv6Host = 0x00000100, + /// + /// Filter all IPv6 server reflexive candidates. + /// noIPv6Srflx = 0x00000200, + /// + /// Filter all IPv6 peer reflexive candidates. + /// noIPv6Prflx = 0x00000400, + /// + /// Filter all IPv6 relay candidates. + /// noIPv6Relay = 0x00000800, + /// + /// Filter all IPv6 private candidates. + /// See: https://en.wikipedia.org/wiki/Private_network + /// noIPv6Private = 0x00001000, + /// + /// Filter all IPv6 Teredo tunnel or other tunneled candidates. + /// noIPv6Tunnel = 0x00002000, + /// + /// Filter all IPv6 permanent candidates. + /// noIPv6Permanent = 0x00004000, + /// + /// Filter all IPv6 candidates. + /// noIPv6 = 0x0000FF00, + /// + /// Filter all host candidates. + /// noHost = 0x00000101, + /// + /// Filter all server reflexive candidates. + /// noSrflx = 0x00000202, + /// + /// Filter all server peer reflexive candidates. + /// noPrflx = 0x00000404, + /// + /// Filter all relay candidates. + /// noRelay = 0x00000808, + /// + /// Filter all private candidates. + /// See: https://en.wikipedia.org/wiki/Private_network + /// noPrivate = 0x00001010, + /// + /// Filter all but relay candidates. + /// relayOnly = 0x00000707, + /// + /// Filter all candidates. + /// noCandidates = 0x7FFFFFFF, }; + /// + /// Use the string form of these enums with the RTCIceInterfacePolicy + /// Interface type variable to specify per interface type policies. + /// + enum RTCIceGatherInterfaceType + { + /// + /// Applies to all unknown interface types. + /// + Unknown, + /// + /// Applies to all interface types where there is no specific interface + /// type policy was specified. + /// + Default, + /// + /// Applies to all Local Area Network interface types. + /// + Lan, + /// + /// Applies to all Tunnel interface types. + /// + Tunnel, + /// + /// Applies to all Wireless Local Area Network interface types. + /// + Wlan, + /// + /// Applies to all Wireless Wide Area Network interface types. + /// + Wwan, + /// + /// Applies to all Virtual Private Network interface types. + /// + Vpn + }; + + /// + /// RTCIceCredentialType represents the type of credential used by a TURN + /// server. + /// enum RTCIceCredentialType { + /// + /// The credential is a long-term authentication password. + /// password, + /// + /// The credential is an access token. + /// token, }; + /// + /// RTCIceTransportState represents the current state of the ICE + /// transport. + /// enum RTCIceTransportState { + /// + /// The RTCIceTransport object is waiting for remote candidates to be + /// supplied. In this state the object can respond to incoming + /// connectivity checks. + /// new, + /// + /// The RTCIceTransport has received at least one remote candidate, and + /// a local and remote RTCIceCandidateComplete dictionary was not added + /// as the last candidate. In this state the RTCIceTransport is checking + /// candidate pairs but has not yet found a successful candidate pair, + /// or consent checks [RFC7675] have failed on a previously successful + /// candidate pair. + /// checking, + /// + /// The RTCIceTransport has received a response to an outgoing + /// connectivity check, or has received incoming DTLS/media after a + /// successful response to an incoming connectivity check, but is still + /// checking other candidate pairs to see if there is a better + /// connection. In this state outgoing media is permitted. + /// connected, + /// + /// A local and remote RTCIceCandidateComplete dictionary was added as + /// the last candidate to the RTCIceTransport and all appropriate + /// candidate pairs have been tested and at least one functioning + /// candidate pair has been found. + /// completed, + /// + /// The RTCIceTransport has received at least one local and remote + /// candidate, and a local and remote RTCIceCandidateComplete dictionary + /// was not added as the last candidate, but all appropriate candidate + /// pairs thus far have been tested and failed (or consent checks + /// [RFC7675] once successful, have now failed). Other candidate pairs + /// may become available for testing as new candidates are trickled, and + /// therefore the "failed" state has not been reached. + /// disconnected, + /// + /// A local and remote RTCIceCandidateComplete dictionary was added as + /// the last candidate to the RTCIceTransport and all appropriate + /// candidate pairs have been tested and failed. + /// failed, + /// + /// The RTCIceTransport has shut down and is no longer responding to + /// STUN requests. + /// closed, }; - enum RTCDataChannelState - { - connecting, - open, - closing, - closed, - }; - + /// + /// RTCDtlsTransportState indicates the state of the DTLS transport. + /// enum RTCDtlsTransportState { + /// + /// The RTCDtlsTransport object has been created and has not started + /// negotiating yet. + /// new, + /// + /// DTLS is in the process of negotiating a secure connection and + /// verifying the remote fingerprint. Once a secure connection is + /// negotiated (but prior to verification of the remote fingerprint, + /// enabled by calling start()), incoming data can flow through (and + /// media, once DTLS-SRTP key derivation is completed). + /// connecting, + /// + /// DTLS has completed negotiation of a secure connection but the + /// fingerprint has not been verified. + /// connected, + /// + /// The DTLS connection has been closed intentionally via a call to + /// Stop() or receipt of a close_notify alert. Calling transport.Stop() + /// will also result in a transition to the "closed" state. + /// closed, + /// + /// The DTLS connection has been closed as the result of an error + /// (such as receipt of an error alert or a failure to validate the + /// remote fingerprint). + /// failed, }; + /// + /// RTCDtlsRole indicates the role of the DTLS transport. + /// enum RTCDtlsRole { + /// + /// The DTLS role is determined based on the resolved ICE role: the + /// "Controlled" role acts as the DTLS client, the "Controlling" role + /// acts as the DTLS server. Since RTCDtlsRole is initialized to "Auto" + /// on construction of an RTCDtlsTransport object, + /// transport.GetLocalParameters().RTCDtlsRole will have an initial + /// value of "Auto". + /// auto, + /// + /// The DTLS client role. A transition to "Client" will occur if + /// Start(remoteParameters) is called with remoteParameters.RTCDtlsRole + /// having a value of "Server". If RTCDtlsRole had previously had a + /// value of "Server" (e.g. due to the RTCDtlsTransport having + /// previously received packets from a DTLS client), then the DTLS + /// session is reset prior to transitioning to the "client" role. + /// client, + /// + /// The DTLS server role. If RTCDtlsRole has a value of "Auto" and the + /// RTCDtlsTransport receives a DTLS client_hello packet, RTCDtlsRole + /// will transition to "Server", even before start() is called. A + /// transition from "Auto" to "Server" will also occur if + /// Start(remoteParameters) is called with remoteParameters.RTCDtlsRole + /// having a value of "Client". + /// server, }; + /// + /// RTCStatsType object is initialized to the name of the dictionary that + /// the RTCStats represents. + /// enum RTCStatsType { + /// + /// Statistics returned are unknown and thus should be ignored. + /// + unknown, + /// + /// Statistics for the inbound RTP stream that is currently received + /// with this RTCRtpReceiver object. It is accessed by the + /// RTCInboundRtpStreamStats. + /// inboundRtp, + /// + /// Statistics for the outbound RTP stream that is currently sent with + /// this RTCRtpSender object. It is accessed by the + /// RTCOutboundRtpStreamStats. + /// outboundRtp, + /// + /// Codec information for the RTCRtpReceiver or RTCRtpSender objects. It + /// is accessed by the RTCCodec. + /// codec, + /// + /// Statistics for the RTCSctpTransport object. It is accessed by the + /// RTCSctpTransportStats. + /// sctpTransport, + /// + /// Statistics for the RTCDataChannel object. It is accessed by the + /// RTCDataChannelStats. + /// dataChannel, + /// + /// Statistics for the RTCMediaStream object. It is accessed by the + /// RTCMediaStreamStats. + /// stream, + /// + /// Statistics for the RTCMediaStreamTrack object. It is accessed by the + /// RTCMediaStreamTrackStats. + /// track, + /// + /// Statistics for the RTCIceGatherer object. It is accessed by the + /// RTCIceGathererStats. + /// iceGatherer, + /// + /// Statistics for the RTCIceTransport object. It is accessed by the + /// RTCIceTransportStats. + /// iceTransport, + /// + /// Statistics for the RTCDtlsTransport object. It is accessed by the + /// RTCDtlsTransportStats. + /// dtlsTransport, + /// + /// Statistics for the RTCSrtpTransport object. It is accessed by the + /// RTCSrtpTransportStats. + /// srtpTransport, + /// + /// Statistics for the RTCCertificate object. It is accessed by the + /// RTCCertificateStats. + /// certificate, + /// + /// Statistics for the RTCIceGatherer or RTCIceTransport object. It is + /// accessed by the RTCIceCandidateAttributes. + /// candidate, + /// + /// Statistics for the RTCIceCandidate object from the RTCIceGatherer + /// object. It is accessed by the RTCIceCandidatePairStats. + /// candidatePair, + /// + /// Statistics for the local RTCIceCandidate from the RTCIceTransport + /// object. It is accessed by the RTCIceCandidateAttributes. + /// localCandidate, + /// + /// Statistics for the remote RTCIceCandidate from the RTCIceTransport + /// object. It is accessed by the RTCIceCandidateAttributes. + /// remoteCandidate, }; + /// + /// Canadidate pair state is defined in Section 5.7.4 of [RFC5245]. + /// enum RTCIceCandidatePairState { + /// + /// Defined in Section 5.7.4 of [RFC5245]. + /// frozen, + /// + /// Defined in Section 5.7.4 of [RFC5245]. + /// waiting, + /// + /// Defined in Section 5.7.4 of [RFC5245]. + /// inProgress, + /// + /// Defined in Section 5.7.4 of [RFC5245]. + /// failed, + /// + /// Defined in Section 5.7.4 of [RFC5245]. + /// succeeded, + /// + /// Defined in Section 5.7.4 of [RFC5245]. + /// cancelled, }; + /// + /// The kind attribute must represent either an audio or video track. + /// enum MediaStreamTrackKind { + /// + /// This object represents an audio track. + /// audio, + /// + /// This object represents an video track. + /// video }; + /// + /// The state attribute represents the state of the track. + /// enum MediaStreamTrackState { + /// + /// The track is active (the track's underlying media source is making a + /// best-effort attempt to provide data in real time). + /// + /// The output of a track in the live state can be switched on and off + /// with the enabled attribute. + /// live, + /// + /// The track has ended (the track's underlying media source is no longer + /// providing data, and will never provide more data for this track). + /// Once a track enters this state, it never exits it. + /// + /// For example, a video track ends when the user unplugs the USB web + /// camera that acts as the track's media source. + /// ended, }; + /// + /// Facing mode enum (as string) to be used in facing mode of the media stream track settings. + /// + enum VideoFacingMode + { + /// + /// The source is facing toward the user (a self-view camera). + /// + user, + /// + /// The source is facing away from the user (viewing the environment). + /// + environment, + /// + /// The source is facing to the left of the user. + /// + left, + /// + /// The source is facing to the right of the user. + /// + right, + }; + + /// + /// The type of the source of the MediaStreamTrack. + /// + enum SourceType + { + /// + /// A valid source type only for video MediaStreamTrack s. The source is + /// a local video-producing camera source. + /// + Camera, + /// + /// A valid source type only for audio MediaStreamTrack s. The source is + /// a local audio-producing microphone source. + /// + Microphone, + }; + + /// + /// Describes the kind of the represented device. + /// enum MediaDeviceKind { + /// + /// Represents an audio input device; for example a microphone. + /// audioInput, + /// + /// Represents an audio output device; for example a pair of headphones. + /// audioOutput, + /// + /// Represents a video input device; for example a webcam. + /// videoInput, }; + /// + /// RTCRtpDegradationPreference can be used to indicate the desired choice + /// between degrading resolution and degrading framerate when bandwidth is + /// constrained. + /// enum RTCRtpDegradationPreference { + /// + /// Degrade resolution in order to maintain framerate. + /// maintainFramerate, + /// + /// Degrade framerate in order to maintain resolution. + /// maintainResolution, + /// + /// Degrade a balance of framerate and resolution. + /// balanced, }; + /// + /// RTCPriorityType can be used to indicate the relative priority of + /// various flows. + /// enum RTCRtpPriorityType { + /// + /// See [draft-ietf-rtcweb-transports], Section 4. + /// veryLow, + /// + /// See [draft-ietf-rtcweb-transports], Section 4. + /// low, + /// + /// See [draft-ietf-rtcweb-transports], Section 4. + /// medium, + /// + /// See [draft-ietf-rtcweb-transports], Section 4. + /// high, }; + /// + /// Configures the type of signal being encoded. + /// enum RTCRtpOpusCodecCapabilityOptionsSignal { + /// + /// (default) + /// auto, + /// + /// Bias thresholds towards choosing MDCT modes. + /// music, + /// + /// Bias thresholds towards choosing LPC or Hybrid modes. + /// voice, }; + /// + /// Opus coding mode. + /// enum RTCRtpOpusCodecCapabilityOptionsApplication { + /// + /// Gives best quality at a given bitrate for voice signals. + /// voip, + /// + /// Gives best quality at a given bitrate for most non-voice signals + /// like music. + /// audio, + /// + /// Configures low-delay mode that disables the speech-optimized mode in + /// exchange for slightly reduced delay. + /// lowDelay, }; + /// + /// The type of protection for FlexFEC. See https://tools.ietf.org/html/draft-ietf-payload-flexible-fec-scheme-03 + /// for more details. + /// enum RTCRtpFlexFecCodecCapabilityParametersToP { + /// + /// 1-D interleaved FEC protection. + /// n1DInterleavedFEC = 0, + /// + /// 1 for 1-D non-interleaved FEC protection. + /// n1DNonInterleavedFEC = 1, + /// + /// 2 for 2-D parity FEC protection. + /// n2DParityFEEC = 2, + /// + /// The value of 3 is reserved for future use. + /// reserved = 3, }; diff --git a/ortc/idl/error.idl b/ortc/idl/error.idl index 47b6c5a6..c50463d9 100644 --- a/ortc/idl/error.idl +++ b/ortc/idl/error.idl @@ -33,18 +33,37 @@ namespace org { namespace ortc { + /// + /// This object represents generic error information. + /// [dictionary] struct Error { + /// + /// Gets or sets a string representing the error code (see HTTP + /// status codes). + /// uint16 errorCode; + /// + /// Gets or sets a string representing one of the error typename. + /// string name; + /// + /// Gets or sets a string representing one of the error reason. + /// string reason; }; typedef zs::PromiseRejectionReason PromiseRejectionReason; + /// + /// This object represents the error event for event delegates. + /// interface ErrorEvent { + /// + /// Gets the error information associated with this event (if any). + /// [getter] Error error; }; diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 802d1092..7124b46a 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -328,6 +328,7 @@ + @@ -481,6 +482,7 @@ + @@ -632,6 +634,7 @@ + diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index a04018d7..2163c42a 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -571,6 +571,9 @@ ortc\idl\wrapper + + ortc\idl\wrapper + @@ -1482,5 +1485,11 @@ ortc\idl\wrapper\generated + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + \ No newline at end of file From 88714566613cf14fa9932863d9fadbec48ea314c Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 21 Feb 2017 20:02:56 -0500 Subject: [PATCH 010/187] - added stubbed implementation for CX wrapper interface --- .../impl_org_ortc_ConstrainBoolean.cpp | 68 +++++ .../wrapper/impl_org_ortc_ConstrainBoolean.h | 33 ++ ...pl_org_ortc_ConstrainBooleanParameters.cpp | 68 +++++ ...impl_org_ortc_ConstrainBooleanParameters.h | 33 ++ .../wrapper/impl_org_ortc_ConstrainDouble.cpp | 68 +++++ .../wrapper/impl_org_ortc_ConstrainDouble.h | 33 ++ .../impl_org_ortc_ConstrainDoubleRange.cpp | 68 +++++ .../impl_org_ortc_ConstrainDoubleRange.h | 33 ++ .../wrapper/impl_org_ortc_ConstrainLong.cpp | 68 +++++ .../idl/wrapper/impl_org_ortc_ConstrainLong.h | 33 ++ .../impl_org_ortc_ConstrainLongRange.cpp | 68 +++++ .../impl_org_ortc_ConstrainLongRange.h | 33 ++ .../wrapper/impl_org_ortc_ConstrainString.cpp | 68 +++++ .../wrapper/impl_org_ortc_ConstrainString.h | 33 ++ ...mpl_org_ortc_ConstrainStringParameters.cpp | 68 +++++ .../impl_org_ortc_ConstrainStringParameters.h | 33 ++ ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp | 56 ++++ ortc/idl/wrapper/impl_org_ortc_Dispatcher.h | 29 ++ .../idl/wrapper/impl_org_ortc_DoubleRange.cpp | 76 +++++ ortc/idl/wrapper/impl_org_ortc_DoubleRange.h | 37 +++ ortc/idl/wrapper/impl_org_ortc_Error.cpp | 44 +++ ortc/idl/wrapper/impl_org_ortc_Error.h | 27 ++ ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp | 51 ++++ ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h | 30 ++ ortc/idl/wrapper/impl_org_ortc_Json.cpp | 51 ++++ ortc/idl/wrapper/impl_org_ortc_Json.h | 30 ++ ortc/idl/wrapper/impl_org_ortc_Logger.cpp | 195 ++++++++++++ ortc/idl/wrapper/impl_org_ortc_Logger.h | 27 ++ ortc/idl/wrapper/impl_org_ortc_LongRange.cpp | 76 +++++ ortc/idl/wrapper/impl_org_ortc_LongRange.h | 37 +++ .../wrapper/impl_org_ortc_MediaControl.cpp | 56 ++++ ortc/idl/wrapper/impl_org_ortc_MediaControl.h | 27 ++ .../wrapper/impl_org_ortc_MediaDeviceInfo.cpp | 68 +++++ .../wrapper/impl_org_ortc_MediaDeviceInfo.h | 33 ++ .../wrapper/impl_org_ortc_MediaDevices.cpp | 72 +++++ ortc/idl/wrapper/impl_org_ortc_MediaDevices.h | 28 ++ .../idl/wrapper/impl_org_ortc_MediaSource.cpp | 68 +++++ ortc/idl/wrapper/impl_org_ortc_MediaSource.h | 33 ++ .../impl_org_ortc_MediaStreamConstraints.cpp | 68 +++++ .../impl_org_ortc_MediaStreamConstraints.h | 33 ++ .../impl_org_ortc_MediaStreamTrack.cpp | 169 +++++++++++ .../wrapper/impl_org_ortc_MediaStreamTrack.h | 51 ++++ .../impl_org_ortc_MediaTrackCapabilities.cpp | 68 +++++ .../impl_org_ortc_MediaTrackCapabilities.h | 33 ++ .../impl_org_ortc_MediaTrackConstraintSet.cpp | 68 +++++ .../impl_org_ortc_MediaTrackConstraintSet.h | 33 ++ .../impl_org_ortc_MediaTrackConstraints.cpp | 68 +++++ .../impl_org_ortc_MediaTrackConstraints.h | 35 +++ .../impl_org_ortc_MediaTrackSettings.cpp | 68 +++++ .../impl_org_ortc_MediaTrackSettings.h | 33 ++ ...rg_ortc_MediaTrackSupportedConstraints.cpp | 68 +++++ ..._org_ortc_MediaTrackSupportedConstraints.h | 33 ++ .../wrapper/impl_org_ortc_MessageQueue.cpp | 46 +++ ortc/idl/wrapper/impl_org_ortc_MessageQueue.h | 26 ++ ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp | 99 ++++++ ortc/idl/wrapper/impl_org_ortc_OrtcLib.h | 23 ++ .../impl_org_ortc_OrtcLibWithDispatcher.cpp | 31 ++ .../impl_org_ortc_OrtcLibWithDispatcher.h | 23 ++ .../impl_org_ortc_OverconstrainedError.cpp | 44 +++ .../impl_org_ortc_OverconstrainedError.h | 27 ++ ...mpl_org_ortc_OverconstrainedErrorEvent.cpp | 51 ++++ .../impl_org_ortc_OverconstrainedErrorEvent.h | 30 ++ .../wrapper/impl_org_ortc_RTCCertificate.cpp | 86 ++++++ .../wrapper/impl_org_ortc_RTCCertificate.h | 32 ++ .../impl_org_ortc_RTCCertificateStats.cpp | 124 ++++++++ .../impl_org_ortc_RTCCertificateStats.h | 47 +++ ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp | 131 ++++++++ ortc/idl/wrapper/impl_org_ortc_RTCCodec.h | 48 +++ .../wrapper/impl_org_ortc_RTCDataChannel.cpp | 133 ++++++++ .../wrapper/impl_org_ortc_RTCDataChannel.h | 51 ++++ .../impl_org_ortc_RTCDataChannelEvent.cpp | 56 ++++ .../impl_org_ortc_RTCDataChannelEvent.h | 31 ++ ...impl_org_ortc_RTCDataChannelParameters.cpp | 68 +++++ .../impl_org_ortc_RTCDataChannelParameters.h | 33 ++ ...rg_ortc_RTCDataChannelStateChangeEvent.cpp | 51 ++++ ..._org_ortc_RTCDataChannelStateChangeEvent.h | 30 ++ .../impl_org_ortc_RTCDataChannelStats.cpp | 152 ++++++++++ .../impl_org_ortc_RTCDataChannelStats.h | 51 ++++ .../impl_org_ortc_RTCDataTransport.cpp | 44 +++ .../wrapper/impl_org_ortc_RTCDataTransport.h | 27 ++ .../impl_org_ortc_RTCDtlsFingerprint.cpp | 68 +++++ .../impl_org_ortc_RTCDtlsFingerprint.h | 33 ++ .../impl_org_ortc_RTCDtlsParameters.cpp | 68 +++++ .../wrapper/impl_org_ortc_RTCDtlsParameters.h | 33 ++ .../impl_org_ortc_RTCDtlsTransport.cpp | 118 ++++++++ .../wrapper/impl_org_ortc_RTCDtlsTransport.h | 48 +++ ..._ortc_RTCDtlsTransportStateChangeEvent.cpp | 51 ++++ ...rg_ortc_RTCDtlsTransportStateChangeEvent.h | 30 ++ .../impl_org_ortc_RTCDtlsTransportStats.cpp | 110 +++++++ .../impl_org_ortc_RTCDtlsTransportStats.h | 45 +++ .../wrapper/impl_org_ortc_RTCIceCandidate.cpp | 142 +++++++++ .../wrapper/impl_org_ortc_RTCIceCandidate.h | 47 +++ ...mpl_org_ortc_RTCIceCandidateAttributes.cpp | 145 +++++++++ .../impl_org_ortc_RTCIceCandidateAttributes.h | 50 +++ .../impl_org_ortc_RTCIceCandidateComplete.cpp | 72 +++++ .../impl_org_ortc_RTCIceCandidateComplete.h | 37 +++ .../impl_org_ortc_RTCIceCandidatePair.cpp | 92 ++++++ .../impl_org_ortc_RTCIceCandidatePair.h | 39 +++ ...rg_ortc_RTCIceCandidatePairChangeEvent.cpp | 51 ++++ ..._org_ortc_RTCIceCandidatePairChangeEvent.h | 30 ++ ...impl_org_ortc_RTCIceCandidatePairStats.cpp | 187 ++++++++++++ .../impl_org_ortc_RTCIceCandidatePairStats.h | 56 ++++ ...l_org_ortc_RTCIceGatherInterfacePolicy.cpp | 68 +++++ ...mpl_org_ortc_RTCIceGatherInterfacePolicy.h | 33 ++ .../impl_org_ortc_RTCIceGatherOptions.cpp | 68 +++++ .../impl_org_ortc_RTCIceGatherOptions.h | 33 ++ .../wrapper/impl_org_ortc_RTCIceGatherer.cpp | 113 +++++++ .../wrapper/impl_org_ortc_RTCIceGatherer.h | 45 +++ .../impl_org_ortc_RTCIceGathererCandidate.cpp | 72 +++++ .../impl_org_ortc_RTCIceGathererCandidate.h | 34 +++ ...c_RTCIceGathererCandidateCompleteEvent.cpp | 51 ++++ ...rtc_RTCIceGathererCandidateCompleteEvent.h | 30 ++ ..._org_ortc_RTCIceGathererCandidateEvent.cpp | 58 ++++ ...pl_org_ortc_RTCIceGathererCandidateEvent.h | 31 ++ ...l_org_ortc_RTCIceGathererIceErrorEvent.cpp | 44 +++ ...mpl_org_ortc_RTCIceGathererIceErrorEvent.h | 27 ++ ...rg_ortc_RTCIceGathererStateChangeEvent.cpp | 51 ++++ ..._org_ortc_RTCIceGathererStateChangeEvent.h | 30 ++ .../impl_org_ortc_RTCIceGathererStats.cpp | 117 ++++++++ .../impl_org_ortc_RTCIceGathererStats.h | 46 +++ .../impl_org_ortc_RTCIceParameters.cpp | 68 +++++ .../wrapper/impl_org_ortc_RTCIceParameters.h | 33 ++ .../wrapper/impl_org_ortc_RTCIceServer.cpp | 68 +++++ ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h | 33 ++ .../wrapper/impl_org_ortc_RTCIceTransport.cpp | 183 +++++++++++ .../wrapper/impl_org_ortc_RTCIceTransport.h | 69 +++++ ...mpl_org_ortc_RTCIceTransportController.cpp | 71 +++++ .../impl_org_ortc_RTCIceTransportController.h | 38 +++ .../impl_org_ortc_RTCIceTransportOptions.cpp | 68 +++++ .../impl_org_ortc_RTCIceTransportOptions.h | 33 ++ ...g_ortc_RTCIceTransportStateChangeEvent.cpp | 51 ++++ ...org_ortc_RTCIceTransportStateChangeEvent.h | 30 ++ .../impl_org_ortc_RTCIceTransportStats.cpp | 131 ++++++++ .../impl_org_ortc_RTCIceTransportStats.h | 48 +++ .../idl/wrapper/impl_org_ortc_RTCIdentity.cpp | 93 ++++++ ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h | 44 +++ .../impl_org_ortc_RTCIdentityAssertion.cpp | 44 +++ .../impl_org_ortc_RTCIdentityAssertion.h | 27 ++ .../impl_org_ortc_RTCIdentityError.cpp | 44 +++ .../wrapper/impl_org_ortc_RTCIdentityError.h | 27 ++ .../impl_org_ortc_RTCIdentityResult.cpp | 44 +++ .../wrapper/impl_org_ortc_RTCIdentityResult.h | 27 ++ ...impl_org_ortc_RTCInboundRtpStreamStats.cpp | 215 +++++++++++++ .../impl_org_ortc_RTCInboundRtpStreamStats.h | 62 ++++ .../impl_org_ortc_RTCMediaStreamStats.cpp | 110 +++++++ .../impl_org_ortc_RTCMediaStreamStats.h | 45 +++ ...impl_org_ortc_RTCMediaStreamTrackStats.cpp | 194 ++++++++++++ .../impl_org_ortc_RTCMediaStreamTrackStats.h | 57 ++++ .../wrapper/impl_org_ortc_RTCMessageEvent.cpp | 51 ++++ .../wrapper/impl_org_ortc_RTCMessageEvent.h | 30 ++ .../impl_org_ortc_RTCMessageEventData.cpp | 58 ++++ .../impl_org_ortc_RTCMessageEventData.h | 31 ++ ...mpl_org_ortc_RTCOutboundRtpStreamStats.cpp | 201 +++++++++++++ .../impl_org_ortc_RTCOutboundRtpStreamStats.h | 60 ++++ .../wrapper/impl_org_ortc_RTCRtcpFeedback.cpp | 68 +++++ .../wrapper/impl_org_ortc_RTCRtcpFeedback.h | 33 ++ .../impl_org_ortc_RTCRtcpParameters.cpp | 68 +++++ .../wrapper/impl_org_ortc_RTCRtcpParameters.h | 33 ++ .../impl_org_ortc_RTCRtcpTransport.cpp | 44 +++ .../wrapper/impl_org_ortc_RTCRtcpTransport.h | 27 ++ .../impl_org_ortc_RTCRtpCapabilities.cpp | 68 +++++ .../impl_org_ortc_RTCRtpCapabilities.h | 33 ++ .../impl_org_ortc_RTCRtpCodecCapability.cpp | 68 +++++ .../impl_org_ortc_RTCRtpCodecCapability.h | 33 ++ ..._org_ortc_RTCRtpCodecCapabilityOptions.cpp | 44 +++ ...pl_org_ortc_RTCRtpCodecCapabilityOptions.h | 27 ++ ...g_ortc_RTCRtpCodecCapabilityParameters.cpp | 44 +++ ...org_ortc_RTCRtpCodecCapabilityParameters.h | 27 ++ .../impl_org_ortc_RTCRtpCodecParameters.cpp | 68 +++++ .../impl_org_ortc_RTCRtpCodecParameters.h | 33 ++ ...impl_org_ortc_RTCRtpContributingSource.cpp | 68 +++++ .../impl_org_ortc_RTCRtpContributingSource.h | 33 ++ .../impl_org_ortc_RTCRtpDtmfSender.cpp | 113 +++++++ .../wrapper/impl_org_ortc_RTCRtpDtmfSender.h | 49 +++ ...impl_org_ortc_RTCRtpEncodingParameters.cpp | 68 +++++ .../impl_org_ortc_RTCRtpEncodingParameters.h | 33 ++ .../impl_org_ortc_RTCRtpFecParameters.cpp | 68 +++++ .../impl_org_ortc_RTCRtpFecParameters.h | 33 ++ ...RTCRtpFlexFecCodecCapabilityParameters.cpp | 116 +++++++ ...c_RTCRtpFlexFecCodecCapabilityParameters.h | 43 +++ ...tc_RTCRtpH264CodecCapabilityParameters.cpp | 68 +++++ ...ortc_RTCRtpH264CodecCapabilityParameters.h | 33 ++ .../impl_org_ortc_RTCRtpHeaderExtension.cpp | 68 +++++ .../impl_org_ortc_RTCRtpHeaderExtension.h | 33 ++ ...g_ortc_RTCRtpHeaderExtensionParameters.cpp | 68 +++++ ...org_ortc_RTCRtpHeaderExtensionParameters.h | 33 ++ .../wrapper/impl_org_ortc_RTCRtpListener.cpp | 83 +++++ .../wrapper/impl_org_ortc_RTCRtpListener.h | 43 +++ ..._ortc_RTCRtpOpusCodecCapabilityOptions.cpp | 68 +++++ ...rg_ortc_RTCRtpOpusCodecCapabilityOptions.h | 33 ++ ...tc_RTCRtpOpusCodecCapabilityParameters.cpp | 68 +++++ ...ortc_RTCRtpOpusCodecCapabilityParameters.h | 33 ++ ..._ortc_RTCRtpOpusCodecParameterSettings.cpp | 68 +++++ ...rg_ortc_RTCRtpOpusCodecParameterSettings.h | 33 ++ .../impl_org_ortc_RTCRtpParameters.cpp | 68 +++++ .../wrapper/impl_org_ortc_RTCRtpParameters.h | 33 ++ .../wrapper/impl_org_ortc_RTCRtpReceiver.cpp | 135 +++++++++ .../wrapper/impl_org_ortc_RTCRtpReceiver.h | 55 ++++ ...g_ortc_RTCRtpRedCodecParameterSettings.cpp | 68 +++++ ...org_ortc_RTCRtpRedCodecParameterSettings.h | 33 ++ ...rtc_RTCRtpRtxCodecCapabilityParameters.cpp | 68 +++++ ..._ortc_RTCRtpRtxCodecCapabilityParameters.h | 33 ++ .../impl_org_ortc_RTCRtpRtxParameters.cpp | 68 +++++ .../impl_org_ortc_RTCRtpRtxParameters.h | 33 ++ .../wrapper/impl_org_ortc_RTCRtpSender.cpp | 135 +++++++++ ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h | 56 ++++ .../impl_org_ortc_RTCRtpStreamStats.cpp | 173 +++++++++++ .../wrapper/impl_org_ortc_RTCRtpStreamStats.h | 54 ++++ .../wrapper/impl_org_ortc_RTCRtpTransport.cpp | 44 +++ .../wrapper/impl_org_ortc_RTCRtpTransport.h | 27 ++ .../impl_org_ortc_RTCRtpUnhandledEvent.cpp | 72 +++++ .../impl_org_ortc_RTCRtpUnhandledEvent.h | 33 ++ ...rtc_RTCRtpVp8CodecCapabilityParameters.cpp | 68 +++++ ..._ortc_RTCRtpVp8CodecCapabilityParameters.h | 33 ++ .../impl_org_ortc_RTCSctpCapabilities.cpp | 68 +++++ .../impl_org_ortc_RTCSctpCapabilities.h | 33 ++ .../impl_org_ortc_RTCSctpTransport.cpp | 141 +++++++++ .../wrapper/impl_org_ortc_RTCSctpTransport.h | 52 ++++ ...impl_org_ortc_RTCSctpTransportListener.cpp | 44 +++ .../impl_org_ortc_RTCSctpTransportListener.h | 27 ++ ..._ortc_RTCSctpTransportStateChangeEvent.cpp | 56 ++++ ...rg_ortc_RTCSctpTransportStateChangeEvent.h | 31 ++ .../impl_org_ortc_RTCSctpTransportStats.cpp | 110 +++++++ .../impl_org_ortc_RTCSctpTransportStats.h | 45 +++ ...l_org_ortc_RTCSrtpSdesCryptoParameters.cpp | 68 +++++ ...mpl_org_ortc_RTCSrtpSdesCryptoParameters.h | 33 ++ ...impl_org_ortc_RTCSrtpSdesKeyParameters.cpp | 68 +++++ .../impl_org_ortc_RTCSrtpSdesKeyParameters.h | 33 ++ .../impl_org_ortc_RTCSrtpSdesParameters.cpp | 68 +++++ .../impl_org_ortc_RTCSrtpSdesParameters.h | 33 ++ .../impl_org_ortc_RTCSrtpSdesTransport.cpp | 93 ++++++ .../impl_org_ortc_RTCSrtpSdesTransport.h | 44 +++ ..._RTCSrtpSdesTransportLifetimeRemaining.cpp | 44 +++ ...tc_RTCSrtpSdesTransportLifetimeRemaining.h | 27 ++ ...rtpSdesTransportLifetimeRemainingEvent.cpp | 51 ++++ ...CSrtpSdesTransportLifetimeRemainingEvent.h | 30 ++ .../impl_org_ortc_RTCSrtpTransportStats.cpp | 96 ++++++ .../impl_org_ortc_RTCSrtpTransportStats.h | 41 +++ .../impl_org_ortc_RTCSsrcConflictEvent.cpp | 51 ++++ .../impl_org_ortc_RTCSsrcConflictEvent.h | 30 ++ ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp | 96 ++++++ ortc/idl/wrapper/impl_org_ortc_RTCStats.h | 39 +++ .../impl_org_ortc_RTCStatsProvider.cpp | 51 ++++ .../wrapper/impl_org_ortc_RTCStatsProvider.h | 30 ++ .../wrapper/impl_org_ortc_RTCStatsReport.cpp | 65 ++++ .../wrapper/impl_org_ortc_RTCStatsReport.h | 34 +++ .../wrapper/impl_org_ortc_RTCStatsTypeSet.cpp | 56 ++++ .../wrapper/impl_org_ortc_RTCStatsTypeSet.h | 31 ++ ortc/idl/wrapper/impl_org_ortc_Settings.cpp | 96 ++++++ ortc/idl/wrapper/impl_org_ortc_Settings.h | 23 ++ .../impl_org_ortc_StringOrStringList.cpp | 68 +++++ .../impl_org_ortc_StringOrStringList.h | 33 ++ .../impl_org_ortc_adapter_MediaStream.cpp | 139 +++++++++ .../impl_org_ortc_adapter_MediaStream.h | 51 ++++ ...impl_org_ortc_adapter_RTCAnswerOptions.cpp | 44 +++ .../impl_org_ortc_adapter_RTCAnswerOptions.h | 29 ++ ..._org_ortc_adapter_RTCCapabilityOptions.cpp | 44 +++ ...pl_org_ortc_adapter_RTCCapabilityOptions.h | 29 ++ ...impl_org_ortc_adapter_RTCConfiguration.cpp | 49 +++ .../impl_org_ortc_adapter_RTCConfiguration.h | 32 ++ .../impl_org_ortc_adapter_RTCIceCandidate.cpp | 107 +++++++ .../impl_org_ortc_adapter_RTCIceCandidate.h | 40 +++ ...apter_RTCMediaStreamTrackConfiguration.cpp | 49 +++ ...adapter_RTCMediaStreamTrackConfiguration.h | 32 ++ ...org_ortc_adapter_RTCOfferAnswerOptions.cpp | 44 +++ ...l_org_ortc_adapter_RTCOfferAnswerOptions.h | 29 ++ .../impl_org_ortc_adapter_RTCOfferOptions.cpp | 44 +++ .../impl_org_ortc_adapter_RTCOfferOptions.h | 29 ++ ...mpl_org_ortc_adapter_RTCPeerConnection.cpp | 284 ++++++++++++++++++ .../impl_org_ortc_adapter_RTCPeerConnection.h | 78 +++++ ...pter_RTCPeerConnectionIceCompleteEvent.cpp | 56 ++++ ...dapter_RTCPeerConnectionIceCompleteEvent.h | 33 ++ ...adapter_RTCPeerConnectionIceErrorEvent.cpp | 92 ++++++ ...c_adapter_RTCPeerConnectionIceErrorEvent.h | 39 +++ ...ortc_adapter_RTCPeerConnectionIceEvent.cpp | 68 +++++ ...g_ortc_adapter_RTCPeerConnectionIceEvent.h | 35 +++ ...org_ortc_adapter_RTCSessionDescription.cpp | 125 ++++++++ ...l_org_ortc_adapter_RTCSessionDescription.h | 48 +++ ...er_RTCSessionDescriptionConnectionData.cpp | 68 +++++ ...pter_RTCSessionDescriptionConnectionData.h | 35 +++ ...essionDescriptionConnectionDataDetails.cpp | 68 +++++ ...CSessionDescriptionConnectionDataDetails.h | 35 +++ ...apter_RTCSessionDescriptionDescription.cpp | 68 +++++ ...adapter_RTCSessionDescriptionDescription.h | 35 +++ ...TCSessionDescriptionDescriptionDetails.cpp | 68 +++++ ..._RTCSessionDescriptionDescriptionDetails.h | 35 +++ ...adapter_RTCSessionDescriptionMediaLine.cpp | 68 +++++ ...c_adapter_RTCSessionDescriptionMediaLine.h | 35 +++ ..._RTCSessionDescriptionMediaLineDetails.cpp | 68 +++++ ...er_RTCSessionDescriptionMediaLineDetails.h | 35 +++ ...pter_RTCSessionDescriptionRtpMediaLine.cpp | 92 ++++++ ...dapter_RTCSessionDescriptionRtpMediaLine.h | 43 +++ ...adapter_RTCSessionDescriptionRtpSender.cpp | 68 +++++ ...c_adapter_RTCSessionDescriptionRtpSender.h | 35 +++ ..._RTCSessionDescriptionRtpSenderDetails.cpp | 68 +++++ ...er_RTCSessionDescriptionRtpSenderDetails.h | 35 +++ ...ter_RTCSessionDescriptionSctpMediaLine.cpp | 92 ++++++ ...apter_RTCSessionDescriptionSctpMediaLine.h | 43 +++ ...adapter_RTCSessionDescriptionTransport.cpp | 68 +++++ ...c_adapter_RTCSessionDescriptionTransport.h | 35 +++ ...CSessionDescriptionTransportParameters.cpp | 68 +++++ ...RTCSessionDescriptionTransportParameters.h | 35 +++ .../impl_org_ortc_adapter_RTCTrackEvent.cpp | 80 +++++ .../impl_org_ortc_adapter_RTCTrackEvent.h | 37 +++ ortc/idl/wrapper/types.h | 182 +++++++++++ 305 files changed, 17923 insertions(+) create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainString.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_Dispatcher.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_DoubleRange.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_Error.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_Error.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_Json.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_Json.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_Logger.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_Logger.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_LongRange.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_LongRange.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaControl.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaDevices.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaSource.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_MessageQueue.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_OrtcLib.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCCodec.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCStats.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_Settings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_Settings.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h create mode 100644 ortc/idl/wrapper/types.h diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp new file mode 100644 index 00000000..fd65720c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ConstrainBoolean.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBoolean::ConstrainBoolean() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ConstrainBooleanPtr wrapper::org::ortc::ConstrainBoolean::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBoolean::~ConstrainBoolean() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainBoolean::wrapper_init_org_ortc_ConstrainBoolean() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainBoolean::wrapper_init_org_ortc_ConstrainBoolean(wrapper::org::ortc::ConstrainBooleanPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainBoolean::wrapper_init_org_ortc_ConstrainBoolean(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainBoolean::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::ConstrainBoolean::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h new file mode 100644 index 00000000..342116d6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ConstrainBoolean.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ConstrainBoolean : public wrapper::org::ortc::ConstrainBoolean + { + ConstrainBooleanWeakPtr thisWeak_; + + ConstrainBoolean(); + virtual ~ConstrainBoolean(); + + // methods ConstrainBoolean + virtual void wrapper_init_org_ortc_ConstrainBoolean() override; + virtual void wrapper_init_org_ortc_ConstrainBoolean(wrapper::org::ortc::ConstrainBooleanPtr source) override; + virtual void wrapper_init_org_ortc_ConstrainBoolean(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp new file mode 100644 index 00000000..99320672 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ConstrainBooleanParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBooleanParameters::ConstrainBooleanParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ConstrainBooleanParametersPtr wrapper::org::ortc::ConstrainBooleanParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBooleanParameters::~ConstrainBooleanParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainBooleanParameters::wrapper_init_org_ortc_ConstrainBooleanParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainBooleanParameters::wrapper_init_org_ortc_ConstrainBooleanParameters(wrapper::org::ortc::ConstrainBooleanParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainBooleanParameters::wrapper_init_org_ortc_ConstrainBooleanParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainBooleanParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::ConstrainBooleanParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h new file mode 100644 index 00000000..7ff66e23 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ConstrainBooleanParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ConstrainBooleanParameters : public wrapper::org::ortc::ConstrainBooleanParameters + { + ConstrainBooleanParametersWeakPtr thisWeak_; + + ConstrainBooleanParameters(); + virtual ~ConstrainBooleanParameters(); + + // methods ConstrainBooleanParameters + virtual void wrapper_init_org_ortc_ConstrainBooleanParameters() override; + virtual void wrapper_init_org_ortc_ConstrainBooleanParameters(wrapper::org::ortc::ConstrainBooleanParametersPtr source) override; + virtual void wrapper_init_org_ortc_ConstrainBooleanParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp new file mode 100644 index 00000000..fa684bcd --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ConstrainDouble.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDouble::ConstrainDouble() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ConstrainDoublePtr wrapper::org::ortc::ConstrainDouble::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDouble::~ConstrainDouble() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainDouble::wrapper_init_org_ortc_ConstrainDouble() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainDouble::wrapper_init_org_ortc_ConstrainDouble(wrapper::org::ortc::ConstrainDoublePtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainDouble::wrapper_init_org_ortc_ConstrainDouble(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainDouble::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::ConstrainDouble::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h new file mode 100644 index 00000000..67ca0056 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ConstrainDouble.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ConstrainDouble : public wrapper::org::ortc::ConstrainDouble + { + ConstrainDoubleWeakPtr thisWeak_; + + ConstrainDouble(); + virtual ~ConstrainDouble(); + + // methods ConstrainDouble + virtual void wrapper_init_org_ortc_ConstrainDouble() override; + virtual void wrapper_init_org_ortc_ConstrainDouble(wrapper::org::ortc::ConstrainDoublePtr source) override; + virtual void wrapper_init_org_ortc_ConstrainDouble(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp new file mode 100644 index 00000000..3a1f2b39 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ConstrainDoubleRange.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDoubleRange::ConstrainDoubleRange() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ConstrainDoubleRangePtr wrapper::org::ortc::ConstrainDoubleRange::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDoubleRange::~ConstrainDoubleRange() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainDoubleRange::wrapper_init_org_ortc_ConstrainDoubleRange() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainDoubleRange::wrapper_init_org_ortc_ConstrainDoubleRange(wrapper::org::ortc::ConstrainDoubleRangePtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainDoubleRange::wrapper_init_org_ortc_ConstrainDoubleRange(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainDoubleRange::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::ConstrainDoubleRange::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h new file mode 100644 index 00000000..f2df00af --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ConstrainDoubleRange.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ConstrainDoubleRange : public wrapper::org::ortc::ConstrainDoubleRange + { + ConstrainDoubleRangeWeakPtr thisWeak_; + + ConstrainDoubleRange(); + virtual ~ConstrainDoubleRange(); + + // methods ConstrainDoubleRange + virtual void wrapper_init_org_ortc_ConstrainDoubleRange() override; + virtual void wrapper_init_org_ortc_ConstrainDoubleRange(wrapper::org::ortc::ConstrainDoubleRangePtr source) override; + virtual void wrapper_init_org_ortc_ConstrainDoubleRange(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp new file mode 100644 index 00000000..e55f6e3e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ConstrainLong.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLong::ConstrainLong() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ConstrainLongPtr wrapper::org::ortc::ConstrainLong::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLong::~ConstrainLong() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainLong::wrapper_init_org_ortc_ConstrainLong() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainLong::wrapper_init_org_ortc_ConstrainLong(wrapper::org::ortc::ConstrainLongPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainLong::wrapper_init_org_ortc_ConstrainLong(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainLong::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::ConstrainLong::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h new file mode 100644 index 00000000..18807f42 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ConstrainLong.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ConstrainLong : public wrapper::org::ortc::ConstrainLong + { + ConstrainLongWeakPtr thisWeak_; + + ConstrainLong(); + virtual ~ConstrainLong(); + + // methods ConstrainLong + virtual void wrapper_init_org_ortc_ConstrainLong() override; + virtual void wrapper_init_org_ortc_ConstrainLong(wrapper::org::ortc::ConstrainLongPtr source) override; + virtual void wrapper_init_org_ortc_ConstrainLong(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp new file mode 100644 index 00000000..1a216e39 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ConstrainLongRange.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLongRange::ConstrainLongRange() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ConstrainLongRangePtr wrapper::org::ortc::ConstrainLongRange::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLongRange::~ConstrainLongRange() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainLongRange::wrapper_init_org_ortc_ConstrainLongRange() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainLongRange::wrapper_init_org_ortc_ConstrainLongRange(wrapper::org::ortc::ConstrainLongRangePtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainLongRange::wrapper_init_org_ortc_ConstrainLongRange(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainLongRange::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::ConstrainLongRange::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h new file mode 100644 index 00000000..8977f278 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ConstrainLongRange.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ConstrainLongRange : public wrapper::org::ortc::ConstrainLongRange + { + ConstrainLongRangeWeakPtr thisWeak_; + + ConstrainLongRange(); + virtual ~ConstrainLongRange(); + + // methods ConstrainLongRange + virtual void wrapper_init_org_ortc_ConstrainLongRange() override; + virtual void wrapper_init_org_ortc_ConstrainLongRange(wrapper::org::ortc::ConstrainLongRangePtr source) override; + virtual void wrapper_init_org_ortc_ConstrainLongRange(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp new file mode 100644 index 00000000..db0eb64b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ConstrainString.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainString::ConstrainString() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ConstrainStringPtr wrapper::org::ortc::ConstrainString::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainString::~ConstrainString() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainString::wrapper_init_org_ortc_ConstrainString() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainString::wrapper_init_org_ortc_ConstrainString(wrapper::org::ortc::ConstrainStringPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainString::wrapper_init_org_ortc_ConstrainString(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainString::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::ConstrainString::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.h new file mode 100644 index 00000000..b15635c5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ConstrainString.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ConstrainString : public wrapper::org::ortc::ConstrainString + { + ConstrainStringWeakPtr thisWeak_; + + ConstrainString(); + virtual ~ConstrainString(); + + // methods ConstrainString + virtual void wrapper_init_org_ortc_ConstrainString() override; + virtual void wrapper_init_org_ortc_ConstrainString(wrapper::org::ortc::ConstrainStringPtr source) override; + virtual void wrapper_init_org_ortc_ConstrainString(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp new file mode 100644 index 00000000..595344ca --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ConstrainStringParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainStringParameters::ConstrainStringParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ConstrainStringParametersPtr wrapper::org::ortc::ConstrainStringParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainStringParameters::~ConstrainStringParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainStringParameters::wrapper_init_org_ortc_ConstrainStringParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainStringParameters::wrapper_init_org_ortc_ConstrainStringParameters(wrapper::org::ortc::ConstrainStringParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ConstrainStringParameters::wrapper_init_org_ortc_ConstrainStringParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainStringParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::ConstrainStringParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h new file mode 100644 index 00000000..80db5e3b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ConstrainStringParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ConstrainStringParameters : public wrapper::org::ortc::ConstrainStringParameters + { + ConstrainStringParametersWeakPtr thisWeak_; + + ConstrainStringParameters(); + virtual ~ConstrainStringParameters(); + + // methods ConstrainStringParameters + virtual void wrapper_init_org_ortc_ConstrainStringParameters() override; + virtual void wrapper_init_org_ortc_ConstrainStringParameters(wrapper::org::ortc::ConstrainStringParametersPtr source) override; + virtual void wrapper_init_org_ortc_ConstrainStringParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp new file mode 100644 index 00000000..14de9f91 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp @@ -0,0 +1,56 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_Dispatcher.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Dispatcher::Dispatcher() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::DispatcherPtr wrapper::org::ortc::Dispatcher::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Dispatcher::~Dispatcher() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::Dispatcher::wrapper_init_org_ortc_Dispatcher(AnyPtr source) +{ +} + +//------------------------------------------------------------------------------ +AnyPtr wrapper::org::ortc::Dispatcher::get_source() +{ + AnyPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Dispatcher::set_source(AnyPtr value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.h b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.h new file mode 100644 index 00000000..4c2f980f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.h @@ -0,0 +1,29 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_Dispatcher.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct Dispatcher : public wrapper::org::ortc::Dispatcher + { + DispatcherWeakPtr thisWeak_; + + Dispatcher(); + virtual ~Dispatcher(); + + // methods Dispatcher + virtual void wrapper_init_org_ortc_Dispatcher(AnyPtr source) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp new file mode 100644 index 00000000..d44dc276 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp @@ -0,0 +1,76 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_DoubleRange.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::DoubleRange::DoubleRange() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::DoubleRangePtr wrapper::org::ortc::DoubleRange::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::DoubleRange::~DoubleRange() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange(long value) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange( + long min, + long max + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::DoubleRange::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::DoubleRange::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h new file mode 100644 index 00000000..0239466a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h @@ -0,0 +1,37 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_DoubleRange.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct DoubleRange : public wrapper::org::ortc::DoubleRange + { + DoubleRangeWeakPtr thisWeak_; + + DoubleRange(); + virtual ~DoubleRange(); + + // methods DoubleRange + virtual void wrapper_init_org_ortc_DoubleRange() override; + virtual void wrapper_init_org_ortc_DoubleRange(long value) override; + virtual void wrapper_init_org_ortc_DoubleRange( + long min, + long max + ) override; + virtual void wrapper_init_org_ortc_DoubleRange(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_Error.cpp b/ortc/idl/wrapper/impl_org_ortc_Error.cpp new file mode 100644 index 00000000..b55a025a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Error.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_Error.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Error::Error() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ErrorPtr wrapper::org::ortc::Error::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Error::~Error() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::Error::wrapper_init_org_ortc_Error() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_Error.h b/ortc/idl/wrapper/impl_org_ortc_Error.h new file mode 100644 index 00000000..a478d7a9 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Error.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_Error.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct Error : public wrapper::org::ortc::Error + { + ErrorWeakPtr thisWeak_; + + Error(); + virtual ~Error(); + virtual void wrapper_init_org_ortc_Error() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp new file mode 100644 index 00000000..306a3ffa --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_ErrorEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ErrorEvent::ErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ErrorEventPtr wrapper::org::ortc::ErrorEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ErrorEvent::~ErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::ErrorEvent::wrapper_init_org_ortc_ErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::ErrorPtr wrapper::impl::org::ortc::ErrorEvent::get_error() +{ + wrapper::org::ortc::ErrorPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h new file mode 100644 index 00000000..bdc5cad1 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_ErrorEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct ErrorEvent : public wrapper::org::ortc::ErrorEvent + { + ErrorEventWeakPtr thisWeak_; + + ErrorEvent(); + virtual ~ErrorEvent(); + virtual void wrapper_init_org_ortc_ErrorEvent() override; + + // properties ErrorEvent + virtual wrapper::org::ortc::ErrorPtr get_error() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_Json.cpp b/ortc/idl/wrapper/impl_org_ortc_Json.cpp new file mode 100644 index 00000000..171cc381 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Json.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_Json.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Json::Json() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::org::ortc::Json::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Json::~Json() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::Json::wrapper_init_org_ortc_Json(String jsonString) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::Json::toString() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_Json.h b/ortc/idl/wrapper/impl_org_ortc_Json.h new file mode 100644 index 00000000..a8bae18f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Json.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_Json.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct Json : public wrapper::org::ortc::Json + { + JsonWeakPtr thisWeak_; + + Json(); + virtual ~Json(); + + // methods Json + virtual void wrapper_init_org_ortc_Json(String jsonString) override; + virtual String toString() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp new file mode 100644 index 00000000..2d67360c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp @@ -0,0 +1,195 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_Logger.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Logger::Logger() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::LoggerPtr wrapper::org::ortc::Logger::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Logger::~Logger() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::Logger::wrapper_init_org_ortc_Logger() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::setDefaultLogLevel(wrapper::org::ortc::log::Level level) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::setLogLevel( + wrapper::org::ortc::log::Component component, + wrapper::org::ortc::log::Level level + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::setLogLevel( + String component, + wrapper::org::ortc::log::Level level + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::installStdOutLogger(bool colorizeOutput) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::installFileLogger( + String fileName, + bool colorizeOutput + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::installTelnetLogger( + uint16_t listenPort, + ::zsLib::Seconds maxWaitForSocketToBeAvailable, + bool colorizeOutput + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::installOutgoingTelnetLogger( + String serverHostWithPort, + bool colorizeOutput, + String sendStringUponConnection + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::installDebuggerLogger() +{ +} + +//------------------------------------------------------------------------------ +bool wrapper::org::ortc::Logger::isTelnetLoggerListening() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::org::ortc::Logger::isTelnetLoggerConnected() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::org::ortc::Logger::isOutgoingTelnetLoggerConnected() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::uninstallStdOutLogger() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::uninstallFileLogger() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::uninstallTelnetLogger() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::uninstallOutgoingTelnetLogger() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::uninstallDebuggerLogger() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::setDefaultEventingLevel(wrapper::org::ortc::log::Level level) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::setEventingLevel( + wrapper::org::ortc::log::Component component, + wrapper::org::ortc::log::Level level + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::setEventingLevel( + String component, + wrapper::org::ortc::log::Level level + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::installEventingListener( + String sharedSecret, + uint16_t listenPort, + ::zsLib::Seconds maxWaitForSocketToBeAvailable + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::connectToEventingServer( + String sharedSecret, + String serverHostWithPort + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::uninstallEventingListener() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::disconnectEventingServer() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.h b/ortc/idl/wrapper/impl_org_ortc_Logger.h new file mode 100644 index 00000000..f245686c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_Logger.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct Logger : public wrapper::org::ortc::Logger + { + LoggerWeakPtr thisWeak_; + + Logger(); + virtual ~Logger(); + virtual void wrapper_init_org_ortc_Logger() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp b/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp new file mode 100644 index 00000000..76539a2e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp @@ -0,0 +1,76 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_LongRange.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::LongRange::LongRange() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::LongRangePtr wrapper::org::ortc::LongRange::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::LongRange::~LongRange() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::LongRange::wrapper_init_org_ortc_LongRange() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::LongRange::wrapper_init_org_ortc_LongRange(long value) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::LongRange::wrapper_init_org_ortc_LongRange( + long min, + long max + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::LongRange::wrapper_init_org_ortc_LongRange(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::LongRange::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::LongRange::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_LongRange.h b/ortc/idl/wrapper/impl_org_ortc_LongRange.h new file mode 100644 index 00000000..9b49f1f8 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_LongRange.h @@ -0,0 +1,37 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_LongRange.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct LongRange : public wrapper::org::ortc::LongRange + { + LongRangeWeakPtr thisWeak_; + + LongRange(); + virtual ~LongRange(); + + // methods LongRange + virtual void wrapper_init_org_ortc_LongRange() override; + virtual void wrapper_init_org_ortc_LongRange(long value) override; + virtual void wrapper_init_org_ortc_LongRange( + long min, + long max + ) override; + virtual void wrapper_init_org_ortc_LongRange(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp new file mode 100644 index 00000000..ebf4167a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp @@ -0,0 +1,56 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaControl.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaControl::MediaControl() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaControlPtr wrapper::org::ortc::MediaControl::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaControl::~MediaControl() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaControl::wrapper_init_org_ortc_MediaControl() +{ +} + +//------------------------------------------------------------------------------ +AnyPtr wrapper::org::ortc::MediaControl::get_displayOrientation() +{ + AnyPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::MediaControl::set_displayOrientation(AnyPtr value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaControl.h b/ortc/idl/wrapper/impl_org_ortc_MediaControl.h new file mode 100644 index 00000000..c655205d --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaControl.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaControl.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaControl : public wrapper::org::ortc::MediaControl + { + MediaControlWeakPtr thisWeak_; + + MediaControl(); + virtual ~MediaControl(); + virtual void wrapper_init_org_ortc_MediaControl() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp new file mode 100644 index 00000000..6bfb6b43 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaDeviceInfo.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaDeviceInfo::MediaDeviceInfo() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaDeviceInfoPtr wrapper::org::ortc::MediaDeviceInfo::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaDeviceInfo::~MediaDeviceInfo() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaDeviceInfo::wrapper_init_org_ortc_MediaDeviceInfo() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaDeviceInfo::wrapper_init_org_ortc_MediaDeviceInfo(wrapper::org::ortc::MediaDeviceInfoPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaDeviceInfo::wrapper_init_org_ortc_MediaDeviceInfo(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaDeviceInfo::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaDeviceInfo::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h new file mode 100644 index 00000000..851497c5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaDeviceInfo.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaDeviceInfo : public wrapper::org::ortc::MediaDeviceInfo + { + MediaDeviceInfoWeakPtr thisWeak_; + + MediaDeviceInfo(); + virtual ~MediaDeviceInfo(); + + // methods MediaDeviceInfo + virtual void wrapper_init_org_ortc_MediaDeviceInfo() override; + virtual void wrapper_init_org_ortc_MediaDeviceInfo(wrapper::org::ortc::MediaDeviceInfoPtr source) override; + virtual void wrapper_init_org_ortc_MediaDeviceInfo(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp new file mode 100644 index 00000000..ef2ffd09 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp @@ -0,0 +1,72 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaDevices.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaDevices::MediaDevices() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaDevicesPtr wrapper::org::ortc::MediaDevices::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaDevices::~MediaDevices() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackSupportedConstraintsPtr wrapper::org::ortc::MediaDevices::getSupportedConstraints() +{ + wrapper::org::ortc::MediaTrackSupportedConstraintsPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > wrapper::org::ortc::MediaDevices::enumerateDevices() +{ + shared_ptr< PromiseWith< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > wrapper::org::ortc::MediaDevices::getUserMedia(wrapper::org::ortc::MediaStreamConstraintsPtr constraints) +{ + shared_ptr< PromiseWith< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaDevicesPtr wrapper::org::ortc::MediaDevices::get_singleton() +{ + wrapper::org::ortc::MediaDevicesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaDevices::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h new file mode 100644 index 00000000..fad0e845 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h @@ -0,0 +1,28 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaDevices.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaDevices : public wrapper::org::ortc::MediaDevices + { + MediaDevicesWeakPtr thisWeak_; + + MediaDevices(); + virtual ~MediaDevices(); + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp new file mode 100644 index 00000000..eeb4bcde --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaSource.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaSource::MediaSource() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaSourcePtr wrapper::org::ortc::MediaSource::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaSource::~MediaSource() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaSource::wrapper_init_org_ortc_MediaSource() +{ +} + +//------------------------------------------------------------------------------ +AnyPtr wrapper::impl::org::ortc::MediaSource::get_source() +{ + AnyPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaSource::set_source(AnyPtr value) +{ +} + +//------------------------------------------------------------------------------ +AnyPtr wrapper::impl::org::ortc::MediaSource::get_track() +{ + AnyPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaSource::set_track(AnyPtr value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.h b/ortc/idl/wrapper/impl_org_ortc_MediaSource.h new file mode 100644 index 00000000..2190b2f5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaSource.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaSource : public wrapper::org::ortc::MediaSource + { + MediaSourceWeakPtr thisWeak_; + + MediaSource(); + virtual ~MediaSource(); + virtual void wrapper_init_org_ortc_MediaSource() override; + + // properties MediaSource + virtual AnyPtr get_source() override; + virtual void set_source(AnyPtr value) override; + virtual AnyPtr get_track() override; + virtual void set_track(AnyPtr value) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp new file mode 100644 index 00000000..a6181a30 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaStreamConstraints.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaStreamConstraints::MediaStreamConstraints() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamConstraintsPtr wrapper::org::ortc::MediaStreamConstraints::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaStreamConstraints::~MediaStreamConstraints() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamConstraints::wrapper_init_org_ortc_MediaStreamConstraints() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamConstraints::wrapper_init_org_ortc_MediaStreamConstraints(wrapper::org::ortc::MediaStreamConstraintsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamConstraints::wrapper_init_org_ortc_MediaStreamConstraints(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaStreamConstraints::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaStreamConstraints::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h new file mode 100644 index 00000000..3d37c731 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaStreamConstraints.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaStreamConstraints : public wrapper::org::ortc::MediaStreamConstraints + { + MediaStreamConstraintsWeakPtr thisWeak_; + + MediaStreamConstraints(); + virtual ~MediaStreamConstraints(); + + // methods MediaStreamConstraints + virtual void wrapper_init_org_ortc_MediaStreamConstraints() override; + virtual void wrapper_init_org_ortc_MediaStreamConstraints(wrapper::org::ortc::MediaStreamConstraintsPtr source) override; + virtual void wrapper_init_org_ortc_MediaStreamConstraints(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp new file mode 100644 index 00000000..b1fb3bff --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp @@ -0,0 +1,169 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaStreamTrack.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaStreamTrack::MediaStreamTrack() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamTrackPtr wrapper::org::ortc::MediaStreamTrack::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaStreamTrack::~MediaStreamTrack() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamTrack::wrapper_init_org_ortc_MediaStreamTrack() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::MediaStreamTrack::clone() +{ + wrapper::org::ortc::MediaStreamTrackPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamTrack::stop() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackCapabilitiesPtr wrapper::impl::org::ortc::MediaStreamTrack::getCapabilities() +{ + wrapper::org::ortc::MediaTrackCapabilitiesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackConstraintsPtr wrapper::impl::org::ortc::MediaStreamTrack::getConstraints() +{ + wrapper::org::ortc::MediaTrackConstraintsPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackSettingsPtr wrapper::impl::org::ortc::MediaStreamTrack::getSettings() +{ + wrapper::org::ortc::MediaTrackSettingsPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +PromisePtr wrapper::impl::org::ortc::MediaStreamTrack::applyConstraints(wrapper::org::ortc::MediaTrackConstraintsPtr constraints) +{ + PromisePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::MediaStreamTrack::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamTrackKind wrapper::impl::org::ortc::MediaStreamTrack::get_kind() +{ + wrapper::org::ortc::MediaStreamTrackKind result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaStreamTrack::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaStreamTrack::get_deviceId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaStreamTrack::get_label() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::MediaStreamTrack::get_enabled() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamTrack::set_enabled(bool value) +{ +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::MediaStreamTrack::get_muted() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamTrack::set_muted(bool value) +{ +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::MediaStreamTrack::get_remote() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamTrackState wrapper::impl::org::ortc::MediaStreamTrack::get_readyState() +{ + wrapper::org::ortc::MediaStreamTrackState result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaSourcePtr wrapper::impl::org::ortc::MediaStreamTrack::get_source() +{ + wrapper::org::ortc::MediaSourcePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamTrack::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h new file mode 100644 index 00000000..b830c170 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaStreamTrack.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaStreamTrack : public wrapper::org::ortc::MediaStreamTrack + { + MediaStreamTrackWeakPtr thisWeak_; + + MediaStreamTrack(); + virtual ~MediaStreamTrack(); + + // methods MediaStreamTrack + virtual wrapper::org::ortc::MediaStreamTrackPtr clone() override; + virtual void stop() override; + virtual wrapper::org::ortc::MediaTrackCapabilitiesPtr getCapabilities() override; + virtual wrapper::org::ortc::MediaTrackConstraintsPtr getConstraints() override; + virtual wrapper::org::ortc::MediaTrackSettingsPtr getSettings() override; + virtual PromisePtr applyConstraints(wrapper::org::ortc::MediaTrackConstraintsPtr constraints) override; + virtual void wrapper_init_org_ortc_MediaStreamTrack() override; + + // properties MediaStreamTrack + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::MediaStreamTrackKind get_kind() override; + virtual String get_id() override; + virtual String get_deviceId() override; + virtual String get_label() override; + virtual bool get_enabled() override; + virtual void set_enabled(bool value) override; + virtual bool get_muted() override; + virtual void set_muted(bool value) override; + virtual bool get_remote() override; + virtual wrapper::org::ortc::MediaStreamTrackState get_readyState() override; + virtual wrapper::org::ortc::MediaSourcePtr get_source() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp new file mode 100644 index 00000000..a719dd69 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaTrackCapabilities.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackCapabilities::MediaTrackCapabilities() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackCapabilitiesPtr wrapper::org::ortc::MediaTrackCapabilities::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackCapabilities::~MediaTrackCapabilities() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackCapabilities::wrapper_init_org_ortc_MediaTrackCapabilities() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackCapabilities::wrapper_init_org_ortc_MediaTrackCapabilities(wrapper::org::ortc::MediaTrackCapabilitiesPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackCapabilities::wrapper_init_org_ortc_MediaTrackCapabilities(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackCapabilities::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaTrackCapabilities::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h new file mode 100644 index 00000000..801abc32 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaTrackCapabilities.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaTrackCapabilities : public wrapper::org::ortc::MediaTrackCapabilities + { + MediaTrackCapabilitiesWeakPtr thisWeak_; + + MediaTrackCapabilities(); + virtual ~MediaTrackCapabilities(); + + // methods MediaTrackCapabilities + virtual void wrapper_init_org_ortc_MediaTrackCapabilities() override; + virtual void wrapper_init_org_ortc_MediaTrackCapabilities(wrapper::org::ortc::MediaTrackCapabilitiesPtr source) override; + virtual void wrapper_init_org_ortc_MediaTrackCapabilities(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp new file mode 100644 index 00000000..61bbdbc7 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaTrackConstraintSet.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraintSet::MediaTrackConstraintSet() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackConstraintSetPtr wrapper::org::ortc::MediaTrackConstraintSet::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraintSet::~MediaTrackConstraintSet() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackConstraintSet::wrapper_init_org_ortc_MediaTrackConstraintSet() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackConstraintSet::wrapper_init_org_ortc_MediaTrackConstraintSet(wrapper::org::ortc::MediaTrackConstraintSetPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackConstraintSet::wrapper_init_org_ortc_MediaTrackConstraintSet(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackConstraintSet::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaTrackConstraintSet::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h new file mode 100644 index 00000000..9acee3df --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaTrackConstraintSet.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaTrackConstraintSet : public wrapper::org::ortc::MediaTrackConstraintSet + { + MediaTrackConstraintSetWeakPtr thisWeak_; + + MediaTrackConstraintSet(); + virtual ~MediaTrackConstraintSet(); + + // methods MediaTrackConstraintSet + virtual void wrapper_init_org_ortc_MediaTrackConstraintSet() override; + virtual void wrapper_init_org_ortc_MediaTrackConstraintSet(wrapper::org::ortc::MediaTrackConstraintSetPtr source) override; + virtual void wrapper_init_org_ortc_MediaTrackConstraintSet(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp new file mode 100644 index 00000000..80dff16c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaTrackConstraints.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraints::MediaTrackConstraints() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackConstraintsPtr wrapper::org::ortc::MediaTrackConstraints::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraints::~MediaTrackConstraints() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackConstraints::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaTrackConstraints::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackConstraints::wrapper_init_org_ortc_MediaTrackConstraints() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackConstraints::wrapper_init_org_ortc_MediaTrackConstraints(wrapper::org::ortc::MediaTrackConstraintsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackConstraints::wrapper_init_org_ortc_MediaTrackConstraints(wrapper::org::ortc::JsonPtr json) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h new file mode 100644 index 00000000..2dd35cfb --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaTrackConstraints.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaTrackConstraints : public wrapper::org::ortc::MediaTrackConstraints + { + MediaTrackConstraintsWeakPtr thisWeak_; + + MediaTrackConstraints(); + virtual ~MediaTrackConstraints(); + + // methods MediaTrackConstraintSet + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // methods MediaTrackConstraints + virtual void wrapper_init_org_ortc_MediaTrackConstraints() override; + virtual void wrapper_init_org_ortc_MediaTrackConstraints(wrapper::org::ortc::MediaTrackConstraintsPtr source) override; + virtual void wrapper_init_org_ortc_MediaTrackConstraints(wrapper::org::ortc::JsonPtr json) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp new file mode 100644 index 00000000..8575f717 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaTrackSettings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackSettings::MediaTrackSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackSettingsPtr wrapper::org::ortc::MediaTrackSettings::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackSettings::~MediaTrackSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackSettings::wrapper_init_org_ortc_MediaTrackSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackSettings::wrapper_init_org_ortc_MediaTrackSettings(wrapper::org::ortc::MediaTrackSettingsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackSettings::wrapper_init_org_ortc_MediaTrackSettings(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackSettings::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaTrackSettings::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h new file mode 100644 index 00000000..f45d6150 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaTrackSettings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaTrackSettings : public wrapper::org::ortc::MediaTrackSettings + { + MediaTrackSettingsWeakPtr thisWeak_; + + MediaTrackSettings(); + virtual ~MediaTrackSettings(); + + // methods MediaTrackSettings + virtual void wrapper_init_org_ortc_MediaTrackSettings() override; + virtual void wrapper_init_org_ortc_MediaTrackSettings(wrapper::org::ortc::MediaTrackSettingsPtr source) override; + virtual void wrapper_init_org_ortc_MediaTrackSettings(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp new file mode 100644 index 00000000..09628b30 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MediaTrackSupportedConstraints.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackSupportedConstraints::MediaTrackSupportedConstraints() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaTrackSupportedConstraintsPtr wrapper::org::ortc::MediaTrackSupportedConstraints::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackSupportedConstraints::~MediaTrackSupportedConstraints() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackSupportedConstraints::wrapper_init_org_ortc_MediaTrackSupportedConstraints() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackSupportedConstraints::wrapper_init_org_ortc_MediaTrackSupportedConstraints(wrapper::org::ortc::MediaTrackSupportedConstraintsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaTrackSupportedConstraints::wrapper_init_org_ortc_MediaTrackSupportedConstraints(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackSupportedConstraints::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::MediaTrackSupportedConstraints::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h new file mode 100644 index 00000000..2cf48459 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MediaTrackSupportedConstraints.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MediaTrackSupportedConstraints : public wrapper::org::ortc::MediaTrackSupportedConstraints + { + MediaTrackSupportedConstraintsWeakPtr thisWeak_; + + MediaTrackSupportedConstraints(); + virtual ~MediaTrackSupportedConstraints(); + + // methods MediaTrackSupportedConstraints + virtual void wrapper_init_org_ortc_MediaTrackSupportedConstraints() override; + virtual void wrapper_init_org_ortc_MediaTrackSupportedConstraints(wrapper::org::ortc::MediaTrackSupportedConstraintsPtr source) override; + virtual void wrapper_init_org_ortc_MediaTrackSupportedConstraints(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp new file mode 100644 index 00000000..be90eaef --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp @@ -0,0 +1,46 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_MessageQueue.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MessageQueue::MessageQueue() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MessageQueuePtr wrapper::org::ortc::MessageQueue::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MessageQueue::~MessageQueue() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MessageQueuePtr wrapper::org::ortc::MessageQueue::getDefaultForUi() +{ + wrapper::org::ortc::MessageQueuePtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.h b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.h new file mode 100644 index 00000000..b8e1f4cd --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.h @@ -0,0 +1,26 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_MessageQueue.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct MessageQueue : public wrapper::org::ortc::MessageQueue + { + MessageQueueWeakPtr thisWeak_; + + MessageQueue(); + virtual ~MessageQueue(); + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp new file mode 100644 index 00000000..517d1da0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp @@ -0,0 +1,99 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_OrtcLib.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::OrtcLib::~OrtcLib() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::OrtcLib::setup() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::OrtcLib::setup(wrapper::org::ortc::MessageQueuePtr queue) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::OrtcLib::startMediaTracing() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::OrtcLib::stopMediaTracing() +{ +} + +//------------------------------------------------------------------------------ +bool wrapper::org::ortc::OrtcLib::isMediaTracing() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::org::ortc::OrtcLib::saveMediaTrace(String filename) +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::org::ortc::OrtcLib::saveMediaTrace( + String host, + int port + ) +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +PromisePtr wrapper::org::ortc::OrtcLib::notifyGoingToBackground() +{ + PromisePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::OrtcLib::notifyGoingToBackgroundNow() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::OrtcLib::notifyReturningFromBackground() +{ +} + +//------------------------------------------------------------------------------ +::zsLib::Milliseconds wrapper::org::ortc::OrtcLib::get_ntpServerTime() +{ + ::zsLib::Milliseconds result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::OrtcLib::set_ntpServerTime(::zsLib::Milliseconds value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.h b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.h new file mode 100644 index 00000000..a8d28a4d --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.h @@ -0,0 +1,23 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_OrtcLib.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct OrtcLib : public wrapper::org::ortc::OrtcLib + { + virtual ~OrtcLib(); + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp new file mode 100644 index 00000000..db2b31ce --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp @@ -0,0 +1,31 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_OrtcLibWithDispatcher.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::OrtcLibWithDispatcher::~OrtcLibWithDispatcher() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::OrtcLibWithDispatcher::setup(wrapper::org::ortc::DispatcherPtr dispatcher) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.h b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.h new file mode 100644 index 00000000..7453d77b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.h @@ -0,0 +1,23 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_OrtcLibWithDispatcher.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct OrtcLibWithDispatcher : public wrapper::org::ortc::OrtcLibWithDispatcher + { + virtual ~OrtcLibWithDispatcher(); + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp new file mode 100644 index 00000000..4e57b091 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_OverconstrainedError.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::OverconstrainedError::OverconstrainedError() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::OverconstrainedErrorPtr wrapper::org::ortc::OverconstrainedError::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::OverconstrainedError::~OverconstrainedError() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::OverconstrainedError::wrapper_init_org_ortc_OverconstrainedError() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h new file mode 100644 index 00000000..09996502 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_OverconstrainedError.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct OverconstrainedError : public wrapper::org::ortc::OverconstrainedError + { + OverconstrainedErrorWeakPtr thisWeak_; + + OverconstrainedError(); + virtual ~OverconstrainedError(); + virtual void wrapper_init_org_ortc_OverconstrainedError() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp new file mode 100644 index 00000000..97f08b47 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_OverconstrainedErrorEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::OverconstrainedErrorEvent::OverconstrainedErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::OverconstrainedErrorEventPtr wrapper::org::ortc::OverconstrainedErrorEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::OverconstrainedErrorEvent::~OverconstrainedErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::OverconstrainedErrorEvent::wrapper_init_org_ortc_OverconstrainedErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::OverconstrainedErrorPtr wrapper::impl::org::ortc::OverconstrainedErrorEvent::get_error() +{ + wrapper::org::ortc::OverconstrainedErrorPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h new file mode 100644 index 00000000..6009074e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_OverconstrainedErrorEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct OverconstrainedErrorEvent : public wrapper::org::ortc::OverconstrainedErrorEvent + { + OverconstrainedErrorEventWeakPtr thisWeak_; + + OverconstrainedErrorEvent(); + virtual ~OverconstrainedErrorEvent(); + virtual void wrapper_init_org_ortc_OverconstrainedErrorEvent() override; + + // properties OverconstrainedErrorEvent + virtual wrapper::org::ortc::OverconstrainedErrorPtr get_error() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp new file mode 100644 index 00000000..774092e0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp @@ -0,0 +1,86 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCCertificate.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificate::RTCCertificate() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCCertificatePtr wrapper::org::ortc::RTCCertificate::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificate::~RTCCertificate() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCCertificate::wrapper_init_org_ortc_RTCCertificate() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate() +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(String keygenAlgorithm) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(wrapper::org::ortc::JsonPtr keygenAlgorithm) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCCertificate::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCCertificate::get_expires() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsFingerprintPtr wrapper::impl::org::ortc::RTCCertificate::get_fingerprint() +{ + wrapper::org::ortc::RTCDtlsFingerprintPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h new file mode 100644 index 00000000..40268e0a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h @@ -0,0 +1,32 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCCertificate.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCCertificate : public wrapper::org::ortc::RTCCertificate + { + RTCCertificateWeakPtr thisWeak_; + + RTCCertificate(); + virtual ~RTCCertificate(); + virtual void wrapper_init_org_ortc_RTCCertificate() override; + + // properties RTCCertificate + virtual uint64_t get_objectId() override; + virtual ::zsLib::Time get_expires() override; + virtual wrapper::org::ortc::RTCDtlsFingerprintPtr get_fingerprint() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp new file mode 100644 index 00000000..d98b2892 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp @@ -0,0 +1,124 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCCertificateStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificateStats::RTCCertificateStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCCertificateStatsPtr wrapper::org::ortc::RTCCertificateStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificateStats::~RTCCertificateStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCCertificateStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCertificateStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCCertificateStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCCertificateStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCertificateStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCertificateStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCCertificateStats::wrapper_init_org_ortc_RTCCertificateStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCCertificateStats::wrapper_init_org_ortc_RTCCertificateStats(wrapper::org::ortc::RTCCertificateStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCCertificateStats::wrapper_init_org_ortc_RTCCertificateStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCertificateStats::get_fingerprint() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCertificateStats::get_fingerprintAlgorithm() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCertificateStats::get_base64Certificate() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCertificateStats::get_issuerCertificateId() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h new file mode 100644 index 00000000..df867c7c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h @@ -0,0 +1,47 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCCertificateStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCCertificateStats : public wrapper::org::ortc::RTCCertificateStats + { + RTCCertificateStatsWeakPtr thisWeak_; + + RTCCertificateStats(); + virtual ~RTCCertificateStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCCertificateStats + virtual void wrapper_init_org_ortc_RTCCertificateStats() override; + virtual void wrapper_init_org_ortc_RTCCertificateStats(wrapper::org::ortc::RTCCertificateStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCCertificateStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCCertificateStats + virtual String get_fingerprint() override; + virtual String get_fingerprintAlgorithm() override; + virtual String get_base64Certificate() override; + virtual String get_issuerCertificateId() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp new file mode 100644 index 00000000..94e1316e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp @@ -0,0 +1,131 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCCodec.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCodec::RTCCodec() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCCodecPtr wrapper::org::ortc::RTCCodec::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCodec::~RTCCodec() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCCodec::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCodec::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCCodec::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCCodec::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCodec::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCodec::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCCodec::wrapper_init_org_ortc_RTCCodec() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCCodec::wrapper_init_org_ortc_RTCCodec(wrapper::org::ortc::RTCCodecPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCCodec::wrapper_init_org_ortc_RTCCodec(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +Optional< uint8_t > wrapper::impl::org::ortc::RTCCodec::get_payloadType() +{ + Optional< uint8_t > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCodec::get_codec() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCCodec::get_clockRate() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< unsigned long > wrapper::impl::org::ortc::RTCCodec::get_channels() +{ + Optional< unsigned long > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCCodec::get_parameters() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.h b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.h new file mode 100644 index 00000000..0c242e3e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.h @@ -0,0 +1,48 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCCodec.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCCodec : public wrapper::org::ortc::RTCCodec + { + RTCCodecWeakPtr thisWeak_; + + RTCCodec(); + virtual ~RTCCodec(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCCodec + virtual void wrapper_init_org_ortc_RTCCodec() override; + virtual void wrapper_init_org_ortc_RTCCodec(wrapper::org::ortc::RTCCodecPtr source) override; + virtual void wrapper_init_org_ortc_RTCCodec(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCCodec + virtual Optional< uint8_t > get_payloadType() override; + virtual String get_codec() override; + virtual unsigned long get_clockRate() override; + virtual Optional< unsigned long > get_channels() override; + virtual String get_parameters() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp new file mode 100644 index 00000000..9a3180fe --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp @@ -0,0 +1,133 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDataChannel.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannel::RTCDataChannel() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelPtr wrapper::org::ortc::RTCDataChannel::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannel::~RTCDataChannel() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDataChannel::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannel::wrapper_init_org_ortc_RTCDataChannel( + wrapper::org::ortc::RTCDataTransportPtr transport, + wrapper::org::ortc::RTCDataChannelParametersPtr params + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannel::close() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannel::send(String text) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannel::send(SecureByteBlockPtr data) +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCDataChannel::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataTransportPtr wrapper::impl::org::ortc::RTCDataChannel::get_transport() +{ + wrapper::org::ortc::RTCDataTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelParametersPtr wrapper::impl::org::ortc::RTCDataChannel::get_parameters() +{ + wrapper::org::ortc::RTCDataChannelParametersPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelState wrapper::impl::org::ortc::RTCDataChannel::get_readyState() +{ + wrapper::org::ortc::RTCDataChannelState result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCDataChannel::get_bufferedAmount() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCDataChannel::get_bufferedAmountLowThreshold() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannel::set_bufferedAmountLowThreshold(uint64_t value) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDataChannel::get_binaryType() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannel::set_binaryType(String value) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannel::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h new file mode 100644 index 00000000..0fac8966 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDataChannel.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDataChannel : public wrapper::org::ortc::RTCDataChannel + { + RTCDataChannelWeakPtr thisWeak_; + + RTCDataChannel(); + virtual ~RTCDataChannel(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCDataChannel + virtual void wrapper_init_org_ortc_RTCDataChannel( + wrapper::org::ortc::RTCDataTransportPtr transport, + wrapper::org::ortc::RTCDataChannelParametersPtr params + ) override; + virtual void close() override; + virtual void send(String text) override; + virtual void send(SecureByteBlockPtr data) override; + + // properties RTCDataChannel + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::RTCDataTransportPtr get_transport() override; + virtual wrapper::org::ortc::RTCDataChannelParametersPtr get_parameters() override; + virtual wrapper::org::ortc::RTCDataChannelState get_readyState() override; + virtual uint64_t get_bufferedAmount() override; + virtual uint64_t get_bufferedAmountLowThreshold() override; + virtual void set_bufferedAmountLowThreshold(uint64_t value) override; + virtual String get_binaryType() override; + virtual void set_binaryType(String value) override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp new file mode 100644 index 00000000..2073f3a2 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp @@ -0,0 +1,56 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDataChannelEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelEvent::RTCDataChannelEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelEventPtr wrapper::org::ortc::RTCDataChannelEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelEvent::~RTCDataChannelEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelEvent::wrapper_init_org_ortc_RTCDataChannelEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelPtr wrapper::impl::org::ortc::RTCDataChannelEvent::get_dataChannel() +{ + wrapper::org::ortc::RTCDataChannelPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelEvent::set_dataChannel(wrapper::org::ortc::RTCDataChannelPtr value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h new file mode 100644 index 00000000..04837cfd --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h @@ -0,0 +1,31 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDataChannelEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDataChannelEvent : public wrapper::org::ortc::RTCDataChannelEvent + { + RTCDataChannelEventWeakPtr thisWeak_; + + RTCDataChannelEvent(); + virtual ~RTCDataChannelEvent(); + virtual void wrapper_init_org_ortc_RTCDataChannelEvent() override; + + // properties RTCDataChannelEvent + virtual wrapper::org::ortc::RTCDataChannelPtr get_dataChannel() override; + virtual void set_dataChannel(wrapper::org::ortc::RTCDataChannelPtr value) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp new file mode 100644 index 00000000..a7eaefa5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDataChannelParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelParameters::RTCDataChannelParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelParametersPtr wrapper::org::ortc::RTCDataChannelParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelParameters::~RTCDataChannelParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelParameters::wrapper_init_org_ortc_RTCDataChannelParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelParameters::wrapper_init_org_ortc_RTCDataChannelParameters(wrapper::org::ortc::RTCDataChannelParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelParameters::wrapper_init_org_ortc_RTCDataChannelParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDataChannelParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDataChannelParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h new file mode 100644 index 00000000..4354c412 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDataChannelParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDataChannelParameters : public wrapper::org::ortc::RTCDataChannelParameters + { + RTCDataChannelParametersWeakPtr thisWeak_; + + RTCDataChannelParameters(); + virtual ~RTCDataChannelParameters(); + + // methods RTCDataChannelParameters + virtual void wrapper_init_org_ortc_RTCDataChannelParameters() override; + virtual void wrapper_init_org_ortc_RTCDataChannelParameters(wrapper::org::ortc::RTCDataChannelParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCDataChannelParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp new file mode 100644 index 00000000..22cc6efa --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDataChannelStateChangeEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::RTCDataChannelStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelStateChangeEventPtr wrapper::org::ortc::RTCDataChannelStateChangeEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::~RTCDataChannelStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::wrapper_init_org_ortc_RTCDataChannelStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelState wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::get_state() +{ + wrapper::org::ortc::RTCDataChannelState result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h new file mode 100644 index 00000000..81c8c2a5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDataChannelStateChangeEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDataChannelStateChangeEvent : public wrapper::org::ortc::RTCDataChannelStateChangeEvent + { + RTCDataChannelStateChangeEventWeakPtr thisWeak_; + + RTCDataChannelStateChangeEvent(); + virtual ~RTCDataChannelStateChangeEvent(); + virtual void wrapper_init_org_ortc_RTCDataChannelStateChangeEvent() override; + + // properties RTCDataChannelStateChangeEvent + virtual wrapper::org::ortc::RTCDataChannelState get_state() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp new file mode 100644 index 00000000..4622e736 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp @@ -0,0 +1,152 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDataChannelStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelStats::RTCDataChannelStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelStatsPtr wrapper::org::ortc::RTCDataChannelStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelStats::~RTCDataChannelStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDataChannelStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDataChannelStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCDataChannelStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCDataChannelStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDataChannelStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDataChannelStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelStats::wrapper_init_org_ortc_RTCDataChannelStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelStats::wrapper_init_org_ortc_RTCDataChannelStats(wrapper::org::ortc::RTCDataChannelStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataChannelStats::wrapper_init_org_ortc_RTCDataChannelStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDataChannelStats::get_label() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDataChannelStats::get_protocol() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +long wrapper::impl::org::ortc::RTCDataChannelStats::get_dataChannelId() +{ + long result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataChannelState wrapper::impl::org::ortc::RTCDataChannelStats::get_state() +{ + wrapper::org::ortc::RTCDataChannelState result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCDataChannelStats::get_messagesSent() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCDataChannelStats::get_bytesSent() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCDataChannelStats::get_messagesReceived() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCDataChannelStats::get_bytesReceived() +{ + unsigned long long result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h new file mode 100644 index 00000000..755f51a5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDataChannelStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDataChannelStats : public wrapper::org::ortc::RTCDataChannelStats + { + RTCDataChannelStatsWeakPtr thisWeak_; + + RTCDataChannelStats(); + virtual ~RTCDataChannelStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCDataChannelStats + virtual void wrapper_init_org_ortc_RTCDataChannelStats() override; + virtual void wrapper_init_org_ortc_RTCDataChannelStats(wrapper::org::ortc::RTCDataChannelStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCDataChannelStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCDataChannelStats + virtual String get_label() override; + virtual String get_protocol() override; + virtual long get_dataChannelId() override; + virtual wrapper::org::ortc::RTCDataChannelState get_state() override; + virtual unsigned long get_messagesSent() override; + virtual unsigned long long get_bytesSent() override; + virtual unsigned long get_messagesReceived() override; + virtual unsigned long long get_bytesReceived() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp new file mode 100644 index 00000000..41d0b250 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDataTransport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataTransport::RTCDataTransport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDataTransportPtr wrapper::org::ortc::RTCDataTransport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataTransport::~RTCDataTransport() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDataTransport::wrapper_init_org_ortc_RTCDataTransport() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h new file mode 100644 index 00000000..02f3b8f5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDataTransport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDataTransport : public wrapper::org::ortc::RTCDataTransport + { + RTCDataTransportWeakPtr thisWeak_; + + RTCDataTransport(); + virtual ~RTCDataTransport(); + virtual void wrapper_init_org_ortc_RTCDataTransport() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp new file mode 100644 index 00000000..a268dec7 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDtlsFingerprint.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsFingerprint::RTCDtlsFingerprint() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsFingerprintPtr wrapper::org::ortc::RTCDtlsFingerprint::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsFingerprint::~RTCDtlsFingerprint() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsFingerprint::wrapper_init_org_ortc_RTCDtlsFingerprint() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsFingerprint::wrapper_init_org_ortc_RTCDtlsFingerprint(wrapper::org::ortc::RTCDtlsFingerprintPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsFingerprint::wrapper_init_org_ortc_RTCDtlsFingerprint(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDtlsFingerprint::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDtlsFingerprint::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h new file mode 100644 index 00000000..460128b7 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDtlsFingerprint.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDtlsFingerprint : public wrapper::org::ortc::RTCDtlsFingerprint + { + RTCDtlsFingerprintWeakPtr thisWeak_; + + RTCDtlsFingerprint(); + virtual ~RTCDtlsFingerprint(); + + // methods RTCDtlsFingerprint + virtual void wrapper_init_org_ortc_RTCDtlsFingerprint() override; + virtual void wrapper_init_org_ortc_RTCDtlsFingerprint(wrapper::org::ortc::RTCDtlsFingerprintPtr source) override; + virtual void wrapper_init_org_ortc_RTCDtlsFingerprint(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp new file mode 100644 index 00000000..89eb7443 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDtlsParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsParameters::RTCDtlsParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsParametersPtr wrapper::org::ortc::RTCDtlsParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsParameters::~RTCDtlsParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsParameters::wrapper_init_org_ortc_RTCDtlsParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsParameters::wrapper_init_org_ortc_RTCDtlsParameters(wrapper::org::ortc::RTCDtlsParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsParameters::wrapper_init_org_ortc_RTCDtlsParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDtlsParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDtlsParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h new file mode 100644 index 00000000..dfe42b3a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDtlsParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDtlsParameters : public wrapper::org::ortc::RTCDtlsParameters + { + RTCDtlsParametersWeakPtr thisWeak_; + + RTCDtlsParameters(); + virtual ~RTCDtlsParameters(); + + // methods RTCDtlsParameters + virtual void wrapper_init_org_ortc_RTCDtlsParameters() override; + virtual void wrapper_init_org_ortc_RTCDtlsParameters(wrapper::org::ortc::RTCDtlsParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCDtlsParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp new file mode 100644 index 00000000..c5c4fd59 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp @@ -0,0 +1,118 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDtlsTransport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsTransport::RTCDtlsTransport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsTransportPtr wrapper::org::ortc::RTCDtlsTransport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsTransport::~RTCDtlsTransport() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsTransport::wrapper_init_org_ortc_RTCDtlsTransport( + wrapper::org::ortc::RTCIceTransportPtr iceTransport, + shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > certificates + ) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsParametersPtr wrapper::impl::org::ortc::RTCDtlsTransport::remoteParameters() +{ + wrapper::org::ortc::RTCDtlsParametersPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +SecureByteBlockPtr wrapper::impl::org::ortc::RTCDtlsTransport::getRemoteCertificates() +{ + SecureByteBlockPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsTransport::start(wrapper::org::ortc::RTCDtlsParametersPtr remoteParameters) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsTransport::stop() +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCDtlsTransport::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > wrapper::impl::org::ortc::RTCDtlsTransport::get_certificates() +{ + shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportPtr wrapper::impl::org::ortc::RTCDtlsTransport::get_transport() +{ + wrapper::org::ortc::RTCIceTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsTransportState wrapper::impl::org::ortc::RTCDtlsTransport::get_state() +{ + wrapper::org::ortc::RTCDtlsTransportState result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsParametersPtr wrapper::impl::org::ortc::RTCDtlsTransport::get_localParameters() +{ + wrapper::org::ortc::RTCDtlsParametersPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsTransport::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h new file mode 100644 index 00000000..77f8468b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h @@ -0,0 +1,48 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDtlsTransport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDtlsTransport : public wrapper::org::ortc::RTCDtlsTransport + { + RTCDtlsTransportWeakPtr thisWeak_; + + RTCDtlsTransport(); + virtual ~RTCDtlsTransport(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCDtlsTransport + virtual void wrapper_init_org_ortc_RTCDtlsTransport( + wrapper::org::ortc::RTCIceTransportPtr iceTransport, + shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > certificates + ) override; + virtual wrapper::org::ortc::RTCDtlsParametersPtr remoteParameters() override; + virtual SecureByteBlockPtr getRemoteCertificates() override; + virtual void start(wrapper::org::ortc::RTCDtlsParametersPtr remoteParameters) override; + virtual void stop() override; + + // properties RTCDtlsTransport + virtual uint64_t get_objectId() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > get_certificates() override; + virtual wrapper::org::ortc::RTCIceTransportPtr get_transport() override; + virtual wrapper::org::ortc::RTCDtlsTransportState get_state() override; + virtual wrapper::org::ortc::RTCDtlsParametersPtr get_localParameters() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp new file mode 100644 index 00000000..f801d849 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDtlsTransportStateChangeEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::RTCDtlsTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsTransportStateChangeEventPtr wrapper::org::ortc::RTCDtlsTransportStateChangeEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::~RTCDtlsTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::wrapper_init_org_ortc_RTCDtlsTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsTransportState wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::get_state() +{ + wrapper::org::ortc::RTCDtlsTransportState result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h new file mode 100644 index 00000000..0adb85d3 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDtlsTransportStateChangeEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDtlsTransportStateChangeEvent : public wrapper::org::ortc::RTCDtlsTransportStateChangeEvent + { + RTCDtlsTransportStateChangeEventWeakPtr thisWeak_; + + RTCDtlsTransportStateChangeEvent(); + virtual ~RTCDtlsTransportStateChangeEvent(); + virtual void wrapper_init_org_ortc_RTCDtlsTransportStateChangeEvent() override; + + // properties RTCDtlsTransportStateChangeEvent + virtual wrapper::org::ortc::RTCDtlsTransportState get_state() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp new file mode 100644 index 00000000..952bbd49 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp @@ -0,0 +1,110 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDtlsTransportStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsTransportStats::RTCDtlsTransportStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsTransportStatsPtr wrapper::org::ortc::RTCDtlsTransportStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsTransportStats::~RTCDtlsTransportStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDtlsTransportStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDtlsTransportStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCDtlsTransportStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCDtlsTransportStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDtlsTransportStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDtlsTransportStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsTransportStats::wrapper_init_org_ortc_RTCDtlsTransportStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsTransportStats::wrapper_init_org_ortc_RTCDtlsTransportStats(wrapper::org::ortc::RTCDtlsTransportStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCDtlsTransportStats::wrapper_init_org_ortc_RTCDtlsTransportStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDtlsTransportStats::get_localCertificateId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDtlsTransportStats::get_remoteCertificateId() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h new file mode 100644 index 00000000..06023d2c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h @@ -0,0 +1,45 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDtlsTransportStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDtlsTransportStats : public wrapper::org::ortc::RTCDtlsTransportStats + { + RTCDtlsTransportStatsWeakPtr thisWeak_; + + RTCDtlsTransportStats(); + virtual ~RTCDtlsTransportStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCDtlsTransportStats + virtual void wrapper_init_org_ortc_RTCDtlsTransportStats() override; + virtual void wrapper_init_org_ortc_RTCDtlsTransportStats(wrapper::org::ortc::RTCDtlsTransportStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCDtlsTransportStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCDtlsTransportStats + virtual String get_localCertificateId() override; + virtual String get_remoteCertificateId() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp new file mode 100644 index 00000000..7948fad7 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp @@ -0,0 +1,142 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceCandidate.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidate::RTCIceCandidate() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePtr wrapper::org::ortc::RTCIceCandidate::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidate::~RTCIceCandidate() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidate::wrapper_init_org_ortc_RTCIceCandidate() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidate::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidate::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceCandidate::get_component() +{ + wrapper::org::ortc::RTCIceComponent result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidate::get_interfaceType() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidate::get_foundation() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint32_t wrapper::impl::org::ortc::RTCIceCandidate::get_priority() +{ + uint32_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint32_t wrapper::impl::org::ortc::RTCIceCandidate::get_unfreezePriority() +{ + uint32_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceProtocol wrapper::impl::org::ortc::RTCIceCandidate::get_protocol() +{ + wrapper::org::ortc::RTCIceProtocol result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidate::get_ip() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint16_t wrapper::impl::org::ortc::RTCIceCandidate::get_port() +{ + uint16_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidateType wrapper::impl::org::ortc::RTCIceCandidate::get_candidateType() +{ + wrapper::org::ortc::RTCIceCandidateType result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTcpCandidateType wrapper::impl::org::ortc::RTCIceCandidate::get_tcpType() +{ + wrapper::org::ortc::RTCIceTcpCandidateType result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidate::get_relatedAddress() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint16_t wrapper::impl::org::ortc::RTCIceCandidate::get_relatedPort() +{ + uint16_t result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h new file mode 100644 index 00000000..a83265b3 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h @@ -0,0 +1,47 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceCandidate.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceCandidate : public wrapper::org::ortc::RTCIceCandidate + { + RTCIceCandidateWeakPtr thisWeak_; + + RTCIceCandidate(); + virtual ~RTCIceCandidate(); + + // methods RTCIceGathererCandidate + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCIceGathererCandidate + virtual wrapper::org::ortc::RTCIceComponent get_component() override; + virtual void wrapper_init_org_ortc_RTCIceCandidate() override; + + // properties RTCIceCandidate + virtual String get_interfaceType() override; + virtual String get_foundation() override; + virtual uint32_t get_priority() override; + virtual uint32_t get_unfreezePriority() override; + virtual wrapper::org::ortc::RTCIceProtocol get_protocol() override; + virtual String get_ip() override; + virtual uint16_t get_port() override; + virtual wrapper::org::ortc::RTCIceCandidateType get_candidateType() override; + virtual wrapper::org::ortc::RTCIceTcpCandidateType get_tcpType() override; + virtual String get_relatedAddress() override; + virtual uint16_t get_relatedPort() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp new file mode 100644 index 00000000..966215b1 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp @@ -0,0 +1,145 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceCandidateAttributes.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidateAttributes::RTCIceCandidateAttributes() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidateAttributesPtr wrapper::org::ortc::RTCIceCandidateAttributes::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidateAttributes::~RTCIceCandidateAttributes() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidateAttributes::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidateAttributes::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidateAttributes::wrapper_init_org_ortc_RTCIceCandidateAttributes() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidateAttributes::wrapper_init_org_ortc_RTCIceCandidateAttributes(wrapper::org::ortc::RTCIceCandidateAttributesPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidateAttributes::wrapper_init_org_ortc_RTCIceCandidateAttributes(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_relatedId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_ipAddress() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_portNumber() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_transport() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidateType wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_candidateType() +{ + wrapper::org::ortc::RTCIceCandidateType result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_priority() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_addressSourceUrl() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h new file mode 100644 index 00000000..7521cb23 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h @@ -0,0 +1,50 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceCandidateAttributes.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceCandidateAttributes : public wrapper::org::ortc::RTCIceCandidateAttributes + { + RTCIceCandidateAttributesWeakPtr thisWeak_; + + RTCIceCandidateAttributes(); + virtual ~RTCIceCandidateAttributes(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCIceCandidateAttributes + virtual void wrapper_init_org_ortc_RTCIceCandidateAttributes() override; + virtual void wrapper_init_org_ortc_RTCIceCandidateAttributes(wrapper::org::ortc::RTCIceCandidateAttributesPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceCandidateAttributes(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCIceCandidateAttributes + virtual String get_relatedId() override; + virtual String get_ipAddress() override; + virtual unsigned long get_portNumber() override; + virtual String get_transport() override; + virtual wrapper::org::ortc::RTCIceCandidateType get_candidateType() override; + virtual unsigned long get_priority() override; + virtual String get_addressSourceUrl() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp new file mode 100644 index 00000000..5cb1ef15 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp @@ -0,0 +1,72 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceCandidateComplete.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidateComplete::RTCIceCandidateComplete() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::org::ortc::RTCIceCandidateComplete::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidateComplete::~RTCIceCandidateComplete() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidateComplete::wrapper_init_org_ortc_RTCIceCandidateComplete() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidateComplete::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidateComplete::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceCandidateComplete::get_component() +{ + wrapper::org::ortc::RTCIceComponent result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCIceCandidateComplete::get_complete() +{ + bool result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h new file mode 100644 index 00000000..65532270 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h @@ -0,0 +1,37 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceCandidateComplete.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceCandidateComplete : public wrapper::org::ortc::RTCIceCandidateComplete + { + RTCIceCandidateCompleteWeakPtr thisWeak_; + + RTCIceCandidateComplete(); + virtual ~RTCIceCandidateComplete(); + + // methods RTCIceGathererCandidate + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCIceGathererCandidate + virtual wrapper::org::ortc::RTCIceComponent get_component() override; + virtual void wrapper_init_org_ortc_RTCIceCandidateComplete() override; + + // properties RTCIceCandidateComplete + virtual bool get_complete() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp new file mode 100644 index 00000000..8d0540f0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp @@ -0,0 +1,92 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceCandidatePair.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidatePair::RTCIceCandidatePair() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePairPtr wrapper::org::ortc::RTCIceCandidatePair::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidatePair::~RTCIceCandidatePair() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePair::wrapper_init_org_ortc_RTCIceCandidatePair() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePair::wrapper_init_org_ortc_RTCIceCandidatePair(wrapper::org::ortc::RTCIceCandidatePairPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePair::wrapper_init_org_ortc_RTCIceCandidatePair(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidatePair::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidatePair::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceCandidatePair::get_local() +{ + wrapper::org::ortc::RTCIceCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePair::set_local(wrapper::org::ortc::RTCIceCandidatePtr value) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceCandidatePair::get_remote() +{ + wrapper::org::ortc::RTCIceCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePair::set_remote(wrapper::org::ortc::RTCIceCandidatePtr value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h new file mode 100644 index 00000000..1e0c1260 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h @@ -0,0 +1,39 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceCandidatePair.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceCandidatePair : public wrapper::org::ortc::RTCIceCandidatePair + { + RTCIceCandidatePairWeakPtr thisWeak_; + + RTCIceCandidatePair(); + virtual ~RTCIceCandidatePair(); + + // methods RTCIceCandidatePair + virtual void wrapper_init_org_ortc_RTCIceCandidatePair() override; + virtual void wrapper_init_org_ortc_RTCIceCandidatePair(wrapper::org::ortc::RTCIceCandidatePairPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceCandidatePair(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCIceCandidatePair + virtual wrapper::org::ortc::RTCIceCandidatePtr get_local() override; + virtual void set_local(wrapper::org::ortc::RTCIceCandidatePtr value) override; + virtual wrapper::org::ortc::RTCIceCandidatePtr get_remote() override; + virtual void set_remote(wrapper::org::ortc::RTCIceCandidatePtr value) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp new file mode 100644 index 00000000..ea2c2e9a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceCandidatePairChangeEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::RTCIceCandidatePairChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePairChangeEventPtr wrapper::org::ortc::RTCIceCandidatePairChangeEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::~RTCIceCandidatePairChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::wrapper_init_org_ortc_RTCIceCandidatePairChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePairPtr wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::get_candidatePair() +{ + wrapper::org::ortc::RTCIceCandidatePairPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h new file mode 100644 index 00000000..98c856e4 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceCandidatePairChangeEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceCandidatePairChangeEvent : public wrapper::org::ortc::RTCIceCandidatePairChangeEvent + { + RTCIceCandidatePairChangeEventWeakPtr thisWeak_; + + RTCIceCandidatePairChangeEvent(); + virtual ~RTCIceCandidatePairChangeEvent(); + virtual void wrapper_init_org_ortc_RTCIceCandidatePairChangeEvent() override; + + // properties RTCIceCandidatePairChangeEvent + virtual wrapper::org::ortc::RTCIceCandidatePairPtr get_candidatePair() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp new file mode 100644 index 00000000..1f9b822c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp @@ -0,0 +1,187 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceCandidatePairStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidatePairStats::RTCIceCandidatePairStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePairStatsPtr wrapper::org::ortc::RTCIceCandidatePairStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidatePairStats::~RTCIceCandidatePairStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidatePairStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidatePairStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePairStats::wrapper_init_org_ortc_RTCIceCandidatePairStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePairStats::wrapper_init_org_ortc_RTCIceCandidatePairStats(wrapper::org::ortc::RTCIceCandidatePairStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceCandidatePairStats::wrapper_init_org_ortc_RTCIceCandidatePairStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_transportId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_localCandidateId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_remoteCandidateId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePairState wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_state() +{ + wrapper::org::ortc::RTCIceCandidatePairState result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_priority() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_nominated() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_writable() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_readable() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_bytesSent() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_bytesReceived() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_roundTripTime() +{ + double result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_availableOutgoingBitrate() +{ + double result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_availableIncomingBitrate() +{ + double result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h new file mode 100644 index 00000000..1c51ab68 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h @@ -0,0 +1,56 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceCandidatePairStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceCandidatePairStats : public wrapper::org::ortc::RTCIceCandidatePairStats + { + RTCIceCandidatePairStatsWeakPtr thisWeak_; + + RTCIceCandidatePairStats(); + virtual ~RTCIceCandidatePairStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCIceCandidatePairStats + virtual void wrapper_init_org_ortc_RTCIceCandidatePairStats() override; + virtual void wrapper_init_org_ortc_RTCIceCandidatePairStats(wrapper::org::ortc::RTCIceCandidatePairStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceCandidatePairStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCIceCandidatePairStats + virtual String get_transportId() override; + virtual String get_localCandidateId() override; + virtual String get_remoteCandidateId() override; + virtual wrapper::org::ortc::RTCIceCandidatePairState get_state() override; + virtual unsigned long long get_priority() override; + virtual bool get_nominated() override; + virtual bool get_writable() override; + virtual bool get_readable() override; + virtual unsigned long long get_bytesSent() override; + virtual unsigned long long get_bytesReceived() override; + virtual double get_roundTripTime() override; + virtual double get_availableOutgoingBitrate() override; + virtual double get_availableIncomingBitrate() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp new file mode 100644 index 00000000..98dbcdce --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGatherInterfacePolicy.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::RTCIceGatherInterfacePolicy() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGatherInterfacePolicyPtr wrapper::org::ortc::RTCIceGatherInterfacePolicy::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::~RTCIceGatherInterfacePolicy() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::wrapper_init_org_ortc_RTCIceGatherInterfacePolicy() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::wrapper_init_org_ortc_RTCIceGatherInterfacePolicy(wrapper::org::ortc::RTCIceGatherInterfacePolicyPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::wrapper_init_org_ortc_RTCIceGatherInterfacePolicy(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h new file mode 100644 index 00000000..70d314bc --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGatherInterfacePolicy.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGatherInterfacePolicy : public wrapper::org::ortc::RTCIceGatherInterfacePolicy + { + RTCIceGatherInterfacePolicyWeakPtr thisWeak_; + + RTCIceGatherInterfacePolicy(); + virtual ~RTCIceGatherInterfacePolicy(); + + // methods RTCIceGatherInterfacePolicy + virtual void wrapper_init_org_ortc_RTCIceGatherInterfacePolicy() override; + virtual void wrapper_init_org_ortc_RTCIceGatherInterfacePolicy(wrapper::org::ortc::RTCIceGatherInterfacePolicyPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceGatherInterfacePolicy(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp new file mode 100644 index 00000000..fcda0e54 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGatherOptions.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherOptions::RTCIceGatherOptions() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGatherOptionsPtr wrapper::org::ortc::RTCIceGatherOptions::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherOptions::~RTCIceGatherOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherOptions::wrapper_init_org_ortc_RTCIceGatherOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherOptions::wrapper_init_org_ortc_RTCIceGatherOptions(wrapper::org::ortc::RTCIceGatherOptionsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherOptions::wrapper_init_org_ortc_RTCIceGatherOptions(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceGatherOptions::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGatherOptions::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h new file mode 100644 index 00000000..ea71979e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGatherOptions.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGatherOptions : public wrapper::org::ortc::RTCIceGatherOptions + { + RTCIceGatherOptionsWeakPtr thisWeak_; + + RTCIceGatherOptions(); + virtual ~RTCIceGatherOptions(); + + // methods RTCIceGatherOptions + virtual void wrapper_init_org_ortc_RTCIceGatherOptions() override; + virtual void wrapper_init_org_ortc_RTCIceGatherOptions(wrapper::org::ortc::RTCIceGatherOptionsPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceGatherOptions(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp new file mode 100644 index 00000000..b9b16fb2 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp @@ -0,0 +1,113 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGatherer.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherer::RTCIceGatherer() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererPtr wrapper::org::ortc::RTCIceGatherer::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherer::~RTCIceGatherer() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceGatherer::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherer::wrapper_init_org_ortc_RTCIceGatherer(wrapper::org::ortc::RTCIceGatherOptionsPtr options) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererPtr wrapper::impl::org::ortc::RTCIceGatherer::createAssociatedGatherer() +{ + wrapper::org::ortc::RTCIceGathererPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherer::gather() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherer::gather(wrapper::org::ortc::RTCIceGatherOptionsPtr options) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherer::close() +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCIceGatherer::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceGatherer::get_component() +{ + wrapper::org::ortc::RTCIceComponent result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererState wrapper::impl::org::ortc::RTCIceGatherer::get_state() +{ + wrapper::org::ortc::RTCIceGathererState result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceParametersPtr wrapper::impl::org::ortc::RTCIceGatherer::get_localParameters() +{ + wrapper::org::ortc::RTCIceParametersPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > wrapper::impl::org::ortc::RTCIceGatherer::get_localCandidates() +{ + shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGatherer::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h new file mode 100644 index 00000000..d997dd42 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h @@ -0,0 +1,45 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGatherer.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGatherer : public wrapper::org::ortc::RTCIceGatherer + { + RTCIceGathererWeakPtr thisWeak_; + + RTCIceGatherer(); + virtual ~RTCIceGatherer(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCIceGatherer + virtual void wrapper_init_org_ortc_RTCIceGatherer(wrapper::org::ortc::RTCIceGatherOptionsPtr options) override; + virtual wrapper::org::ortc::RTCIceGathererPtr createAssociatedGatherer() override; + virtual void gather() override; + virtual void gather(wrapper::org::ortc::RTCIceGatherOptionsPtr options) override; + virtual void close() override; + + // properties RTCIceGatherer + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::RTCIceComponent get_component() override; + virtual wrapper::org::ortc::RTCIceGathererState get_state() override; + virtual wrapper::org::ortc::RTCIceParametersPtr get_localParameters() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > get_localCandidates() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp new file mode 100644 index 00000000..904063dc --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp @@ -0,0 +1,72 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGathererCandidate.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererCandidate::RTCIceGathererCandidate() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererCandidatePtr wrapper::org::ortc::RTCIceGathererCandidate::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererCandidate::~RTCIceGathererCandidate() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererCandidate::wrapper_init_org_ortc_RTCIceGathererCandidate() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererCandidatePtr wrapper::org::ortc::RTCIceGathererCandidate::create(wrapper::org::ortc::JsonPtr json) +{ + wrapper::org::ortc::RTCIceGathererCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceGathererCandidate::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGathererCandidate::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceGathererCandidate::get_component() +{ + wrapper::org::ortc::RTCIceComponent result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h new file mode 100644 index 00000000..f04b6bc3 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h @@ -0,0 +1,34 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGathererCandidate.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGathererCandidate : public wrapper::org::ortc::RTCIceGathererCandidate + { + RTCIceGathererCandidateWeakPtr thisWeak_; + + RTCIceGathererCandidate(); + virtual ~RTCIceGathererCandidate(); + + // methods RTCIceGathererCandidate + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + virtual void wrapper_init_org_ortc_RTCIceGathererCandidate() override; + + // properties RTCIceGathererCandidate + virtual wrapper::org::ortc::RTCIceComponent get_component() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp new file mode 100644 index 00000000..c31868af --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::RTCIceGathererCandidateCompleteEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererCandidateCompleteEventPtr wrapper::org::ortc::RTCIceGathererCandidateCompleteEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::~RTCIceGathererCandidateCompleteEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::wrapper_init_org_ortc_RTCIceGathererCandidateCompleteEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::get_candidate() +{ + wrapper::org::ortc::RTCIceCandidateCompletePtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h new file mode 100644 index 00000000..62e8eb1f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGathererCandidateCompleteEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGathererCandidateCompleteEvent : public wrapper::org::ortc::RTCIceGathererCandidateCompleteEvent + { + RTCIceGathererCandidateCompleteEventWeakPtr thisWeak_; + + RTCIceGathererCandidateCompleteEvent(); + virtual ~RTCIceGathererCandidateCompleteEvent(); + virtual void wrapper_init_org_ortc_RTCIceGathererCandidateCompleteEvent() override; + + // properties RTCIceGathererCandidateCompleteEvent + virtual wrapper::org::ortc::RTCIceCandidateCompletePtr get_candidate() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp new file mode 100644 index 00000000..4f083ef6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp @@ -0,0 +1,58 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGathererCandidateEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::RTCIceGathererCandidateEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererCandidateEventPtr wrapper::org::ortc::RTCIceGathererCandidateEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::~RTCIceGathererCandidateEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::wrapper_init_org_ortc_RTCIceGathererCandidateEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::get_candidate() +{ + wrapper::org::ortc::RTCIceCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::get_url() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h new file mode 100644 index 00000000..f04883da --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h @@ -0,0 +1,31 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGathererCandidateEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGathererCandidateEvent : public wrapper::org::ortc::RTCIceGathererCandidateEvent + { + RTCIceGathererCandidateEventWeakPtr thisWeak_; + + RTCIceGathererCandidateEvent(); + virtual ~RTCIceGathererCandidateEvent(); + virtual void wrapper_init_org_ortc_RTCIceGathererCandidateEvent() override; + + // properties RTCIceGathererCandidateEvent + virtual wrapper::org::ortc::RTCIceCandidatePtr get_candidate() override; + virtual String get_url() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp new file mode 100644 index 00000000..0c54b0d4 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGathererIceErrorEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::RTCIceGathererIceErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererIceErrorEventPtr wrapper::org::ortc::RTCIceGathererIceErrorEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::~RTCIceGathererIceErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::wrapper_init_org_ortc_RTCIceGathererIceErrorEvent() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h new file mode 100644 index 00000000..f9041ef6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGathererIceErrorEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGathererIceErrorEvent : public wrapper::org::ortc::RTCIceGathererIceErrorEvent + { + RTCIceGathererIceErrorEventWeakPtr thisWeak_; + + RTCIceGathererIceErrorEvent(); + virtual ~RTCIceGathererIceErrorEvent(); + virtual void wrapper_init_org_ortc_RTCIceGathererIceErrorEvent() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp new file mode 100644 index 00000000..27990f3d --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGathererStateChangeEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::RTCIceGathererStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererStateChangeEventPtr wrapper::org::ortc::RTCIceGathererStateChangeEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::~RTCIceGathererStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::wrapper_init_org_ortc_RTCIceGathererStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererState wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::get_state() +{ + wrapper::org::ortc::RTCIceGathererState result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h new file mode 100644 index 00000000..7c0e147b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGathererStateChangeEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGathererStateChangeEvent : public wrapper::org::ortc::RTCIceGathererStateChangeEvent + { + RTCIceGathererStateChangeEventWeakPtr thisWeak_; + + RTCIceGathererStateChangeEvent(); + virtual ~RTCIceGathererStateChangeEvent(); + virtual void wrapper_init_org_ortc_RTCIceGathererStateChangeEvent() override; + + // properties RTCIceGathererStateChangeEvent + virtual wrapper::org::ortc::RTCIceGathererState get_state() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp new file mode 100644 index 00000000..71337d5b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp @@ -0,0 +1,117 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceGathererStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererStats::RTCIceGathererStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererStatsPtr wrapper::org::ortc::RTCIceGathererStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererStats::~RTCIceGathererStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceGathererStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGathererStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCIceGathererStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCIceGathererStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGathererStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGathererStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererStats::wrapper_init_org_ortc_RTCIceGathererStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererStats::wrapper_init_org_ortc_RTCIceGathererStats(wrapper::org::ortc::RTCIceGathererStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererStats::wrapper_init_org_ortc_RTCIceGathererStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCIceGathererStats::get_bytesSent() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCIceGathererStats::get_bytesReceived() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGathererStats::get_rtcpGathererStatsId() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h new file mode 100644 index 00000000..53b7bfce --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h @@ -0,0 +1,46 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceGathererStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceGathererStats : public wrapper::org::ortc::RTCIceGathererStats + { + RTCIceGathererStatsWeakPtr thisWeak_; + + RTCIceGathererStats(); + virtual ~RTCIceGathererStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCIceGathererStats + virtual void wrapper_init_org_ortc_RTCIceGathererStats() override; + virtual void wrapper_init_org_ortc_RTCIceGathererStats(wrapper::org::ortc::RTCIceGathererStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceGathererStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCIceGathererStats + virtual unsigned long long get_bytesSent() override; + virtual unsigned long long get_bytesReceived() override; + virtual String get_rtcpGathererStatsId() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp new file mode 100644 index 00000000..89c0173f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceParameters::RTCIceParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceParametersPtr wrapper::org::ortc::RTCIceParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceParameters::~RTCIceParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceParameters::wrapper_init_org_ortc_RTCIceParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceParameters::wrapper_init_org_ortc_RTCIceParameters(wrapper::org::ortc::RTCIceParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceParameters::wrapper_init_org_ortc_RTCIceParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h new file mode 100644 index 00000000..cedcbc79 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceParameters : public wrapper::org::ortc::RTCIceParameters + { + RTCIceParametersWeakPtr thisWeak_; + + RTCIceParameters(); + virtual ~RTCIceParameters(); + + // methods RTCIceParameters + virtual void wrapper_init_org_ortc_RTCIceParameters() override; + virtual void wrapper_init_org_ortc_RTCIceParameters(wrapper::org::ortc::RTCIceParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp new file mode 100644 index 00000000..2234772e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceServer.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceServer::RTCIceServer() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceServerPtr wrapper::org::ortc::RTCIceServer::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceServer::~RTCIceServer() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceServer::wrapper_init_org_ortc_RTCIceServer() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceServer::wrapper_init_org_ortc_RTCIceServer(wrapper::org::ortc::RTCIceServerPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceServer::wrapper_init_org_ortc_RTCIceServer(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceServer::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceServer::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h new file mode 100644 index 00000000..3a386603 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceServer.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceServer : public wrapper::org::ortc::RTCIceServer + { + RTCIceServerWeakPtr thisWeak_; + + RTCIceServer(); + virtual ~RTCIceServer(); + + // methods RTCIceServer + virtual void wrapper_init_org_ortc_RTCIceServer() override; + virtual void wrapper_init_org_ortc_RTCIceServer(wrapper::org::ortc::RTCIceServerPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceServer(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp new file mode 100644 index 00000000..e03615d6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp @@ -0,0 +1,183 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceTransport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransport::RTCIceTransport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportPtr wrapper::org::ortc::RTCIceTransport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransport::~RTCIceTransport() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::wrapper_init_org_ortc_RTCIceTransport() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::wrapper_init_org_ortc_RTCIceTransport(wrapper::org::ortc::RTCIceGathererPtr gatherer) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::start( + wrapper::org::ortc::RTCIceGathererPtr gatherer, + wrapper::org::ortc::RTCIceParametersPtr remoteParameters + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::start( + wrapper::org::ortc::RTCIceGathererPtr gatherer, + wrapper::org::ortc::RTCIceParametersPtr remoteParameters, + wrapper::org::ortc::RTCIceRole options + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::start( + wrapper::org::ortc::RTCIceGathererPtr gatherer, + wrapper::org::ortc::RTCIceParametersPtr remoteParameters, + wrapper::org::ortc::RTCIceTransportOptionsPtr options + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::stop() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportPtr wrapper::impl::org::ortc::RTCIceTransport::createAssociatedTransport() +{ + wrapper::org::ortc::RTCIceTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::addRemoteCandidate(wrapper::org::ortc::RTCIceGathererCandidatePtr remoteCandidate) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::setRemoteCandidates(shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > remoteCandidates) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::removeRemoteCandidate(wrapper::org::ortc::RTCIceGathererCandidatePtr remoteCandidate) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::keepWarm(wrapper::org::ortc::RTCIceCandidatePairPtr candidatePair) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::keepWarm( + wrapper::org::ortc::RTCIceCandidatePairPtr candidatePair, + bool keepWarm + ) +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCIceTransport::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererPtr wrapper::impl::org::ortc::RTCIceTransport::get_gatherer() +{ + wrapper::org::ortc::RTCIceGathererPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceRole wrapper::impl::org::ortc::RTCIceTransport::get_role() +{ + wrapper::org::ortc::RTCIceRole result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceTransport::get_component() +{ + wrapper::org::ortc::RTCIceComponent result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportState wrapper::impl::org::ortc::RTCIceTransport::get_state() +{ + wrapper::org::ortc::RTCIceTransportState result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > wrapper::impl::org::ortc::RTCIceTransport::get_remoteCandidates() +{ + shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > wrapper::impl::org::ortc::RTCIceTransport::get_selectedCandidatePair() +{ + shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceParametersPtr wrapper::impl::org::ortc::RTCIceTransport::get_remoteParameters() +{ + wrapper::org::ortc::RTCIceParametersPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransport::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h new file mode 100644 index 00000000..ccfd379b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h @@ -0,0 +1,69 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceTransport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceTransport : public wrapper::org::ortc::RTCIceTransport + { + RTCIceTransportWeakPtr thisWeak_; + + RTCIceTransport(); + virtual ~RTCIceTransport(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCIceTransport + virtual void wrapper_init_org_ortc_RTCIceTransport() override; + virtual void wrapper_init_org_ortc_RTCIceTransport(wrapper::org::ortc::RTCIceGathererPtr gatherer) override; + virtual void start( + wrapper::org::ortc::RTCIceGathererPtr gatherer, + wrapper::org::ortc::RTCIceParametersPtr remoteParameters + ) override; + virtual void start( + wrapper::org::ortc::RTCIceGathererPtr gatherer, + wrapper::org::ortc::RTCIceParametersPtr remoteParameters, + wrapper::org::ortc::RTCIceRole options + ) override; + virtual void start( + wrapper::org::ortc::RTCIceGathererPtr gatherer, + wrapper::org::ortc::RTCIceParametersPtr remoteParameters, + wrapper::org::ortc::RTCIceTransportOptionsPtr options + ) override; + virtual void stop() override; + virtual wrapper::org::ortc::RTCIceTransportPtr createAssociatedTransport() override; + virtual void addRemoteCandidate(wrapper::org::ortc::RTCIceGathererCandidatePtr remoteCandidate) override; + virtual void setRemoteCandidates(shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > remoteCandidates) override; + virtual void removeRemoteCandidate(wrapper::org::ortc::RTCIceGathererCandidatePtr remoteCandidate) override; + virtual void keepWarm(wrapper::org::ortc::RTCIceCandidatePairPtr candidatePair) override; + virtual void keepWarm( + wrapper::org::ortc::RTCIceCandidatePairPtr candidatePair, + bool keepWarm + ) override; + + // properties RTCIceTransport + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::RTCIceGathererPtr get_gatherer() override; + virtual wrapper::org::ortc::RTCIceRole get_role() override; + virtual wrapper::org::ortc::RTCIceComponent get_component() override; + virtual wrapper::org::ortc::RTCIceTransportState get_state() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > get_remoteCandidates() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > get_selectedCandidatePair() override; + virtual wrapper::org::ortc::RTCIceParametersPtr get_remoteParameters() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp new file mode 100644 index 00000000..83a27e2c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp @@ -0,0 +1,71 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceTransportController.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportController::RTCIceTransportController() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportControllerPtr wrapper::org::ortc::RTCIceTransportController::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportController::~RTCIceTransportController() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportController::wrapper_init_org_ortc_RTCIceTransportController() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportController::addTransport(wrapper::org::ortc::RTCIceTransportPtr transport) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportController::addTransport( + wrapper::org::ortc::RTCIceTransportPtr transport, + uint64_t index + ) +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCIceTransportController::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCIceTransportPtr > > wrapper::impl::org::ortc::RTCIceTransportController::get_transports() +{ + shared_ptr< list< wrapper::org::ortc::RTCIceTransportPtr > > result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h new file mode 100644 index 00000000..422266b9 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h @@ -0,0 +1,38 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceTransportController.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceTransportController : public wrapper::org::ortc::RTCIceTransportController + { + RTCIceTransportControllerWeakPtr thisWeak_; + + RTCIceTransportController(); + virtual ~RTCIceTransportController(); + + // methods RTCIceTransportController + virtual void wrapper_init_org_ortc_RTCIceTransportController() override; + virtual void addTransport(wrapper::org::ortc::RTCIceTransportPtr transport) override; + virtual void addTransport( + wrapper::org::ortc::RTCIceTransportPtr transport, + uint64_t index + ) override; + + // properties RTCIceTransportController + virtual uint64_t get_objectId() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCIceTransportPtr > > get_transports() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp new file mode 100644 index 00000000..0cca2151 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceTransportOptions.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportOptions::RTCIceTransportOptions() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportOptionsPtr wrapper::org::ortc::RTCIceTransportOptions::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportOptions::~RTCIceTransportOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportOptions::wrapper_init_org_ortc_RTCIceTransportOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportOptions::wrapper_init_org_ortc_RTCIceTransportOptions(wrapper::org::ortc::RTCIceTransportOptionsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportOptions::wrapper_init_org_ortc_RTCIceTransportOptions(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceTransportOptions::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceTransportOptions::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h new file mode 100644 index 00000000..e1433ed0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceTransportOptions.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceTransportOptions : public wrapper::org::ortc::RTCIceTransportOptions + { + RTCIceTransportOptionsWeakPtr thisWeak_; + + RTCIceTransportOptions(); + virtual ~RTCIceTransportOptions(); + + // methods RTCIceTransportOptions + virtual void wrapper_init_org_ortc_RTCIceTransportOptions() override; + virtual void wrapper_init_org_ortc_RTCIceTransportOptions(wrapper::org::ortc::RTCIceTransportOptionsPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceTransportOptions(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp new file mode 100644 index 00000000..002b37d0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceTransportStateChangeEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::RTCIceTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportStateChangeEventPtr wrapper::org::ortc::RTCIceTransportStateChangeEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::~RTCIceTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::wrapper_init_org_ortc_RTCIceTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportState wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::get_state() +{ + wrapper::org::ortc::RTCIceTransportState result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h new file mode 100644 index 00000000..824c9513 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceTransportStateChangeEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceTransportStateChangeEvent : public wrapper::org::ortc::RTCIceTransportStateChangeEvent + { + RTCIceTransportStateChangeEventWeakPtr thisWeak_; + + RTCIceTransportStateChangeEvent(); + virtual ~RTCIceTransportStateChangeEvent(); + virtual void wrapper_init_org_ortc_RTCIceTransportStateChangeEvent() override; + + // properties RTCIceTransportStateChangeEvent + virtual wrapper::org::ortc::RTCIceTransportState get_state() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp new file mode 100644 index 00000000..43447eaf --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp @@ -0,0 +1,131 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIceTransportStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportStats::RTCIceTransportStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportStatsPtr wrapper::org::ortc::RTCIceTransportStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportStats::~RTCIceTransportStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceTransportStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceTransportStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCIceTransportStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCIceTransportStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceTransportStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceTransportStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportStats::wrapper_init_org_ortc_RTCIceTransportStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportStats::wrapper_init_org_ortc_RTCIceTransportStats(wrapper::org::ortc::RTCIceTransportStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceTransportStats::wrapper_init_org_ortc_RTCIceTransportStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCIceTransportStats::get_bytesSent() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCIceTransportStats::get_bytesReceived() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceTransportStats::get_rtcpTransportStatsId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCIceTransportStats::get_activeConnection() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceTransportStats::get_selectedCandidatePairId() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h new file mode 100644 index 00000000..b6fff244 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h @@ -0,0 +1,48 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIceTransportStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIceTransportStats : public wrapper::org::ortc::RTCIceTransportStats + { + RTCIceTransportStatsWeakPtr thisWeak_; + + RTCIceTransportStats(); + virtual ~RTCIceTransportStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCIceTransportStats + virtual void wrapper_init_org_ortc_RTCIceTransportStats() override; + virtual void wrapper_init_org_ortc_RTCIceTransportStats(wrapper::org::ortc::RTCIceTransportStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCIceTransportStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCIceTransportStats + virtual unsigned long long get_bytesSent() override; + virtual unsigned long long get_bytesReceived() override; + virtual String get_rtcpTransportStatsId() override; + virtual bool get_activeConnection() override; + virtual String get_selectedCandidatePairId() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp new file mode 100644 index 00000000..a7daa96d --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp @@ -0,0 +1,93 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIdentity.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentity::RTCIdentity() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIdentityPtr wrapper::org::ortc::RTCIdentity::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentity::~RTCIdentity() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIdentity::wrapper_init_org_ortc_RTCIdentity(wrapper::org::ortc::RTCDtlsTransportPtr transport) +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion(String provider) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( + String provider, + String protocol + ) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( + String provider, + String protocol, + String username + ) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityAssertionPtr > > wrapper::impl::org::ortc::RTCIdentity::setIdentityAssertion(String assertion) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityAssertionPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCIdentity::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIdentityAssertionPtr wrapper::impl::org::ortc::RTCIdentity::get_peerIdentity() +{ + wrapper::org::ortc::RTCIdentityAssertionPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h new file mode 100644 index 00000000..f0525e7b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIdentity.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIdentity : public wrapper::org::ortc::RTCIdentity + { + RTCIdentityWeakPtr thisWeak_; + + RTCIdentity(); + virtual ~RTCIdentity(); + + // methods RTCIdentity + virtual void wrapper_init_org_ortc_RTCIdentity(wrapper::org::ortc::RTCDtlsTransportPtr transport) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion(String provider) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( + String provider, + String protocol + ) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( + String provider, + String protocol, + String username + ) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityAssertionPtr > > setIdentityAssertion(String assertion) override; + + // properties RTCIdentity + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::RTCIdentityAssertionPtr get_peerIdentity() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp new file mode 100644 index 00000000..feaaa8e3 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIdentityAssertion.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityAssertion::RTCIdentityAssertion() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIdentityAssertionPtr wrapper::org::ortc::RTCIdentityAssertion::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityAssertion::~RTCIdentityAssertion() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIdentityAssertion::wrapper_init_org_ortc_RTCIdentityAssertion() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h new file mode 100644 index 00000000..634df220 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIdentityAssertion.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIdentityAssertion : public wrapper::org::ortc::RTCIdentityAssertion + { + RTCIdentityAssertionWeakPtr thisWeak_; + + RTCIdentityAssertion(); + virtual ~RTCIdentityAssertion(); + virtual void wrapper_init_org_ortc_RTCIdentityAssertion() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp new file mode 100644 index 00000000..f34aeb55 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIdentityError.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityError::RTCIdentityError() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIdentityErrorPtr wrapper::org::ortc::RTCIdentityError::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityError::~RTCIdentityError() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIdentityError::wrapper_init_org_ortc_RTCIdentityError() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h new file mode 100644 index 00000000..9e4ee681 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIdentityError.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIdentityError : public wrapper::org::ortc::RTCIdentityError + { + RTCIdentityErrorWeakPtr thisWeak_; + + RTCIdentityError(); + virtual ~RTCIdentityError(); + virtual void wrapper_init_org_ortc_RTCIdentityError() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp new file mode 100644 index 00000000..cb1c47c4 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCIdentityResult.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityResult::RTCIdentityResult() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIdentityResultPtr wrapper::org::ortc::RTCIdentityResult::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityResult::~RTCIdentityResult() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIdentityResult::wrapper_init_org_ortc_RTCIdentityResult() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h new file mode 100644 index 00000000..7a28dee5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCIdentityResult.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCIdentityResult : public wrapper::org::ortc::RTCIdentityResult + { + RTCIdentityResultWeakPtr thisWeak_; + + RTCIdentityResult(); + virtual ~RTCIdentityResult(); + virtual void wrapper_init_org_ortc_RTCIdentityResult() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp new file mode 100644 index 00000000..a972b590 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp @@ -0,0 +1,215 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCInboundRtpStreamStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCInboundRtpStreamStats::RTCInboundRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCInboundRtpStreamStatsPtr wrapper::org::ortc::RTCInboundRtpStreamStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCInboundRtpStreamStats::~RTCInboundRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCInboundRtpStreamStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< uint32_t > wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_ssrc() +{ + Optional< uint32_t > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_associatedStatId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_isRemote() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_mediaType() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_mediaTrackId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_transportId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_codecId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_firCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_pliCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_nackCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_sliCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCInboundRtpStreamStats::wrapper_init_org_ortc_RTCInboundRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCInboundRtpStreamStats::wrapper_init_org_ortc_RTCInboundRtpStreamStats(wrapper::org::ortc::RTCInboundRtpStreamStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCInboundRtpStreamStats::wrapper_init_org_ortc_RTCInboundRtpStreamStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_packetsReceived() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_bytesReceived() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_packetsLost() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_jitter() +{ + double result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_fractionLost() +{ + double result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Milliseconds wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_endToEndDelay() +{ + ::zsLib::Milliseconds result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h new file mode 100644 index 00000000..e7b11381 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h @@ -0,0 +1,62 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCInboundRtpStreamStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCInboundRtpStreamStats : public wrapper::org::ortc::RTCInboundRtpStreamStats + { + RTCInboundRtpStreamStatsWeakPtr thisWeak_; + + RTCInboundRtpStreamStats(); + virtual ~RTCInboundRtpStreamStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // properties RTCRtpStreamStats + virtual Optional< uint32_t > get_ssrc() override; + virtual String get_associatedStatId() override; + virtual bool get_isRemote() override; + virtual String get_mediaType() override; + virtual String get_mediaTrackId() override; + virtual String get_transportId() override; + virtual String get_codecId() override; + virtual unsigned long get_firCount() override; + virtual unsigned long get_pliCount() override; + virtual unsigned long get_nackCount() override; + virtual unsigned long get_sliCount() override; + + // methods RTCInboundRtpStreamStats + virtual void wrapper_init_org_ortc_RTCInboundRtpStreamStats() override; + virtual void wrapper_init_org_ortc_RTCInboundRtpStreamStats(wrapper::org::ortc::RTCInboundRtpStreamStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCInboundRtpStreamStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCInboundRtpStreamStats + virtual unsigned long get_packetsReceived() override; + virtual unsigned long long get_bytesReceived() override; + virtual unsigned long get_packetsLost() override; + virtual double get_jitter() override; + virtual double get_fractionLost() override; + virtual ::zsLib::Milliseconds get_endToEndDelay() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp new file mode 100644 index 00000000..30be1d07 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp @@ -0,0 +1,110 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCMediaStreamStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMediaStreamStats::RTCMediaStreamStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCMediaStreamStatsPtr wrapper::org::ortc::RTCMediaStreamStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMediaStreamStats::~RTCMediaStreamStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCMediaStreamStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMediaStreamStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCMediaStreamStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCMediaStreamStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMediaStreamStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMediaStreamStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCMediaStreamStats::wrapper_init_org_ortc_RTCMediaStreamStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCMediaStreamStats::wrapper_init_org_ortc_RTCMediaStreamStats(wrapper::org::ortc::RTCMediaStreamStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCMediaStreamStats::wrapper_init_org_ortc_RTCMediaStreamStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMediaStreamStats::get_streamId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< String > > wrapper::impl::org::ortc::RTCMediaStreamStats::get_trackIds() +{ + shared_ptr< list< String > > result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h new file mode 100644 index 00000000..46bf443f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h @@ -0,0 +1,45 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCMediaStreamStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCMediaStreamStats : public wrapper::org::ortc::RTCMediaStreamStats + { + RTCMediaStreamStatsWeakPtr thisWeak_; + + RTCMediaStreamStats(); + virtual ~RTCMediaStreamStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCMediaStreamStats + virtual void wrapper_init_org_ortc_RTCMediaStreamStats() override; + virtual void wrapper_init_org_ortc_RTCMediaStreamStats(wrapper::org::ortc::RTCMediaStreamStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCMediaStreamStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCMediaStreamStats + virtual String get_streamId() override; + virtual shared_ptr< list< String > > get_trackIds() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp new file mode 100644 index 00000000..6800cc51 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp @@ -0,0 +1,194 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCMediaStreamTrackStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMediaStreamTrackStats::RTCMediaStreamTrackStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCMediaStreamTrackStatsPtr wrapper::org::ortc::RTCMediaStreamTrackStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCMediaStreamTrackStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMediaStreamTrackStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCMediaStreamTrackStats::wrapper_init_org_ortc_RTCMediaStreamTrackStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCMediaStreamTrackStats::wrapper_init_org_ortc_RTCMediaStreamTrackStats(wrapper::org::ortc::RTCMediaStreamTrackStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCMediaStreamTrackStats::wrapper_init_org_ortc_RTCMediaStreamTrackStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_trackId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_remoteSource() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< uint32_t > > wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_ssrcIds() +{ + shared_ptr< list< uint32_t > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_frameWidth() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_frameHeight() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesPerSecond() +{ + double result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesSent() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesReceived() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesDecoded() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesDropped() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesCorrupted() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_audioLevel() +{ + double result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_echoReturnLoss() +{ + double result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_echoReturnLossEnhancement() +{ + double result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h new file mode 100644 index 00000000..ee8bcff0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h @@ -0,0 +1,57 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCMediaStreamTrackStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCMediaStreamTrackStats : public wrapper::org::ortc::RTCMediaStreamTrackStats + { + RTCMediaStreamTrackStatsWeakPtr thisWeak_; + + RTCMediaStreamTrackStats(); + virtual ~RTCMediaStreamTrackStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCMediaStreamTrackStats + virtual void wrapper_init_org_ortc_RTCMediaStreamTrackStats() override; + virtual void wrapper_init_org_ortc_RTCMediaStreamTrackStats(wrapper::org::ortc::RTCMediaStreamTrackStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCMediaStreamTrackStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCMediaStreamTrackStats + virtual String get_trackId() override; + virtual bool get_remoteSource() override; + virtual shared_ptr< list< uint32_t > > get_ssrcIds() override; + virtual unsigned long get_frameWidth() override; + virtual unsigned long get_frameHeight() override; + virtual double get_framesPerSecond() override; + virtual unsigned long get_framesSent() override; + virtual unsigned long get_framesReceived() override; + virtual unsigned long get_framesDecoded() override; + virtual unsigned long get_framesDropped() override; + virtual unsigned long get_framesCorrupted() override; + virtual double get_audioLevel() override; + virtual double get_echoReturnLoss() override; + virtual double get_echoReturnLossEnhancement() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp new file mode 100644 index 00000000..86ae074b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCMessageEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMessageEvent::RTCMessageEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCMessageEventPtr wrapper::org::ortc::RTCMessageEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMessageEvent::~RTCMessageEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCMessageEvent::wrapper_init_org_ortc_RTCMessageEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCMessageEventDataPtr wrapper::impl::org::ortc::RTCMessageEvent::get_data() +{ + wrapper::org::ortc::RTCMessageEventDataPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h new file mode 100644 index 00000000..5da23dbb --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCMessageEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCMessageEvent : public wrapper::org::ortc::RTCMessageEvent + { + RTCMessageEventWeakPtr thisWeak_; + + RTCMessageEvent(); + virtual ~RTCMessageEvent(); + virtual void wrapper_init_org_ortc_RTCMessageEvent() override; + + // properties RTCMessageEvent + virtual wrapper::org::ortc::RTCMessageEventDataPtr get_data() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp new file mode 100644 index 00000000..2d1088df --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp @@ -0,0 +1,58 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCMessageEventData.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMessageEventData::RTCMessageEventData() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCMessageEventDataPtr wrapper::org::ortc::RTCMessageEventData::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMessageEventData::~RTCMessageEventData() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCMessageEventData::wrapper_init_org_ortc_RTCMessageEventData() +{ +} + +//------------------------------------------------------------------------------ +SecureByteBlockPtr wrapper::impl::org::ortc::RTCMessageEventData::get_binary() +{ + SecureByteBlockPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCMessageEventData::get_text() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.h b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.h new file mode 100644 index 00000000..cdd3a793 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.h @@ -0,0 +1,31 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCMessageEventData.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCMessageEventData : public wrapper::org::ortc::RTCMessageEventData + { + RTCMessageEventDataWeakPtr thisWeak_; + + RTCMessageEventData(); + virtual ~RTCMessageEventData(); + virtual void wrapper_init_org_ortc_RTCMessageEventData() override; + + // properties RTCMessageEventData + virtual SecureByteBlockPtr get_binary() override; + virtual String get_text() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp new file mode 100644 index 00000000..54a3f455 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp @@ -0,0 +1,201 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCOutboundRtpStreamStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::RTCOutboundRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCOutboundRtpStreamStatsPtr wrapper::org::ortc::RTCOutboundRtpStreamStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::~RTCOutboundRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< uint32_t > wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_ssrc() +{ + Optional< uint32_t > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_associatedStatId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_isRemote() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_mediaType() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_mediaTrackId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_transportId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_codecId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_firCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_pliCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_nackCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_sliCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::wrapper_init_org_ortc_RTCOutboundRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::wrapper_init_org_ortc_RTCOutboundRtpStreamStats(wrapper::org::ortc::RTCOutboundRtpStreamStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::wrapper_init_org_ortc_RTCOutboundRtpStreamStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_packetsSent() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_bytesSent() +{ + unsigned long long result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_targetBitrate() +{ + double result {}; + return result; +} + +//------------------------------------------------------------------------------ +double wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_roundTripTime() +{ + double result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h new file mode 100644 index 00000000..b3665fb3 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h @@ -0,0 +1,60 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCOutboundRtpStreamStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCOutboundRtpStreamStats : public wrapper::org::ortc::RTCOutboundRtpStreamStats + { + RTCOutboundRtpStreamStatsWeakPtr thisWeak_; + + RTCOutboundRtpStreamStats(); + virtual ~RTCOutboundRtpStreamStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // properties RTCRtpStreamStats + virtual Optional< uint32_t > get_ssrc() override; + virtual String get_associatedStatId() override; + virtual bool get_isRemote() override; + virtual String get_mediaType() override; + virtual String get_mediaTrackId() override; + virtual String get_transportId() override; + virtual String get_codecId() override; + virtual unsigned long get_firCount() override; + virtual unsigned long get_pliCount() override; + virtual unsigned long get_nackCount() override; + virtual unsigned long get_sliCount() override; + + // methods RTCOutboundRtpStreamStats + virtual void wrapper_init_org_ortc_RTCOutboundRtpStreamStats() override; + virtual void wrapper_init_org_ortc_RTCOutboundRtpStreamStats(wrapper::org::ortc::RTCOutboundRtpStreamStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCOutboundRtpStreamStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCOutboundRtpStreamStats + virtual unsigned long get_packetsSent() override; + virtual unsigned long long get_bytesSent() override; + virtual double get_targetBitrate() override; + virtual double get_roundTripTime() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp new file mode 100644 index 00000000..b8d6b70c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtcpFeedback.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtcpFeedback::RTCRtcpFeedback() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtcpFeedbackPtr wrapper::org::ortc::RTCRtcpFeedback::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtcpFeedback::~RTCRtcpFeedback() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtcpFeedback::wrapper_init_org_ortc_RTCRtcpFeedback() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtcpFeedback::wrapper_init_org_ortc_RTCRtcpFeedback(wrapper::org::ortc::RTCRtcpFeedbackPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtcpFeedback::wrapper_init_org_ortc_RTCRtcpFeedback(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtcpFeedback::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtcpFeedback::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h new file mode 100644 index 00000000..e8481144 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtcpFeedback.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtcpFeedback : public wrapper::org::ortc::RTCRtcpFeedback + { + RTCRtcpFeedbackWeakPtr thisWeak_; + + RTCRtcpFeedback(); + virtual ~RTCRtcpFeedback(); + + // methods RTCRtcpFeedback + virtual void wrapper_init_org_ortc_RTCRtcpFeedback() override; + virtual void wrapper_init_org_ortc_RTCRtcpFeedback(wrapper::org::ortc::RTCRtcpFeedbackPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtcpFeedback(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp new file mode 100644 index 00000000..c3d5aedb --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtcpParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtcpParameters::RTCRtcpParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtcpParametersPtr wrapper::org::ortc::RTCRtcpParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtcpParameters::~RTCRtcpParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtcpParameters::wrapper_init_org_ortc_RTCRtcpParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtcpParameters::wrapper_init_org_ortc_RTCRtcpParameters(wrapper::org::ortc::RTCRtcpParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtcpParameters::wrapper_init_org_ortc_RTCRtcpParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtcpParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtcpParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h new file mode 100644 index 00000000..dc0ee686 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtcpParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtcpParameters : public wrapper::org::ortc::RTCRtcpParameters + { + RTCRtcpParametersWeakPtr thisWeak_; + + RTCRtcpParameters(); + virtual ~RTCRtcpParameters(); + + // methods RTCRtcpParameters + virtual void wrapper_init_org_ortc_RTCRtcpParameters() override; + virtual void wrapper_init_org_ortc_RTCRtcpParameters(wrapper::org::ortc::RTCRtcpParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtcpParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp new file mode 100644 index 00000000..a4e5fe29 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtcpTransport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtcpTransport::RTCRtcpTransport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtcpTransportPtr wrapper::org::ortc::RTCRtcpTransport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtcpTransport::~RTCRtcpTransport() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtcpTransport::wrapper_init_org_ortc_RTCRtcpTransport() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h new file mode 100644 index 00000000..e706e978 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtcpTransport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtcpTransport : public wrapper::org::ortc::RTCRtcpTransport + { + RTCRtcpTransportWeakPtr thisWeak_; + + RTCRtcpTransport(); + virtual ~RTCRtcpTransport(); + virtual void wrapper_init_org_ortc_RTCRtcpTransport() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp new file mode 100644 index 00000000..20cf3c1c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpCapabilities.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCapabilities::RTCRtpCapabilities() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::org::ortc::RTCRtpCapabilities::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCapabilities::~RTCRtpCapabilities() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCapabilities::wrapper_init_org_ortc_RTCRtpCapabilities() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCapabilities::wrapper_init_org_ortc_RTCRtpCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCapabilities::wrapper_init_org_ortc_RTCRtpCapabilities(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpCapabilities::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpCapabilities::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h new file mode 100644 index 00000000..e0ad8131 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpCapabilities.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpCapabilities : public wrapper::org::ortc::RTCRtpCapabilities + { + RTCRtpCapabilitiesWeakPtr thisWeak_; + + RTCRtpCapabilities(); + virtual ~RTCRtpCapabilities(); + + // methods RTCRtpCapabilities + virtual void wrapper_init_org_ortc_RTCRtpCapabilities() override; + virtual void wrapper_init_org_ortc_RTCRtpCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpCapabilities(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp new file mode 100644 index 00000000..01e1977c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpCodecCapability.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecCapability::RTCRtpCodecCapability() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCodecCapabilityPtr wrapper::org::ortc::RTCRtpCodecCapability::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecCapability::~RTCRtpCodecCapability() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCodecCapability::wrapper_init_org_ortc_RTCRtpCodecCapability() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCodecCapability::wrapper_init_org_ortc_RTCRtpCodecCapability(wrapper::org::ortc::RTCRtpCodecCapabilityPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCodecCapability::wrapper_init_org_ortc_RTCRtpCodecCapability(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpCodecCapability::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpCodecCapability::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h new file mode 100644 index 00000000..7b26329c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpCodecCapability.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpCodecCapability : public wrapper::org::ortc::RTCRtpCodecCapability + { + RTCRtpCodecCapabilityWeakPtr thisWeak_; + + RTCRtpCodecCapability(); + virtual ~RTCRtpCodecCapability(); + + // methods RTCRtpCodecCapability + virtual void wrapper_init_org_ortc_RTCRtpCodecCapability() override; + virtual void wrapper_init_org_ortc_RTCRtpCodecCapability(wrapper::org::ortc::RTCRtpCodecCapabilityPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpCodecCapability(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp new file mode 100644 index 00000000..6423ffbe --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpCodecCapabilityOptions.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::RTCRtpCodecCapabilityOptions() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCodecCapabilityOptionsPtr wrapper::org::ortc::RTCRtpCodecCapabilityOptions::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::~RTCRtpCodecCapabilityOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::wrapper_init_org_ortc_RTCRtpCodecCapabilityOptions() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h new file mode 100644 index 00000000..bf8d2ec0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpCodecCapabilityOptions.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpCodecCapabilityOptions : public wrapper::org::ortc::RTCRtpCodecCapabilityOptions + { + RTCRtpCodecCapabilityOptionsWeakPtr thisWeak_; + + RTCRtpCodecCapabilityOptions(); + virtual ~RTCRtpCodecCapabilityOptions(); + virtual void wrapper_init_org_ortc_RTCRtpCodecCapabilityOptions() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp new file mode 100644 index 00000000..e913200e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpCodecCapabilityParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::RTCRtpCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCodecCapabilityParametersPtr wrapper::org::ortc::RTCRtpCodecCapabilityParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::~RTCRtpCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpCodecCapabilityParameters() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h new file mode 100644 index 00000000..1e8565fa --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpCodecCapabilityParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpCodecCapabilityParameters : public wrapper::org::ortc::RTCRtpCodecCapabilityParameters + { + RTCRtpCodecCapabilityParametersWeakPtr thisWeak_; + + RTCRtpCodecCapabilityParameters(); + virtual ~RTCRtpCodecCapabilityParameters(); + virtual void wrapper_init_org_ortc_RTCRtpCodecCapabilityParameters() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp new file mode 100644 index 00000000..bf4a71e4 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpCodecParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecParameters::RTCRtpCodecParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCodecParametersPtr wrapper::org::ortc::RTCRtpCodecParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecParameters::~RTCRtpCodecParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCodecParameters::wrapper_init_org_ortc_RTCRtpCodecParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCodecParameters::wrapper_init_org_ortc_RTCRtpCodecParameters(wrapper::org::ortc::RTCRtpCodecParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpCodecParameters::wrapper_init_org_ortc_RTCRtpCodecParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpCodecParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpCodecParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h new file mode 100644 index 00000000..e687b398 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpCodecParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpCodecParameters : public wrapper::org::ortc::RTCRtpCodecParameters + { + RTCRtpCodecParametersWeakPtr thisWeak_; + + RTCRtpCodecParameters(); + virtual ~RTCRtpCodecParameters(); + + // methods RTCRtpCodecParameters + virtual void wrapper_init_org_ortc_RTCRtpCodecParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpCodecParameters(wrapper::org::ortc::RTCRtpCodecParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpCodecParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp new file mode 100644 index 00000000..e65e1299 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpContributingSource.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpContributingSource::RTCRtpContributingSource() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpContributingSourcePtr wrapper::org::ortc::RTCRtpContributingSource::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpContributingSource::~RTCRtpContributingSource() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpContributingSource::wrapper_init_org_ortc_RTCRtpContributingSource() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpContributingSource::wrapper_init_org_ortc_RTCRtpContributingSource(wrapper::org::ortc::RTCRtpContributingSourcePtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpContributingSource::wrapper_init_org_ortc_RTCRtpContributingSource(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpContributingSource::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpContributingSource::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h new file mode 100644 index 00000000..6a856b2a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpContributingSource.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpContributingSource : public wrapper::org::ortc::RTCRtpContributingSource + { + RTCRtpContributingSourceWeakPtr thisWeak_; + + RTCRtpContributingSource(); + virtual ~RTCRtpContributingSource(); + + // methods RTCRtpContributingSource + virtual void wrapper_init_org_ortc_RTCRtpContributingSource() override; + virtual void wrapper_init_org_ortc_RTCRtpContributingSource(wrapper::org::ortc::RTCRtpContributingSourcePtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpContributingSource(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp new file mode 100644 index 00000000..0b187a74 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp @@ -0,0 +1,113 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpDtmfSender.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpDtmfSender::RTCRtpDtmfSender() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpDtmfSenderPtr wrapper::org::ortc::RTCRtpDtmfSender::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpDtmfSender::~RTCRtpDtmfSender() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpDtmfSender::wrapper_init_org_ortc_RTCRtpDtmfSender(wrapper::org::ortc::RTCRtpSenderPtr sender) +{ +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCRtpDtmfSender::canInsertDtmf() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpDtmfSender::insertDtmf(String tones) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpDtmfSender::insertDtmf( + String tones, + ::zsLib::Milliseconds duration + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpDtmfSender::insertDtmf( + String tones, + ::zsLib::Milliseconds duration, + ::zsLib::Milliseconds interToneGap + ) +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCRtpDtmfSender::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpSenderPtr wrapper::impl::org::ortc::RTCRtpDtmfSender::get_sender() +{ + wrapper::org::ortc::RTCRtpSenderPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpDtmfSender::get_toneBuffer() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Milliseconds wrapper::impl::org::ortc::RTCRtpDtmfSender::get_duration() +{ + ::zsLib::Milliseconds result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Milliseconds wrapper::impl::org::ortc::RTCRtpDtmfSender::get_interToneGap() +{ + ::zsLib::Milliseconds result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpDtmfSender::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.h new file mode 100644 index 00000000..bb0b4b80 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.h @@ -0,0 +1,49 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpDtmfSender.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpDtmfSender : public wrapper::org::ortc::RTCRtpDtmfSender + { + RTCRtpDtmfSenderWeakPtr thisWeak_; + + RTCRtpDtmfSender(); + virtual ~RTCRtpDtmfSender(); + + // methods RTCRtpDtmfSender + virtual void wrapper_init_org_ortc_RTCRtpDtmfSender(wrapper::org::ortc::RTCRtpSenderPtr sender) override; + virtual bool canInsertDtmf() override; + virtual void insertDtmf(String tones) override; + virtual void insertDtmf( + String tones, + ::zsLib::Milliseconds duration + ) override; + virtual void insertDtmf( + String tones, + ::zsLib::Milliseconds duration, + ::zsLib::Milliseconds interToneGap + ) override; + + // properties RTCRtpDtmfSender + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::RTCRtpSenderPtr get_sender() override; + virtual String get_toneBuffer() override; + virtual ::zsLib::Milliseconds get_duration() override; + virtual ::zsLib::Milliseconds get_interToneGap() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp new file mode 100644 index 00000000..b711ee1b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpEncodingParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpEncodingParameters::RTCRtpEncodingParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpEncodingParametersPtr wrapper::org::ortc::RTCRtpEncodingParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpEncodingParameters::~RTCRtpEncodingParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpEncodingParameters::wrapper_init_org_ortc_RTCRtpEncodingParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpEncodingParameters::wrapper_init_org_ortc_RTCRtpEncodingParameters(wrapper::org::ortc::RTCRtpEncodingParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpEncodingParameters::wrapper_init_org_ortc_RTCRtpEncodingParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpEncodingParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpEncodingParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h new file mode 100644 index 00000000..a567d97a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpEncodingParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpEncodingParameters : public wrapper::org::ortc::RTCRtpEncodingParameters + { + RTCRtpEncodingParametersWeakPtr thisWeak_; + + RTCRtpEncodingParameters(); + virtual ~RTCRtpEncodingParameters(); + + // methods RTCRtpEncodingParameters + virtual void wrapper_init_org_ortc_RTCRtpEncodingParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpEncodingParameters(wrapper::org::ortc::RTCRtpEncodingParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpEncodingParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp new file mode 100644 index 00000000..9eadf6b9 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpFecParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpFecParameters::RTCRtpFecParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpFecParametersPtr wrapper::org::ortc::RTCRtpFecParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpFecParameters::~RTCRtpFecParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFecParameters::wrapper_init_org_ortc_RTCRtpFecParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFecParameters::wrapper_init_org_ortc_RTCRtpFecParameters(wrapper::org::ortc::RTCRtpFecParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFecParameters::wrapper_init_org_ortc_RTCRtpFecParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpFecParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpFecParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h new file mode 100644 index 00000000..d66f8ce0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpFecParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpFecParameters : public wrapper::org::ortc::RTCRtpFecParameters + { + RTCRtpFecParametersWeakPtr thisWeak_; + + RTCRtpFecParameters(); + virtual ~RTCRtpFecParameters(); + + // methods RTCRtpFecParameters + virtual void wrapper_init_org_ortc_RTCRtpFecParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpFecParameters(wrapper::org::ortc::RTCRtpFecParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpFecParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp new file mode 100644 index 00000000..dfcc89e0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp @@ -0,0 +1,116 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::RTCRtpFlexFecCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersPtr wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::~RTCRtpFlexFecCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters(wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Microseconds wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::get_repairWindow() +{ + ::zsLib::Microseconds result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::set_repairWindow(::zsLib::Microseconds value) +{ +} + +//------------------------------------------------------------------------------ +Optional< unsigned long > wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::get_l() +{ + Optional< unsigned long > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::set_l(Optional< unsigned long > value) +{ +} + +//------------------------------------------------------------------------------ +Optional< unsigned long > wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::get_d() +{ + Optional< unsigned long > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::set_d(Optional< unsigned long > value) +{ +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::get_toP() +{ + Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::set_toP(Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h new file mode 100644 index 00000000..90682610 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h @@ -0,0 +1,43 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpFlexFecCodecCapabilityParameters : public wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParameters + { + RTCRtpFlexFecCodecCapabilityParametersWeakPtr thisWeak_; + + RTCRtpFlexFecCodecCapabilityParameters(); + virtual ~RTCRtpFlexFecCodecCapabilityParameters(); + + // methods RTCRtpFlexFecCodecCapabilityParameters + virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters(wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCRtpFlexFecCodecCapabilityParameters + virtual ::zsLib::Microseconds get_repairWindow() override; + virtual void set_repairWindow(::zsLib::Microseconds value) override; + virtual Optional< unsigned long > get_l() override; + virtual void set_l(Optional< unsigned long > value) override; + virtual Optional< unsigned long > get_d() override; + virtual void set_d(Optional< unsigned long > value) override; + virtual Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > get_toP() override; + virtual void set_toP(Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > value) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp new file mode 100644 index 00000000..8ae66ab5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::RTCRtpH264CodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpH264CodecCapabilityParametersPtr wrapper::org::ortc::RTCRtpH264CodecCapabilityParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::~RTCRtpH264CodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters(wrapper::org::ortc::RTCRtpH264CodecCapabilityParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h new file mode 100644 index 00000000..57c400af --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpH264CodecCapabilityParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpH264CodecCapabilityParameters : public wrapper::org::ortc::RTCRtpH264CodecCapabilityParameters + { + RTCRtpH264CodecCapabilityParametersWeakPtr thisWeak_; + + RTCRtpH264CodecCapabilityParameters(); + virtual ~RTCRtpH264CodecCapabilityParameters(); + + // methods RTCRtpH264CodecCapabilityParameters + virtual void wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters(wrapper::org::ortc::RTCRtpH264CodecCapabilityParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp new file mode 100644 index 00000000..ee409bee --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpHeaderExtension.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpHeaderExtension::RTCRtpHeaderExtension() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpHeaderExtensionPtr wrapper::org::ortc::RTCRtpHeaderExtension::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpHeaderExtension::~RTCRtpHeaderExtension() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpHeaderExtension::wrapper_init_org_ortc_RTCRtpHeaderExtension() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpHeaderExtension::wrapper_init_org_ortc_RTCRtpHeaderExtension(wrapper::org::ortc::RTCRtpHeaderExtensionPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpHeaderExtension::wrapper_init_org_ortc_RTCRtpHeaderExtension(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpHeaderExtension::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpHeaderExtension::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h new file mode 100644 index 00000000..67d5bb53 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpHeaderExtension.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpHeaderExtension : public wrapper::org::ortc::RTCRtpHeaderExtension + { + RTCRtpHeaderExtensionWeakPtr thisWeak_; + + RTCRtpHeaderExtension(); + virtual ~RTCRtpHeaderExtension(); + + // methods RTCRtpHeaderExtension + virtual void wrapper_init_org_ortc_RTCRtpHeaderExtension() override; + virtual void wrapper_init_org_ortc_RTCRtpHeaderExtension(wrapper::org::ortc::RTCRtpHeaderExtensionPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpHeaderExtension(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp new file mode 100644 index 00000000..eb4fca2a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpHeaderExtensionParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::RTCRtpHeaderExtensionParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr wrapper::org::ortc::RTCRtpHeaderExtensionParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::~RTCRtpHeaderExtensionParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters(wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h new file mode 100644 index 00000000..7980a5b1 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpHeaderExtensionParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpHeaderExtensionParameters : public wrapper::org::ortc::RTCRtpHeaderExtensionParameters + { + RTCRtpHeaderExtensionParametersWeakPtr thisWeak_; + + RTCRtpHeaderExtensionParameters(); + virtual ~RTCRtpHeaderExtensionParameters(); + + // methods RTCRtpHeaderExtensionParameters + virtual void wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters(wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp new file mode 100644 index 00000000..a2486218 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp @@ -0,0 +1,83 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpListener.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpListener::RTCRtpListener() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpListenerPtr wrapper::org::ortc::RTCRtpListener::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpListener::~RTCRtpListener() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpListener::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpListener::wrapper_init_org_ortc_RTCRtpListener(wrapper::org::ortc::RTCRtpTransportPtr transport) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpListener::wrapper_init_org_ortc_RTCRtpListener( + wrapper::org::ortc::RTCRtpTransportPtr transport, + shared_ptr< list< wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr > > headerExtensions + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpListener::setHeaderExtensions(shared_ptr< list< wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr > > headerExtensions) +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCRtpListener::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpListener::get_transport() +{ + wrapper::org::ortc::RTCRtpTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpListener::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h new file mode 100644 index 00000000..cffc7592 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h @@ -0,0 +1,43 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpListener.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpListener : public wrapper::org::ortc::RTCRtpListener + { + RTCRtpListenerWeakPtr thisWeak_; + + RTCRtpListener(); + virtual ~RTCRtpListener(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCRtpListener + virtual void wrapper_init_org_ortc_RTCRtpListener(wrapper::org::ortc::RTCRtpTransportPtr transport) override; + virtual void wrapper_init_org_ortc_RTCRtpListener( + wrapper::org::ortc::RTCRtpTransportPtr transport, + shared_ptr< list< wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr > > headerExtensions + ) override; + virtual void setHeaderExtensions(shared_ptr< list< wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr > > headerExtensions) override; + + // properties RTCRtpListener + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::RTCRtpTransportPtr get_transport() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp new file mode 100644 index 00000000..6a6122ca --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::RTCRtpOpusCodecCapabilityOptions() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsPtr wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptions::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::~RTCRtpOpusCodecCapabilityOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions(wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h new file mode 100644 index 00000000..bab6f245 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpOpusCodecCapabilityOptions.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpOpusCodecCapabilityOptions : public wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptions + { + RTCRtpOpusCodecCapabilityOptionsWeakPtr thisWeak_; + + RTCRtpOpusCodecCapabilityOptions(); + virtual ~RTCRtpOpusCodecCapabilityOptions(); + + // methods RTCRtpOpusCodecCapabilityOptions + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions() override; + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions(wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp new file mode 100644 index 00000000..0a14aae1 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::RTCRtpOpusCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpOpusCodecCapabilityParametersPtr wrapper::org::ortc::RTCRtpOpusCodecCapabilityParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::~RTCRtpOpusCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters(wrapper::org::ortc::RTCRtpOpusCodecCapabilityParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h new file mode 100644 index 00000000..0e16dbfc --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpOpusCodecCapabilityParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpOpusCodecCapabilityParameters : public wrapper::org::ortc::RTCRtpOpusCodecCapabilityParameters + { + RTCRtpOpusCodecCapabilityParametersWeakPtr thisWeak_; + + RTCRtpOpusCodecCapabilityParameters(); + virtual ~RTCRtpOpusCodecCapabilityParameters(); + + // methods RTCRtpOpusCodecCapabilityParameters + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters(wrapper::org::ortc::RTCRtpOpusCodecCapabilityParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp new file mode 100644 index 00000000..2fb79cde --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpOpusCodecParameterSettings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::RTCRtpOpusCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpOpusCodecParameterSettingsPtr wrapper::org::ortc::RTCRtpOpusCodecParameterSettings::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::~RTCRtpOpusCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings(wrapper::org::ortc::RTCRtpOpusCodecParameterSettingsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h new file mode 100644 index 00000000..35ac138d --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpOpusCodecParameterSettings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpOpusCodecParameterSettings : public wrapper::org::ortc::RTCRtpOpusCodecParameterSettings + { + RTCRtpOpusCodecParameterSettingsWeakPtr thisWeak_; + + RTCRtpOpusCodecParameterSettings(); + virtual ~RTCRtpOpusCodecParameterSettings(); + + // methods RTCRtpOpusCodecParameterSettings + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings() override; + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings(wrapper::org::ortc::RTCRtpOpusCodecParameterSettingsPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp new file mode 100644 index 00000000..ca7c9647 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpParameters::RTCRtpParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpParametersPtr wrapper::org::ortc::RTCRtpParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpParameters::~RTCRtpParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpParameters::wrapper_init_org_ortc_RTCRtpParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpParameters::wrapper_init_org_ortc_RTCRtpParameters(wrapper::org::ortc::RTCRtpParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpParameters::wrapper_init_org_ortc_RTCRtpParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h new file mode 100644 index 00000000..ea06b7b6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpParameters : public wrapper::org::ortc::RTCRtpParameters + { + RTCRtpParametersWeakPtr thisWeak_; + + RTCRtpParameters(); + virtual ~RTCRtpParameters(); + + // methods RTCRtpParameters + virtual void wrapper_init_org_ortc_RTCRtpParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpParameters(wrapper::org::ortc::RTCRtpParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp new file mode 100644 index 00000000..bb7f95c1 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp @@ -0,0 +1,135 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpReceiver.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpReceiver::RTCRtpReceiver() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpReceiverPtr wrapper::org::ortc::RTCRtpReceiver::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpReceiver::~RTCRtpReceiver() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpReceiver::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpReceiver::wrapper_init_org_ortc_RTCRtpReceiver( + wrapper::org::ortc::MediaStreamTrackKind kind, + wrapper::org::ortc::RTCRtpTransportPtr transport + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpReceiver::wrapper_init_org_ortc_RTCRtpReceiver( + wrapper::org::ortc::MediaStreamTrackKind kind, + wrapper::org::ortc::RTCRtpTransportPtr transport, + wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpReceiver::setTransport(wrapper::org::ortc::RTCRtpTransportPtr transport) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpReceiver::setTransport( + wrapper::org::ortc::RTCRtpTransportPtr transport, + wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport + ) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::org::ortc::RTCRtpReceiver::getCapabilities(Optional< wrapper::org::ortc::MediaStreamTrackKind > kind) +{ + wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +PromisePtr wrapper::impl::org::ortc::RTCRtpReceiver::receive(wrapper::org::ortc::RTCRtpParametersPtr parameters) +{ + PromisePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpReceiver::stop() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCRtpContributingSourcePtr > > wrapper::impl::org::ortc::RTCRtpReceiver::getContributingSources() +{ + shared_ptr< list< wrapper::org::ortc::RTCRtpContributingSourcePtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpReceiver::requestSendCsrc(uint32_t csrc) +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCRtpReceiver::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::RTCRtpReceiver::get_track() +{ + wrapper::org::ortc::MediaStreamTrackPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpReceiver::get_transport() +{ + wrapper::org::ortc::RTCRtpTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpReceiver::get_rtcpTransport() +{ + wrapper::org::ortc::RTCRtpTransportPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h new file mode 100644 index 00000000..c9b6661f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h @@ -0,0 +1,55 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpReceiver.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpReceiver : public wrapper::org::ortc::RTCRtpReceiver + { + RTCRtpReceiverWeakPtr thisWeak_; + + RTCRtpReceiver(); + virtual ~RTCRtpReceiver(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCRtpReceiver + virtual void wrapper_init_org_ortc_RTCRtpReceiver( + wrapper::org::ortc::MediaStreamTrackKind kind, + wrapper::org::ortc::RTCRtpTransportPtr transport + ) override; + virtual void wrapper_init_org_ortc_RTCRtpReceiver( + wrapper::org::ortc::MediaStreamTrackKind kind, + wrapper::org::ortc::RTCRtpTransportPtr transport, + wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport + ) override; + virtual void setTransport(wrapper::org::ortc::RTCRtpTransportPtr transport) override; + virtual void setTransport( + wrapper::org::ortc::RTCRtpTransportPtr transport, + wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport + ) override; + virtual PromisePtr receive(wrapper::org::ortc::RTCRtpParametersPtr parameters) override; + virtual void stop() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCRtpContributingSourcePtr > > getContributingSources() override; + virtual void requestSendCsrc(uint32_t csrc) override; + + // properties RTCRtpReceiver + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::MediaStreamTrackPtr get_track() override; + virtual wrapper::org::ortc::RTCRtpTransportPtr get_transport() override; + virtual wrapper::org::ortc::RTCRtpTransportPtr get_rtcpTransport() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp new file mode 100644 index 00000000..8b92e4fe --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpRedCodecParameterSettings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::RTCRtpRedCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpRedCodecParameterSettingsPtr wrapper::org::ortc::RTCRtpRedCodecParameterSettings::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::~RTCRtpRedCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings(wrapper::org::ortc::RTCRtpRedCodecParameterSettingsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h new file mode 100644 index 00000000..bf743db5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpRedCodecParameterSettings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpRedCodecParameterSettings : public wrapper::org::ortc::RTCRtpRedCodecParameterSettings + { + RTCRtpRedCodecParameterSettingsWeakPtr thisWeak_; + + RTCRtpRedCodecParameterSettings(); + virtual ~RTCRtpRedCodecParameterSettings(); + + // methods RTCRtpRedCodecParameterSettings + virtual void wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings() override; + virtual void wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings(wrapper::org::ortc::RTCRtpRedCodecParameterSettingsPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp new file mode 100644 index 00000000..a6b147e0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::RTCRtpRtxCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpRtxCodecCapabilityParametersPtr wrapper::org::ortc::RTCRtpRtxCodecCapabilityParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::~RTCRtpRtxCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters(wrapper::org::ortc::RTCRtpRtxCodecCapabilityParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h new file mode 100644 index 00000000..087c33b6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpRtxCodecCapabilityParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpRtxCodecCapabilityParameters : public wrapper::org::ortc::RTCRtpRtxCodecCapabilityParameters + { + RTCRtpRtxCodecCapabilityParametersWeakPtr thisWeak_; + + RTCRtpRtxCodecCapabilityParameters(); + virtual ~RTCRtpRtxCodecCapabilityParameters(); + + // methods RTCRtpRtxCodecCapabilityParameters + virtual void wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters(wrapper::org::ortc::RTCRtpRtxCodecCapabilityParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp new file mode 100644 index 00000000..f1aed92c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpRtxParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpRtxParameters::RTCRtpRtxParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpRtxParametersPtr wrapper::org::ortc::RTCRtpRtxParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpRtxParameters::~RTCRtpRtxParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxParameters::wrapper_init_org_ortc_RTCRtpRtxParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxParameters::wrapper_init_org_ortc_RTCRtpRtxParameters(wrapper::org::ortc::RTCRtpRtxParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxParameters::wrapper_init_org_ortc_RTCRtpRtxParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpRtxParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpRtxParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h new file mode 100644 index 00000000..b87d471c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpRtxParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpRtxParameters : public wrapper::org::ortc::RTCRtpRtxParameters + { + RTCRtpRtxParametersWeakPtr thisWeak_; + + RTCRtpRtxParameters(); + virtual ~RTCRtpRtxParameters(); + + // methods RTCRtpRtxParameters + virtual void wrapper_init_org_ortc_RTCRtpRtxParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpRtxParameters(wrapper::org::ortc::RTCRtpRtxParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpRtxParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp new file mode 100644 index 00000000..ae6b4d13 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp @@ -0,0 +1,135 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpSender.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpSender::RTCRtpSender() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpSenderPtr wrapper::org::ortc::RTCRtpSender::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpSender::~RTCRtpSender() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpSender::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpSender::wrapper_init_org_ortc_RTCRtpSender( + wrapper::org::ortc::MediaStreamTrackPtr track, + wrapper::org::ortc::RTCRtpTransportPtr transport + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpSender::wrapper_init_org_ortc_RTCRtpSender( + wrapper::org::ortc::MediaStreamTrackPtr track, + wrapper::org::ortc::RTCRtpTransportPtr transport, + wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpSender::setTransport(wrapper::org::ortc::RTCRtpTransportPtr transport) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpSender::setTransport( + wrapper::org::ortc::RTCRtpTransportPtr transport, + wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport + ) +{ +} + +//------------------------------------------------------------------------------ +PromisePtr wrapper::impl::org::ortc::RTCRtpSender::setTrack(wrapper::org::ortc::MediaStreamTrackPtr track) +{ + PromisePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::org::ortc::RTCRtpSender::getCapabilities(Optional< wrapper::org::ortc::MediaStreamTrackKind > kind) +{ + wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +PromisePtr wrapper::impl::org::ortc::RTCRtpSender::send(wrapper::org::ortc::RTCRtpParametersPtr parameters) +{ + PromisePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpSender::stop() +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCRtpSender::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::RTCRtpSender::get_track() +{ + wrapper::org::ortc::MediaStreamTrackPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpSender::get_transport() +{ + wrapper::org::ortc::RTCRtpTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtcpTransportPtr wrapper::impl::org::ortc::RTCRtpSender::get_rtcpTransport() +{ + wrapper::org::ortc::RTCRtcpTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpSender::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h new file mode 100644 index 00000000..4ab8876b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h @@ -0,0 +1,56 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpSender.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpSender : public wrapper::org::ortc::RTCRtpSender + { + RTCRtpSenderWeakPtr thisWeak_; + + RTCRtpSender(); + virtual ~RTCRtpSender(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCRtpSender + virtual void wrapper_init_org_ortc_RTCRtpSender( + wrapper::org::ortc::MediaStreamTrackPtr track, + wrapper::org::ortc::RTCRtpTransportPtr transport + ) override; + virtual void wrapper_init_org_ortc_RTCRtpSender( + wrapper::org::ortc::MediaStreamTrackPtr track, + wrapper::org::ortc::RTCRtpTransportPtr transport, + wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport + ) override; + virtual void setTransport(wrapper::org::ortc::RTCRtpTransportPtr transport) override; + virtual void setTransport( + wrapper::org::ortc::RTCRtpTransportPtr transport, + wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport + ) override; + virtual PromisePtr setTrack(wrapper::org::ortc::MediaStreamTrackPtr track) override; + virtual PromisePtr send(wrapper::org::ortc::RTCRtpParametersPtr parameters) override; + virtual void stop() override; + + // properties RTCRtpSender + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::MediaStreamTrackPtr get_track() override; + virtual wrapper::org::ortc::RTCRtpTransportPtr get_transport() override; + virtual wrapper::org::ortc::RTCRtcpTransportPtr get_rtcpTransport() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp new file mode 100644 index 00000000..211f3702 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp @@ -0,0 +1,173 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpStreamStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpStreamStats::RTCRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpStreamStatsPtr wrapper::org::ortc::RTCRtpStreamStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpStreamStats::~RTCRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpStreamStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpStreamStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCRtpStreamStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCRtpStreamStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpStreamStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpStreamStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpStreamStats::wrapper_init_org_ortc_RTCRtpStreamStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpStreamStats::wrapper_init_org_ortc_RTCRtpStreamStats(wrapper::org::ortc::RTCRtpStreamStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpStreamStats::wrapper_init_org_ortc_RTCRtpStreamStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +Optional< uint32_t > wrapper::impl::org::ortc::RTCRtpStreamStats::get_ssrc() +{ + Optional< uint32_t > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpStreamStats::get_associatedStatId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCRtpStreamStats::get_isRemote() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpStreamStats::get_mediaType() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpStreamStats::get_mediaTrackId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpStreamStats::get_transportId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpStreamStats::get_codecId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCRtpStreamStats::get_firCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCRtpStreamStats::get_pliCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCRtpStreamStats::get_nackCount() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCRtpStreamStats::get_sliCount() +{ + unsigned long result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h new file mode 100644 index 00000000..cbe87cf5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h @@ -0,0 +1,54 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpStreamStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpStreamStats : public wrapper::org::ortc::RTCRtpStreamStats + { + RTCRtpStreamStatsWeakPtr thisWeak_; + + RTCRtpStreamStats(); + virtual ~RTCRtpStreamStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCRtpStreamStats + virtual void wrapper_init_org_ortc_RTCRtpStreamStats() override; + virtual void wrapper_init_org_ortc_RTCRtpStreamStats(wrapper::org::ortc::RTCRtpStreamStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpStreamStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCRtpStreamStats + virtual Optional< uint32_t > get_ssrc() override; + virtual String get_associatedStatId() override; + virtual bool get_isRemote() override; + virtual String get_mediaType() override; + virtual String get_mediaTrackId() override; + virtual String get_transportId() override; + virtual String get_codecId() override; + virtual unsigned long get_firCount() override; + virtual unsigned long get_pliCount() override; + virtual unsigned long get_nackCount() override; + virtual unsigned long get_sliCount() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp new file mode 100644 index 00000000..f19d5796 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpTransport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpTransport::RTCRtpTransport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpTransportPtr wrapper::org::ortc::RTCRtpTransport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpTransport::~RTCRtpTransport() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpTransport::wrapper_init_org_ortc_RTCRtpTransport() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h new file mode 100644 index 00000000..d33e4c40 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpTransport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpTransport : public wrapper::org::ortc::RTCRtpTransport + { + RTCRtpTransportWeakPtr thisWeak_; + + RTCRtpTransport(); + virtual ~RTCRtpTransport(); + virtual void wrapper_init_org_ortc_RTCRtpTransport() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp new file mode 100644 index 00000000..5901a0e7 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp @@ -0,0 +1,72 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpUnhandledEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpUnhandledEvent::RTCRtpUnhandledEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpUnhandledEventPtr wrapper::org::ortc::RTCRtpUnhandledEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpUnhandledEvent::~RTCRtpUnhandledEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpUnhandledEvent::wrapper_init_org_ortc_RTCRtpUnhandledEvent() +{ +} + +//------------------------------------------------------------------------------ +uint32_t wrapper::impl::org::ortc::RTCRtpUnhandledEvent::get_ssrc() +{ + uint32_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint8_t wrapper::impl::org::ortc::RTCRtpUnhandledEvent::get_payloadType() +{ + uint8_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpUnhandledEvent::get_muxId() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpUnhandledEvent::get_rid() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h new file mode 100644 index 00000000..9ab2dd88 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpUnhandledEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpUnhandledEvent : public wrapper::org::ortc::RTCRtpUnhandledEvent + { + RTCRtpUnhandledEventWeakPtr thisWeak_; + + RTCRtpUnhandledEvent(); + virtual ~RTCRtpUnhandledEvent(); + virtual void wrapper_init_org_ortc_RTCRtpUnhandledEvent() override; + + // properties RTCRtpUnhandledEvent + virtual uint32_t get_ssrc() override; + virtual uint8_t get_payloadType() override; + virtual String get_muxId() override; + virtual String get_rid() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp new file mode 100644 index 00000000..23f9d6b4 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::RTCRtpVp8CodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpVp8CodecCapabilityParametersPtr wrapper::org::ortc::RTCRtpVp8CodecCapabilityParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::~RTCRtpVp8CodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters(wrapper::org::ortc::RTCRtpVp8CodecCapabilityParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h new file mode 100644 index 00000000..39e0e80e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpVp8CodecCapabilityParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpVp8CodecCapabilityParameters : public wrapper::org::ortc::RTCRtpVp8CodecCapabilityParameters + { + RTCRtpVp8CodecCapabilityParametersWeakPtr thisWeak_; + + RTCRtpVp8CodecCapabilityParameters(); + virtual ~RTCRtpVp8CodecCapabilityParameters(); + + // methods RTCRtpVp8CodecCapabilityParameters + virtual void wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters() override; + virtual void wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters(wrapper::org::ortc::RTCRtpVp8CodecCapabilityParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp new file mode 100644 index 00000000..7df80ed5 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSctpCapabilities.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpCapabilities::RTCSctpCapabilities() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpCapabilitiesPtr wrapper::org::ortc::RTCSctpCapabilities::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpCapabilities::~RTCSctpCapabilities() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpCapabilities::wrapper_init_org_ortc_RTCSctpCapabilities() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpCapabilities::wrapper_init_org_ortc_RTCSctpCapabilities(wrapper::org::ortc::RTCSctpCapabilitiesPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpCapabilities::wrapper_init_org_ortc_RTCSctpCapabilities(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSctpCapabilities::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSctpCapabilities::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h new file mode 100644 index 00000000..f290eb28 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSctpCapabilities.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSctpCapabilities : public wrapper::org::ortc::RTCSctpCapabilities + { + RTCSctpCapabilitiesWeakPtr thisWeak_; + + RTCSctpCapabilities(); + virtual ~RTCSctpCapabilities(); + + // methods RTCSctpCapabilities + virtual void wrapper_init_org_ortc_RTCSctpCapabilities() override; + virtual void wrapper_init_org_ortc_RTCSctpCapabilities(wrapper::org::ortc::RTCSctpCapabilitiesPtr source) override; + virtual void wrapper_init_org_ortc_RTCSctpCapabilities(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp new file mode 100644 index 00000000..e9e04430 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp @@ -0,0 +1,141 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSctpTransport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransport::RTCSctpTransport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportPtr wrapper::org::ortc::RTCSctpTransport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransport::~RTCSctpTransport() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSctpTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransport::wrapper_init_org_ortc_RTCSctpTransport(wrapper::org::ortc::RTCDtlsTransportPtr transport) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransport::wrapper_init_org_ortc_RTCSctpTransport( + wrapper::org::ortc::RTCDtlsTransportPtr transport, + uint16_t localPort + ) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportListenerPtr wrapper::org::ortc::RTCSctpTransport::listen( + wrapper::org::ortc::RTCDtlsTransportPtr transport, + wrapper::org::ortc::RTCSctpCapabilitiesPtr remoteCapabilities + ) +{ + wrapper::org::ortc::RTCSctpTransportListenerPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpCapabilitiesPtr wrapper::org::ortc::RTCSctpTransport::getCapabilities() +{ + wrapper::org::ortc::RTCSctpCapabilitiesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransport::start(wrapper::org::ortc::RTCSctpCapabilitiesPtr remoteCapabilities) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransport::start( + wrapper::org::ortc::RTCSctpCapabilitiesPtr remoteCapabilities, + uint16_t remotePort + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransport::stop() +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCSctpTransport::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsTransportPtr wrapper::impl::org::ortc::RTCSctpTransport::get_transport() +{ + wrapper::org::ortc::RTCDtlsTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportState wrapper::impl::org::ortc::RTCSctpTransport::get_state() +{ + wrapper::org::ortc::RTCSctpTransportState result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint16_t wrapper::impl::org::ortc::RTCSctpTransport::get_port() +{ + uint16_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint16_t wrapper::impl::org::ortc::RTCSctpTransport::get_localPort() +{ + uint16_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< uint16_t > wrapper::impl::org::ortc::RTCSctpTransport::get_remotePort() +{ + Optional< uint16_t > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransport::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h new file mode 100644 index 00000000..1ae7b258 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h @@ -0,0 +1,52 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSctpTransport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSctpTransport : public wrapper::org::ortc::RTCSctpTransport + { + RTCSctpTransportWeakPtr thisWeak_; + + RTCSctpTransport(); + virtual ~RTCSctpTransport(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCSctpTransport + virtual void wrapper_init_org_ortc_RTCSctpTransport(wrapper::org::ortc::RTCDtlsTransportPtr transport) override; + virtual void wrapper_init_org_ortc_RTCSctpTransport( + wrapper::org::ortc::RTCDtlsTransportPtr transport, + uint16_t localPort + ) override; + virtual void start(wrapper::org::ortc::RTCSctpCapabilitiesPtr remoteCapabilities) override; + virtual void start( + wrapper::org::ortc::RTCSctpCapabilitiesPtr remoteCapabilities, + uint16_t remotePort + ) override; + virtual void stop() override; + + // properties RTCSctpTransport + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::RTCDtlsTransportPtr get_transport() override; + virtual wrapper::org::ortc::RTCSctpTransportState get_state() override; + virtual uint16_t get_port() override; + virtual uint16_t get_localPort() override; + virtual Optional< uint16_t > get_remotePort() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp new file mode 100644 index 00000000..e4042258 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSctpTransportListener.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportListener::RTCSctpTransportListener() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportListenerPtr wrapper::org::ortc::RTCSctpTransportListener::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportListener::~RTCSctpTransportListener() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransportListener::wrapper_init_org_ortc_RTCSctpTransportListener() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h new file mode 100644 index 00000000..b191926c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSctpTransportListener.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSctpTransportListener : public wrapper::org::ortc::RTCSctpTransportListener + { + RTCSctpTransportListenerWeakPtr thisWeak_; + + RTCSctpTransportListener(); + virtual ~RTCSctpTransportListener(); + virtual void wrapper_init_org_ortc_RTCSctpTransportListener() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp new file mode 100644 index 00000000..106be09f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp @@ -0,0 +1,56 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSctpTransportStateChangeEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::RTCSctpTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportStateChangeEventPtr wrapper::org::ortc::RTCSctpTransportStateChangeEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::~RTCSctpTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::wrapper_init_org_ortc_RTCSctpTransportStateChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportState wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::get_state() +{ + wrapper::org::ortc::RTCSctpTransportState result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::set_state(wrapper::org::ortc::RTCSctpTransportState value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h new file mode 100644 index 00000000..d0e84351 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h @@ -0,0 +1,31 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSctpTransportStateChangeEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSctpTransportStateChangeEvent : public wrapper::org::ortc::RTCSctpTransportStateChangeEvent + { + RTCSctpTransportStateChangeEventWeakPtr thisWeak_; + + RTCSctpTransportStateChangeEvent(); + virtual ~RTCSctpTransportStateChangeEvent(); + virtual void wrapper_init_org_ortc_RTCSctpTransportStateChangeEvent() override; + + // properties RTCSctpTransportStateChangeEvent + virtual wrapper::org::ortc::RTCSctpTransportState get_state() override; + virtual void set_state(wrapper::org::ortc::RTCSctpTransportState value) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp new file mode 100644 index 00000000..e7e4b2cb --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp @@ -0,0 +1,110 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSctpTransportStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportStats::RTCSctpTransportStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportStatsPtr wrapper::org::ortc::RTCSctpTransportStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportStats::~RTCSctpTransportStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSctpTransportStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSctpTransportStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCSctpTransportStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCSctpTransportStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSctpTransportStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSctpTransportStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransportStats::wrapper_init_org_ortc_RTCSctpTransportStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransportStats::wrapper_init_org_ortc_RTCSctpTransportStats(wrapper::org::ortc::RTCSctpTransportStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSctpTransportStats::wrapper_init_org_ortc_RTCSctpTransportStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCSctpTransportStats::get_dataChannelsOpened() +{ + unsigned long result {}; + return result; +} + +//------------------------------------------------------------------------------ +unsigned long wrapper::impl::org::ortc::RTCSctpTransportStats::get_dataChannelsClosed() +{ + unsigned long result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h new file mode 100644 index 00000000..56de0a36 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h @@ -0,0 +1,45 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSctpTransportStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSctpTransportStats : public wrapper::org::ortc::RTCSctpTransportStats + { + RTCSctpTransportStatsWeakPtr thisWeak_; + + RTCSctpTransportStats(); + virtual ~RTCSctpTransportStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCSctpTransportStats + virtual void wrapper_init_org_ortc_RTCSctpTransportStats() override; + virtual void wrapper_init_org_ortc_RTCSctpTransportStats(wrapper::org::ortc::RTCSctpTransportStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCSctpTransportStats(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCSctpTransportStats + virtual unsigned long get_dataChannelsOpened() override; + virtual unsigned long get_dataChannelsClosed() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp new file mode 100644 index 00000000..b68ba1ac --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSrtpSdesCryptoParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::RTCSrtpSdesCryptoParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr wrapper::org::ortc::RTCSrtpSdesCryptoParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::~RTCSrtpSdesCryptoParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters(wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h new file mode 100644 index 00000000..0bf72f94 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSrtpSdesCryptoParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSrtpSdesCryptoParameters : public wrapper::org::ortc::RTCSrtpSdesCryptoParameters + { + RTCSrtpSdesCryptoParametersWeakPtr thisWeak_; + + RTCSrtpSdesCryptoParameters(); + virtual ~RTCSrtpSdesCryptoParameters(); + + // methods RTCSrtpSdesCryptoParameters + virtual void wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters() override; + virtual void wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters(wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp new file mode 100644 index 00000000..62d2564c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSrtpSdesKeyParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::RTCSrtpSdesKeyParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpSdesKeyParametersPtr wrapper::org::ortc::RTCSrtpSdesKeyParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::~RTCSrtpSdesKeyParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::wrapper_init_org_ortc_RTCSrtpSdesKeyParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::wrapper_init_org_ortc_RTCSrtpSdesKeyParameters(wrapper::org::ortc::RTCSrtpSdesKeyParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::wrapper_init_org_ortc_RTCSrtpSdesKeyParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h new file mode 100644 index 00000000..c5e56e2a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSrtpSdesKeyParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSrtpSdesKeyParameters : public wrapper::org::ortc::RTCSrtpSdesKeyParameters + { + RTCSrtpSdesKeyParametersWeakPtr thisWeak_; + + RTCSrtpSdesKeyParameters(); + virtual ~RTCSrtpSdesKeyParameters(); + + // methods RTCSrtpSdesKeyParameters + virtual void wrapper_init_org_ortc_RTCSrtpSdesKeyParameters() override; + virtual void wrapper_init_org_ortc_RTCSrtpSdesKeyParameters(wrapper::org::ortc::RTCSrtpSdesKeyParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCSrtpSdesKeyParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp new file mode 100644 index 00000000..7b7c6fdd --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSrtpSdesParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesParameters::RTCSrtpSdesParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpSdesParametersPtr wrapper::org::ortc::RTCSrtpSdesParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesParameters::~RTCSrtpSdesParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesParameters::wrapper_init_org_ortc_RTCSrtpSdesParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesParameters::wrapper_init_org_ortc_RTCSrtpSdesParameters(wrapper::org::ortc::RTCSrtpSdesParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesParameters::wrapper_init_org_ortc_RTCSrtpSdesParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSrtpSdesParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSrtpSdesParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h new file mode 100644 index 00000000..52b9d420 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSrtpSdesParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSrtpSdesParameters : public wrapper::org::ortc::RTCSrtpSdesParameters + { + RTCSrtpSdesParametersWeakPtr thisWeak_; + + RTCSrtpSdesParameters(); + virtual ~RTCSrtpSdesParameters(); + + // methods RTCSrtpSdesParameters + virtual void wrapper_init_org_ortc_RTCSrtpSdesParameters() override; + virtual void wrapper_init_org_ortc_RTCSrtpSdesParameters(wrapper::org::ortc::RTCSrtpSdesParametersPtr source) override; + virtual void wrapper_init_org_ortc_RTCSrtpSdesParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp new file mode 100644 index 00000000..b87122c4 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp @@ -0,0 +1,93 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSrtpSdesTransport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesTransport::RTCSrtpSdesTransport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpSdesTransportPtr wrapper::org::ortc::RTCSrtpSdesTransport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesTransport::~RTCSrtpSdesTransport() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSrtpSdesTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesTransport::wrapper_init_org_ortc_RTCSrtpSdesTransport( + wrapper::org::ortc::RTCIceTransportPtr iceTransport, + wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr encryptParameters, + wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr decryptParameters + ) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpSdesParametersPtr wrapper::org::ortc::RTCSrtpSdesTransport::getLocalParameters() +{ + wrapper::org::ortc::RTCSrtpSdesParametersPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesTransport::stop() +{ +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCSrtpSdesTransport::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportPtr wrapper::impl::org::ortc::RTCSrtpSdesTransport::get_transport() +{ + wrapper::org::ortc::RTCIceTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceTransportPtr wrapper::impl::org::ortc::RTCSrtpSdesTransport::get_rtcpTransport() +{ + wrapper::org::ortc::RTCIceTransportPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesTransport::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h new file mode 100644 index 00000000..06f37bfb --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSrtpSdesTransport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSrtpSdesTransport : public wrapper::org::ortc::RTCSrtpSdesTransport + { + RTCSrtpSdesTransportWeakPtr thisWeak_; + + RTCSrtpSdesTransport(); + virtual ~RTCSrtpSdesTransport(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCSrtpSdesTransport + virtual void wrapper_init_org_ortc_RTCSrtpSdesTransport( + wrapper::org::ortc::RTCIceTransportPtr iceTransport, + wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr encryptParameters, + wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr decryptParameters + ) override; + virtual void stop() override; + + // properties RTCSrtpSdesTransport + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::RTCIceTransportPtr get_transport() override; + virtual wrapper::org::ortc::RTCIceTransportPtr get_rtcpTransport() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp new file mode 100644 index 00000000..46b9c950 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemaining::RTCSrtpSdesTransportLifetimeRemaining() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingPtr wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemaining::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemaining::~RTCSrtpSdesTransportLifetimeRemaining() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemaining::wrapper_init_org_ortc_RTCSrtpSdesTransportLifetimeRemaining() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h new file mode 100644 index 00000000..d64730b6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h @@ -0,0 +1,27 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSrtpSdesTransportLifetimeRemaining : public wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemaining + { + RTCSrtpSdesTransportLifetimeRemainingWeakPtr thisWeak_; + + RTCSrtpSdesTransportLifetimeRemaining(); + virtual ~RTCSrtpSdesTransportLifetimeRemaining(); + virtual void wrapper_init_org_ortc_RTCSrtpSdesTransportLifetimeRemaining() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp new file mode 100644 index 00000000..5bc98bd0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::RTCSrtpSdesTransportLifetimeRemainingEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEventPtr wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::~RTCSrtpSdesTransportLifetimeRemainingEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::wrapper_init_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingPtr wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::get_data() +{ + wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h new file mode 100644 index 00000000..9306057c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSrtpSdesTransportLifetimeRemainingEvent : public wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent + { + RTCSrtpSdesTransportLifetimeRemainingEventWeakPtr thisWeak_; + + RTCSrtpSdesTransportLifetimeRemainingEvent(); + virtual ~RTCSrtpSdesTransportLifetimeRemainingEvent(); + virtual void wrapper_init_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent() override; + + // properties RTCSrtpSdesTransportLifetimeRemainingEvent + virtual wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingPtr get_data() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp new file mode 100644 index 00000000..0c89dfa8 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp @@ -0,0 +1,96 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSrtpTransportStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpTransportStats::RTCSrtpTransportStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSrtpTransportStatsPtr wrapper::org::ortc::RTCSrtpTransportStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpTransportStats::~RTCSrtpTransportStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSrtpTransportStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSrtpTransportStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCSrtpTransportStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCSrtpTransportStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSrtpTransportStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCSrtpTransportStats::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCSrtpTransportStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::RTCDtlsTransportStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::JsonPtr json) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h new file mode 100644 index 00000000..1ce88d91 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h @@ -0,0 +1,41 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSrtpTransportStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSrtpTransportStats : public wrapper::org::ortc::RTCSrtpTransportStats + { + RTCSrtpTransportStatsWeakPtr thisWeak_; + + RTCSrtpTransportStats(); + virtual ~RTCSrtpTransportStats(); + + // methods RTCStats + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + + // methods RTCSrtpTransportStats + virtual void wrapper_init_org_ortc_RTCSrtpTransportStats() override; + virtual void wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::RTCDtlsTransportStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::JsonPtr json) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp new file mode 100644 index 00000000..b9511049 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSsrcConflictEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSsrcConflictEvent::RTCSsrcConflictEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSsrcConflictEventPtr wrapper::org::ortc::RTCSsrcConflictEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSsrcConflictEvent::~RTCSsrcConflictEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCSsrcConflictEvent::wrapper_init_org_ortc_RTCSsrcConflictEvent() +{ +} + +//------------------------------------------------------------------------------ +uint32_t wrapper::impl::org::ortc::RTCSsrcConflictEvent::get_ssrc() +{ + uint32_t result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h new file mode 100644 index 00000000..9df32952 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSsrcConflictEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSsrcConflictEvent : public wrapper::org::ortc::RTCSsrcConflictEvent + { + RTCSsrcConflictEventWeakPtr thisWeak_; + + RTCSsrcConflictEvent(); + virtual ~RTCSsrcConflictEvent(); + virtual void wrapper_init_org_ortc_RTCSsrcConflictEvent() override; + + // properties RTCSsrcConflictEvent + virtual uint32_t get_ssrc() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp new file mode 100644 index 00000000..02bcb995 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp @@ -0,0 +1,96 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCStats.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStats::RTCStats() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCStatsPtr wrapper::org::ortc::RTCStats::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStats::~RTCStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCStats::wrapper_init_org_ortc_RTCStats() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCStats::wrapper_init_org_ortc_RTCStats(wrapper::org::ortc::RTCStatsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCStats::wrapper_init_org_ortc_RTCStats(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCStats::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCStats::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Time wrapper::impl::org::ortc::RTCStats::get_timestamp() +{ + ::zsLib::Time result {}; + return result; +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCStats::get_statsType() +{ + Optional< wrapper::org::ortc::RTCStatsType > result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCStats::get_statsTypeOther() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCStats::get_id() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCStats.h new file mode 100644 index 00000000..42dc7655 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStats.h @@ -0,0 +1,39 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCStats.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCStats : public wrapper::org::ortc::RTCStats + { + RTCStatsWeakPtr thisWeak_; + + RTCStats(); + virtual ~RTCStats(); + + // methods RTCStats + virtual void wrapper_init_org_ortc_RTCStats() override; + virtual void wrapper_init_org_ortc_RTCStats(wrapper::org::ortc::RTCStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCStats(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCStats + virtual ::zsLib::Time get_timestamp() override; + virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; + virtual String get_statsTypeOther() override; + virtual String get_id() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp new file mode 100644 index 00000000..dbee5f97 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCStatsProvider.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsProvider::RTCStatsProvider() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCStatsProviderPtr wrapper::org::ortc::RTCStatsProvider::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsProvider::~RTCStatsProvider() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCStatsProvider::wrapper_init_org_ortc_RTCStatsProvider() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCStatsProvider::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h new file mode 100644 index 00000000..2d32f0b4 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h @@ -0,0 +1,30 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCStatsProvider.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCStatsProvider : public wrapper::org::ortc::RTCStatsProvider + { + RTCStatsProviderWeakPtr thisWeak_; + + RTCStatsProvider(); + virtual ~RTCStatsProvider(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual void wrapper_init_org_ortc_RTCStatsProvider() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp new file mode 100644 index 00000000..2e48a1ce --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp @@ -0,0 +1,65 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCStatsReport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsReport::RTCStatsReport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCStatsReportPtr wrapper::org::ortc::RTCStatsReport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsReport::~RTCStatsReport() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCStatsReport::wrapper_init_org_ortc_RTCStatsReport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCStatsPtr wrapper::impl::org::ortc::RTCStatsReport::getStats(String id) +{ + wrapper::org::ortc::RTCStatsPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::RTCStatsReport::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< String > > wrapper::impl::org::ortc::RTCStatsReport::get_statsIds() +{ + shared_ptr< list< String > > result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h new file mode 100644 index 00000000..ca288707 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h @@ -0,0 +1,34 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCStatsReport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCStatsReport : public wrapper::org::ortc::RTCStatsReport + { + RTCStatsReportWeakPtr thisWeak_; + + RTCStatsReport(); + virtual ~RTCStatsReport(); + + // methods RTCStatsReport + virtual wrapper::org::ortc::RTCStatsPtr getStats(String id) override; + virtual void wrapper_init_org_ortc_RTCStatsReport() override; + + // properties RTCStatsReport + virtual uint64_t get_objectId() override; + virtual shared_ptr< list< String > > get_statsIds() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp new file mode 100644 index 00000000..53c51088 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp @@ -0,0 +1,56 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCStatsTypeSet.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsTypeSet::RTCStatsTypeSet() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCStatsTypeSetPtr wrapper::org::ortc::RTCStatsTypeSet::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsTypeSet::~RTCStatsTypeSet() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCStatsTypeSet::wrapper_init_org_ortc_RTCStatsTypeSet() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCStatsTypeSet::wrapper_init_org_ortc_RTCStatsTypeSet(shared_ptr< set< wrapper::org::ortc::RTCStatsType > > values) +{ +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::RTCStatsTypeSet::hasStatType(wrapper::org::ortc::RTCStatsType type) +{ + bool result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h new file mode 100644 index 00000000..5b1efb1c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h @@ -0,0 +1,31 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCStatsTypeSet.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCStatsTypeSet : public wrapper::org::ortc::RTCStatsTypeSet + { + RTCStatsTypeSetWeakPtr thisWeak_; + + RTCStatsTypeSet(); + virtual ~RTCStatsTypeSet(); + + // methods RTCStatsTypeSet + virtual void wrapper_init_org_ortc_RTCStatsTypeSet() override; + virtual void wrapper_init_org_ortc_RTCStatsTypeSet(shared_ptr< set< wrapper::org::ortc::RTCStatsType > > values) override; + virtual bool hasStatType(wrapper::org::ortc::RTCStatsType type) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp new file mode 100644 index 00000000..73d4bc47 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp @@ -0,0 +1,96 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_Settings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::Settings::~Settings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::applyDefaults() +{ +} + +//------------------------------------------------------------------------------ +bool wrapper::org::ortc::Settings::apply(wrapper::org::ortc::JsonPtr jsonSettings) +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::setString( + String key, + String value + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::setInt( + String key, + int64_t value + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::setUInt( + String key, + uint64_t value + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::setBool( + String key, + bool value + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::setFloat( + String key, + float value + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::setDouble( + String key, + double value + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::clear(String key) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Settings::clearAll() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_Settings.h b/ortc/idl/wrapper/impl_org_ortc_Settings.h new file mode 100644 index 00000000..bea228e0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Settings.h @@ -0,0 +1,23 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_Settings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct Settings : public wrapper::org::ortc::Settings + { + virtual ~Settings(); + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp new file mode 100644 index 00000000..1b1a6a34 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_StringOrStringList.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::StringOrStringList::StringOrStringList() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::StringOrStringListPtr wrapper::org::ortc::StringOrStringList::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::StringOrStringList::~StringOrStringList() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::StringOrStringList::wrapper_init_org_ortc_StringOrStringList() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::StringOrStringList::wrapper_init_org_ortc_StringOrStringList(wrapper::org::ortc::StringOrStringListPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::StringOrStringList::wrapper_init_org_ortc_StringOrStringList(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::StringOrStringList::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::StringOrStringList::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h new file mode 100644 index 00000000..6c838d4f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_StringOrStringList.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct StringOrStringList : public wrapper::org::ortc::StringOrStringList + { + StringOrStringListWeakPtr thisWeak_; + + StringOrStringList(); + virtual ~StringOrStringList(); + + // methods StringOrStringList + virtual void wrapper_init_org_ortc_StringOrStringList() override; + virtual void wrapper_init_org_ortc_StringOrStringList(wrapper::org::ortc::StringOrStringListPtr source) override; + virtual void wrapper_init_org_ortc_StringOrStringList(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp new file mode 100644 index 00000000..4060236a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp @@ -0,0 +1,139 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_MediaStream.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::MediaStream::MediaStream() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::MediaStreamPtr wrapper::org::ortc::adapter::MediaStream::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::MediaStream::~MediaStream() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::MediaStream::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::wrapper_init_org_ortc_adapter_MediaStream() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::wrapper_init_org_ortc_adapter_MediaStream(wrapper::org::ortc::adapter::MediaStreamPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::wrapper_init_org_ortc_adapter_MediaStream(shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > tracks) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::adapter::MediaStream::getTrackById(String id) +{ + wrapper::org::ortc::MediaStreamTrackPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::removeTrack(wrapper::org::ortc::MediaStreamTrackPtr track) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::MediaStreamPtr wrapper::impl::org::ortc::adapter::MediaStream::clone() +{ + wrapper::org::ortc::adapter::MediaStreamPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::adapter::MediaStream::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::MediaStream::get_id() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::adapter::MediaStream::get_active() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > wrapper::impl::org::ortc::adapter::MediaStream::get_tracks() +{ + shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > wrapper::impl::org::ortc::adapter::MediaStream::get_audioTracks() +{ + shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > wrapper::impl::org::ortc::adapter::MediaStream::get_videoTracks() +{ + shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::adapter::MediaStream::get_count() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h new file mode 100644 index 00000000..7d207e05 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h @@ -0,0 +1,51 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_MediaStream.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct MediaStream : public wrapper::org::ortc::adapter::MediaStream + { + MediaStreamWeakPtr thisWeak_; + + MediaStream(); + virtual ~MediaStream(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods MediaStream + virtual void wrapper_init_org_ortc_adapter_MediaStream() override; + virtual void wrapper_init_org_ortc_adapter_MediaStream(wrapper::org::ortc::adapter::MediaStreamPtr source) override; + virtual void wrapper_init_org_ortc_adapter_MediaStream(shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > tracks) override; + virtual wrapper::org::ortc::MediaStreamTrackPtr getTrackById(String id) override; + virtual void addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) override; + virtual void removeTrack(wrapper::org::ortc::MediaStreamTrackPtr track) override; + virtual wrapper::org::ortc::adapter::MediaStreamPtr clone() override; + + // properties MediaStream + virtual uint64_t get_objectId() override; + virtual String get_id() override; + virtual bool get_active() override; + virtual shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > get_tracks() override; + virtual shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > get_audioTracks() override; + virtual shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > get_videoTracks() override; + virtual uint64_t get_count() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp new file mode 100644 index 00000000..c72b8117 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCAnswerOptions.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCAnswerOptions::RTCAnswerOptions() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCAnswerOptionsPtr wrapper::org::ortc::adapter::RTCAnswerOptions::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCAnswerOptions::~RTCAnswerOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCAnswerOptions::wrapper_init_org_ortc_adapter_RTCAnswerOptions() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h new file mode 100644 index 00000000..af5ef81c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h @@ -0,0 +1,29 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCAnswerOptions.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCAnswerOptions : public wrapper::org::ortc::adapter::RTCAnswerOptions + { + RTCAnswerOptionsWeakPtr thisWeak_; + + RTCAnswerOptions(); + virtual ~RTCAnswerOptions(); + virtual void wrapper_init_org_ortc_adapter_RTCAnswerOptions() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp new file mode 100644 index 00000000..e0a8c3c8 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCCapabilityOptions.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCCapabilityOptions::RTCCapabilityOptions() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr wrapper::org::ortc::adapter::RTCCapabilityOptions::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCCapabilityOptions::~RTCCapabilityOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCCapabilityOptions::wrapper_init_org_ortc_adapter_RTCCapabilityOptions() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h new file mode 100644 index 00000000..ff78c20a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h @@ -0,0 +1,29 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCCapabilityOptions.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCCapabilityOptions : public wrapper::org::ortc::adapter::RTCCapabilityOptions + { + RTCCapabilityOptionsWeakPtr thisWeak_; + + RTCCapabilityOptions(); + virtual ~RTCCapabilityOptions(); + virtual void wrapper_init_org_ortc_adapter_RTCCapabilityOptions() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp new file mode 100644 index 00000000..2c26e5da --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp @@ -0,0 +1,49 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCConfiguration.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCConfiguration::RTCConfiguration() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCConfigurationPtr wrapper::org::ortc::adapter::RTCConfiguration::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCConfiguration::~RTCConfiguration() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCConfiguration::wrapper_init_org_ortc_adapter_RTCConfiguration() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCConfiguration::wrapper_init_org_ortc_adapter_RTCConfiguration(wrapper::org::ortc::adapter::RTCConfigurationPtr source) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h new file mode 100644 index 00000000..ede66d50 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h @@ -0,0 +1,32 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCConfiguration.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCConfiguration : public wrapper::org::ortc::adapter::RTCConfiguration + { + RTCConfigurationWeakPtr thisWeak_; + + RTCConfiguration(); + virtual ~RTCConfiguration(); + + // methods RTCConfiguration + virtual void wrapper_init_org_ortc_adapter_RTCConfiguration() override; + virtual void wrapper_init_org_ortc_adapter_RTCConfiguration(wrapper::org::ortc::adapter::RTCConfigurationPtr source) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp new file mode 100644 index 00000000..d760ce4f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp @@ -0,0 +1,107 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCIceCandidate.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCIceCandidate::RTCIceCandidate() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::org::ortc::adapter::RTCIceCandidate::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCIceCandidate::~RTCIceCandidate() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCIceCandidate::wrapper_init_org_ortc_adapter_RTCIceCandidate() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCIceCandidate::wrapper_init_org_ortc_adapter_RTCIceCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCIceCandidate::wrapper_init_org_ortc_adapter_RTCIceCandidate(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::org::ortc::adapter::RTCIceCandidate::fromSdpStringWithMLineIndex( + String sdp, + uint64_t mlineIndex + ) +{ + wrapper::org::ortc::adapter::RTCIceCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::org::ortc::adapter::RTCIceCandidate::fromSdpStringWithMid( + String sdp, + String mid + ) +{ + wrapper::org::ortc::adapter::RTCIceCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCIceCandidate::toSdp() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCIceCandidate::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCIceCandidate::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCIceCandidate::get_sdpMid() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCIceCandidate::set_sdpMid(String value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h new file mode 100644 index 00000000..83cb5061 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h @@ -0,0 +1,40 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCIceCandidate.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCIceCandidate : public wrapper::org::ortc::adapter::RTCIceCandidate + { + RTCIceCandidateWeakPtr thisWeak_; + + RTCIceCandidate(); + virtual ~RTCIceCandidate(); + + // methods RTCIceCandidate + virtual void wrapper_init_org_ortc_adapter_RTCIceCandidate() override; + virtual void wrapper_init_org_ortc_adapter_RTCIceCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCIceCandidate(wrapper::org::ortc::JsonPtr json) override; + virtual String toSdp() override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCIceCandidate + virtual String get_sdpMid() override; + virtual void set_sdpMid(String value) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp new file mode 100644 index 00000000..d73adf64 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp @@ -0,0 +1,49 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::RTCMediaStreamTrackConfiguration() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr wrapper::org::ortc::adapter::RTCMediaStreamTrackConfiguration::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::~RTCMediaStreamTrackConfiguration() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::wrapper_init_org_ortc_adapter_RTCMediaStreamTrackConfiguration() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::wrapper_init_org_ortc_adapter_RTCMediaStreamTrackConfiguration(wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr source) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h new file mode 100644 index 00000000..dbdac5e0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h @@ -0,0 +1,32 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCMediaStreamTrackConfiguration.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCMediaStreamTrackConfiguration : public wrapper::org::ortc::adapter::RTCMediaStreamTrackConfiguration + { + RTCMediaStreamTrackConfigurationWeakPtr thisWeak_; + + RTCMediaStreamTrackConfiguration(); + virtual ~RTCMediaStreamTrackConfiguration(); + + // methods RTCMediaStreamTrackConfiguration + virtual void wrapper_init_org_ortc_adapter_RTCMediaStreamTrackConfiguration() override; + virtual void wrapper_init_org_ortc_adapter_RTCMediaStreamTrackConfiguration(wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr source) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp new file mode 100644 index 00000000..c0977b08 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCOfferAnswerOptions.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::RTCOfferAnswerOptions() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCOfferAnswerOptionsPtr wrapper::org::ortc::adapter::RTCOfferAnswerOptions::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::~RTCOfferAnswerOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::wrapper_init_org_ortc_adapter_RTCOfferAnswerOptions() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h new file mode 100644 index 00000000..f5e21e2c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h @@ -0,0 +1,29 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCOfferAnswerOptions.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCOfferAnswerOptions : public wrapper::org::ortc::adapter::RTCOfferAnswerOptions + { + RTCOfferAnswerOptionsWeakPtr thisWeak_; + + RTCOfferAnswerOptions(); + virtual ~RTCOfferAnswerOptions(); + virtual void wrapper_init_org_ortc_adapter_RTCOfferAnswerOptions() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp new file mode 100644 index 00000000..0e8f84f6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp @@ -0,0 +1,44 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCOfferOptions.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCOfferOptions::RTCOfferOptions() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCOfferOptionsPtr wrapper::org::ortc::adapter::RTCOfferOptions::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCOfferOptions::~RTCOfferOptions() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCOfferOptions::wrapper_init_org_ortc_adapter_RTCOfferOptions() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h new file mode 100644 index 00000000..a8d2b7a2 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h @@ -0,0 +1,29 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCOfferOptions.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCOfferOptions : public wrapper::org::ortc::adapter::RTCOfferOptions + { + RTCOfferOptionsWeakPtr thisWeak_; + + RTCOfferOptions(); + virtual ~RTCOfferOptions(); + virtual void wrapper_init_org_ortc_adapter_RTCOfferOptions() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp new file mode 100644 index 00000000..de3474a2 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp @@ -0,0 +1,284 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCPeerConnection.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCPeerConnection::RTCPeerConnection() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCPeerConnectionPtr wrapper::org::ortc::adapter::RTCPeerConnection::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCPeerConnection::~RTCPeerConnection() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnection::wrapper_init_org_ortc_adapter_RTCPeerConnection() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnection::wrapper_init_org_ortc_adapter_RTCPeerConnection(wrapper::org::ortc::adapter::RTCConfigurationPtr configuration) +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer() +{ + shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer() +{ + shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities() +{ + shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +PromisePtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::setLocalDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) +{ + PromisePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +PromisePtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::setRemoteDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) +{ + PromisePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnection::addIceCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr candidate) +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCIceServerPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getDefaultIceServers() +{ + shared_ptr< list< wrapper::org::ortc::RTCIceServerPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnection::close() +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getSenders() +{ + shared_ptr< list< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getReceivers() +{ + shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( + wrapper::org::ortc::MediaStreamTrackPtr track, + wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config + ) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( + wrapper::org::ortc::MediaStreamTrackPtr track, + shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > mediaStreams, + wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config + ) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnection::removeTrack(wrapper::org::ortc::RTCRtpSenderPtr sender) +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< PromiseWith< wrapper::org::ortc::RTCDataChannelPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) +{ + shared_ptr< PromiseWith< wrapper::org::ortc::RTCDataChannelPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_localDescription() +{ + wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_currentDescription() +{ + wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_pendingDescription() +{ + wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_remoteDescription() +{ + wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_currentRemoteDescription() +{ + wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_pendingRemoteDescription() +{ + wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSignalingState wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_signalingState() +{ + wrapper::org::ortc::adapter::RTCSignalingState result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceGathererState wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_iceGatheringState() +{ + wrapper::org::ortc::RTCIceGathererState result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCIceConnectionState wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_iceConnectionState() +{ + wrapper::org::ortc::adapter::RTCIceConnectionState result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCPeerConnectionState wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_connectionState() +{ + wrapper::org::ortc::adapter::RTCPeerConnectionState result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_canTrickleCandidates() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCConfigurationPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_getConfiguration() +{ + wrapper::org::ortc::adapter::RTCConfigurationPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnection::set_getConfiguration(wrapper::org::ortc::adapter::RTCConfigurationPtr value) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnection::wrapper_onObserverCountChanged(size_t count) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h new file mode 100644 index 00000000..7f303e4c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h @@ -0,0 +1,78 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCPeerConnection.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCPeerConnection : public wrapper::org::ortc::adapter::RTCPeerConnection + { + RTCPeerConnectionWeakPtr thisWeak_; + + RTCPeerConnection(); + virtual ~RTCPeerConnection(); + + // methods RTCStatsProvider + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + // methods RTCPeerConnection + virtual void wrapper_init_org_ortc_adapter_RTCPeerConnection() override; + virtual void wrapper_init_org_ortc_adapter_RTCPeerConnection(wrapper::org::ortc::adapter::RTCConfigurationPtr configuration) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer() override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer() override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities() override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) override; + virtual PromisePtr setLocalDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) override; + virtual PromisePtr setRemoteDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) override; + virtual void addIceCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr candidate) override; + virtual shared_ptr< list< wrapper::org::ortc::RTCIceServerPtr > > getDefaultIceServers() override; + virtual void close() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCRtpSenderPtr > > getSenders() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > getReceivers() override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( + wrapper::org::ortc::MediaStreamTrackPtr track, + wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config + ) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( + wrapper::org::ortc::MediaStreamTrackPtr track, + shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > mediaStreams, + wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config + ) override; + virtual void removeTrack(wrapper::org::ortc::RTCRtpSenderPtr sender) override; + virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCDataChannelPtr > > createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) override; + + // properties RTCPeerConnection + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::adapter::RTCSessionDescriptionPtr get_localDescription() override; + virtual wrapper::org::ortc::adapter::RTCSessionDescriptionPtr get_currentDescription() override; + virtual wrapper::org::ortc::adapter::RTCSessionDescriptionPtr get_pendingDescription() override; + virtual wrapper::org::ortc::adapter::RTCSessionDescriptionPtr get_remoteDescription() override; + virtual wrapper::org::ortc::adapter::RTCSessionDescriptionPtr get_currentRemoteDescription() override; + virtual wrapper::org::ortc::adapter::RTCSessionDescriptionPtr get_pendingRemoteDescription() override; + virtual wrapper::org::ortc::adapter::RTCSignalingState get_signalingState() override; + virtual wrapper::org::ortc::RTCIceGathererState get_iceGatheringState() override; + virtual wrapper::org::ortc::adapter::RTCIceConnectionState get_iceConnectionState() override; + virtual wrapper::org::ortc::adapter::RTCPeerConnectionState get_connectionState() override; + virtual bool get_canTrickleCandidates() override; + virtual wrapper::org::ortc::adapter::RTCConfigurationPtr get_getConfiguration() override; + virtual void set_getConfiguration(wrapper::org::ortc::adapter::RTCConfigurationPtr value) override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp new file mode 100644 index 00000000..048a1bc2 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp @@ -0,0 +1,56 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::RTCPeerConnectionIceCompleteEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCPeerConnectionIceCompleteEventPtr wrapper::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::~RTCPeerConnectionIceCompleteEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::wrapper_init_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::get_candidate() +{ + wrapper::org::ortc::RTCIceCandidateCompletePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::set_candidate(wrapper::org::ortc::RTCIceCandidateCompletePtr value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h new file mode 100644 index 00000000..536f9a2f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h @@ -0,0 +1,33 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCPeerConnectionIceCompleteEvent : public wrapper::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent + { + RTCPeerConnectionIceCompleteEventWeakPtr thisWeak_; + + RTCPeerConnectionIceCompleteEvent(); + virtual ~RTCPeerConnectionIceCompleteEvent(); + virtual void wrapper_init_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent() override; + + // properties RTCPeerConnectionIceCompleteEvent + virtual wrapper::org::ortc::RTCIceCandidateCompletePtr get_candidate() override; + virtual void set_candidate(wrapper::org::ortc::RTCIceCandidateCompletePtr value) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp new file mode 100644 index 00000000..fb356368 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp @@ -0,0 +1,92 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::RTCPeerConnectionIceErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCPeerConnectionIceErrorEventPtr wrapper::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::~RTCPeerConnectionIceErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::wrapper_init_org_ortc_adapter_RTCPeerConnectionIceErrorEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_hostCandidate() +{ + wrapper::org::ortc::adapter::RTCIceCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::set_hostCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr value) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_url() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::set_url(String value) +{ +} + +//------------------------------------------------------------------------------ +Optional< uint16_t > wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_errorCode() +{ + Optional< uint16_t > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::set_errorCode(Optional< uint16_t > value) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_errorText() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::set_errorText(String value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h new file mode 100644 index 00000000..55e00ff7 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h @@ -0,0 +1,39 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCPeerConnectionIceErrorEvent : public wrapper::org::ortc::adapter::RTCPeerConnectionIceErrorEvent + { + RTCPeerConnectionIceErrorEventWeakPtr thisWeak_; + + RTCPeerConnectionIceErrorEvent(); + virtual ~RTCPeerConnectionIceErrorEvent(); + virtual void wrapper_init_org_ortc_adapter_RTCPeerConnectionIceErrorEvent() override; + + // properties RTCPeerConnectionIceErrorEvent + virtual wrapper::org::ortc::adapter::RTCIceCandidatePtr get_hostCandidate() override; + virtual void set_hostCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr value) override; + virtual String get_url() override; + virtual void set_url(String value) override; + virtual Optional< uint16_t > get_errorCode() override; + virtual void set_errorCode(Optional< uint16_t > value) override; + virtual String get_errorText() override; + virtual void set_errorText(String value) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp new file mode 100644 index 00000000..3d0cc35c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCPeerConnectionIceEventPtr wrapper::org::ortc::adapter::RTCPeerConnectionIceEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::~RTCPeerConnectionIceEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::wrapper_init_org_ortc_adapter_RTCPeerConnectionIceEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::get_candidate() +{ + wrapper::org::ortc::adapter::RTCIceCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::set_candidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr value) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::get_uri() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::set_uri(String value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h new file mode 100644 index 00000000..9f9154c9 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCPeerConnectionIceEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCPeerConnectionIceEvent : public wrapper::org::ortc::adapter::RTCPeerConnectionIceEvent + { + RTCPeerConnectionIceEventWeakPtr thisWeak_; + + RTCPeerConnectionIceEvent(); + virtual ~RTCPeerConnectionIceEvent(); + virtual void wrapper_init_org_ortc_adapter_RTCPeerConnectionIceEvent() override; + + // properties RTCPeerConnectionIceEvent + virtual wrapper::org::ortc::adapter::RTCIceCandidatePtr get_candidate() override; + virtual void set_candidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr value) override; + virtual String get_uri() override; + virtual void set_uri(String value) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp new file mode 100644 index 00000000..8bc53f9a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp @@ -0,0 +1,125 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescription.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescription::RTCSessionDescription() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::org::ortc::adapter::RTCSessionDescription::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescription::~RTCSessionDescription() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescription::wrapper_init_org_ortc_adapter_RTCSessionDescription( + wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType type, + String description + ) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescription::wrapper_init_org_ortc_adapter_RTCSessionDescription( + wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType type, + wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr description + ) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpParametersPtr wrapper::org::ortc::adapter::RTCSessionDescription::convertCapabilitiesToParameters(wrapper::org::ortc::RTCRtpCapabilitiesPtr capabilitites) +{ + wrapper::org::ortc::RTCRtpParametersPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::org::ortc::adapter::RTCSessionDescription::ConvertParametersToCapabilitites(wrapper::org::ortc::RTCRtpParametersPtr parameters) +{ + wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint64_t wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_objectId() +{ + uint64_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_type() +{ + wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSdpType wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_sdpType() +{ + wrapper::org::ortc::adapter::RTCSdpType result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_isJsonSignalling() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +bool wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_isSdpSignaling() +{ + bool result {}; + return result; +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_description() +{ + wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_formattedDescription() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_sdp() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h new file mode 100644 index 00000000..a1199208 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h @@ -0,0 +1,48 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescription.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescription : public wrapper::org::ortc::adapter::RTCSessionDescription + { + RTCSessionDescriptionWeakPtr thisWeak_; + + RTCSessionDescription(); + virtual ~RTCSessionDescription(); + + // methods RTCSessionDescription + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescription( + wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType type, + String description + ) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescription( + wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType type, + wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr description + ) override; + + // properties RTCSessionDescription + virtual uint64_t get_objectId() override; + virtual wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType get_type() override; + virtual wrapper::org::ortc::adapter::RTCSdpType get_sdpType() override; + virtual bool get_isJsonSignalling() override; + virtual bool get_isSdpSignaling() override; + virtual wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr get_description() override; + virtual String get_formattedDescription() override; + virtual String get_sdp() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp new file mode 100644 index 00000000..6b3853a9 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::RTCSessionDescriptionConnectionData() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataPtr wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionData::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::~RTCSessionDescriptionConnectionData() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData(wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h new file mode 100644 index 00000000..ed2ce31e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionConnectionData.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionConnectionData : public wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionData + { + RTCSessionDescriptionConnectionDataWeakPtr thisWeak_; + + RTCSessionDescriptionConnectionData(); + virtual ~RTCSessionDescriptionConnectionData(); + + // methods RTCSessionDescriptionConnectionData + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData(wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp new file mode 100644 index 00000000..dec01b32 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::RTCSessionDescriptionConnectionDataDetails() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetailsPtr wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::~RTCSessionDescriptionConnectionDataDetails() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetailsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h new file mode 100644 index 00000000..2166a587 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionConnectionDataDetails : public wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails + { + RTCSessionDescriptionConnectionDataDetailsWeakPtr thisWeak_; + + RTCSessionDescriptionConnectionDataDetails(); + virtual ~RTCSessionDescriptionConnectionDataDetails(); + + // methods RTCSessionDescriptionConnectionDataDetails + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetailsPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp new file mode 100644 index 00000000..2fe8577d --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionDescription.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::RTCSessionDescriptionDescription() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr wrapper::org::ortc::adapter::RTCSessionDescriptionDescription::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::~RTCSessionDescriptionDescription() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h new file mode 100644 index 00000000..a7bd1e59 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionDescription.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionDescription : public wrapper::org::ortc::adapter::RTCSessionDescriptionDescription + { + RTCSessionDescriptionDescriptionWeakPtr thisWeak_; + + RTCSessionDescriptionDescription(); + virtual ~RTCSessionDescriptionDescription(); + + // methods RTCSessionDescriptionDescription + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp new file mode 100644 index 00000000..6ac390c0 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::RTCSessionDescriptionDescriptionDetails() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionDetailsPtr wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::~RTCSessionDescriptionDescriptionDetails() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionDetailsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h new file mode 100644 index 00000000..06ea9e5e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionDescriptionDetails : public wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails + { + RTCSessionDescriptionDescriptionDetailsWeakPtr thisWeak_; + + RTCSessionDescriptionDescriptionDetails(); + virtual ~RTCSessionDescriptionDescriptionDetails(); + + // methods RTCSessionDescriptionDescriptionDetails + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionDetailsPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp new file mode 100644 index 00000000..1c32d673 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::RTCSessionDescriptionMediaLine() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLinePtr wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLine::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::~RTCSessionDescriptionMediaLine() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLinePtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h new file mode 100644 index 00000000..3dd68c0d --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionMediaLine.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionMediaLine : public wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLine + { + RTCSessionDescriptionMediaLineWeakPtr thisWeak_; + + RTCSessionDescriptionMediaLine(); + virtual ~RTCSessionDescriptionMediaLine(); + + // methods RTCSessionDescriptionMediaLine + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLinePtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp new file mode 100644 index 00000000..4796735a --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::RTCSessionDescriptionMediaLineDetails() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLineDetailsPtr wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::~RTCSessionDescriptionMediaLineDetails() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLineDetailsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h new file mode 100644 index 00000000..9530d92e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionMediaLineDetails : public wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails + { + RTCSessionDescriptionMediaLineDetailsWeakPtr thisWeak_; + + RTCSessionDescriptionMediaLineDetails(); + virtual ~RTCSessionDescriptionMediaLineDetails(); + + // methods RTCSessionDescriptionMediaLineDetails + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLineDetailsPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp new file mode 100644 index 00000000..46939729 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp @@ -0,0 +1,92 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::RTCSessionDescriptionRtpMediaLine() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLinePtr wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::~RTCSessionDescriptionRtpMediaLine() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLinePtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::get_senderCapabilities() +{ + wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::set_senderCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr value) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::get_receiverCapabilities() +{ + wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::set_receiverCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h new file mode 100644 index 00000000..8f007271 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h @@ -0,0 +1,43 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionRtpMediaLine : public wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine + { + RTCSessionDescriptionRtpMediaLineWeakPtr thisWeak_; + + RTCSessionDescriptionRtpMediaLine(); + virtual ~RTCSessionDescriptionRtpMediaLine(); + + // methods RTCSessionDescriptionMediaLine + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // methods RTCSessionDescriptionRtpMediaLine + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLinePtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCSessionDescriptionRtpMediaLine + virtual wrapper::org::ortc::RTCRtpCapabilitiesPtr get_senderCapabilities() override; + virtual void set_senderCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr value) override; + virtual wrapper::org::ortc::RTCRtpCapabilitiesPtr get_receiverCapabilities() override; + virtual void set_receiverCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr value) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp new file mode 100644 index 00000000..b4e034cc --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::RTCSessionDescriptionRtpSender() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderPtr wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSender::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::~RTCSessionDescriptionRtpSender() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h new file mode 100644 index 00000000..113f2b20 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionRtpSender.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionRtpSender : public wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSender + { + RTCSessionDescriptionRtpSenderWeakPtr thisWeak_; + + RTCSessionDescriptionRtpSender(); + virtual ~RTCSessionDescriptionRtpSender(); + + // methods RTCSessionDescriptionRtpSender + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp new file mode 100644 index 00000000..1272ec34 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::RTCSessionDescriptionRtpSenderDetails() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetailsPtr wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::~RTCSessionDescriptionRtpSenderDetails() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetailsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h new file mode 100644 index 00000000..17a91037 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionRtpSenderDetails : public wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails + { + RTCSessionDescriptionRtpSenderDetailsWeakPtr thisWeak_; + + RTCSessionDescriptionRtpSenderDetails(); + virtual ~RTCSessionDescriptionRtpSenderDetails(); + + // methods RTCSessionDescriptionRtpSenderDetails + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetailsPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp new file mode 100644 index 00000000..8e7a31a2 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp @@ -0,0 +1,92 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::RTCSessionDescriptionSctpMediaLine() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLinePtr wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::~RTCSessionDescriptionSctpMediaLine() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLinePtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpCapabilitiesPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::get_capabilities() +{ + wrapper::org::ortc::RTCSctpCapabilitiesPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::set_capabilities(wrapper::org::ortc::RTCSctpCapabilitiesPtr value) +{ +} + +//------------------------------------------------------------------------------ +Optional< uint16_t > wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::get_port() +{ + Optional< uint16_t > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::set_port(Optional< uint16_t > value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h new file mode 100644 index 00000000..d15c7ce3 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h @@ -0,0 +1,43 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionSctpMediaLine : public wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine + { + RTCSessionDescriptionSctpMediaLineWeakPtr thisWeak_; + + RTCSessionDescriptionSctpMediaLine(); + virtual ~RTCSessionDescriptionSctpMediaLine(); + + // methods RTCSessionDescriptionMediaLine + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // methods RTCSessionDescriptionSctpMediaLine + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLinePtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::JsonPtr json) override; + + // properties RTCSessionDescriptionSctpMediaLine + virtual wrapper::org::ortc::RTCSctpCapabilitiesPtr get_capabilities() override; + virtual void set_capabilities(wrapper::org::ortc::RTCSctpCapabilitiesPtr value) override; + virtual Optional< uint16_t > get_port() override; + virtual void set_port(Optional< uint16_t > value) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp new file mode 100644 index 00000000..36ac4702 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionTransport.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::RTCSessionDescriptionTransport() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionTransportPtr wrapper::org::ortc::adapter::RTCSessionDescriptionTransport::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::~RTCSessionDescriptionTransport() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport(wrapper::org::ortc::adapter::RTCSessionDescriptionTransportPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h new file mode 100644 index 00000000..c7b0d80e --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionTransport.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionTransport : public wrapper::org::ortc::adapter::RTCSessionDescriptionTransport + { + RTCSessionDescriptionTransportWeakPtr thisWeak_; + + RTCSessionDescriptionTransport(); + virtual ~RTCSessionDescriptionTransport(); + + // methods RTCSessionDescriptionTransport + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport(wrapper::org::ortc::adapter::RTCSessionDescriptionTransportPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp new file mode 100644 index 00000000..4ef79e3b --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp @@ -0,0 +1,68 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::RTCSessionDescriptionTransportParameters() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCSessionDescriptionTransportParametersPtr wrapper::org::ortc::adapter::RTCSessionDescriptionTransportParameters::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::~RTCSessionDescriptionTransportParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters(wrapper::org::ortc::adapter::RTCSessionDescriptionTransportParametersPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters(wrapper::org::ortc::JsonPtr json) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::hash() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h new file mode 100644 index 00000000..5008b0ef --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCSessionDescriptionTransportParameters.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCSessionDescriptionTransportParameters : public wrapper::org::ortc::adapter::RTCSessionDescriptionTransportParameters + { + RTCSessionDescriptionTransportParametersWeakPtr thisWeak_; + + RTCSessionDescriptionTransportParameters(); + virtual ~RTCSessionDescriptionTransportParameters(); + + // methods RTCSessionDescriptionTransportParameters + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters() override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters(wrapper::org::ortc::adapter::RTCSessionDescriptionTransportParametersPtr source) override; + virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters(wrapper::org::ortc::JsonPtr json) override; + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp new file mode 100644 index 00000000..d90bf1dc --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp @@ -0,0 +1,80 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_adapter_RTCTrackEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWith; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCTrackEvent::RTCTrackEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::adapter::RTCTrackEventPtr wrapper::org::ortc::adapter::RTCTrackEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCTrackEvent::~RTCTrackEvent() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCTrackEvent::wrapper_init_org_ortc_adapter_RTCTrackEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpReceiverPtr wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_receiver() +{ + wrapper::org::ortc::RTCRtpReceiverPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCTrackEvent::set_receiver(wrapper::org::ortc::RTCRtpReceiverPtr value) +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_track() +{ + wrapper::org::ortc::MediaStreamTrackPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCTrackEvent::set_track(wrapper::org::ortc::MediaStreamTrackPtr value) +{ +} + +//------------------------------------------------------------------------------ +shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_mediaStreams() +{ + shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::RTCTrackEvent::set_mediaStreams(shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > value) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h new file mode 100644 index 00000000..eaefad56 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h @@ -0,0 +1,37 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_adapter_RTCTrackEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + + struct RTCTrackEvent : public wrapper::org::ortc::adapter::RTCTrackEvent + { + RTCTrackEventWeakPtr thisWeak_; + + RTCTrackEvent(); + virtual ~RTCTrackEvent(); + virtual void wrapper_init_org_ortc_adapter_RTCTrackEvent() override; + + // properties RTCTrackEvent + virtual wrapper::org::ortc::RTCRtpReceiverPtr get_receiver() override; + virtual void set_receiver(wrapper::org::ortc::RTCRtpReceiverPtr value) override; + virtual wrapper::org::ortc::MediaStreamTrackPtr get_track() override; + virtual void set_track(wrapper::org::ortc::MediaStreamTrackPtr value) override; + virtual shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > get_mediaStreams() override; + virtual void set_mediaStreams(shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > value) override; + }; + + } // adapter + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/types.h b/ortc/idl/wrapper/types.h new file mode 100644 index 00000000..cdab31cf --- /dev/null +++ b/ortc/idl/wrapper/types.h @@ -0,0 +1,182 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "generated/types.h" + +namespace wrapper { + namespace impl { + + namespace org { + namespace ortc { + namespace adapter { + + ZS_DECLARE_STRUCT_PTR(MediaStream); + ZS_DECLARE_STRUCT_PTR(RTCAnswerOptions); + ZS_DECLARE_STRUCT_PTR(RTCCapabilityOptions); + ZS_DECLARE_STRUCT_PTR(RTCConfiguration); + ZS_DECLARE_STRUCT_PTR(RTCIceCandidate); + ZS_DECLARE_STRUCT_PTR(RTCMediaStreamTrackConfiguration); + ZS_DECLARE_STRUCT_PTR(RTCOfferAnswerOptions); + ZS_DECLARE_STRUCT_PTR(RTCOfferOptions); + ZS_DECLARE_STRUCT_PTR(RTCPeerConnection); + ZS_DECLARE_STRUCT_PTR(RTCPeerConnectionIceCompleteEvent); + ZS_DECLARE_STRUCT_PTR(RTCPeerConnectionIceErrorEvent); + ZS_DECLARE_STRUCT_PTR(RTCPeerConnectionIceEvent); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescription); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionConnectionData); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionConnectionDataDetails); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionDescription); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionDescriptionDetails); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionMediaLine); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionMediaLineDetails); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionRtpMediaLine); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionRtpSender); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionRtpSenderDetails); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionSctpMediaLine); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionTransport); + ZS_DECLARE_STRUCT_PTR(RTCSessionDescriptionTransportParameters); + ZS_DECLARE_STRUCT_PTR(RTCTrackEvent); + + } // namespace adapter + + namespace log { + } // namespace log + + ZS_DECLARE_STRUCT_PTR(ConstrainBoolean); + ZS_DECLARE_STRUCT_PTR(ConstrainBooleanParameters); + ZS_DECLARE_STRUCT_PTR(ConstrainDouble); + ZS_DECLARE_STRUCT_PTR(ConstrainDoubleRange); + ZS_DECLARE_STRUCT_PTR(ConstrainLong); + ZS_DECLARE_STRUCT_PTR(ConstrainLongRange); + ZS_DECLARE_STRUCT_PTR(ConstrainString); + ZS_DECLARE_STRUCT_PTR(ConstrainStringParameters); + ZS_DECLARE_STRUCT_PTR(Dispatcher); + ZS_DECLARE_STRUCT_PTR(DoubleRange); + ZS_DECLARE_STRUCT_PTR(Error); + ZS_DECLARE_STRUCT_PTR(ErrorEvent); + ZS_DECLARE_STRUCT_PTR(Json); + ZS_DECLARE_STRUCT_PTR(Logger); + ZS_DECLARE_STRUCT_PTR(LongRange); + ZS_DECLARE_STRUCT_PTR(MediaControl); + ZS_DECLARE_STRUCT_PTR(MediaDeviceInfo); + ZS_DECLARE_STRUCT_PTR(MediaDevices); + ZS_DECLARE_STRUCT_PTR(MediaSource); + ZS_DECLARE_STRUCT_PTR(MediaStreamConstraints); + ZS_DECLARE_STRUCT_PTR(MediaStreamTrack); + ZS_DECLARE_STRUCT_PTR(MediaTrackCapabilities); + ZS_DECLARE_STRUCT_PTR(MediaTrackConstraintSet); + ZS_DECLARE_STRUCT_PTR(MediaTrackConstraints); + ZS_DECLARE_STRUCT_PTR(MediaTrackSettings); + ZS_DECLARE_STRUCT_PTR(MediaTrackSupportedConstraints); + ZS_DECLARE_STRUCT_PTR(MessageQueue); + ZS_DECLARE_STRUCT_PTR(OrtcLib); + ZS_DECLARE_STRUCT_PTR(OrtcLibWithDispatcher); + ZS_DECLARE_STRUCT_PTR(OverconstrainedError); + ZS_DECLARE_STRUCT_PTR(OverconstrainedErrorEvent); + ZS_DECLARE_STRUCT_PTR(RTCCertificate); + ZS_DECLARE_STRUCT_PTR(RTCCertificateStats); + ZS_DECLARE_STRUCT_PTR(RTCCodec); + ZS_DECLARE_STRUCT_PTR(RTCDataChannel); + ZS_DECLARE_STRUCT_PTR(RTCDataChannelEvent); + ZS_DECLARE_STRUCT_PTR(RTCDataChannelParameters); + ZS_DECLARE_STRUCT_PTR(RTCDataChannelStateChangeEvent); + ZS_DECLARE_STRUCT_PTR(RTCDataChannelStats); + ZS_DECLARE_STRUCT_PTR(RTCDataTransport); + ZS_DECLARE_STRUCT_PTR(RTCDtlsFingerprint); + ZS_DECLARE_STRUCT_PTR(RTCDtlsParameters); + ZS_DECLARE_STRUCT_PTR(RTCDtlsTransport); + ZS_DECLARE_STRUCT_PTR(RTCDtlsTransportStateChangeEvent); + ZS_DECLARE_STRUCT_PTR(RTCDtlsTransportStats); + ZS_DECLARE_STRUCT_PTR(RTCIceCandidate); + ZS_DECLARE_STRUCT_PTR(RTCIceCandidateAttributes); + ZS_DECLARE_STRUCT_PTR(RTCIceCandidateComplete); + ZS_DECLARE_STRUCT_PTR(RTCIceCandidatePair); + ZS_DECLARE_STRUCT_PTR(RTCIceCandidatePairChangeEvent); + ZS_DECLARE_STRUCT_PTR(RTCIceCandidatePairStats); + ZS_DECLARE_STRUCT_PTR(RTCIceGatherInterfacePolicy); + ZS_DECLARE_STRUCT_PTR(RTCIceGatherOptions); + ZS_DECLARE_STRUCT_PTR(RTCIceGatherer); + ZS_DECLARE_STRUCT_PTR(RTCIceGathererCandidate); + ZS_DECLARE_STRUCT_PTR(RTCIceGathererCandidateCompleteEvent); + ZS_DECLARE_STRUCT_PTR(RTCIceGathererCandidateEvent); + ZS_DECLARE_STRUCT_PTR(RTCIceGathererIceErrorEvent); + ZS_DECLARE_STRUCT_PTR(RTCIceGathererStateChangeEvent); + ZS_DECLARE_STRUCT_PTR(RTCIceGathererStats); + ZS_DECLARE_STRUCT_PTR(RTCIceParameters); + ZS_DECLARE_STRUCT_PTR(RTCIceServer); + ZS_DECLARE_STRUCT_PTR(RTCIceTransport); + ZS_DECLARE_STRUCT_PTR(RTCIceTransportController); + ZS_DECLARE_STRUCT_PTR(RTCIceTransportOptions); + ZS_DECLARE_STRUCT_PTR(RTCIceTransportStateChangeEvent); + ZS_DECLARE_STRUCT_PTR(RTCIceTransportStats); + ZS_DECLARE_STRUCT_PTR(RTCIdentity); + ZS_DECLARE_STRUCT_PTR(RTCIdentityAssertion); + ZS_DECLARE_STRUCT_PTR(RTCIdentityError); + ZS_DECLARE_STRUCT_PTR(RTCIdentityResult); + ZS_DECLARE_STRUCT_PTR(RTCInboundRtpStreamStats); + ZS_DECLARE_STRUCT_PTR(RTCMediaStreamStats); + ZS_DECLARE_STRUCT_PTR(RTCMediaStreamTrackStats); + ZS_DECLARE_STRUCT_PTR(RTCMessageEvent); + ZS_DECLARE_STRUCT_PTR(RTCMessageEventData); + ZS_DECLARE_STRUCT_PTR(RTCOutboundRtpStreamStats); + ZS_DECLARE_STRUCT_PTR(RTCRtcpFeedback); + ZS_DECLARE_STRUCT_PTR(RTCRtcpParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtcpTransport); + ZS_DECLARE_STRUCT_PTR(RTCRtpCapabilities); + ZS_DECLARE_STRUCT_PTR(RTCRtpCodecCapability); + ZS_DECLARE_STRUCT_PTR(RTCRtpCodecCapabilityOptions); + ZS_DECLARE_STRUCT_PTR(RTCRtpCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpCodecParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpContributingSource); + ZS_DECLARE_STRUCT_PTR(RTCRtpDtmfSender); + ZS_DECLARE_STRUCT_PTR(RTCRtpEncodingParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpFecParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpFlexFecCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpH264CodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpHeaderExtension); + ZS_DECLARE_STRUCT_PTR(RTCRtpHeaderExtensionParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpListener); + ZS_DECLARE_STRUCT_PTR(RTCRtpOpusCodecCapabilityOptions); + ZS_DECLARE_STRUCT_PTR(RTCRtpOpusCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpOpusCodecParameterSettings); + ZS_DECLARE_STRUCT_PTR(RTCRtpParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpReceiver); + ZS_DECLARE_STRUCT_PTR(RTCRtpRedCodecParameterSettings); + ZS_DECLARE_STRUCT_PTR(RTCRtpRtxCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpRtxParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpSender); + ZS_DECLARE_STRUCT_PTR(RTCRtpStreamStats); + ZS_DECLARE_STRUCT_PTR(RTCRtpTransport); + ZS_DECLARE_STRUCT_PTR(RTCRtpUnhandledEvent); + ZS_DECLARE_STRUCT_PTR(RTCRtpVp8CodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCSctpCapabilities); + ZS_DECLARE_STRUCT_PTR(RTCSctpTransport); + ZS_DECLARE_STRUCT_PTR(RTCSctpTransportListener); + ZS_DECLARE_STRUCT_PTR(RTCSctpTransportStateChangeEvent); + ZS_DECLARE_STRUCT_PTR(RTCSctpTransportStats); + ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesCryptoParameters); + ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesKeyParameters); + ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesParameters); + ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesTransport); + ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesTransportLifetimeRemaining); + ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesTransportLifetimeRemainingEvent); + ZS_DECLARE_STRUCT_PTR(RTCSrtpTransportStats); + ZS_DECLARE_STRUCT_PTR(RTCSsrcConflictEvent); + ZS_DECLARE_STRUCT_PTR(RTCStats); + ZS_DECLARE_STRUCT_PTR(RTCStatsProvider); + ZS_DECLARE_STRUCT_PTR(RTCStatsReport); + ZS_DECLARE_STRUCT_PTR(RTCStatsTypeSet); + ZS_DECLARE_STRUCT_PTR(Settings); + ZS_DECLARE_STRUCT_PTR(StringOrStringList); + + } // namespace ortc + } // namespace org + + namespace zs { + namespace exceptions { + } // namespace exceptions + } // namespace zs + } // namespace impl +} // namespace wrapper + From 9bcf2226b6a9c9244b4ca11b3aa58ead436cd228 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 21 Feb 2017 21:55:31 -0500 Subject: [PATCH 011/187] - added missing exception declations --- ortc/idl/Certificate.idl | 4 ++-- ortc/idl/DataChannel.idl | 4 ++-- ortc/idl/DtlsTransport.idl | 2 +- ortc/idl/DtmfSender.idl | 2 +- ortc/idl/IceGatherer.idl | 2 +- ortc/idl/IceTransport.idl | 8 ++++---- ortc/idl/RtpReceiver.idl | 10 +++++----- ortc/idl/RtpSender.idl | 12 ++++++------ ortc/idl/SrtpSdesTransport.idl | 2 +- ortc/idl/StatsProvider.idl | 2 +- ortc/idl/adapter/MediaStream.idl | 2 +- ortc/idl/adapter/SessionDescription.idl | 10 +++++----- 12 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ortc/idl/Certificate.idl b/ortc/idl/Certificate.idl index 1aa40619..a4409680 100644 --- a/ortc/idl/Certificate.idl +++ b/ortc/idl/Certificate.idl @@ -98,7 +98,7 @@ namespace org /// /// An awaitable newly generated certificate. [static] - PromiseWithCertificate generateCertificate(); + PromiseWithCertificate generateCertificate() throws (NotImplemented); /// /// The GenerateCertificate method causes the user agent to create and @@ -113,7 +113,7 @@ namespace org /// with the certificate is generated. /// string keygenAlgorithm - ); + ) throws(NotImplemented); [static, altname(generateCertificateWithJson)] PromiseWithCertificate generateCertificate(Json keygenAlgorithm); diff --git a/ortc/idl/DataChannel.idl b/ortc/idl/DataChannel.idl index a4db0770..f80bff88 100644 --- a/ortc/idl/DataChannel.idl +++ b/ortc/idl/DataChannel.idl @@ -239,14 +239,14 @@ namespace org /// types. This Send() method transmits a string to the remote peer. /// [default, altname(sendWithString)] - void send(string text); + void send(string text) throws (InvalidParameters, InvalidStateError); /// /// The Send() method is overloaded to handle different data argument /// types. This Send() method transmits a binary blob to the remote /// peer. /// [altname(sendWithBinary)] - void send(binary data); + void send(binary data) throws (InvalidParameters, InvalidStateError); /// /// The event handler when the state of the RTCDataChannel is open. diff --git a/ortc/idl/DtlsTransport.idl b/ortc/idl/DtlsTransport.idl index 52c9ba4a..8f290037 100644 --- a/ortc/idl/DtlsTransport.idl +++ b/ortc/idl/DtlsTransport.idl @@ -112,7 +112,7 @@ namespace org void RTCDtlsTransport( RTCIceTransport iceTransport, CertificateList certificates - ); + ) throws (InvalidParameters, InvalidStateError); /// /// Gets a unique object instance identifier for this object. diff --git a/ortc/idl/DtmfSender.idl b/ortc/idl/DtmfSender.idl index 208db15a..1ac3624c 100644 --- a/ortc/idl/DtmfSender.idl +++ b/ortc/idl/DtmfSender.idl @@ -45,7 +45,7 @@ namespace org /// RTCRtpSender. /// [constructor] - void RTCRtpDtmfSender(RTCRtpSender sender); + void RTCRtpDtmfSender(RTCRtpSender sender) throws (InvalidStateError); /// /// Gets a unique object instance identifier for this object. diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index 7df88684..ccb41fb7 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -334,7 +334,7 @@ namespace org /// method more than once, or if component is "RTCP", throw an /// InvalidStateError exception. /// - RTCIceGatherer createAssociatedGatherer(); + RTCIceGatherer createAssociatedGatherer() throws (InvalidStateError); /// /// Gather ICE candidates. Utilize the value of options passed in the constructor. diff --git a/ortc/idl/IceTransport.idl b/ortc/idl/IceTransport.idl index a819f2e2..8fc2f37d 100644 --- a/ortc/idl/IceTransport.idl +++ b/ortc/idl/IceTransport.idl @@ -92,7 +92,7 @@ namespace org /// specified RTCIceGatherer. /// [constructor, altname(RTCIceTransportWithGatherer)] - void RTCIceTransport(RTCIceGatherer gatherer); + void RTCIceTransport(RTCIceGatherer gatherer) throws (InvalidStateError); /// /// Gets an unique object instance identifier for this object. @@ -160,7 +160,7 @@ namespace org void start( RTCIceGatherer gatherer, RTCIceParameters remoteParameters, - ); + ) throws (InvalidParameters, InvalidStateError); /// /// The first time Start() is called, candidate connectivity checks are @@ -180,7 +180,7 @@ namespace org RTCIceGatherer gatherer, RTCIceParameters remoteParameters, RTCIceRole options - ); + ) throws(InvalidParameters, InvalidStateError); /// /// The first time Start() is called, candidate connectivity checks are @@ -200,7 +200,7 @@ namespace org RTCIceGatherer gatherer, RTCIceParameters remoteParameters, RTCIceTransportOptions options - ); + ) throws(InvalidParameters, InvalidStateError); /// /// Stops and closes the current object. Also removes the object from diff --git a/ortc/idl/RtpReceiver.idl b/ortc/idl/RtpReceiver.idl index bb708519..d5958c39 100644 --- a/ortc/idl/RtpReceiver.idl +++ b/ortc/idl/RtpReceiver.idl @@ -126,7 +126,7 @@ namespace org void RTCRtpReceiver( MediaStreamTrackKind kind, RTCRtpTransport transport, - ); + ) throws (InvalidParameters, InvalidStateError); /// /// Constructs an instance of RTCRtpReceiver from a value of kind and an /// RTCDtlsTransport object. If an attempt is made to construct an @@ -140,7 +140,7 @@ namespace org MediaStreamTrackKind kind, RTCRtpTransport transport, RTCRtcpTransport rtcpTransport - ); + ) throws(InvalidParameters, InvalidStateError); /// /// Gets a unique object instance identifier for this object. @@ -179,7 +179,7 @@ namespace org /// InvalidParameters exception. If SetTransport() is called and /// transport.State is "closed", throw an InvalidParameters exception. /// - void setTransport(RTCRtpTransport transport); + void setTransport(RTCRtpTransport transport) throws (InvalidParameters, InvalidStateError); /// /// Set the RTP RTCSrtpSdesTransport. If the last call to /// receive(parameters) had parameters.Rtcp.Mux set to false, throw an @@ -189,7 +189,7 @@ namespace org void setTransport( RTCRtpTransport transport, RTCRtcpTransport rtcpTransport - ); + ) throws(InvalidParameters, InvalidStateError); /// /// Obtain the receiver capabilities, based on kind. Capabilities such @@ -221,7 +221,7 @@ namespace org /// throw an InvalidParameters exception. SSRC misusage also results in /// an InvalidParameters exception. /// - zs::Promise receive(RTCRtpParameters parameters); + zs::Promise receive(RTCRtpParameters parameters) throws (InvalidParameters, InvalidStateError); /// /// Stops receiving the track on the wire. Stop is final like /// MediaStreamTrack. diff --git a/ortc/idl/RtpSender.idl b/ortc/idl/RtpSender.idl index 0c7dc277..f2fa1062 100644 --- a/ortc/idl/RtpSender.idl +++ b/ortc/idl/RtpSender.idl @@ -64,7 +64,7 @@ namespace org void RTCRtpSender( MediaStreamTrack track, RTCRtpTransport transport, - ); + ) throws (InvalidParameters, InvalidStateError); /// /// Constructs an instance of an RTCRtpSender from an MediaStreamTrack @@ -78,7 +78,7 @@ namespace org MediaStreamTrack track, RTCRtpTransport transport, RTCRtcpTransport rtcpTransport - ); + ) throws(InvalidParameters, InvalidStateError); /// /// Gets a unique object instance identifier for this object. @@ -121,7 +121,7 @@ namespace org /// void setTransport( RTCRtpTransport transport, - ); + ) throws (InvalidParameters, InvalidStateError); /// /// Set the RTP RTCDtlsTransport and RTCP RTCDtlsTransport. If /// SetTransport() is called when transport.State or rtcpTransport.State @@ -130,12 +130,12 @@ namespace org void setTransport( RTCRtpTransport transport, RTCRtcpTransport rtcpTransport - ); + ) throws(InvalidParameters, InvalidStateError); /// /// Attempts to replace the track being sent with another track provided. /// - zs::Promise setTrack(MediaStreamTrack track); + zs::Promise setTrack(MediaStreamTrack track) throws(InvalidParameters, InvalidStateError); /// /// Obtain the sender capabilities, based on kind. Capabilities such as @@ -178,7 +178,7 @@ namespace org /// stops sending when stop() is called. SSRC misusage results in an /// InvalidParameters exception. /// - zs::Promise send(RTCRtpParameters parameters); + zs::Promise send(RTCRtpParameters parameters) throws (InvalidParameters, InvalidStateError); /// /// Stops sending the track on the wire, and sends an RTCP BYE. Stop is diff --git a/ortc/idl/SrtpSdesTransport.idl b/ortc/idl/SrtpSdesTransport.idl index b5d784bc..3c55e0bd 100644 --- a/ortc/idl/SrtpSdesTransport.idl +++ b/ortc/idl/SrtpSdesTransport.idl @@ -235,7 +235,7 @@ namespace org RTCIceTransport iceTransport, RTCSrtpSdesCryptoParameters encryptParameters, RTCSrtpSdesCryptoParameters decryptParameters - ); + ) throws (InvalidParameters, InvalidStateError); /// /// Gets a unique object instance identifier for this object. diff --git a/ortc/idl/StatsProvider.idl b/ortc/idl/StatsProvider.idl index ff0906e4..0288b2e4 100644 --- a/ortc/idl/StatsProvider.idl +++ b/ortc/idl/StatsProvider.idl @@ -48,7 +48,7 @@ namespace org /// objects indicates that no inspectable statistics are available at /// this time. /// - PromiseWithStatsReport getStats(RTCStatsTypeSet statTypes); + PromiseWithStatsReport getStats(RTCStatsTypeSet statTypes) throws (InvalidParameters, InvalidStateError); }; } } diff --git a/ortc/idl/adapter/MediaStream.idl b/ortc/idl/adapter/MediaStream.idl index d7d62e9d..684c8403 100644 --- a/ortc/idl/adapter/MediaStream.idl +++ b/ortc/idl/adapter/MediaStream.idl @@ -124,7 +124,7 @@ namespace org /// /// Adds the given MediaStreamTrack to this MediaStream. /// - void addTrack(MediaStreamTrack track); + void addTrack(MediaStreamTrack track) throws (InvalidParameters); /// /// Removes the given MediaStreamTrack object from this MediaStream. /// diff --git a/ortc/idl/adapter/SessionDescription.idl b/ortc/idl/adapter/SessionDescription.idl index 03bb3bff..6458e672 100644 --- a/ortc/idl/adapter/SessionDescription.idl +++ b/ortc/idl/adapter/SessionDescription.idl @@ -775,7 +775,7 @@ namespace org /// Constructs an instance of an RTCIceCandidate object by extracting object data from a JSON object. /// [constructor, altname(RTCIceCandidateWithJson)] - void RTCIceCandidate(Json json); + void RTCIceCandidate(Json json) throws (InvalidParameters); /// /// A helper routine to easily converty from a SDP-candidate string to @@ -785,7 +785,7 @@ namespace org RTCIceCandidate fromSdpStringWithMLineIndex( string sdp, size_t mlineIndex - ); + ) throws (InvalidParameters); /// /// A helper routine to easily converty from a SDP-candidate string to /// an RTCIceCandidate object. @@ -794,7 +794,7 @@ namespace org RTCIceCandidate fromSdpStringWithMid( string sdp, string mid - ); + ) throws (InvalidParameters); /// /// A helper routine to easily convert to a SDP-candidate string. @@ -1066,7 +1066,7 @@ namespace org void RTCSessionDescription( RTCSessionDescriptionSignalingType type, string description - ); + ) throws (InvalidParameters, InvalidStateError); /// /// Constructs an instance of an RTCSessionDescription from a @@ -1076,7 +1076,7 @@ namespace org void RTCSessionDescription( RTCSessionDescriptionSignalingType type, RTCSessionDescriptionDescription description - ); + ) throws(InvalidParameters, InvalidStateError); /// /// Helper routine to convert RTP capabilities into the appropriate From 6afdcaf35f6d7407bb787899ecf4fbbfc9543ea0 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 21 Feb 2017 23:17:20 -0500 Subject: [PATCH 012/187] - fixed typo in mediastream IDL --- ortc/idl/adapter/MediaStream.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/idl/adapter/MediaStream.idl b/ortc/idl/adapter/MediaStream.idl index 684c8403..433b1cf6 100644 --- a/ortc/idl/adapter/MediaStream.idl +++ b/ortc/idl/adapter/MediaStream.idl @@ -148,7 +148,7 @@ namespace org /// directly modifies the tracks of a MediaStream. /// [event] - void onRemoteTrack(MediaStreamTrack track); + void onRemoveTrack(MediaStreamTrack track); }; } From 433702ae6aa4989826883e2da323726dc8ac2cbc Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 01:12:50 -0500 Subject: [PATCH 013/187] - added anyholder promise object --- ortc/idl/wrapper/impl_org_ortc.cpp | 5 ++ .../impl_org_ortc_ConstrainBoolean.cpp | 3 +- ...pl_org_ortc_ConstrainBooleanParameters.cpp | 3 +- .../wrapper/impl_org_ortc_ConstrainDouble.cpp | 3 +- .../impl_org_ortc_ConstrainDoubleRange.cpp | 3 +- .../wrapper/impl_org_ortc_ConstrainLong.cpp | 3 +- .../impl_org_ortc_ConstrainLongRange.cpp | 3 +- .../wrapper/impl_org_ortc_ConstrainString.cpp | 3 +- ...mpl_org_ortc_ConstrainStringParameters.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp | 3 +- .../idl/wrapper/impl_org_ortc_DoubleRange.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_Error.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_Json.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_Logger.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_LongRange.cpp | 3 +- .../wrapper/impl_org_ortc_MediaControl.cpp | 3 +- .../wrapper/impl_org_ortc_MediaDeviceInfo.cpp | 3 +- .../wrapper/impl_org_ortc_MediaDevices.cpp | 11 +++-- .../idl/wrapper/impl_org_ortc_MediaSource.cpp | 3 +- .../impl_org_ortc_MediaStreamConstraints.cpp | 3 +- .../impl_org_ortc_MediaStreamTrack.cpp | 3 +- .../impl_org_ortc_MediaTrackCapabilities.cpp | 3 +- .../impl_org_ortc_MediaTrackConstraintSet.cpp | 3 +- .../impl_org_ortc_MediaTrackConstraints.cpp | 3 +- .../impl_org_ortc_MediaTrackSettings.cpp | 3 +- ...rg_ortc_MediaTrackSupportedConstraints.cpp | 3 +- .../wrapper/impl_org_ortc_MessageQueue.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp | 3 +- .../impl_org_ortc_OrtcLibWithDispatcher.cpp | 3 +- .../impl_org_ortc_OverconstrainedError.cpp | 3 +- ...mpl_org_ortc_OverconstrainedErrorEvent.cpp | 3 +- .../wrapper/impl_org_ortc_RTCCertificate.cpp | 15 +++--- .../impl_org_ortc_RTCCertificateStats.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp | 3 +- .../wrapper/impl_org_ortc_RTCDataChannel.cpp | 7 +-- .../wrapper/impl_org_ortc_RTCDataChannel.h | 2 +- .../impl_org_ortc_RTCDataChannelEvent.cpp | 3 +- ...impl_org_ortc_RTCDataChannelParameters.cpp | 3 +- ...rg_ortc_RTCDataChannelStateChangeEvent.cpp | 3 +- .../impl_org_ortc_RTCDataChannelStats.cpp | 3 +- .../impl_org_ortc_RTCDataTransport.cpp | 3 +- .../impl_org_ortc_RTCDtlsFingerprint.cpp | 3 +- .../impl_org_ortc_RTCDtlsParameters.cpp | 3 +- .../impl_org_ortc_RTCDtlsTransport.cpp | 7 +-- .../wrapper/impl_org_ortc_RTCDtlsTransport.h | 2 +- ..._ortc_RTCDtlsTransportStateChangeEvent.cpp | 3 +- .../impl_org_ortc_RTCDtlsTransportStats.cpp | 3 +- .../wrapper/impl_org_ortc_RTCIceCandidate.cpp | 3 +- ...mpl_org_ortc_RTCIceCandidateAttributes.cpp | 3 +- .../impl_org_ortc_RTCIceCandidateComplete.cpp | 3 +- .../impl_org_ortc_RTCIceCandidatePair.cpp | 3 +- ...rg_ortc_RTCIceCandidatePairChangeEvent.cpp | 3 +- ...impl_org_ortc_RTCIceCandidatePairStats.cpp | 3 +- ...l_org_ortc_RTCIceGatherInterfacePolicy.cpp | 3 +- .../impl_org_ortc_RTCIceGatherOptions.cpp | 3 +- .../wrapper/impl_org_ortc_RTCIceGatherer.cpp | 7 +-- .../wrapper/impl_org_ortc_RTCIceGatherer.h | 2 +- .../impl_org_ortc_RTCIceGathererCandidate.cpp | 3 +- ...c_RTCIceGathererCandidateCompleteEvent.cpp | 3 +- ..._org_ortc_RTCIceGathererCandidateEvent.cpp | 3 +- ...l_org_ortc_RTCIceGathererIceErrorEvent.cpp | 3 +- ...rg_ortc_RTCIceGathererStateChangeEvent.cpp | 3 +- .../impl_org_ortc_RTCIceGathererStats.cpp | 3 +- .../impl_org_ortc_RTCIceParameters.cpp | 3 +- .../wrapper/impl_org_ortc_RTCIceServer.cpp | 3 +- .../wrapper/impl_org_ortc_RTCIceTransport.cpp | 7 +-- .../wrapper/impl_org_ortc_RTCIceTransport.h | 2 +- ...mpl_org_ortc_RTCIceTransportController.cpp | 3 +- .../impl_org_ortc_RTCIceTransportOptions.cpp | 3 +- ...g_ortc_RTCIceTransportStateChangeEvent.cpp | 3 +- .../impl_org_ortc_RTCIceTransportStats.cpp | 3 +- .../idl/wrapper/impl_org_ortc_RTCIdentity.cpp | 19 ++++---- ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h | 8 ++-- .../impl_org_ortc_RTCIdentityAssertion.cpp | 3 +- .../impl_org_ortc_RTCIdentityError.cpp | 3 +- .../impl_org_ortc_RTCIdentityResult.cpp | 3 +- ...impl_org_ortc_RTCInboundRtpStreamStats.cpp | 3 +- .../impl_org_ortc_RTCMediaStreamStats.cpp | 3 +- ...impl_org_ortc_RTCMediaStreamTrackStats.cpp | 3 +- .../wrapper/impl_org_ortc_RTCMessageEvent.cpp | 3 +- .../impl_org_ortc_RTCMessageEventData.cpp | 3 +- ...mpl_org_ortc_RTCOutboundRtpStreamStats.cpp | 3 +- .../wrapper/impl_org_ortc_RTCRtcpFeedback.cpp | 3 +- .../impl_org_ortc_RTCRtcpParameters.cpp | 3 +- .../impl_org_ortc_RTCRtcpTransport.cpp | 3 +- .../impl_org_ortc_RTCRtpCapabilities.cpp | 3 +- .../impl_org_ortc_RTCRtpCodecCapability.cpp | 3 +- ..._org_ortc_RTCRtpCodecCapabilityOptions.cpp | 3 +- ...g_ortc_RTCRtpCodecCapabilityParameters.cpp | 3 +- .../impl_org_ortc_RTCRtpCodecParameters.cpp | 3 +- ...impl_org_ortc_RTCRtpContributingSource.cpp | 3 +- .../impl_org_ortc_RTCRtpDtmfSender.cpp | 3 +- ...impl_org_ortc_RTCRtpEncodingParameters.cpp | 3 +- .../impl_org_ortc_RTCRtpFecParameters.cpp | 3 +- ...RTCRtpFlexFecCodecCapabilityParameters.cpp | 3 +- ...tc_RTCRtpH264CodecCapabilityParameters.cpp | 3 +- .../impl_org_ortc_RTCRtpHeaderExtension.cpp | 3 +- ...g_ortc_RTCRtpHeaderExtensionParameters.cpp | 3 +- .../wrapper/impl_org_ortc_RTCRtpListener.cpp | 7 +-- .../wrapper/impl_org_ortc_RTCRtpListener.h | 2 +- ..._ortc_RTCRtpOpusCodecCapabilityOptions.cpp | 3 +- ...tc_RTCRtpOpusCodecCapabilityParameters.cpp | 3 +- ..._ortc_RTCRtpOpusCodecParameterSettings.cpp | 3 +- .../impl_org_ortc_RTCRtpParameters.cpp | 3 +- .../wrapper/impl_org_ortc_RTCRtpReceiver.cpp | 7 +-- .../wrapper/impl_org_ortc_RTCRtpReceiver.h | 2 +- ...g_ortc_RTCRtpRedCodecParameterSettings.cpp | 3 +- ...rtc_RTCRtpRtxCodecCapabilityParameters.cpp | 3 +- .../impl_org_ortc_RTCRtpRtxParameters.cpp | 3 +- .../wrapper/impl_org_ortc_RTCRtpSender.cpp | 7 +-- ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h | 2 +- .../impl_org_ortc_RTCRtpStreamStats.cpp | 3 +- .../wrapper/impl_org_ortc_RTCRtpTransport.cpp | 3 +- .../impl_org_ortc_RTCRtpUnhandledEvent.cpp | 3 +- ...rtc_RTCRtpVp8CodecCapabilityParameters.cpp | 3 +- .../impl_org_ortc_RTCSctpCapabilities.cpp | 3 +- .../impl_org_ortc_RTCSctpTransport.cpp | 7 +-- .../wrapper/impl_org_ortc_RTCSctpTransport.h | 2 +- ...impl_org_ortc_RTCSctpTransportListener.cpp | 3 +- ..._ortc_RTCSctpTransportStateChangeEvent.cpp | 3 +- .../impl_org_ortc_RTCSctpTransportStats.cpp | 3 +- ...l_org_ortc_RTCSrtpSdesCryptoParameters.cpp | 3 +- ...impl_org_ortc_RTCSrtpSdesKeyParameters.cpp | 3 +- .../impl_org_ortc_RTCSrtpSdesParameters.cpp | 3 +- .../impl_org_ortc_RTCSrtpSdesTransport.cpp | 7 +-- .../impl_org_ortc_RTCSrtpSdesTransport.h | 2 +- ..._RTCSrtpSdesTransportLifetimeRemaining.cpp | 3 +- ...rtpSdesTransportLifetimeRemainingEvent.cpp | 3 +- .../impl_org_ortc_RTCSrtpTransportStats.cpp | 3 +- .../impl_org_ortc_RTCSsrcConflictEvent.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp | 3 +- .../impl_org_ortc_RTCStatsProvider.cpp | 7 +-- .../wrapper/impl_org_ortc_RTCStatsProvider.h | 2 +- .../wrapper/impl_org_ortc_RTCStatsReport.cpp | 3 +- .../wrapper/impl_org_ortc_RTCStatsTypeSet.cpp | 3 +- ortc/idl/wrapper/impl_org_ortc_Settings.cpp | 3 +- .../impl_org_ortc_StringOrStringList.cpp | 3 +- .../impl_org_ortc_adapter_MediaStream.cpp | 7 +-- .../impl_org_ortc_adapter_MediaStream.h | 2 +- ...impl_org_ortc_adapter_RTCAnswerOptions.cpp | 3 +- ..._org_ortc_adapter_RTCCapabilityOptions.cpp | 3 +- ...impl_org_ortc_adapter_RTCConfiguration.cpp | 3 +- .../impl_org_ortc_adapter_RTCIceCandidate.cpp | 3 +- ...apter_RTCMediaStreamTrackConfiguration.cpp | 3 +- ...org_ortc_adapter_RTCOfferAnswerOptions.cpp | 3 +- .../impl_org_ortc_adapter_RTCOfferOptions.cpp | 3 +- ...mpl_org_ortc_adapter_RTCPeerConnection.cpp | 47 ++++++++++--------- .../impl_org_ortc_adapter_RTCPeerConnection.h | 22 ++++----- ...pter_RTCPeerConnectionIceCompleteEvent.cpp | 3 +- ...adapter_RTCPeerConnectionIceErrorEvent.cpp | 3 +- ...ortc_adapter_RTCPeerConnectionIceEvent.cpp | 3 +- ...org_ortc_adapter_RTCSessionDescription.cpp | 3 +- ...er_RTCSessionDescriptionConnectionData.cpp | 3 +- ...essionDescriptionConnectionDataDetails.cpp | 3 +- ...apter_RTCSessionDescriptionDescription.cpp | 3 +- ...TCSessionDescriptionDescriptionDetails.cpp | 3 +- ...adapter_RTCSessionDescriptionMediaLine.cpp | 3 +- ..._RTCSessionDescriptionMediaLineDetails.cpp | 3 +- ...pter_RTCSessionDescriptionRtpMediaLine.cpp | 3 +- ...adapter_RTCSessionDescriptionRtpSender.cpp | 3 +- ..._RTCSessionDescriptionRtpSenderDetails.cpp | 3 +- ...ter_RTCSessionDescriptionSctpMediaLine.cpp | 3 +- ...adapter_RTCSessionDescriptionTransport.cpp | 3 +- ...CSessionDescriptionTransportParameters.cpp | 3 +- .../impl_org_ortc_adapter_RTCTrackEvent.cpp | 3 +- 166 files changed, 397 insertions(+), 240 deletions(-) create mode 100644 ortc/idl/wrapper/impl_org_ortc.cpp diff --git a/ortc/idl/wrapper/impl_org_ortc.cpp b/ortc/idl/wrapper/impl_org_ortc.cpp new file mode 100644 index 00000000..b0203054 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc.cpp @@ -0,0 +1,5 @@ + +#include + +namespace wrapper { namespace impl { namespace org { ZS_IMPLEMENT_SUBSYSTEM(ortc_wrapper); } } } +namespace wrapper { namespace impl { namespace org { namespace adapter { ZS_IMPLEMENT_SUBSYSTEM(ortc_adapter_wrapper); } } } } diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp index fd65720c..17db94d8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp index 99320672..8d20b8a2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp index fa684bcd..1524f096 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp index 3a1f2b39..42a69146 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp index e55f6e3e..8828840b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp index 1a216e39..34e73a61 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp index db0eb64b..055530e2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp index 595344ca..4e52cbcb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp index 14de9f91..567457e8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp index d44dc276..71746c7c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Error.cpp b/ortc/idl/wrapper/impl_org_ortc_Error.cpp index b55a025a..b81d71f5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Error.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Error.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp index 306a3ffa..ec6b44e6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Json.cpp b/ortc/idl/wrapper/impl_org_ortc_Json.cpp index 171cc381..363bb922 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Json.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Json.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp index 2d67360c..1f8e29d6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp b/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp index 76539a2e..ee6c1a4b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp index ebf4167a..d634cad2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp index 6bfb6b43..29734ae4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp index ef2ffd09..77387f0a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -44,16 +45,16 @@ wrapper::org::ortc::MediaTrackSupportedConstraintsPtr wrapper::org::ortc::MediaD } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > wrapper::org::ortc::MediaDevices::enumerateDevices() +shared_ptr< PromiseWithHolder< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > wrapper::org::ortc::MediaDevices::enumerateDevices() { - shared_ptr< PromiseWith< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > result {}; + shared_ptr< PromiseWithHolder< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > wrapper::org::ortc::MediaDevices::getUserMedia(wrapper::org::ortc::MediaStreamConstraintsPtr constraints) +shared_ptr< PromiseWithHolder< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > wrapper::org::ortc::MediaDevices::getUserMedia(wrapper::org::ortc::MediaStreamConstraintsPtr constraints) { - shared_ptr< PromiseWith< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > result {}; + shared_ptr< PromiseWithHolder< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp index eeb4bcde..086d7c19 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp index a6181a30..27c51663 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp index b1fb3bff..6b3191df 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp index a719dd69..455e7058 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp index 61bbdbc7..577482d9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp index 80dff16c..7303a5d7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp index 8575f717..c9acbdf8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp index 09628b30..96025575 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp index be90eaef..829e49c5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp index 517d1da0..dbeabb76 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp index db2b31ce..158e7adf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp index 4e57b091..02a3ab00 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp index 97f08b47..1c1f3c09 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp index 774092e0..731672a0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -42,23 +43,23 @@ void wrapper::impl::org::ortc::RTCCertificate::wrapper_init_org_ortc_RTCCertific } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate() +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate() { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(String keygenAlgorithm) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(String keygenAlgorithm) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(wrapper::org::ortc::JsonPtr keygenAlgorithm) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(wrapper::org::ortc::JsonPtr keygenAlgorithm) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCCertificatePtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp index d98b2892..3cfe6459 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp index 94e1316e..c0fc148a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp index 9a3180fe..fe7ee96e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCDataChannel::~RTCDataChannel() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDataChannel::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDataChannel::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h index 0fac8966..f0b82e9b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCDataChannel(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCDataChannel virtual void wrapper_init_org_ortc_RTCDataChannel( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp index 2073f3a2..88380339 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp index a7eaefa5..3a7ec748 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp index 22cc6efa..683cf0e7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp index 4622e736..66f8f5ae 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp index 41d0b250..f5710cf3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp index a268dec7..2cc67e3d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp index 89eb7443..2241fc81 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp index c5c4fd59..2d0ced3b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCDtlsTransport::~RTCDtlsTransport() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h index 77f8468b..940fb079 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCDtlsTransport(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCDtlsTransport virtual void wrapper_init_org_ortc_RTCDtlsTransport( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp index f801d849..cebac499 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp index 952bbd49..263f4fe2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp index 7948fad7..3282f1ab 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp index 966215b1..3734f314 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp index 5cb1ef15..28f4b6cf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp index 8d0540f0..35fc9fe4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp index ea2c2e9a..68784a71 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp index 1f9b822c..861e3b17 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp index 98dbcdce..b9b8b395 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp index fcda0e54..532bec2d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp index b9b16fb2..f6a9d291 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCIceGatherer::~RTCIceGatherer() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceGatherer::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceGatherer::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h index d997dd42..a417f272 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCIceGatherer(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCIceGatherer virtual void wrapper_init_org_ortc_RTCIceGatherer(wrapper::org::ortc::RTCIceGatherOptionsPtr options) override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp index 904063dc..28dccf70 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp index c31868af..9607c777 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp index 4f083ef6..b24216e4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp index 0c54b0d4..43f787cc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp index 27990f3d..6a68109f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp index 71337d5b..7048d9ac 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp index 89c0173f..6f7e72d2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp index 2234772e..f684e84e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp index e03615d6..539f54c7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCIceTransport::~RTCIceTransport() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h index ccfd379b..16597cc1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCIceTransport(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCIceTransport virtual void wrapper_init_org_ortc_RTCIceTransport() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp index 83a27e2c..2cf8ae83 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp index 0cca2151..18317bec 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp index 002b37d0..db818fcb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp index 43447eaf..d241c63d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp index a7daa96d..dc66e3c4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -42,37 +43,37 @@ void wrapper::impl::org::ortc::RTCIdentity::wrapper_init_org_ortc_RTCIdentity(wr } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion(String provider) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion(String provider) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( String provider, String protocol ) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( String provider, String protocol, String username ) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityAssertionPtr > > wrapper::impl::org::ortc::RTCIdentity::setIdentityAssertion(String assertion) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityAssertionPtr > > wrapper::impl::org::ortc::RTCIdentity::setIdentityAssertion(String assertion) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityAssertionPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityAssertionPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h index f0525e7b..27002bff 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h @@ -20,17 +20,17 @@ namespace wrapper { // methods RTCIdentity virtual void wrapper_init_org_ortc_RTCIdentity(wrapper::org::ortc::RTCDtlsTransportPtr transport) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion(String provider) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion(String provider) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( String provider, String protocol ) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( String provider, String protocol, String username ) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCIdentityAssertionPtr > > setIdentityAssertion(String assertion) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityAssertionPtr > > setIdentityAssertion(String assertion) override; // properties RTCIdentity virtual uint64_t get_objectId() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp index feaaa8e3..86944d0c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp index f34aeb55..4e7736c8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp index cb1c47c4..a3d7737f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp index a972b590..a4612be8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp index 30be1d07..508d887b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp index 6800cc51..4d4bcd5f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp index 86ae074b..02adab1c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp index 2d1088df..e7cb0951 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp index 54a3f455..71ae7e8c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp index b8d6b70c..ac982cb1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp index c3d5aedb..4715e77d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp index a4e5fe29..152eece5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp index 20cf3c1c..9c5b4fdc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp index 01e1977c..ad94190a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp index 6423ffbe..4b182141 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp index e913200e..f28068c3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp index bf4a71e4..6db8e12a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp index e65e1299..73a52a9b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp index 0b187a74..89b8bfef 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp index b711ee1b..c8199163 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp index 9eadf6b9..021bf70e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp index dfcc89e0..8b9441d0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp index 8ae66ab5..0cedfbbd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp index ee409bee..5a7bccf0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp index eb4fca2a..1ca46255 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp index a2486218..a32fbab4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCRtpListener::~RTCRtpListener() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpListener::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpListener::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h index cffc7592..bdc6b29d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCRtpListener(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCRtpListener virtual void wrapper_init_org_ortc_RTCRtpListener(wrapper::org::ortc::RTCRtpTransportPtr transport) override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp index 6a6122ca..91ad952f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp index 0a14aae1..09b4a003 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp index 2fb79cde..558c3864 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp index ca7c9647..8d6d7797 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp index bb7f95c1..622a9ac9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCRtpReceiver::~RTCRtpReceiver() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpReceiver::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpReceiver::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h index c9b6661f..b40dfe62 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCRtpReceiver(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCRtpReceiver virtual void wrapper_init_org_ortc_RTCRtpReceiver( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp index 8b92e4fe..64c394f0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp index a6b147e0..d2403401 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp index f1aed92c..e82264bf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp index ae6b4d13..6d096e27 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCRtpSender::~RTCRtpSender() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpSender::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpSender::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h index 4ab8876b..31727e94 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCRtpSender(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCRtpSender virtual void wrapper_init_org_ortc_RTCRtpSender( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp index 211f3702..47ac1a9f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp index f19d5796..6e561ae9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp index 5901a0e7..6c8494d2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp index 23f9d6b4..77f269e0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp index 7df80ed5..e0411672 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp index e9e04430..48ce0f51 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCSctpTransport::~RTCSctpTransport() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSctpTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSctpTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h index 1ae7b258..043f16db 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCSctpTransport(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCSctpTransport virtual void wrapper_init_org_ortc_RTCSctpTransport(wrapper::org::ortc::RTCDtlsTransportPtr transport) override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp index e4042258..77af0186 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp index 106be09f..6f448469 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp index e7e4b2cb..0ec340a5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp index b68ba1ac..e18b6af1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp index 62d2564c..d2686c1b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp index 7b7c6fdd..41681793 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp index b87122c4..f0a34043 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::RTCSrtpSdesTransport::~RTCSrtpSdesTransport() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSrtpSdesTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSrtpSdesTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h index 06f37bfb..9e250654 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCSrtpSdesTransport(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCSrtpSdesTransport virtual void wrapper_init_org_ortc_RTCSrtpSdesTransport( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp index 46b9c950..3cd8d2ba 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp index 5bc98bd0..a2556a16 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp index 0c89dfa8..f6138ce4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp index b9511049..adb27667 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp index 02bcb995..d0f69f9a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp index dbee5f97..eff29a5a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -42,9 +43,9 @@ void wrapper::impl::org::ortc::RTCStatsProvider::wrapper_init_org_ortc_RTCStatsP } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCStatsProvider::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCStatsProvider::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h index 2d32f0b4..09647aad 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCStatsProvider(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; virtual void wrapper_init_org_ortc_RTCStatsProvider() override; }; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp index 2e48a1ce..ec0679f2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp index 53c51088..1ada0ddd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp index 73d4bc47..5d465377 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp index 1b1a6a34..8f2bdc8f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp index 4060236a..7a6e0be9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::adapter::MediaStream::~MediaStream() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::MediaStream::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::MediaStream::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h index 7d207e05..4b516dcb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h @@ -20,7 +20,7 @@ namespace wrapper { virtual ~MediaStream(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods MediaStream virtual void wrapper_init_org_ortc_adapter_MediaStream() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp index c72b8117..21a0a8da 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp index e0a8c3c8..caf9617a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp index 2c26e5da..1724f089 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp index d760ce4f..0a48c7d4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp index d73adf64..8b85c5af 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp index c0977b08..6f42c2b9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp index 0e8f84f6..5f3cd81d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp index de3474a2..9b7f3009 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -37,9 +38,9 @@ wrapper::impl::org::ortc::adapter::RTCPeerConnection::~RTCPeerConnection() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } @@ -54,44 +55,44 @@ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::wrapper_init_org_ortc } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer() +shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer() { - shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) { - shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer() +shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer() { - shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) { - shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities() +shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities() { - shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) { - shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } @@ -141,30 +142,30 @@ shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > wrapper::impl::org:: } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( wrapper::org::ortc::MediaStreamTrackPtr track, wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( wrapper::org::ortc::MediaStreamTrackPtr track, shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > mediaStreams, wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; return result; } @@ -174,9 +175,9 @@ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::removeTrack(wrapper:: } //------------------------------------------------------------------------------ -shared_ptr< PromiseWith< wrapper::org::ortc::RTCDataChannelPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) +shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCDataChannelPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) { - shared_ptr< PromiseWith< wrapper::org::ortc::RTCDataChannelPtr > > result {}; + shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCDataChannelPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h index 7f303e4c..75454376 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h @@ -20,17 +20,17 @@ namespace wrapper { virtual ~RTCPeerConnection(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCPeerConnection virtual void wrapper_init_org_ortc_adapter_RTCPeerConnection() override; virtual void wrapper_init_org_ortc_adapter_RTCPeerConnection(wrapper::org::ortc::adapter::RTCConfigurationPtr configuration) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer() override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer() override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities() override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer() override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer() override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities() override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) override; virtual PromisePtr setLocalDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) override; virtual PromisePtr setRemoteDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) override; virtual void addIceCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr candidate) override; @@ -38,18 +38,18 @@ namespace wrapper { virtual void close() override; virtual shared_ptr< list< wrapper::org::ortc::RTCRtpSenderPtr > > getSenders() override; virtual shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > getReceivers() override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( wrapper::org::ortc::MediaStreamTrackPtr track, wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( wrapper::org::ortc::MediaStreamTrackPtr track, shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > mediaStreams, wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) override; virtual void removeTrack(wrapper::org::ortc::RTCRtpSenderPtr sender) override; - virtual shared_ptr< PromiseWith< wrapper::org::ortc::RTCDataChannelPtr > > createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) override; + virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCDataChannelPtr > > createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) override; // properties RTCPeerConnection virtual uint64_t get_objectId() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp index 048a1bc2..c40918c2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp index fb356368..3ded645d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp index 3d0cc35c..69475970 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp index 8bc53f9a..d8df9d98 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp index 6b3853a9..47402a8f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp index dec01b32..b9688ef3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp index 2fe8577d..b06a695d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp index 6ac390c0..49901da7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp index 1c32d673..5fbd1177 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp index 4796735a..7114281b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp index 46939729..79ae33e9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp index b4e034cc..f1fe11e4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp index 1272ec34..28782b08 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp index 8e7a31a2..9c2d7605 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp index 36ac4702..831804e6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp index 4ef79e3b..f73b081e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp index d90bf1dc..6214892f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp @@ -6,9 +6,10 @@ using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; -using ::zsLib::PromiseWith; +using ::zsLib::PromiseWithHolder; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; From 80d0442e0b50b6d645fa0bfcc256e6a6ad749c7f Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 11:19:30 -0500 Subject: [PATCH 014/187] - added anyholderptr promise object --- .../impl_org_ortc_ConstrainBoolean.cpp | 1 + ...pl_org_ortc_ConstrainBooleanParameters.cpp | 1 + .../wrapper/impl_org_ortc_ConstrainDouble.cpp | 1 + .../impl_org_ortc_ConstrainDoubleRange.cpp | 1 + .../wrapper/impl_org_ortc_ConstrainLong.cpp | 1 + .../impl_org_ortc_ConstrainLongRange.cpp | 1 + .../wrapper/impl_org_ortc_ConstrainString.cpp | 1 + ...mpl_org_ortc_ConstrainStringParameters.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp | 1 + .../idl/wrapper/impl_org_ortc_DoubleRange.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_Error.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_Json.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_Logger.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_LongRange.cpp | 1 + .../wrapper/impl_org_ortc_MediaControl.cpp | 1 + .../wrapper/impl_org_ortc_MediaDeviceInfo.cpp | 1 + .../wrapper/impl_org_ortc_MediaDevices.cpp | 9 ++-- .../idl/wrapper/impl_org_ortc_MediaSource.cpp | 1 + .../impl_org_ortc_MediaStreamConstraints.cpp | 1 + .../impl_org_ortc_MediaStreamTrack.cpp | 1 + .../impl_org_ortc_MediaTrackCapabilities.cpp | 1 + .../impl_org_ortc_MediaTrackConstraintSet.cpp | 1 + .../impl_org_ortc_MediaTrackConstraints.cpp | 1 + .../impl_org_ortc_MediaTrackSettings.cpp | 1 + ...rg_ortc_MediaTrackSupportedConstraints.cpp | 1 + .../wrapper/impl_org_ortc_MessageQueue.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp | 1 + .../impl_org_ortc_OrtcLibWithDispatcher.cpp | 1 + .../impl_org_ortc_OverconstrainedError.cpp | 1 + ...mpl_org_ortc_OverconstrainedErrorEvent.cpp | 1 + .../wrapper/impl_org_ortc_RTCCertificate.cpp | 13 +++--- .../impl_org_ortc_RTCCertificateStats.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp | 1 + .../wrapper/impl_org_ortc_RTCDataChannel.cpp | 5 ++- .../wrapper/impl_org_ortc_RTCDataChannel.h | 2 +- .../impl_org_ortc_RTCDataChannelEvent.cpp | 1 + ...impl_org_ortc_RTCDataChannelParameters.cpp | 1 + ...rg_ortc_RTCDataChannelStateChangeEvent.cpp | 1 + .../impl_org_ortc_RTCDataChannelStats.cpp | 1 + .../impl_org_ortc_RTCDataTransport.cpp | 1 + .../impl_org_ortc_RTCDtlsFingerprint.cpp | 1 + .../impl_org_ortc_RTCDtlsParameters.cpp | 1 + .../impl_org_ortc_RTCDtlsTransport.cpp | 5 ++- .../wrapper/impl_org_ortc_RTCDtlsTransport.h | 2 +- ..._ortc_RTCDtlsTransportStateChangeEvent.cpp | 1 + .../impl_org_ortc_RTCDtlsTransportStats.cpp | 1 + .../wrapper/impl_org_ortc_RTCIceCandidate.cpp | 1 + ...mpl_org_ortc_RTCIceCandidateAttributes.cpp | 1 + .../impl_org_ortc_RTCIceCandidateComplete.cpp | 1 + .../impl_org_ortc_RTCIceCandidatePair.cpp | 1 + ...rg_ortc_RTCIceCandidatePairChangeEvent.cpp | 1 + ...impl_org_ortc_RTCIceCandidatePairStats.cpp | 1 + ...l_org_ortc_RTCIceGatherInterfacePolicy.cpp | 1 + .../impl_org_ortc_RTCIceGatherOptions.cpp | 1 + .../wrapper/impl_org_ortc_RTCIceGatherer.cpp | 5 ++- .../wrapper/impl_org_ortc_RTCIceGatherer.h | 2 +- .../impl_org_ortc_RTCIceGathererCandidate.cpp | 1 + ...c_RTCIceGathererCandidateCompleteEvent.cpp | 1 + ..._org_ortc_RTCIceGathererCandidateEvent.cpp | 1 + ...l_org_ortc_RTCIceGathererIceErrorEvent.cpp | 1 + ...rg_ortc_RTCIceGathererStateChangeEvent.cpp | 1 + .../impl_org_ortc_RTCIceGathererStats.cpp | 1 + .../impl_org_ortc_RTCIceParameters.cpp | 1 + .../wrapper/impl_org_ortc_RTCIceServer.cpp | 1 + .../wrapper/impl_org_ortc_RTCIceTransport.cpp | 5 ++- .../wrapper/impl_org_ortc_RTCIceTransport.h | 2 +- ...mpl_org_ortc_RTCIceTransportController.cpp | 1 + .../impl_org_ortc_RTCIceTransportOptions.cpp | 1 + ...g_ortc_RTCIceTransportStateChangeEvent.cpp | 1 + .../impl_org_ortc_RTCIceTransportStats.cpp | 1 + .../idl/wrapper/impl_org_ortc_RTCIdentity.cpp | 17 +++---- ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h | 8 ++-- .../impl_org_ortc_RTCIdentityAssertion.cpp | 1 + .../impl_org_ortc_RTCIdentityError.cpp | 1 + .../impl_org_ortc_RTCIdentityResult.cpp | 1 + ...impl_org_ortc_RTCInboundRtpStreamStats.cpp | 1 + .../impl_org_ortc_RTCMediaStreamStats.cpp | 1 + ...impl_org_ortc_RTCMediaStreamTrackStats.cpp | 1 + .../wrapper/impl_org_ortc_RTCMessageEvent.cpp | 1 + .../impl_org_ortc_RTCMessageEventData.cpp | 1 + ...mpl_org_ortc_RTCOutboundRtpStreamStats.cpp | 1 + .../wrapper/impl_org_ortc_RTCRtcpFeedback.cpp | 1 + .../impl_org_ortc_RTCRtcpParameters.cpp | 1 + .../impl_org_ortc_RTCRtcpTransport.cpp | 1 + .../impl_org_ortc_RTCRtpCapabilities.cpp | 1 + .../impl_org_ortc_RTCRtpCodecCapability.cpp | 1 + ..._org_ortc_RTCRtpCodecCapabilityOptions.cpp | 1 + ...g_ortc_RTCRtpCodecCapabilityParameters.cpp | 1 + .../impl_org_ortc_RTCRtpCodecParameters.cpp | 1 + ...impl_org_ortc_RTCRtpContributingSource.cpp | 1 + .../impl_org_ortc_RTCRtpDtmfSender.cpp | 1 + ...impl_org_ortc_RTCRtpEncodingParameters.cpp | 1 + .../impl_org_ortc_RTCRtpFecParameters.cpp | 1 + ...RTCRtpFlexFecCodecCapabilityParameters.cpp | 1 + ...tc_RTCRtpH264CodecCapabilityParameters.cpp | 1 + .../impl_org_ortc_RTCRtpHeaderExtension.cpp | 1 + ...g_ortc_RTCRtpHeaderExtensionParameters.cpp | 1 + .../wrapper/impl_org_ortc_RTCRtpListener.cpp | 5 ++- .../wrapper/impl_org_ortc_RTCRtpListener.h | 2 +- ..._ortc_RTCRtpOpusCodecCapabilityOptions.cpp | 1 + ...tc_RTCRtpOpusCodecCapabilityParameters.cpp | 1 + ..._ortc_RTCRtpOpusCodecParameterSettings.cpp | 1 + .../impl_org_ortc_RTCRtpParameters.cpp | 1 + .../wrapper/impl_org_ortc_RTCRtpReceiver.cpp | 5 ++- .../wrapper/impl_org_ortc_RTCRtpReceiver.h | 2 +- ...g_ortc_RTCRtpRedCodecParameterSettings.cpp | 1 + ...rtc_RTCRtpRtxCodecCapabilityParameters.cpp | 1 + .../impl_org_ortc_RTCRtpRtxParameters.cpp | 1 + .../wrapper/impl_org_ortc_RTCRtpSender.cpp | 5 ++- ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h | 2 +- .../impl_org_ortc_RTCRtpStreamStats.cpp | 1 + .../wrapper/impl_org_ortc_RTCRtpTransport.cpp | 1 + .../impl_org_ortc_RTCRtpUnhandledEvent.cpp | 1 + ...rtc_RTCRtpVp8CodecCapabilityParameters.cpp | 1 + .../impl_org_ortc_RTCSctpCapabilities.cpp | 1 + .../impl_org_ortc_RTCSctpTransport.cpp | 5 ++- .../wrapper/impl_org_ortc_RTCSctpTransport.h | 2 +- ...impl_org_ortc_RTCSctpTransportListener.cpp | 1 + ..._ortc_RTCSctpTransportStateChangeEvent.cpp | 1 + .../impl_org_ortc_RTCSctpTransportStats.cpp | 1 + ...l_org_ortc_RTCSrtpSdesCryptoParameters.cpp | 1 + ...impl_org_ortc_RTCSrtpSdesKeyParameters.cpp | 1 + .../impl_org_ortc_RTCSrtpSdesParameters.cpp | 1 + .../impl_org_ortc_RTCSrtpSdesTransport.cpp | 5 ++- .../impl_org_ortc_RTCSrtpSdesTransport.h | 2 +- ..._RTCSrtpSdesTransportLifetimeRemaining.cpp | 1 + ...rtpSdesTransportLifetimeRemainingEvent.cpp | 1 + .../impl_org_ortc_RTCSrtpTransportStats.cpp | 1 + .../impl_org_ortc_RTCSsrcConflictEvent.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp | 1 + .../impl_org_ortc_RTCStatsProvider.cpp | 5 ++- .../wrapper/impl_org_ortc_RTCStatsProvider.h | 2 +- .../wrapper/impl_org_ortc_RTCStatsReport.cpp | 1 + .../wrapper/impl_org_ortc_RTCStatsTypeSet.cpp | 1 + ortc/idl/wrapper/impl_org_ortc_Settings.cpp | 1 + .../impl_org_ortc_StringOrStringList.cpp | 1 + .../impl_org_ortc_adapter_MediaStream.cpp | 5 ++- .../impl_org_ortc_adapter_MediaStream.h | 2 +- ...impl_org_ortc_adapter_RTCAnswerOptions.cpp | 1 + ..._org_ortc_adapter_RTCCapabilityOptions.cpp | 1 + ...impl_org_ortc_adapter_RTCConfiguration.cpp | 1 + .../impl_org_ortc_adapter_RTCIceCandidate.cpp | 1 + ...apter_RTCMediaStreamTrackConfiguration.cpp | 1 + ...org_ortc_adapter_RTCOfferAnswerOptions.cpp | 1 + .../impl_org_ortc_adapter_RTCOfferOptions.cpp | 1 + ...mpl_org_ortc_adapter_RTCPeerConnection.cpp | 45 ++++++++++--------- .../impl_org_ortc_adapter_RTCPeerConnection.h | 22 ++++----- ...pter_RTCPeerConnectionIceCompleteEvent.cpp | 1 + ...adapter_RTCPeerConnectionIceErrorEvent.cpp | 1 + ...ortc_adapter_RTCPeerConnectionIceEvent.cpp | 1 + ...org_ortc_adapter_RTCSessionDescription.cpp | 1 + ...er_RTCSessionDescriptionConnectionData.cpp | 1 + ...essionDescriptionConnectionDataDetails.cpp | 1 + ...apter_RTCSessionDescriptionDescription.cpp | 1 + ...TCSessionDescriptionDescriptionDetails.cpp | 1 + ...adapter_RTCSessionDescriptionMediaLine.cpp | 1 + ..._RTCSessionDescriptionMediaLineDetails.cpp | 1 + ...pter_RTCSessionDescriptionRtpMediaLine.cpp | 1 + ...adapter_RTCSessionDescriptionRtpSender.cpp | 1 + ..._RTCSessionDescriptionRtpSenderDetails.cpp | 1 + ...ter_RTCSessionDescriptionSctpMediaLine.cpp | 1 + ...adapter_RTCSessionDescriptionTransport.cpp | 1 + ...CSessionDescriptionTransportParameters.cpp | 1 + .../impl_org_ortc_adapter_RTCTrackEvent.cpp | 1 + 165 files changed, 240 insertions(+), 88 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp index 17db94d8..b64ad85c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp index 8d20b8a2..9be45c9d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp index 1524f096..687fff88 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp index 42a69146..a30ee18e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp index 8828840b..38456576 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp index 34e73a61..e0cfabaf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp index 055530e2..fd0a554f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp index 4e52cbcb..f1757547 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp index 567457e8..6478fdc5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp index 71746c7c..58a8bdc1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Error.cpp b/ortc/idl/wrapper/impl_org_ortc_Error.cpp index b81d71f5..0cd4d5ac 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Error.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Error.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp index ec6b44e6..5a37b67e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Json.cpp b/ortc/idl/wrapper/impl_org_ortc_Json.cpp index 363bb922..60a605b8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Json.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Json.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp index 1f8e29d6..45d52226 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp b/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp index ee6c1a4b..4f7bbba5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp index d634cad2..b1e8edad 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp index 29734ae4..0b1df7fa 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp index 77387f0a..afb3a69a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -45,16 +46,16 @@ wrapper::org::ortc::MediaTrackSupportedConstraintsPtr wrapper::org::ortc::MediaD } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > wrapper::org::ortc::MediaDevices::enumerateDevices() +shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > wrapper::org::ortc::MediaDevices::enumerateDevices() { - shared_ptr< PromiseWithHolder< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > result {}; + shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > wrapper::org::ortc::MediaDevices::getUserMedia(wrapper::org::ortc::MediaStreamConstraintsPtr constraints) +shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > wrapper::org::ortc::MediaDevices::getUserMedia(wrapper::org::ortc::MediaStreamConstraintsPtr constraints) { - shared_ptr< PromiseWithHolder< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > result {}; + shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp index 086d7c19..e958eeb2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp index 27c51663..6f8aa0c3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp index 6b3191df..28076145 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp index 455e7058..f312e71a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp index 577482d9..1698957e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp index 7303a5d7..84ce5ff5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp index c9acbdf8..a5a32f37 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp index 96025575..82cffe33 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp index 829e49c5..da8faf43 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp index dbeabb76..fd023691 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp index 158e7adf..85a0833d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp index 02a3ab00..da89781f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp index 1c1f3c09..10cee491 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp index 731672a0..c417897a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -43,23 +44,23 @@ void wrapper::impl::org::ortc::RTCCertificate::wrapper_init_org_ortc_RTCCertific } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate() +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate() { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(String keygenAlgorithm) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(String keygenAlgorithm) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(wrapper::org::ortc::JsonPtr keygenAlgorithm) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(wrapper::org::ortc::JsonPtr keygenAlgorithm) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCCertificatePtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp index 3cfe6459..ff868ac9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp index c0fc148a..a5b28fef 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp index fe7ee96e..2b8f70fb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCDataChannel::~RTCDataChannel() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDataChannel::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDataChannel::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h index f0b82e9b..e938cbef 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCDataChannel(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCDataChannel virtual void wrapper_init_org_ortc_RTCDataChannel( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp index 88380339..537df769 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp index 3a7ec748..95391f4a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp index 683cf0e7..ca30624d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp index 66f8f5ae..9b9ae68d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp index f5710cf3..79453272 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp index 2cc67e3d..519dc4d3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp index 2241fc81..a702a3a5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp index 2d0ced3b..a0cae6d2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCDtlsTransport::~RTCDtlsTransport() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h index 940fb079..ec258fce 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCDtlsTransport(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCDtlsTransport virtual void wrapper_init_org_ortc_RTCDtlsTransport( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp index cebac499..5b0c4b47 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp index 263f4fe2..94e7efe2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp index 3282f1ab..5a535303 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp index 3734f314..4606c92a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp index 28f4b6cf..7ce77b72 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp index 35fc9fe4..ccd1107c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp index 68784a71..e16dbe89 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp index 861e3b17..0ac929a6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp index b9b8b395..e313c214 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp index 532bec2d..b000a996 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp index f6a9d291..d2800ca8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCIceGatherer::~RTCIceGatherer() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceGatherer::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceGatherer::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h index a417f272..463ef982 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCIceGatherer(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCIceGatherer virtual void wrapper_init_org_ortc_RTCIceGatherer(wrapper::org::ortc::RTCIceGatherOptionsPtr options) override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp index 28dccf70..0f508d59 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp index 9607c777..10bdf19e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp index b24216e4..db84083d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp index 43f787cc..1ca9b434 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp index 6a68109f..62881838 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp index 7048d9ac..5bc1172f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp index 6f7e72d2..1484f91f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp index f684e84e..9dbccc77 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp index 539f54c7..59ad66ce 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCIceTransport::~RTCIceTransport() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h index 16597cc1..283a1658 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCIceTransport(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCIceTransport virtual void wrapper_init_org_ortc_RTCIceTransport() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp index 2cf8ae83..615fe121 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp index 18317bec..0d16bf89 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp index db818fcb..896e7f40 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp index d241c63d..8ec5723a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp index dc66e3c4..b7cdeb32 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -43,37 +44,37 @@ void wrapper::impl::org::ortc::RTCIdentity::wrapper_init_org_ortc_RTCIdentity(wr } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion(String provider) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion(String provider) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( String provider, String protocol ) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion( String provider, String protocol, String username ) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityAssertionPtr > > wrapper::impl::org::ortc::RTCIdentity::setIdentityAssertion(String assertion) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityAssertionPtr > > wrapper::impl::org::ortc::RTCIdentity::setIdentityAssertion(String assertion) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityAssertionPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityAssertionPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h index 27002bff..9cbc764e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h @@ -20,17 +20,17 @@ namespace wrapper { // methods RTCIdentity virtual void wrapper_init_org_ortc_RTCIdentity(wrapper::org::ortc::RTCDtlsTransportPtr transport) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion(String provider) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion(String provider) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( String provider, String protocol ) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > getIdentityAssertion( String provider, String protocol, String username ) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCIdentityAssertionPtr > > setIdentityAssertion(String assertion) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityAssertionPtr > > setIdentityAssertion(String assertion) override; // properties RTCIdentity virtual uint64_t get_objectId() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp index 86944d0c..6480767b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp index 4e7736c8..c3b7a985 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp index a3d7737f..86644000 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp index a4612be8..912bcd6b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp index 508d887b..a63118af 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp index 4d4bcd5f..1232a5d4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp index 02adab1c..3a02eda6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp index e7cb0951..648189db 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp index 71ae7e8c..5368c40f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp index ac982cb1..45ee60d1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp index 4715e77d..666e1d7a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp index 152eece5..556757cf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp index 9c5b4fdc..1946917c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp index ad94190a..5c666639 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp index 4b182141..3b6102ec 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp index f28068c3..5170921e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp index 6db8e12a..a1f67953 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp index 73a52a9b..410249d6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp index 89b8bfef..1b33e4a0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp index c8199163..71281f37 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp index 021bf70e..dfffeac5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp index 8b9441d0..45a2b898 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp index 0cedfbbd..361fd0ae 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp index 5a7bccf0..3f6e06d6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp index 1ca46255..5cbe4a02 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp index a32fbab4..65184bce 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCRtpListener::~RTCRtpListener() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpListener::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpListener::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h index bdc6b29d..165d58d9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCRtpListener(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCRtpListener virtual void wrapper_init_org_ortc_RTCRtpListener(wrapper::org::ortc::RTCRtpTransportPtr transport) override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp index 91ad952f..a10c19c9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp index 09b4a003..fcdcb519 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp index 558c3864..fc9622dc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp index 8d6d7797..86552d3a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp index 622a9ac9..d2e0888c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCRtpReceiver::~RTCRtpReceiver() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpReceiver::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpReceiver::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h index b40dfe62..d29afb2f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCRtpReceiver(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCRtpReceiver virtual void wrapper_init_org_ortc_RTCRtpReceiver( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp index 64c394f0..96dc9985 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp index d2403401..6a7b3d54 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp index e82264bf..fa3500c3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp index 6d096e27..3a06de22 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCRtpSender::~RTCRtpSender() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpSender::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpSender::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h index 31727e94..dbe255cb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCRtpSender(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCRtpSender virtual void wrapper_init_org_ortc_RTCRtpSender( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp index 47ac1a9f..96350391 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp index 6e561ae9..cde167af 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp index 6c8494d2..98d23c76 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp index 77f269e0..464c2ae0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp index e0411672..2c1a7324 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp index 48ce0f51..10e9b63e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCSctpTransport::~RTCSctpTransport() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSctpTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSctpTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h index 043f16db..649095ae 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCSctpTransport(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCSctpTransport virtual void wrapper_init_org_ortc_RTCSctpTransport(wrapper::org::ortc::RTCDtlsTransportPtr transport) override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp index 77af0186..092990e8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp index 6f448469..763d5927 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp index 0ec340a5..539ab5bb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp index e18b6af1..61522a86 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp index d2686c1b..1d36f55b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp index 41681793..4f8b5e46 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp index f0a34043..de50bd1e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::RTCSrtpSdesTransport::~RTCSrtpSdesTransport() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSrtpSdesTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSrtpSdesTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h index 9e250654..b323bf73 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCSrtpSdesTransport(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCSrtpSdesTransport virtual void wrapper_init_org_ortc_RTCSrtpSdesTransport( diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp index 3cd8d2ba..708870d3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp index a2556a16..6b7e4a60 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp index f6138ce4..74b233f2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp index adb27667..4dfed090 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp index d0f69f9a..da8ea060 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp index eff29a5a..30d2e4f0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -43,9 +44,9 @@ void wrapper::impl::org::ortc::RTCStatsProvider::wrapper_init_org_ortc_RTCStatsP } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCStatsProvider::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCStatsProvider::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h index 09647aad..039424c4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h @@ -19,7 +19,7 @@ namespace wrapper { virtual ~RTCStatsProvider(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; virtual void wrapper_init_org_ortc_RTCStatsProvider() override; }; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp index ec0679f2..62b8b910 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp index 1ada0ddd..831e6026 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp index 5d465377..d32fd978 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp index 8f2bdc8f..0e43ed6a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp index 7a6e0be9..48d3d84f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::adapter::MediaStream::~MediaStream() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::MediaStream::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::MediaStream::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h index 4b516dcb..f535e827 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h @@ -20,7 +20,7 @@ namespace wrapper { virtual ~MediaStream(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods MediaStream virtual void wrapper_init_org_ortc_adapter_MediaStream() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp index 21a0a8da..e39bcd99 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp index caf9617a..490743a9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp index 1724f089..b3c4037a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp index 0a48c7d4..2c0d787e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp index 8b85c5af..58383973 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp index 6f42c2b9..65880373 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp index 5f3cd81d..817c7273 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp index 9b7f3009..2f73666a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; @@ -38,9 +39,9 @@ wrapper::impl::org::ortc::adapter::RTCPeerConnection::~RTCPeerConnection() } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; return result; } @@ -55,44 +56,44 @@ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::wrapper_init_org_ortc } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer() +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer() { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer() +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer() { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities() +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities() { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; return result; } @@ -142,30 +143,30 @@ shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > wrapper::impl::org:: } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( wrapper::org::ortc::MediaStreamTrackPtr track, wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; return result; } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack( wrapper::org::ortc::MediaStreamTrackPtr track, shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > mediaStreams, wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; return result; } @@ -175,9 +176,9 @@ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::removeTrack(wrapper:: } //------------------------------------------------------------------------------ -shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCDataChannelPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) +shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCDataChannelPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) { - shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCDataChannelPtr > > result {}; + shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCDataChannelPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h index 75454376..aa2c7ffd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h @@ -20,17 +20,17 @@ namespace wrapper { virtual ~RTCPeerConnection(); // methods RTCStatsProvider - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; // methods RTCPeerConnection virtual void wrapper_init_org_ortc_adapter_RTCPeerConnection() override; virtual void wrapper_init_org_ortc_adapter_RTCPeerConnection(wrapper::org::ortc::adapter::RTCConfigurationPtr configuration) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer() override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer() override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities() override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer() override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer() override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities() override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) override; virtual PromisePtr setLocalDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) override; virtual PromisePtr setRemoteDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) override; virtual void addIceCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr candidate) override; @@ -38,18 +38,18 @@ namespace wrapper { virtual void close() override; virtual shared_ptr< list< wrapper::org::ortc::RTCRtpSenderPtr > > getSenders() override; virtual shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > getReceivers() override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( wrapper::org::ortc::MediaStreamTrackPtr track, wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > addTrack( wrapper::org::ortc::MediaStreamTrackPtr track, shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > mediaStreams, wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) override; virtual void removeTrack(wrapper::org::ortc::RTCRtpSenderPtr sender) override; - virtual shared_ptr< PromiseWithHolder< wrapper::org::ortc::RTCDataChannelPtr > > createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) override; + virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCDataChannelPtr > > createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) override; // properties RTCPeerConnection virtual uint64_t get_objectId() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp index c40918c2..9511128e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp index 3ded645d..c6fce768 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp index 69475970..42ecfcb7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp index d8df9d98..111c5597 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp index 47402a8f..00c098eb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp index b9688ef3..7dddf462 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp index b06a695d..13a61738 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp index 49901da7..73ffed6f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp index 5fbd1177..3cf277bb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp index 7114281b..78d6dd68 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp index 79ae33e9..83b63150 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp index f1fe11e4..dc01177f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp index 28782b08..e2ca073b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp index 9c2d7605..3a7a47af 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp index 831804e6..580beba0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp index f73b081e..a5fefe79 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp index 6214892f..49ac0beb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp @@ -10,6 +10,7 @@ using ::zsLib::AnyHolder; using ::zsLib::Promise; using ::zsLib::PromisePtr; using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; using ::zsLib::eventing::SecureByteBlock; using ::zsLib::eventing::SecureByteBlockPtr; using ::std::shared_ptr; From c3a00b5c2bec583000fa107c66cc43473597df08 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 14:53:12 -0500 Subject: [PATCH 015/187] - adding starter helper routines for wrapper glue --- ortc/idl/wrapper/impl_org_ortc_Helper.cpp | 78 +++++++++++++++++++++++ ortc/idl/wrapper/impl_org_ortc_Helper.h | 39 ++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 ortc/idl/wrapper/impl_org_ortc_Helper.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_Helper.h diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp new file mode 100644 index 00000000..b6c5fabd --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp @@ -0,0 +1,78 @@ + +#include "impl_org_ortc_Helper.h" + +#include "impl_org_ortc_MediaStreamTrack.h" +#include "impl_org_ortc_RTCStatsTypeSet.h" +#include "impl_org_ortc_RTCStatsReport.h" + +#include +#include + +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + namespace adapter { + } // namespace adapater + + + //--------------------------------------------------------------------- + Helper::WrapperMediaStreamTrackListPtr Helper::toWrapper(MediaStreamTrackListPtr tracks) + { + auto result = make_shared(); + for (auto iter = tracks->begin(); iter != tracks->end(); ++iter) + { + auto native = wrapper::impl::org::ortc::MediaStreamTrack::createFromNative(*iter); + if (!native) continue; + result->push_back(native); + } + return result; + } + + //--------------------------------------------------------------------- + Helper::MediaStreamTrackListPtr Helper::toNative(WrapperMediaStreamTrackListPtr tracks) + { + if (!tracks) return MediaStreamTrackListPtr(); + + MediaStreamTrackListPtr result = make_shared(); + for (auto iter = tracks->begin(); iter != tracks->end(); ++iter) + { + auto native = wrapper::impl::org::ortc::MediaStreamTrack::toNative(*iter); + if (!native) continue; + result->push_back(native); + } + return result; + } + + //--------------------------------------------------------------------- + Helper::PromiseWithStatsReportPtr Helper::getStats(IStatsProviderPtr native, wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) + { + ZS_THROW_INVALID_ARGUMENT_IF(!native); + ZS_THROW_INVALID_ARGUMENT_IF(!statTypes); + + auto value = wrapper::impl::org::ortc::RTCStatsTypeSet::toNative(statTypes); + ZS_THROW_INVALID_ARGUMENT_IF(!value); + + auto result = native->getStats(*value); + if (!result) return PromiseWithStatsReportPtr(); + + auto promise = PromiseWithStatsReport::create(); + + result->thenClosure([promise, result]() + { + if (result->isRejected()) + { + promise->reject(); + return; + } + promise->resolve(wrapper::impl::org::ortc::RTCStatsReport::createFromNative(result->value())); + }); + } + + } // namespace ortc + } // namespace org + } // namespace impl +} // namespace wrapper diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.h b/ortc/idl/wrapper/impl_org_ortc_Helper.h new file mode 100644 index 00000000..99a6b7f1 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.h @@ -0,0 +1,39 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_Json.h" + +#include + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct Helper + { + typedef PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > PromiseWithStatsReport; + ZS_DECLARE_PTR(PromiseWithStatsReport); + + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsProvider, IStatsProvider); + + typedef list< ::ortc::IMediaStreamTrackPtr > MediaStreamTrackList; + ZS_DECLARE_PTR(MediaStreamTrackList); + + typedef list< wrapper::org::ortc::MediaStreamTrackPtr > WrapperMediaStreamTrackList; + ZS_DECLARE_PTR(WrapperMediaStreamTrackList); + + static WrapperMediaStreamTrackListPtr toWrapper(MediaStreamTrackListPtr tracks); + static MediaStreamTrackListPtr toNative(WrapperMediaStreamTrackListPtr tracks); + + static PromiseWithStatsReportPtr getStats(IStatsProviderPtr native, wrapper::org::ortc::RTCStatsTypeSetPtr statTypes); + + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + From 619bc4e2d6c285def2c9e33eacf7f8c43eb9340a Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 14:55:30 -0500 Subject: [PATCH 016/187] - media stream track does not have constructor --- ortc/idl/MediaStreamTrack.idl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index 8cacc2c8..fb447629 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -692,6 +692,9 @@ namespace org [getter] MediaSource source; + [constructor, delete] + void MediaStreamTrack(); + /// /// Clones this MediaStreamTrack. /// From 495d1eb6f6715de7ec0c537cdbeb285f5eb45936 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 14:57:22 -0500 Subject: [PATCH 017/187] - removed IDL from wrapper project (it's in the ortclib project) - added wrapper helper to wrapper project file --- .../ortclib.wrapper.vcxproj | 263 +----------------- .../ortclib.wrapper.vcxproj.filters | 112 +------- 2 files changed, 12 insertions(+), 363 deletions(-) diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 7124b46a..655cd01d 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -27,266 +27,7 @@ - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - + @@ -325,6 +66,7 @@ + @@ -631,6 +373,7 @@ + diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index 2163c42a..c1c8f929 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -13,109 +13,6 @@ {856ec7c4-23a4-4b0a-ae49-46a103ab4f34} - - {8e4e19d9-65a2-4b68-9635-e2c0d194b07c} - - - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl - - - ortc\idl\adapter - - - ortc\idl\adapter - - - ortc\idl\adapter - - - ortc\idl\adapter - - - ortc\idl - - - ortc\idl - - - - - ortc\idl - - - ortc\idl - @@ -574,6 +471,12 @@ ortc\idl\wrapper + + ortc\idl\wrapper + + + ortc\idl\wrapper + @@ -1491,5 +1394,8 @@ ortc\idl\wrapper\generated + + ortc\idl\wrapper + \ No newline at end of file From a42b0905a781d2e8c040dff7cbd080361d33afcb Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 15:04:42 -0500 Subject: [PATCH 018/187] - removed media stream track constructor --- ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h | 1 - 2 files changed, 6 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp index 28076145..1d6060a2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::MediaStreamTrack::~MediaStreamTrack() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::MediaStreamTrack::wrapper_init_org_ortc_MediaStreamTrack() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::MediaStreamTrack::clone() { diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h index b830c170..be496102 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h @@ -25,7 +25,6 @@ namespace wrapper { virtual wrapper::org::ortc::MediaTrackConstraintsPtr getConstraints() override; virtual wrapper::org::ortc::MediaTrackSettingsPtr getSettings() override; virtual PromisePtr applyConstraints(wrapper::org::ortc::MediaTrackConstraintsPtr constraints) override; - virtual void wrapper_init_org_ortc_MediaStreamTrack() override; // properties MediaStreamTrack virtual uint64_t get_objectId() override; From 9666af44f82206a03cf3b155054a21c64078c069 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 16:17:26 -0500 Subject: [PATCH 019/187] - remove MediaSource track property setter --- ortc/idl/MediaStreamTrack.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index fb447629..4f45a045 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -606,7 +606,7 @@ namespace org /// /// Gets or sets the media track associated to the media source. /// - [getter, setter] + [getter] zs::Any track; }; From 7e028b4306b6390b3ceacc58340a239e6eda3eac Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 16:19:11 -0500 Subject: [PATCH 020/187] - remove MediaSource track property setter --- ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_MediaSource.h | 1 - 2 files changed, 6 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp index e958eeb2..72f02eac 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp @@ -62,9 +62,4 @@ AnyPtr wrapper::impl::org::ortc::MediaSource::get_track() return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::MediaSource::set_track(AnyPtr value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.h b/ortc/idl/wrapper/impl_org_ortc_MediaSource.h index 2190b2f5..7f93e49e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaSource.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.h @@ -23,7 +23,6 @@ namespace wrapper { virtual AnyPtr get_source() override; virtual void set_source(AnyPtr value) override; virtual AnyPtr get_track() override; - virtual void set_track(AnyPtr value) override; }; } // ortc From 8a8536bca6c998099d752e8a45bcbbad4429c80f Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 22:02:16 -0500 Subject: [PATCH 021/187] - fixed capability double to take double in constructors instead of long --- ortc/idl/Capabilities.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ortc/idl/Capabilities.idl b/ortc/idl/Capabilities.idl index 660e6fd1..dbc9dcd2 100644 --- a/ortc/idl/Capabilities.idl +++ b/ortc/idl/Capabilities.idl @@ -107,13 +107,13 @@ namespace org /// Constructs a minimum and maximum legal range given a real value. /// [constructor, default, altname(DoubleRangeWithValue)] - void DoubleRange(long value); + void DoubleRange(double value); /// /// Constructs a minimum and maximum legal range given a real minimum and maximum value. /// [constructor, default, altname(DoubleRangeWithLimits)] - void DoubleRange(long min, long max); + void DoubleRange(double min, double max); /// /// Constructs a minimum and maximum legal range given a JSON object. From a092d5f3fa4414dab2ea7115fc24e2af5dd6f127 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 22:03:52 -0500 Subject: [PATCH 022/187] - fixed capability double to take double in constructors instead of long --- ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp | 6 +++--- ortc/idl/wrapper/impl_org_ortc_DoubleRange.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp index 58a8bdc1..6b31597b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp @@ -44,14 +44,14 @@ void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange() } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange(long value) +void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange(double value) { } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange( - long min, - long max + double min, + double max ) { } diff --git a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h index 0239466a..01b7aae3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h +++ b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h @@ -20,10 +20,10 @@ namespace wrapper { // methods DoubleRange virtual void wrapper_init_org_ortc_DoubleRange() override; - virtual void wrapper_init_org_ortc_DoubleRange(long value) override; + virtual void wrapper_init_org_ortc_DoubleRange(double value) override; virtual void wrapper_init_org_ortc_DoubleRange( - long min, - long max + double min, + double max ) override; virtual void wrapper_init_org_ortc_DoubleRange(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; From cb223ca72e819bdedb99464d4025ba530bdd830a Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 22:15:49 -0500 Subject: [PATCH 023/187] - fixed typo in camelcase of deviceID and groupID --- ortc/idl/MediaStreamTrack.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index 4f45a045..8b1f3b68 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -135,11 +135,11 @@ namespace org /// /// The origin-unique identifier for the source of the MediaStreamTrack. /// - string deviceID; + string deviceId; /// /// The browsing session-unique group identifier for the source of the MediaStreamTrack. /// - string groupID; + string groupId; /// /// Constructs an empty instance of a MediaTrackCapabilities object. From ec4de00cb891da9b7b5c44916ebd07750a39add5 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Feb 2017 22:43:24 -0500 Subject: [PATCH 024/187] - fixed type "fameRate" vs "frameRate" --- ortc/idl/MediaStreamTrack.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index 8b1f3b68..5280e08f 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -73,7 +73,7 @@ namespace org /// must refer to the User Agent's vsync display rate. /// [optional] - DoubleRange fameRate; + DoubleRange frameRate; /// /// This string (or each string, when a list) should be one of the members of /// VideoFacingMode. The members describe the directions that the camera can From 21f7df8ae174dd3278efb5929d9019beb5b6c95c Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 23 Feb 2017 11:33:28 -0500 Subject: [PATCH 025/187] - removed unknown stats report enum type from wrapper - added stats report clone mechanism --- ortc/IStatsReport.h | 1 + ortc/cpp/ortc_StatsReport.cpp | 27 +++++++++++++++++++++++++++ ortc/idl/StatsReport.idl | 3 +++ ortc/idl/enums.idl | 4 ---- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ortc/IStatsReport.h b/ortc/IStatsReport.h index bb1401c0..2733285c 100644 --- a/ortc/IStatsReport.h +++ b/ortc/IStatsReport.h @@ -153,6 +153,7 @@ namespace ortc String statsType() const { if (mStatsType.hasValue()) return IStatsReportTypes::toString(mStatsType); return mStatsTypeOther; } + static StatsPtr create(const Stats &source); static StatsPtr create(ElementPtr rootEl); static StatsPtr convert(AnyPtr any); diff --git a/ortc/cpp/ortc_StatsReport.cpp b/ortc/cpp/ortc_StatsReport.cpp index a1acf203..4bf4c458 100644 --- a/ortc/cpp/ortc_StatsReport.cpp +++ b/ortc/cpp/ortc_StatsReport.cpp @@ -671,6 +671,33 @@ namespace ortc IHelper::getElementValue(rootEl, "ortc::IStatsReportTypes::Stats", "id", mID); } + //--------------------------------------------------------------------------- + IStatsReportTypes::StatsPtr IStatsReportTypes::Stats::create(const Stats &source) + { + if (!source.mStatsType.hasValue()) return make_shared(source); + switch (source.mStatsType.value()) + { + case StatsType_InboundRTP: return make_shared(dynamic_cast(source)); + case StatsType_OutboundRTP: return make_shared(dynamic_cast(source)); + case StatsType_Codec: return make_shared(dynamic_cast(source)); + case StatsType_SCTPTransport: return make_shared(dynamic_cast(source)); + case StatsType_DataChannel: return make_shared(dynamic_cast(source)); + case StatsType_Stream: return make_shared(dynamic_cast(source)); + case StatsType_Track: return make_shared(dynamic_cast(source)); + case StatsType_ICEGatherer: return make_shared(dynamic_cast(source)); + case StatsType_ICETransport: return make_shared(dynamic_cast(source)); + case StatsType_DTLSTransport: return make_shared(dynamic_cast(source)); + case StatsType_SRTPTransport: return make_shared(dynamic_cast(source)); + case StatsType_Certificate: return make_shared(dynamic_cast(source)); + case StatsType_Candidate: return make_shared(dynamic_cast(source)); + case StatsType_CandidatePair: return make_shared(dynamic_cast(source)); + case StatsType_LocalCandidate: return make_shared(dynamic_cast(source)); + case StatsType_RemoteCandidate: return make_shared(dynamic_cast(source)); + } + + return StatsPtr(); + } + //--------------------------------------------------------------------------- IStatsReportTypes::StatsPtr IStatsReportTypes::Stats::create(ElementPtr rootEl) { diff --git a/ortc/idl/StatsReport.idl b/ortc/idl/StatsReport.idl index 45b09d40..11064884 100644 --- a/ortc/idl/StatsReport.idl +++ b/ortc/idl/StatsReport.idl @@ -1006,6 +1006,9 @@ namespace org { typedef StringList IdList; + [constructor, delete] + void RTCStatsReport(); + /// /// Gets a unique object instance identifier for this object. /// diff --git a/ortc/idl/enums.idl b/ortc/idl/enums.idl index 04ab6f8f..c15fa222 100644 --- a/ortc/idl/enums.idl +++ b/ortc/idl/enums.idl @@ -497,10 +497,6 @@ namespace org /// enum RTCStatsType { - /// - /// Statistics returned are unknown and thus should be ignored. - /// - unknown, /// /// Statistics for the inbound RTP stream that is currently received /// with this RTCRtpReceiver object. It is accessed by the From 20ca75b631891509046464da071289e5dbcb43e1 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 23 Feb 2017 11:35:59 -0500 Subject: [PATCH 026/187] - removed stats report constructor --- ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h | 1 - 2 files changed, 6 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp index 62b8b910..55b9dd0b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCStatsReport::~RTCStatsReport() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCStatsReport::wrapper_init_org_ortc_RTCStatsReport() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCStatsPtr wrapper::impl::org::ortc::RTCStatsReport::getStats(String id) { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h index ca288707..304b6822 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h @@ -20,7 +20,6 @@ namespace wrapper { // methods RTCStatsReport virtual wrapper::org::ortc::RTCStatsPtr getStats(String id) override; - virtual void wrapper_init_org_ortc_RTCStatsReport() override; // properties RTCStatsReport virtual uint64_t get_objectId() override; From 9d4d9c69fc7ddfe82eaedc12fbc32fcf5341bd8d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 23 Feb 2017 15:35:39 -0500 Subject: [PATCH 027/187] - fixed incorrect SRTP stats definition in IDL - native C++ stats structs can clone themselves --- ortc/IStatsReport.h | 15 +++++++++++++++ ortc/idl/StatsReport.idl | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ortc/IStatsReport.h b/ortc/IStatsReport.h index 2733285c..808039d1 100644 --- a/ortc/IStatsReport.h +++ b/ortc/IStatsReport.h @@ -198,6 +198,7 @@ namespace ortc RTPStreamStats(ElementPtr rootEl); static RTPStreamStatsPtr create(ElementPtr rootEl); + static RTPStreamStatsPtr create(const RTPStreamStats &op2) { return std::dynamic_pointer_cast(Stats::create(op2)); } static RTPStreamStatsPtr convert(AnyPtr any); @@ -233,6 +234,7 @@ namespace ortc Codec(ElementPtr rootEl); static CodecPtr create(ElementPtr rootEl); + static CodecPtr create(const Codec &op2) { return std::make_shared(op2); } static CodecPtr convert(AnyPtr any); @@ -269,6 +271,7 @@ namespace ortc InboundRTPStreamStats(ElementPtr rootEl); static InboundRTPStreamStatsPtr create(ElementPtr rootEl); + static InboundRTPStreamStatsPtr create(const InboundRTPStreamStats &op2) { return std::make_shared(op2); } static InboundRTPStreamStatsPtr convert(AnyPtr any); @@ -303,6 +306,7 @@ namespace ortc OutboundRTPStreamStats(ElementPtr rootEl); static OutboundRTPStreamStatsPtr create(ElementPtr rootEl); + static OutboundRTPStreamStatsPtr create(const OutboundRTPStreamStats &op2) { return std::make_shared(op2); } static OutboundRTPStreamStatsPtr convert(AnyPtr any); @@ -335,6 +339,7 @@ namespace ortc SCTPTransportStats(ElementPtr rootEl); static SCTPTransportStatsPtr create(ElementPtr rootEl); + static SCTPTransportStatsPtr create(const SCTPTransportStats &op2) { return std::make_shared(op2); } static SCTPTransportStatsPtr convert(AnyPtr any); @@ -367,6 +372,7 @@ namespace ortc MediaStreamStats(ElementPtr rootEl); static MediaStreamStatsPtr create(ElementPtr rootEl); + static MediaStreamStatsPtr create(const MediaStreamStats &op2) { return std::make_shared(op2); } static MediaStreamStatsPtr convert(AnyPtr any); @@ -411,6 +417,7 @@ namespace ortc MediaStreamTrackStats(ElementPtr rootEl); static MediaStreamTrackStatsPtr create(ElementPtr rootEl); + static MediaStreamTrackStatsPtr create(const MediaStreamTrackStats &op2) { return std::make_shared(op2); } static MediaStreamTrackStatsPtr convert(AnyPtr any); @@ -449,6 +456,7 @@ namespace ortc DataChannelStats(ElementPtr rootEl); static DataChannelStatsPtr create(ElementPtr rootEl); + static DataChannelStatsPtr create(const DataChannelStats &op2) { return std::make_shared(op2); } static DataChannelStatsPtr convert(AnyPtr any); @@ -482,6 +490,7 @@ namespace ortc ICEGathererStats(ElementPtr rootEl); static ICEGathererStatsPtr create(ElementPtr rootEl); + static ICEGathererStatsPtr create(const ICEGathererStats &op2) { return std::make_shared(op2); } static ICEGathererStatsPtr convert(AnyPtr any); @@ -518,6 +527,7 @@ namespace ortc ICETransportStats(ElementPtr rootEl); static ICETransportStatsPtr create(ElementPtr rootEl); + static ICETransportStatsPtr create(const ICETransportStats &op2) { return std::make_shared(op2); } static ICETransportStatsPtr convert(AnyPtr any); @@ -550,6 +560,7 @@ namespace ortc DTLSTransportStats(ElementPtr rootEl); static DTLSTransportStatsPtr create(ElementPtr rootEl); + static DTLSTransportStatsPtr create(const DTLSTransportStats &op2) { return std::make_shared(op2); } static DTLSTransportStatsPtr convert(AnyPtr any); @@ -579,6 +590,7 @@ namespace ortc SRTPTransportStats(ElementPtr rootEl); static SRTPTransportStatsPtr create(ElementPtr rootEl); + static SRTPTransportStatsPtr create(const SRTPTransportStats &op2) { return std::make_shared(op2); } static SRTPTransportStatsPtr convert(AnyPtr any); @@ -616,6 +628,7 @@ namespace ortc ICECandidateAttributes(ElementPtr rootEl); static ICECandidateAttributesPtr create(ElementPtr rootEl); + static ICECandidateAttributesPtr create(const ICECandidateAttributes &op2) { return std::make_shared(op2); } static ICECandidateAttributesPtr convert(AnyPtr any); @@ -659,6 +672,7 @@ namespace ortc ICECandidatePairStats(ElementPtr rootEl); static ICECandidatePairStatsPtr create(ElementPtr rootEl); + static ICECandidatePairStatsPtr create(const ICECandidatePairStats &op2) { return std::make_shared(op2); } static ICECandidatePairStatsPtr convert(AnyPtr any); @@ -693,6 +707,7 @@ namespace ortc CertificateStats(ElementPtr rootEl); static CertificateStatsPtr create(ElementPtr rootEl); + static CertificateStatsPtr create(const CertificateStats &op2) { return std::make_shared(op2); } static CertificateStatsPtr convert(AnyPtr any); diff --git a/ortc/idl/StatsReport.idl b/ortc/idl/StatsReport.idl index 11064884..acd3d922 100644 --- a/ortc/idl/StatsReport.idl +++ b/ortc/idl/StatsReport.idl @@ -769,7 +769,7 @@ namespace org /// Constructs an instance of an RTCSrtpTransportStats object by cloning object data from an existing object. /// [constructor, altname(RTCSrtpTransportStatsClone)] - void RTCSrtpTransportStats(RTCDtlsTransportStats source); + void RTCSrtpTransportStats(RTCSrtpTransportStats source); /// /// Constructs an instance of an RTCSrtpTransportStats object by extracting object data from a JSON object. /// From 5f9506a117d7f8974ce81bf3c936c9ee0f64d291 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 23 Feb 2017 15:37:28 -0500 Subject: [PATCH 028/187] - fixed incorrect SRTP stats definition in IDL --- ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp | 2 +- ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp index 74b233f2..dd3a2efc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp @@ -86,7 +86,7 @@ void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCS } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::RTCDtlsTransportStatsPtr source) +void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::RTCSrtpTransportStatsPtr source) { } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h index 1ce88d91..63496b34 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h @@ -30,7 +30,7 @@ namespace wrapper { // methods RTCSrtpTransportStats virtual void wrapper_init_org_ortc_RTCSrtpTransportStats() override; - virtual void wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::RTCDtlsTransportStatsPtr source) override; + virtual void wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::RTCSrtpTransportStatsPtr source) override; virtual void wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::JsonPtr json) override; }; From 85199e0546fb9e8583b1d6c528116c69491a4139 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 23 Feb 2017 17:13:00 -0500 Subject: [PATCH 029/187] - stats provider should not have constructor in IDL --- ortc/idl/StatsProvider.idl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ortc/idl/StatsProvider.idl b/ortc/idl/StatsProvider.idl index 0288b2e4..e257fe36 100644 --- a/ortc/idl/StatsProvider.idl +++ b/ortc/idl/StatsProvider.idl @@ -40,6 +40,9 @@ namespace org { typedef zs::PromiseWith PromiseWithStatsReport; + [constructor, delete] + void RTCStatsProvider(); + /// /// Gets an awaitable RTCStatsReport object that will contain a set of /// statistics objects for the inspected object. A null RTCStatsReport From cb972fe161cccd15c2a22243ef36154847b3c5f3 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 23 Feb 2017 17:14:32 -0500 Subject: [PATCH 030/187] - stats provider should not have constructor in IDL --- ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h | 1 - 2 files changed, 6 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp index 30d2e4f0..893ac142 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCStatsProvider::~RTCStatsProvider() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCStatsProvider::wrapper_init_org_ortc_RTCStatsProvider() -{ -} - //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCStatsProvider::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h index 039424c4..c0dfbddb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h @@ -20,7 +20,6 @@ namespace wrapper { // methods RTCStatsProvider virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; - virtual void wrapper_init_org_ortc_RTCStatsProvider() override; }; } // ortc From 8ef5e8350bf42599efa09ac82d1a6265ced01f8a Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 23 Feb 2017 17:28:00 -0500 Subject: [PATCH 031/187] - adapter offer/answer options base class does not need constructor --- ortc/idl/adapter/PeerConnection.idl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ortc/idl/adapter/PeerConnection.idl b/ortc/idl/adapter/PeerConnection.idl index b8c96036..6d5f66f7 100644 --- a/ortc/idl/adapter/PeerConnection.idl +++ b/ortc/idl/adapter/PeerConnection.idl @@ -102,6 +102,9 @@ namespace org [dictionary] struct RTCOfferAnswerOptions { + [constructor, delete] + void RTCOfferAnswerOptions(); + /// /// Gets or sets if VAD is enabled. Many codecs and systems are /// capable of detecting "silence" and changing their behavior in this From 094752def1efe1c06b66cf1d2e718aea1406e0f7 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 23 Feb 2017 17:57:46 -0500 Subject: [PATCH 032/187] - adapter offer/answer options base class does not need constructor --- .../wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp | 5 ----- .../wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h | 1 - 2 files changed, 6 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp index 65880373..d66478d0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp @@ -38,9 +38,4 @@ wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::~RTCOfferAnswerOptions { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::wrapper_init_org_ortc_adapter_RTCOfferAnswerOptions() -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h index f5e21e2c..f665b3a2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h @@ -18,7 +18,6 @@ namespace wrapper { RTCOfferAnswerOptions(); virtual ~RTCOfferAnswerOptions(); - virtual void wrapper_init_org_ortc_adapter_RTCOfferAnswerOptions() override; }; } // adapter From 3e476cb168e01f0557e80e967183b792dc924ca7 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 13:55:19 -0500 Subject: [PATCH 033/187] - removed constructors from IDL for certificate and candidate gatherer types --- ortc/ICertificate.h | 2 +- ortc/adapter/ISessionDescription.h | 2 +- ortc/idl/Certificate.idl | 3 +++ ortc/idl/IceTypes.idl | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ortc/ICertificate.h b/ortc/ICertificate.h index f2381134..688fab6f 100644 --- a/ortc/ICertificate.h +++ b/ortc/ICertificate.h @@ -45,7 +45,7 @@ namespace ortc //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- #pragma mark - #pragma mark IDTLSTransportTypes + #pragma mark ICertificateTypes #pragma mark interaction ICertificateTypes diff --git a/ortc/adapter/ISessionDescription.h b/ortc/adapter/ISessionDescription.h index e8c59a30..d387df00 100644 --- a/ortc/adapter/ISessionDescription.h +++ b/ortc/adapter/ISessionDescription.h @@ -353,7 +353,7 @@ namespace ortc ElementPtr toDebug() const; String hash() const; - static ICECandidatePtr createFromSDP(ElementPtr rootEl); + static ICECandidatePtr createFromJSON(ElementPtr rootEl) { return create(rootEl); } static ICECandidatePtr createFromSDP(const char *value); String toSDP() const; ElementPtr toJSON() const; diff --git a/ortc/idl/Certificate.idl b/ortc/idl/Certificate.idl index a4409680..e846b4b5 100644 --- a/ortc/idl/Certificate.idl +++ b/ortc/idl/Certificate.idl @@ -118,6 +118,9 @@ namespace org [static, altname(generateCertificateWithJson)] PromiseWithCertificate generateCertificate(Json keygenAlgorithm); + [constructor, delete] + void RTCCertificate(); + /// /// Gets the unique object identifier for the certificate object. /// diff --git a/ortc/idl/IceTypes.idl b/ortc/idl/IceTypes.idl index f0e3c39f..6c402057 100644 --- a/ortc/idl/IceTypes.idl +++ b/ortc/idl/IceTypes.idl @@ -38,6 +38,9 @@ namespace org /// struct RTCIceGathererCandidate { + [constructor, delete] + void RTCIceGathererCandidate(); + /// /// Gets or sets the the component of the ICE candidate to indicate /// if the candidate is related to RTP or RTCP. From d9a8130844d0376b3fd5c0d8612844824582cccd Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 13:56:56 -0500 Subject: [PATCH 034/187] - adapter offer/answer options base class does not need constructor --- ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h | 1 - ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h | 1 - 4 files changed, 12 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp index c417897a..e512a620 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCCertificate::~RTCCertificate() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCCertificate::wrapper_init_org_ortc_RTCCertificate() -{ -} - //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h index 40268e0a..e0a5e318 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h @@ -17,7 +17,6 @@ namespace wrapper { RTCCertificate(); virtual ~RTCCertificate(); - virtual void wrapper_init_org_ortc_RTCCertificate() override; // properties RTCCertificate virtual uint64_t get_objectId() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp index 0f508d59..9822a5d5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCIceGathererCandidate::~RTCIceGathererCandidate() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCIceGathererCandidate::wrapper_init_org_ortc_RTCIceGathererCandidate() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceGathererCandidatePtr wrapper::org::ortc::RTCIceGathererCandidate::create(wrapper::org::ortc::JsonPtr json) { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h index f04b6bc3..dca8b679 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h @@ -21,7 +21,6 @@ namespace wrapper { // methods RTCIceGathererCandidate virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; - virtual void wrapper_init_org_ortc_RTCIceGathererCandidate() override; // properties RTCIceGathererCandidate virtual wrapper::org::ortc::RTCIceComponent get_component() override; From 468c660d743ded807d76fe5950b384cc22ea80a1 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 15:46:11 -0500 Subject: [PATCH 035/187] - removed constructors for IDL codec capability parameters / options and codec parameters --- ortc/idl/RtpTypes.idl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ortc/idl/RtpTypes.idl b/ortc/idl/RtpTypes.idl index 3e68fb45..be266011 100644 --- a/ortc/idl/RtpTypes.idl +++ b/ortc/idl/RtpTypes.idl @@ -39,6 +39,8 @@ namespace org [dictionary] struct RTCRtpCodecCapabilityOptions { + [constructor, delete] + void RTCRtpCodecCapabilityOptions(); }; /// @@ -47,6 +49,8 @@ namespace org [dictionary] struct RTCRtpCodecCapabilityParameters { + [constructor, delete] + void RTCRtpCodecCapabilityParameters(); }; /// @@ -795,6 +799,9 @@ namespace org { typedef std::list RtcpFeedbackList; + [constructor, delete] + void RTCRtpCodecParameters(); + /// /// Gets or sets the MIME media type. Valid types are listed in /// [www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2]. From a18c9bd701a09a31f4efe906880a3293f1b1ec33 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 15:50:12 -0500 Subject: [PATCH 036/187] - removed constructors for IDL codec capability parameters / options and codec parameters --- .../wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp | 5 ----- .../idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h | 1 - .../impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp | 5 ----- .../wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h | 1 - 4 files changed, 12 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp index 3b6102ec..7e92936d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp @@ -38,9 +38,4 @@ wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::~RTCRtpCodecCapabilityOp { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::wrapper_init_org_ortc_RTCRtpCodecCapabilityOptions() -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h index bf8d2ec0..4a17e6ca 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h @@ -17,7 +17,6 @@ namespace wrapper { RTCRtpCodecCapabilityOptions(); virtual ~RTCRtpCodecCapabilityOptions(); - virtual void wrapper_init_org_ortc_RTCRtpCodecCapabilityOptions() override; }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp index 5170921e..65b590a3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp @@ -38,9 +38,4 @@ wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::~RTCRtpCodecCapabilit { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpCodecCapabilityParameters() -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h index 1e8565fa..55adaa95 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h @@ -17,7 +17,6 @@ namespace wrapper { RTCRtpCodecCapabilityParameters(); virtual ~RTCRtpCodecCapabilityParameters(); - virtual void wrapper_init_org_ortc_RTCRtpCodecCapabilityParameters() override; }; } // ortc From 2f0e40c8a6842c7817c42bc0a75d78f173b518cf Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 16:13:05 -0500 Subject: [PATCH 037/187] - changed capability parameters / settings to expose types to wrapper --- ortc/idl/RtpTypes.idl | 105 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 94 insertions(+), 11 deletions(-) diff --git a/ortc/idl/RtpTypes.idl b/ortc/idl/RtpTypes.idl index be266011..1a72481e 100644 --- a/ortc/idl/RtpTypes.idl +++ b/ortc/idl/RtpTypes.idl @@ -53,6 +53,13 @@ namespace org void RTCRtpCodecCapabilityParameters(); }; + [dictionary] + struct RTCRtpCodecParameterSettings + { + [constructor, delete] + void RTCRtpCodecParameterSettings(); + }; + /// /// RTCRtcpFeedback provides information on RTCP feedback messages. /// @@ -400,7 +407,6 @@ namespace org string hash(); }; - // https://tools.ietf.org/html/rfc7587#section-6.1 /// /// The following optional capability parameters are defined for "opus", @@ -492,7 +498,8 @@ namespace org /// noted in [RFC7741] Section 6.1: /// [dictionary] - struct RTCRtpVp8CodecCapabilityParameters : RTCRtpCodecCapabilityParameters + struct RTCRtpVp8CodecCapabilityParameters : RTCRtpCodecCapabilityParameters, + RTCRtpCodecParameterSettings { /// /// Gets or sets the maximum frame rate in frames per second that the @@ -539,7 +546,8 @@ namespace org /// in [RFC6184] Section 8.1, and [draft-ietf-rtcweb-video] Section 6.2. /// [dictionary] - struct RTCRtpH264CodecCapabilityParameters : RTCRtpCodecCapabilityParameters + struct RTCRtpH264CodecCapabilityParameters : RTCRtpCodecCapabilityParameters, + RTCRtpCodecParameterSettings { typedef std::list PacketizationModeList; @@ -630,7 +638,8 @@ namespace org /// Section 8.6: /// [dictionary] - struct RTCRtpRtxCodecCapabilityParameters : RTCRtpCodecCapabilityParameters + struct RTCRtpRtxCodecCapabilityParameters : RTCRtpCodecCapabilityParameters, + RTCRtpCodecParameterSettings { /// /// Gets or sets the associated payload type of the original stream @@ -675,7 +684,8 @@ namespace org /// The following capabilities are defined for "flexfec", as noted in /// [draft-ietf-rtcweb-fec] Section 5.1.1: /// - struct RTCRtpFlexFecCodecCapabilityParameters : RTCRtpCodecCapabilityParameters + struct RTCRtpFlexFecCodecCapabilityParameters : RTCRtpCodecCapabilityParameters, + RTCRtpCodecParameterSettings { /// /// Gets or sets the default time that spans the source packets and the @@ -789,8 +799,6 @@ namespace org string hash(); }; - typedef RTCRtpCodecCapabilityParameters RTCRtpCodecParameterSettings; - /// /// RTCRtpCodecParameters provides information on codec settings. /// @@ -1288,10 +1296,85 @@ namespace org string hash(); }; - typedef RTCRtpVp8CodecCapabilityParameters RTCRtpVp8CodecParameterSettings; - typedef RTCRtpH264CodecCapabilityParameters RTCRtpH264CodecParameterSettings; - typedef RTCRtpRtxCodecCapabilityParameters RTCRtpRtxCodecParameterSettings; - typedef RTCRtpFlexFecCodecCapabilityParameters RTCRtpFlexFecCodecParameterSettings; + [dictionary] + struct RTCRtpVp8CodecParameterSettings : RTCRtpVp8CodecCapabilityParameters + { + /// + /// Constructs an empty instance of an RTCRtpVp8CodecParameterSettings object. + /// + [constructor, default] + void RTCRtpVp8CodecParameterSettings(); + /// + /// Constructs an instance of an RTCRtpVp8CodecParameterSettings object by cloning object data from an existing object. + /// + [constructor, altname(RTCRtpVp8CodecParameterSettingsClone)] + void RTCRtpVp8CodecParameterSettings(RTCRtpVp8CodecParameterSettings source); + /// + /// Constructs an instance of an RTCRtpVp8CodecParameterSettings object by extrating object data from a JSON object. + /// + [constructor, default, altname(RTCRtpVp8CodecParameterSettingsWithJson)] + void RTCRtpVp8CodecParameterSettings(Json json); + }; + + [dictionary] + struct RTCRtpH264CodecParameterSettings : RTCRtpH264CodecCapabilityParameters + { + /// + /// Constructs an empty instance of an RTCRtpH264CodecParameterSettings object. + /// + [constructor, default] + void RTCRtpH264CodecParameterSettings(); + /// + /// Constructs an instance of an RTCRtpH264CodecParameterSettings object by cloning object data from an existing object. + /// + [constructor, altname(RTCRtpH264CodecParameterSettingsClone)] + void RTCRtpH264CodecParameterSettings(RTCRtpH264CodecParameterSettings source); + /// + /// Constructs an instance of an RTCRtpH264CodecParameterSettings object by extrating object data from a JSON object. + /// + [constructor, default, altname(RTCRtpH264CodecParameterSettingsWithJson)] + void RTCRtpH264CodecParameterSettings(Json json); + }; + + [dictionary] + struct RTCRtpRtxCodecParameterSettings : RTCRtpRtxCodecCapabilityParameters + { + /// + /// Constructs an empty instance of an RTCRtpRtxCodecParameterSettings object. + /// + [constructor, default] + void RTCRtpRtxCodecParameterSettings(); + /// + /// Constructs an instance of an RTCRtpRtxCodecParameterSettings object by cloning object data from an existing object. + /// + [constructor, altname(RTCRtpRtxCodecParameterSettingsClone)] + void RTCRtpRtxCodecParameterSettings(RTCRtpRtxCodecParameterSettings source); + /// + /// Constructs an instance of an RTCRtpRtxCodecParameterSettings object by extrating object data from a JSON object. + /// + [constructor, default, altname(RTCRtpRtxCodecParameterSettingsWithJson)] + void RTCRtpRtxCodecParameterSettings(Json json); + }; + + [dictionary] + struct RTCRtpFlexFecCodecParameterSettings : RTCRtpFlexFecCodecCapabilityParameters + { + /// + /// Constructs an empty instance of an RTCRtpFlexFecCodecParameterSettings object. + /// + [constructor, default] + void RTCRtpFlexFecCodecParameterSettings(); + /// + /// Constructs an instance of an RTCRtpFlexFecCodecParameterSettings object by cloning object data from an existing object. + /// + [constructor, altname(RTCRtpFlexFecCodecParameterSettingsClone)] + void RTCRtpFlexFecCodecParameterSettings(RTCRtpFlexFecCodecParameterSettings source); + /// + /// Constructs an instance of an RTCRtpFlexFecCodecParameterSettings object by extrating object data from a JSON object. + /// + [constructor, default, altname(RTCRtpFlexFecCodecParameterSettingsWithJson)] + void RTCRtpFlexFecCodecParameterSettings(Json json); + }; /// /// The following setting is defined for "red", as noted in [RFC2198] From 42c8ecd90695f778001acdc110222799d8fb2703 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 16:15:59 -0500 Subject: [PATCH 038/187] - changed capability parameters / settings to expose types to wrapper --- ..._org_ortc_RTCRtpCodecParameterSettings.cpp | 41 ++++++ ...pl_org_ortc_RTCRtpCodecParameterSettings.h | 26 ++++ ...tc_RTCRtpFlexFecCodecParameterSettings.cpp | 118 ++++++++++++++++++ ...ortc_RTCRtpFlexFecCodecParameterSettings.h | 45 +++++++ ..._ortc_RTCRtpH264CodecParameterSettings.cpp | 70 +++++++++++ ...rg_ortc_RTCRtpH264CodecParameterSettings.h | 35 ++++++ ...g_ortc_RTCRtpRtxCodecParameterSettings.cpp | 70 +++++++++++ ...org_ortc_RTCRtpRtxCodecParameterSettings.h | 35 ++++++ ...g_ortc_RTCRtpVp8CodecParameterSettings.cpp | 70 +++++++++++ ...org_ortc_RTCRtpVp8CodecParameterSettings.h | 35 ++++++ ortc/idl/wrapper/types.h | 5 + 11 files changed, 550 insertions(+) create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp new file mode 100644 index 00000000..8e74d039 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp @@ -0,0 +1,41 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpCodecParameterSettings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecParameterSettings::RTCRtpCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpCodecParameterSettingsPtr wrapper::org::ortc::RTCRtpCodecParameterSettings::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpCodecParameterSettings::~RTCRtpCodecParameterSettings() +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h new file mode 100644 index 00000000..5d6ee8eb --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h @@ -0,0 +1,26 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpCodecParameterSettings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpCodecParameterSettings : public wrapper::org::ortc::RTCRtpCodecParameterSettings + { + RTCRtpCodecParameterSettingsWeakPtr thisWeak_; + + RTCRtpCodecParameterSettings(); + virtual ~RTCRtpCodecParameterSettings(); + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp new file mode 100644 index 00000000..017adca6 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp @@ -0,0 +1,118 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::RTCRtpFlexFecCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettingsPtr wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettings::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::~RTCRtpFlexFecCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +::zsLib::Microseconds wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::get_repairWindow() +{ + ::zsLib::Microseconds result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::set_repairWindow(::zsLib::Microseconds value) +{ +} + +//------------------------------------------------------------------------------ +Optional< unsigned long > wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::get_l() +{ + Optional< unsigned long > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::set_l(Optional< unsigned long > value) +{ +} + +//------------------------------------------------------------------------------ +Optional< unsigned long > wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::get_d() +{ + Optional< unsigned long > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::set_d(Optional< unsigned long > value) +{ +} + +//------------------------------------------------------------------------------ +Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::get_toP() +{ + Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::set_toP(Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > value) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettingsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::JsonPtr json) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h new file mode 100644 index 00000000..1eda5546 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h @@ -0,0 +1,45 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpFlexFecCodecParameterSettings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpFlexFecCodecParameterSettings : public wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettings + { + RTCRtpFlexFecCodecParameterSettingsWeakPtr thisWeak_; + + RTCRtpFlexFecCodecParameterSettings(); + virtual ~RTCRtpFlexFecCodecParameterSettings(); + + // methods RTCRtpFlexFecCodecCapabilityParameters + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // properties RTCRtpFlexFecCodecCapabilityParameters + virtual ::zsLib::Microseconds get_repairWindow() override; + virtual void set_repairWindow(::zsLib::Microseconds value) override; + virtual Optional< unsigned long > get_l() override; + virtual void set_l(Optional< unsigned long > value) override; + virtual Optional< unsigned long > get_d() override; + virtual void set_d(Optional< unsigned long > value) override; + virtual Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > get_toP() override; + virtual void set_toP(Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > value) override; + + // methods RTCRtpFlexFecCodecParameterSettings + virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings() override; + virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettingsPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp new file mode 100644 index 00000000..16496782 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp @@ -0,0 +1,70 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpH264CodecParameterSettings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::RTCRtpH264CodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpH264CodecParameterSettingsPtr wrapper::org::ortc::RTCRtpH264CodecParameterSettings::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::~RTCRtpH264CodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings(wrapper::org::ortc::RTCRtpH264CodecParameterSettingsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings(wrapper::org::ortc::JsonPtr json) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h new file mode 100644 index 00000000..2909bf34 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpH264CodecParameterSettings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpH264CodecParameterSettings : public wrapper::org::ortc::RTCRtpH264CodecParameterSettings + { + RTCRtpH264CodecParameterSettingsWeakPtr thisWeak_; + + RTCRtpH264CodecParameterSettings(); + virtual ~RTCRtpH264CodecParameterSettings(); + + // methods RTCRtpH264CodecCapabilityParameters + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // methods RTCRtpH264CodecParameterSettings + virtual void wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings() override; + virtual void wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings(wrapper::org::ortc::RTCRtpH264CodecParameterSettingsPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp new file mode 100644 index 00000000..e0ca5a9f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp @@ -0,0 +1,70 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpRtxCodecParameterSettings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::RTCRtpRtxCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpRtxCodecParameterSettingsPtr wrapper::org::ortc::RTCRtpRtxCodecParameterSettings::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::~RTCRtpRtxCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings(wrapper::org::ortc::RTCRtpRtxCodecParameterSettingsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings(wrapper::org::ortc::JsonPtr json) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h new file mode 100644 index 00000000..6b88e9a9 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpRtxCodecParameterSettings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpRtxCodecParameterSettings : public wrapper::org::ortc::RTCRtpRtxCodecParameterSettings + { + RTCRtpRtxCodecParameterSettingsWeakPtr thisWeak_; + + RTCRtpRtxCodecParameterSettings(); + virtual ~RTCRtpRtxCodecParameterSettings(); + + // methods RTCRtpRtxCodecCapabilityParameters + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // methods RTCRtpRtxCodecParameterSettings + virtual void wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings() override; + virtual void wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings(wrapper::org::ortc::RTCRtpRtxCodecParameterSettingsPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp new file mode 100644 index 00000000..5d4a5f68 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp @@ -0,0 +1,70 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCRtpVp8CodecParameterSettings.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::RTCRtpVp8CodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCRtpVp8CodecParameterSettingsPtr wrapper::org::ortc::RTCRtpVp8CodecParameterSettings::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::~RTCRtpVp8CodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::toJson() +{ + wrapper::org::ortc::JsonPtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::hash() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings() +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings(wrapper::org::ortc::RTCRtpVp8CodecParameterSettingsPtr source) +{ +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings(wrapper::org::ortc::JsonPtr json) +{ +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h new file mode 100644 index 00000000..851e9682 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h @@ -0,0 +1,35 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCRtpVp8CodecParameterSettings.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCRtpVp8CodecParameterSettings : public wrapper::org::ortc::RTCRtpVp8CodecParameterSettings + { + RTCRtpVp8CodecParameterSettingsWeakPtr thisWeak_; + + RTCRtpVp8CodecParameterSettings(); + virtual ~RTCRtpVp8CodecParameterSettings(); + + // methods RTCRtpVp8CodecCapabilityParameters + virtual wrapper::org::ortc::JsonPtr toJson() override; + virtual String hash() override; + + // methods RTCRtpVp8CodecParameterSettings + virtual void wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings() override; + virtual void wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings(wrapper::org::ortc::RTCRtpVp8CodecParameterSettingsPtr source) override; + virtual void wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/types.h b/ortc/idl/wrapper/types.h index cdab31cf..f5fa8b8f 100644 --- a/ortc/idl/wrapper/types.h +++ b/ortc/idl/wrapper/types.h @@ -127,13 +127,16 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCRtpCodecCapability); ZS_DECLARE_STRUCT_PTR(RTCRtpCodecCapabilityOptions); ZS_DECLARE_STRUCT_PTR(RTCRtpCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpCodecParameterSettings); ZS_DECLARE_STRUCT_PTR(RTCRtpCodecParameters); ZS_DECLARE_STRUCT_PTR(RTCRtpContributingSource); ZS_DECLARE_STRUCT_PTR(RTCRtpDtmfSender); ZS_DECLARE_STRUCT_PTR(RTCRtpEncodingParameters); ZS_DECLARE_STRUCT_PTR(RTCRtpFecParameters); ZS_DECLARE_STRUCT_PTR(RTCRtpFlexFecCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpFlexFecCodecParameterSettings); ZS_DECLARE_STRUCT_PTR(RTCRtpH264CodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpH264CodecParameterSettings); ZS_DECLARE_STRUCT_PTR(RTCRtpHeaderExtension); ZS_DECLARE_STRUCT_PTR(RTCRtpHeaderExtensionParameters); ZS_DECLARE_STRUCT_PTR(RTCRtpListener); @@ -144,12 +147,14 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCRtpReceiver); ZS_DECLARE_STRUCT_PTR(RTCRtpRedCodecParameterSettings); ZS_DECLARE_STRUCT_PTR(RTCRtpRtxCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpRtxCodecParameterSettings); ZS_DECLARE_STRUCT_PTR(RTCRtpRtxParameters); ZS_DECLARE_STRUCT_PTR(RTCRtpSender); ZS_DECLARE_STRUCT_PTR(RTCRtpStreamStats); ZS_DECLARE_STRUCT_PTR(RTCRtpTransport); ZS_DECLARE_STRUCT_PTR(RTCRtpUnhandledEvent); ZS_DECLARE_STRUCT_PTR(RTCRtpVp8CodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTCRtpVp8CodecParameterSettings); ZS_DECLARE_STRUCT_PTR(RTCSctpCapabilities); ZS_DECLARE_STRUCT_PTR(RTCSctpTransport); ZS_DECLARE_STRUCT_PTR(RTCSctpTransportListener); From a81b43307093dbbce9896574f618577de122b84f Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 16:41:12 -0500 Subject: [PATCH 039/187] - changed capability parameters / settings to expose types to wrapper --- .../ortclib.wrapper.vcxproj | 14 +++++++ .../ortclib.wrapper.vcxproj.filters | 42 +++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 655cd01d..789189b2 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -140,12 +140,15 @@ + + + @@ -156,12 +159,14 @@ + + @@ -298,7 +303,9 @@ + + @@ -309,12 +316,14 @@ + + @@ -447,12 +456,15 @@ + + + @@ -463,12 +475,14 @@ + + diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index c1c8f929..d3c2b625 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -477,6 +477,21 @@ ortc\idl\wrapper + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + @@ -1397,5 +1412,32 @@ ortc\idl\wrapper + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + \ No newline at end of file From acc68ac148f437fac3d2eeee138ca93c675221ed Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 21:16:56 -0500 Subject: [PATCH 040/187] - flexfec IDL did not contain dictionary optional --- ortc/idl/RtpTypes.idl | 1 + 1 file changed, 1 insertion(+) diff --git a/ortc/idl/RtpTypes.idl b/ortc/idl/RtpTypes.idl index 1a72481e..7347d312 100644 --- a/ortc/idl/RtpTypes.idl +++ b/ortc/idl/RtpTypes.idl @@ -684,6 +684,7 @@ namespace org /// The following capabilities are defined for "flexfec", as noted in /// [draft-ietf-rtcweb-fec] Section 5.1.1: /// + [dictionary] struct RTCRtpFlexFecCodecCapabilityParameters : RTCRtpCodecCapabilityParameters, RTCRtpCodecParameterSettings { From 349270b3805425729b5a0ffb4a4305b94d36094e Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 21:19:38 -0500 Subject: [PATCH 041/187] - flexfec IDL did not contain dictionary optional --- ...RTCRtpFlexFecCodecCapabilityParameters.cpp | 48 ------------------- ...c_RTCRtpFlexFecCodecCapabilityParameters.h | 10 ---- ...tc_RTCRtpFlexFecCodecParameterSettings.cpp | 48 ------------------- ...ortc_RTCRtpFlexFecCodecParameterSettings.h | 10 ---- 4 files changed, 116 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp index 45a2b898..fc0ca4b8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp @@ -67,52 +67,4 @@ String wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::hash() return result; } -//------------------------------------------------------------------------------ -::zsLib::Microseconds wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::get_repairWindow() -{ - ::zsLib::Microseconds result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::set_repairWindow(::zsLib::Microseconds value) -{ -} - -//------------------------------------------------------------------------------ -Optional< unsigned long > wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::get_l() -{ - Optional< unsigned long > result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::set_l(Optional< unsigned long > value) -{ -} - -//------------------------------------------------------------------------------ -Optional< unsigned long > wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::get_d() -{ - Optional< unsigned long > result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::set_d(Optional< unsigned long > value) -{ -} - -//------------------------------------------------------------------------------ -Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::get_toP() -{ - Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::set_toP(Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h index 90682610..b37d70cd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h @@ -24,16 +24,6 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; - - // properties RTCRtpFlexFecCodecCapabilityParameters - virtual ::zsLib::Microseconds get_repairWindow() override; - virtual void set_repairWindow(::zsLib::Microseconds value) override; - virtual Optional< unsigned long > get_l() override; - virtual void set_l(Optional< unsigned long > value) override; - virtual Optional< unsigned long > get_d() override; - virtual void set_d(Optional< unsigned long > value) override; - virtual Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > get_toP() override; - virtual void set_toP(Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > value) override; }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp index 017adca6..1e2cc61a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp @@ -52,54 +52,6 @@ String wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::hash() return result; } -//------------------------------------------------------------------------------ -::zsLib::Microseconds wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::get_repairWindow() -{ - ::zsLib::Microseconds result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::set_repairWindow(::zsLib::Microseconds value) -{ -} - -//------------------------------------------------------------------------------ -Optional< unsigned long > wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::get_l() -{ - Optional< unsigned long > result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::set_l(Optional< unsigned long > value) -{ -} - -//------------------------------------------------------------------------------ -Optional< unsigned long > wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::get_d() -{ - Optional< unsigned long > result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::set_d(Optional< unsigned long > value) -{ -} - -//------------------------------------------------------------------------------ -Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::get_toP() -{ - Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::set_toP(Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > value) -{ -} - //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h index 1eda5546..1883981f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h @@ -22,16 +22,6 @@ namespace wrapper { virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; - // properties RTCRtpFlexFecCodecCapabilityParameters - virtual ::zsLib::Microseconds get_repairWindow() override; - virtual void set_repairWindow(::zsLib::Microseconds value) override; - virtual Optional< unsigned long > get_l() override; - virtual void set_l(Optional< unsigned long > value) override; - virtual Optional< unsigned long > get_d() override; - virtual void set_d(Optional< unsigned long > value) override; - virtual Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > get_toP() override; - virtual void set_toP(Optional< wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP > value) override; - // methods RTCRtpFlexFecCodecParameterSettings virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings() override; virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettingsPtr source) override; From 07695bc66879f4551dda7d73813bbbc2bcb62441 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 24 Feb 2017 22:16:33 -0500 Subject: [PATCH 042/187] - fixed type in maxMbps in IDL --- ortc/idl/RtpTypes.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/idl/RtpTypes.idl b/ortc/idl/RtpTypes.idl index 7347d312..13f8a89a 100644 --- a/ortc/idl/RtpTypes.idl +++ b/ortc/idl/RtpTypes.idl @@ -571,7 +571,7 @@ namespace org /// rate in units of macroblocks per second. /// [optional] - unsigned long long maxMnps; + unsigned long long maxMbps; /// /// Gets or sets an integer indicating the maximum static macroblock /// processing rate in units of static macroblocks per second, under the From 73d510d01c2146afd08bfa16fb37b92976817ebe Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 25 Feb 2017 14:05:04 -0500 Subject: [PATCH 043/187] - removed rtp priority type unknown - made peer connection events read-only without constructors --- ortc/IRTPTypes.h | 6 ++---- ortc/cpp/ortc_RTPTypes.cpp | 3 +-- ortc/idl/adapter/PeerConnection.idl | 23 ++++++++++++++++++++++- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/ortc/IRTPTypes.h b/ortc/IRTPTypes.h index 29779aae..bd3c2989 100644 --- a/ortc/IRTPTypes.h +++ b/ortc/IRTPTypes.h @@ -640,9 +640,7 @@ namespace ortc enum PriorityTypes { PriorityType_First, - PriorityType_Unknown = PriorityType_First, - - PriorityType_VeryLow, + PriorityType_VeryLow = PriorityType_First, PriorityType_Low, PriorityType_Medium, PriorityType_High, @@ -663,7 +661,7 @@ namespace ortc Optional mCodecPayloadType; Optional mFEC; Optional mRTX; - PriorityTypes mPriority {PriorityType_Unknown}; + Optional mPriority; Optional mMaxBitrate {}; Optional mMinQuality {0}; Optional mResolutionScale {}; diff --git a/ortc/cpp/ortc_RTPTypes.cpp b/ortc/cpp/ortc_RTPTypes.cpp index 0768b151..481e055d 100644 --- a/ortc/cpp/ortc_RTPTypes.cpp +++ b/ortc/cpp/ortc_RTPTypes.cpp @@ -4106,7 +4106,6 @@ namespace ortc const char *IRTPTypes::toString(PriorityTypes type) { switch (type) { - case PriorityType_Unknown: return ""; case PriorityType_VeryLow: return "very-low"; case PriorityType_Low: return "low"; case PriorityType_Medium: return "medium"; @@ -4125,7 +4124,7 @@ namespace ortc if (typeStr == IRTPTypes::toString(index)) return index; } - return PriorityType_Unknown; + ORTC_THROW_INVALID_PARAMETERS("unknown priority type"); } //--------------------------------------------------------------------------- diff --git a/ortc/idl/adapter/PeerConnection.idl b/ortc/idl/adapter/PeerConnection.idl index 6d5f66f7..b39c673a 100644 --- a/ortc/idl/adapter/PeerConnection.idl +++ b/ortc/idl/adapter/PeerConnection.idl @@ -189,26 +189,32 @@ namespace org /// interface RTCPeerConnectionIceErrorEvent { + [constructor, delete] + void RTCPeerConnectionIceErrorEvent(); + /// /// Gets the local candidate used to communicate with the STUN or TURN /// server. /// + [getter] RTCIceCandidate hostCandidate; /// /// Gets the STUN or TURN URL that identifies the STUN or TURN server /// for which the failure occurred. /// + [getter] string url; /// /// Gets the errorCode attribute is the numeric STUN error code /// returned by the STUN or TURN server. /// - [optional] + [getter, optional] uint16 errorCode; /// /// Gets the errorText attribute is the STUN reason text returned by /// the STUN or TURN server. /// + [getter] string errorText; }; @@ -217,16 +223,21 @@ namespace org /// struct RTCPeerConnectionIceEvent { + [constructor, delete] + void RTCPeerConnectionIceEvent(); + /// /// Gets the RTCIceCandidate object with the new ICE candidate that /// caused the event. /// + [getter] RTCIceCandidate candidate; /// /// Gets the STUN or TURN URL that identifies the STUN or TURN server /// used to gather this candidate. If the candidate was not gathered /// from a STUN or TURN server, this parameter will be set to null. /// + [getter] string uri; }; @@ -236,10 +247,14 @@ namespace org /// struct RTCPeerConnectionIceCompleteEvent { + [constructor, delete] + void RTCPeerConnectionIceCompleteEvent(); + /// /// Gets the RTCIceCandidateComplete object with the final ICE /// transport candidate that caused the event. /// + [getter] RTCIceCandidateComplete candidate; }; @@ -250,19 +265,25 @@ namespace org { typedef std::list MediaStreamList; + [constructor, delete] + void RTCTrackEvent(); + /// /// Gets the RTCRtpReceiver object associated with the event. /// + [getter] RTCRtpReceiver receiver; /// /// Gets the MediaStreamTrack object that is associated with the /// RTCRtpReceiver identified by receiver. /// + [getter] MediaStreamTrack track; /// /// Gets an array of MediaStream objects representing the MediaStreams /// that this event's track is a part of. /// + [getter] MediaStreamList mediaStreams; }; From 651a08fab1fa43e38ae949c5b48b98c24719cd67 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 25 Feb 2017 14:07:28 -0500 Subject: [PATCH 044/187] - peer connection events are now read only and non constructable --- ...pter_RTCPeerConnectionIceCompleteEvent.cpp | 10 -------- ...dapter_RTCPeerConnectionIceCompleteEvent.h | 2 -- ...adapter_RTCPeerConnectionIceErrorEvent.cpp | 25 ------------------- ...c_adapter_RTCPeerConnectionIceErrorEvent.h | 5 ---- ...ortc_adapter_RTCPeerConnectionIceEvent.cpp | 15 ----------- ...g_ortc_adapter_RTCPeerConnectionIceEvent.h | 3 --- .../impl_org_ortc_adapter_RTCTrackEvent.cpp | 20 --------------- .../impl_org_ortc_adapter_RTCTrackEvent.h | 4 --- 8 files changed, 84 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp index 9511128e..0936f5cc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::~RTCPeerCo { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::wrapper_init_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::get_candidate() { @@ -50,9 +45,4 @@ wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::impl::org::ortc::adapter return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::set_candidate(wrapper::org::ortc::RTCIceCandidateCompletePtr value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h index 536f9a2f..b28ee581 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h @@ -18,11 +18,9 @@ namespace wrapper { RTCPeerConnectionIceCompleteEvent(); virtual ~RTCPeerConnectionIceCompleteEvent(); - virtual void wrapper_init_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent() override; // properties RTCPeerConnectionIceCompleteEvent virtual wrapper::org::ortc::RTCIceCandidateCompletePtr get_candidate() override; - virtual void set_candidate(wrapper::org::ortc::RTCIceCandidateCompletePtr value) override; }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp index c6fce768..635799d7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::~RTCPeerConne { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::wrapper_init_org_ortc_adapter_RTCPeerConnectionIceErrorEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_hostCandidate() { @@ -50,11 +45,6 @@ wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::impl::org::ortc::adapte return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::set_hostCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr value) -{ -} - //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_url() { @@ -62,11 +52,6 @@ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_ur return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::set_url(String value) -{ -} - //------------------------------------------------------------------------------ Optional< uint16_t > wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_errorCode() { @@ -74,11 +59,6 @@ Optional< uint16_t > wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErro return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::set_errorCode(Optional< uint16_t > value) -{ -} - //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_errorText() { @@ -86,9 +66,4 @@ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_er return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::set_errorText(String value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h index 55e00ff7..a819b03c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h @@ -18,17 +18,12 @@ namespace wrapper { RTCPeerConnectionIceErrorEvent(); virtual ~RTCPeerConnectionIceErrorEvent(); - virtual void wrapper_init_org_ortc_adapter_RTCPeerConnectionIceErrorEvent() override; // properties RTCPeerConnectionIceErrorEvent virtual wrapper::org::ortc::adapter::RTCIceCandidatePtr get_hostCandidate() override; - virtual void set_hostCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr value) override; virtual String get_url() override; - virtual void set_url(String value) override; virtual Optional< uint16_t > get_errorCode() override; - virtual void set_errorCode(Optional< uint16_t > value) override; virtual String get_errorText() override; - virtual void set_errorText(String value) override; }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp index 42ecfcb7..cc454517 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::~RTCPeerConnection { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::wrapper_init_org_ortc_adapter_RTCPeerConnectionIceEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::get_candidate() { @@ -50,11 +45,6 @@ wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::impl::org::ortc::adapte return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::set_candidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr value) -{ -} - //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::get_uri() { @@ -62,9 +52,4 @@ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::get_uri() return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::set_uri(String value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h index 9f9154c9..cba4974a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h @@ -18,13 +18,10 @@ namespace wrapper { RTCPeerConnectionIceEvent(); virtual ~RTCPeerConnectionIceEvent(); - virtual void wrapper_init_org_ortc_adapter_RTCPeerConnectionIceEvent() override; // properties RTCPeerConnectionIceEvent virtual wrapper::org::ortc::adapter::RTCIceCandidatePtr get_candidate() override; - virtual void set_candidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr value) override; virtual String get_uri() override; - virtual void set_uri(String value) override; }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp index 49ac0beb..d611a782 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::adapter::RTCTrackEvent::~RTCTrackEvent() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCTrackEvent::wrapper_init_org_ortc_adapter_RTCTrackEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpReceiverPtr wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_receiver() { @@ -50,11 +45,6 @@ wrapper::org::ortc::RTCRtpReceiverPtr wrapper::impl::org::ortc::adapter::RTCTrac return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCTrackEvent::set_receiver(wrapper::org::ortc::RTCRtpReceiverPtr value) -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_track() { @@ -62,11 +52,6 @@ wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::adapter::RTCTr return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCTrackEvent::set_track(wrapper::org::ortc::MediaStreamTrackPtr value) -{ -} - //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_mediaStreams() { @@ -74,9 +59,4 @@ shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > wrapper::impl: return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCTrackEvent::set_mediaStreams(shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h index eaefad56..74cfc1b4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h @@ -18,15 +18,11 @@ namespace wrapper { RTCTrackEvent(); virtual ~RTCTrackEvent(); - virtual void wrapper_init_org_ortc_adapter_RTCTrackEvent() override; // properties RTCTrackEvent virtual wrapper::org::ortc::RTCRtpReceiverPtr get_receiver() override; - virtual void set_receiver(wrapper::org::ortc::RTCRtpReceiverPtr value) override; virtual wrapper::org::ortc::MediaStreamTrackPtr get_track() override; - virtual void set_track(wrapper::org::ortc::MediaStreamTrackPtr value) override; virtual shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > get_mediaStreams() override; - virtual void set_mediaStreams(shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > value) override; }; } // adapter From 5637b773a9a5d268253fa7865bb1209316b67f04 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 25 Feb 2017 14:55:08 -0500 Subject: [PATCH 045/187] - peer connection ice candidate complete event is removed --- ortc/idl/adapter/PeerConnection.idl | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/ortc/idl/adapter/PeerConnection.idl b/ortc/idl/adapter/PeerConnection.idl index b39c673a..87de91a5 100644 --- a/ortc/idl/adapter/PeerConnection.idl +++ b/ortc/idl/adapter/PeerConnection.idl @@ -241,23 +241,6 @@ namespace org string uri; }; - /// - /// This event fires whenever the final ICE candidate has been - /// discovered for an ICE transport. - /// - struct RTCPeerConnectionIceCompleteEvent - { - [constructor, delete] - void RTCPeerConnectionIceCompleteEvent(); - - /// - /// Gets the RTCIceCandidateComplete object with the final ICE - /// transport candidate that caused the event. - /// - [getter] - RTCIceCandidateComplete candidate; - }; - /// /// The RTCTrackEvent is fired when a new remote track is detected. /// @@ -580,12 +563,6 @@ namespace org [event] void onIceCandidate(RTCPeerConnectionIceEvent event); - /// - /// The final RTCIceCandidateComplete is discovered for a transport. - /// - [event] - void onIceCandidateComplete(RTCPeerConnectionIceCompleteEvent event); - /// /// A failure occured when gathering ICE candidates. /// From 101892dadf08fdeb31256236735bf0ebbbc4f6a6 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 25 Feb 2017 15:10:17 -0500 Subject: [PATCH 046/187] - peer connection ice candidate complete event is removed --- ...pter_RTCPeerConnectionIceCompleteEvent.cpp | 48 ------------------- ...dapter_RTCPeerConnectionIceCompleteEvent.h | 31 ------------ ortc/idl/wrapper/types.h | 1 - .../ortclib.wrapper.vcxproj | 3 -- .../ortclib.wrapper.vcxproj.filters | 9 ---- 5 files changed, 92 deletions(-) delete mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp delete mode 100644 ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp deleted file mode 100644 index 0936f5cc..00000000 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by zsLibEventingTool - -#include "impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h" - -using ::zsLib::String; -using ::zsLib::Optional; -using ::zsLib::Any; -using ::zsLib::AnyPtr; -using ::zsLib::AnyHolder; -using ::zsLib::Promise; -using ::zsLib::PromisePtr; -using ::zsLib::PromiseWithHolder; -using ::zsLib::PromiseWithHolderPtr; -using ::zsLib::eventing::SecureByteBlock; -using ::zsLib::eventing::SecureByteBlockPtr; -using ::std::shared_ptr; -using ::std::weak_ptr; -using ::std::make_shared; -using ::std::list; -using ::std::set; -using ::std::map; - -//------------------------------------------------------------------------------ -wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::RTCPeerConnectionIceCompleteEvent() -{ -} - -//------------------------------------------------------------------------------ -wrapper::org::ortc::adapter::RTCPeerConnectionIceCompleteEventPtr wrapper::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::wrapper_create() -{ - auto pThis = make_shared(); - pThis->thisWeak_ = pThis; - return pThis; -} - -//------------------------------------------------------------------------------ -wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::~RTCPeerConnectionIceCompleteEvent() -{ -} - -//------------------------------------------------------------------------------ -wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent::get_candidate() -{ - wrapper::org::ortc::RTCIceCandidateCompletePtr result {}; - return result; -} - - diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h deleted file mode 100644 index b28ee581..00000000 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by zsLibEventingTool - -#pragma once - -#include "types.h" -#include "generated/org_ortc_adapter_RTCPeerConnectionIceCompleteEvent.h" - - -namespace wrapper { - namespace impl { - namespace org { - namespace ortc { - namespace adapter { - - struct RTCPeerConnectionIceCompleteEvent : public wrapper::org::ortc::adapter::RTCPeerConnectionIceCompleteEvent - { - RTCPeerConnectionIceCompleteEventWeakPtr thisWeak_; - - RTCPeerConnectionIceCompleteEvent(); - virtual ~RTCPeerConnectionIceCompleteEvent(); - - // properties RTCPeerConnectionIceCompleteEvent - virtual wrapper::org::ortc::RTCIceCandidateCompletePtr get_candidate() override; - }; - - } // adapter - } // ortc - } // org - } // namespace impl -} // namespace wrapper - diff --git a/ortc/idl/wrapper/types.h b/ortc/idl/wrapper/types.h index f5fa8b8f..bd4432de 100644 --- a/ortc/idl/wrapper/types.h +++ b/ortc/idl/wrapper/types.h @@ -20,7 +20,6 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCOfferAnswerOptions); ZS_DECLARE_STRUCT_PTR(RTCOfferOptions); ZS_DECLARE_STRUCT_PTR(RTCPeerConnection); - ZS_DECLARE_STRUCT_PTR(RTCPeerConnectionIceCompleteEvent); ZS_DECLARE_STRUCT_PTR(RTCPeerConnectionIceErrorEvent); ZS_DECLARE_STRUCT_PTR(RTCPeerConnectionIceEvent); ZS_DECLARE_STRUCT_PTR(RTCSessionDescription); diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 789189b2..001541a6 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -37,7 +37,6 @@ - @@ -197,7 +196,6 @@ - @@ -353,7 +351,6 @@ - diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index d3c2b625..5a5950c5 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -36,9 +36,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - ortc\idl\wrapper @@ -515,9 +512,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - ortc\idl\wrapper @@ -956,9 +950,6 @@ ortc\idl\wrapper\generated - - ortc\idl\wrapper\generated - ortc\idl\wrapper\generated From a13dc9be20e31680807e70aa495f532e81318ca3 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 25 Feb 2017 19:51:40 -0500 Subject: [PATCH 047/187] - some adpter dictionaries were not marked with [dictionary] --- ortc/idl/adapter/SessionDescription.idl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ortc/idl/adapter/SessionDescription.idl b/ortc/idl/adapter/SessionDescription.idl index 6458e672..c1df28e6 100644 --- a/ortc/idl/adapter/SessionDescription.idl +++ b/ortc/idl/adapter/SessionDescription.idl @@ -482,7 +482,8 @@ namespace org /// a=sendrecv /// a=mid:a2 /// - /// [dictionary] + /// + [dictionary] struct RTCSessionDescriptionRtpMediaLine : RTCSessionDescriptionMediaLine { /// @@ -542,7 +543,8 @@ namespace org /// a=fmtp:webrtc-datachannel max-message-size=65536 /// a=sctp-port 5000 /// - /// [dictionary] + /// + [dictionary] struct RTCSessionDescriptionSctpMediaLine : RTCSessionDescriptionMediaLine { /// From 5d53104e9b4ace964ad86c00fa8d3b3db32afd88 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 25 Feb 2017 19:53:12 -0500 Subject: [PATCH 048/187] - some adpter dictionaries were not marked with [dictionary] --- ...pter_RTCSessionDescriptionRtpMediaLine.cpp | 24 ------------------- ...dapter_RTCSessionDescriptionRtpMediaLine.h | 6 ----- ...ter_RTCSessionDescriptionSctpMediaLine.cpp | 24 ------------------- ...apter_RTCSessionDescriptionSctpMediaLine.h | 6 ----- 4 files changed, 60 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp index 83b63150..1252631d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp @@ -67,28 +67,4 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::wrapp { } -//------------------------------------------------------------------------------ -wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::get_senderCapabilities() -{ - wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::set_senderCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr value) -{ -} - -//------------------------------------------------------------------------------ -wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::get_receiverCapabilities() -{ - wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::set_receiverCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h index 8f007271..7d9f1d92 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h @@ -27,12 +27,6 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine() override; virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLinePtr source) override; virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::JsonPtr json) override; - - // properties RTCSessionDescriptionRtpMediaLine - virtual wrapper::org::ortc::RTCRtpCapabilitiesPtr get_senderCapabilities() override; - virtual void set_senderCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr value) override; - virtual wrapper::org::ortc::RTCRtpCapabilitiesPtr get_receiverCapabilities() override; - virtual void set_receiverCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr value) override; }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp index 3a7a47af..fa60c24e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp @@ -67,28 +67,4 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::wrap { } -//------------------------------------------------------------------------------ -wrapper::org::ortc::RTCSctpCapabilitiesPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::get_capabilities() -{ - wrapper::org::ortc::RTCSctpCapabilitiesPtr result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::set_capabilities(wrapper::org::ortc::RTCSctpCapabilitiesPtr value) -{ -} - -//------------------------------------------------------------------------------ -Optional< uint16_t > wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::get_port() -{ - Optional< uint16_t > result {}; - return result; -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::set_port(Optional< uint16_t > value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h index d15c7ce3..fabff59a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h @@ -27,12 +27,6 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine() override; virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLinePtr source) override; virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::JsonPtr json) override; - - // properties RTCSessionDescriptionSctpMediaLine - virtual wrapper::org::ortc::RTCSctpCapabilitiesPtr get_capabilities() override; - virtual void set_capabilities(wrapper::org::ortc::RTCSctpCapabilitiesPtr value) override; - virtual Optional< uint16_t > get_port() override; - virtual void set_port(Optional< uint16_t > value) override; }; } // adapter From 73d0a8e983d766406ed3724baa63c9c426670ecb Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 25 Feb 2017 21:15:51 -0500 Subject: [PATCH 049/187] - deete adapter media line constructors --- ortc/idl/adapter/SessionDescription.idl | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/ortc/idl/adapter/SessionDescription.idl b/ortc/idl/adapter/SessionDescription.idl index c1df28e6..13de5cef 100644 --- a/ortc/idl/adapter/SessionDescription.idl +++ b/ortc/idl/adapter/SessionDescription.idl @@ -377,6 +377,9 @@ namespace org [dictionary] struct RTCSessionDescriptionMediaLine { + [constructor, delete] + void RTCSessionDescriptionMediaLine(); + /// /// Gets or sets the media identifier for the media line as described /// in [RFC5888] Section 4. @@ -428,22 +431,6 @@ namespace org /// RTCSessionDescriptionMediaLineDetails details; - /// - /// Constructs an empty instance of an RTCSessionDescriptionMediaLine object. - /// - [constructor, default] - void RTCSessionDescriptionMediaLine(); - /// - /// Constructs an instance of an RTCSessionDescriptionMediaLine object by cloning object data from an existing object. - /// - [constructor, altname(RTCSessionDescriptionMediaLineClone)] - void RTCSessionDescriptionMediaLine(RTCSessionDescriptionMediaLine source); - /// - /// Constructs an instance of an RTCSessionDescriptionMediaLine object by extracting object data from a JSON object. - /// - [constructor, default, altname(RTCSessionDescriptionMediaLineWithJson)] - void RTCSessionDescriptionMediaLine(Json json); - /// /// A helper routine to convert the object's data to structured JSON object data. /// From 87bc5a6dd70020fcdf50eb39ad7d03363df3d417 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 25 Feb 2017 21:19:23 -0500 Subject: [PATCH 050/187] - deete adapter media line constructors --- ...rtc_adapter_RTCSessionDescriptionMediaLine.cpp | 15 --------------- ..._ortc_adapter_RTCSessionDescriptionMediaLine.h | 3 --- 2 files changed, 18 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp index 3cf277bb..be6e9d89 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp @@ -38,21 +38,6 @@ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::~RTCSessionDe { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine() -{ -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLinePtr source) -{ -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine(wrapper::org::ortc::JsonPtr json) -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::toJson() { diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h index 3dd68c0d..0ad91c1d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h @@ -20,9 +20,6 @@ namespace wrapper { virtual ~RTCSessionDescriptionMediaLine(); // methods RTCSessionDescriptionMediaLine - virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine() override; - virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLinePtr source) override; - virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLine(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; }; From 2cb278a2a62543630c17981700d709fa105ff5fa Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 12:59:39 -0500 Subject: [PATCH 051/187] - constributing source IDL doesn't need JSON conversion --- ortc/idl/RtpReceiver.idl | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ortc/idl/RtpReceiver.idl b/ortc/idl/RtpReceiver.idl index d5958c39..0f3a73a0 100644 --- a/ortc/idl/RtpReceiver.idl +++ b/ortc/idl/RtpReceiver.idl @@ -86,21 +86,7 @@ namespace org /// [constructor, default] void RTCRtpContributingSource(); - /// - /// Constructs an instance of an RTCRtpContributingSource by cloning object data from an existing object. - /// - [constructor, altname(RTCRtpContributingSourceClone)] - void RTCRtpContributingSource(RTCRtpContributingSource source); - /// - /// Constructs an instance of an RTCRtpContributingSource by extracting object data from a JSON object. - /// - [constructor, default, altname(RTCRtpContributingSourceWithJson)] - void RTCRtpContributingSource(Json json); - /// - /// A helper routine to convert the object's data to structured JSON object data. - /// - Json toJson(); /// /// Return a hash of the data contained within the object. /// From a7cfbdd10da2468fdb01ef3234ee4ae1193a14ee Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 13:01:21 -0500 Subject: [PATCH 052/187] - constributing source IDL doesn't need JSON conversion --- .../impl_org_ortc_RTCRtpContributingSource.cpp | 17 ----------------- .../impl_org_ortc_RTCRtpContributingSource.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp index 410249d6..41b1c695 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp @@ -43,23 +43,6 @@ void wrapper::impl::org::ortc::RTCRtpContributingSource::wrapper_init_org_ortc_R { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpContributingSource::wrapper_init_org_ortc_RTCRtpContributingSource(wrapper::org::ortc::RTCRtpContributingSourcePtr source) -{ -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpContributingSource::wrapper_init_org_ortc_RTCRtpContributingSource(wrapper::org::ortc::JsonPtr json) -{ -} - -//------------------------------------------------------------------------------ -wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpContributingSource::toJson() -{ - wrapper::org::ortc::JsonPtr result {}; - return result; -} - //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpContributingSource::hash() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h index 6a856b2a..8660a64c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h @@ -20,9 +20,6 @@ namespace wrapper { // methods RTCRtpContributingSource virtual void wrapper_init_org_ortc_RTCRtpContributingSource() override; - virtual void wrapper_init_org_ortc_RTCRtpContributingSource(wrapper::org::ortc::RTCRtpContributingSourcePtr source) override; - virtual void wrapper_init_org_ortc_RTCRtpContributingSource(wrapper::org::ortc::JsonPtr json) override; - virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; }; From 414618279b54e767a44dbdd68c767b4c6405d48b Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 13:20:22 -0500 Subject: [PATCH 053/187] - rtp / rtcp transports should not have constructor in IDL --- ortc/idl/IceTransport.idl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ortc/idl/IceTransport.idl b/ortc/idl/IceTransport.idl index 8fc2f37d..a3e6fa24 100644 --- a/ortc/idl/IceTransport.idl +++ b/ortc/idl/IceTransport.idl @@ -36,11 +36,19 @@ namespace org /// /// An abstract object representing an RTP transport. /// - interface RTCRtpTransport {}; + interface RTCRtpTransport + { + [constructor, delete] + void RTCRtpTransport(); + }; /// /// An abstract object representing an RTCP transport. /// - interface RTCRtcpTransport {}; + interface RTCRtcpTransport + { + [constructor, delete] + void RTCRtcpTransport(); + }; /// /// This object represents the event data associated when the From 58eb70d2b8717beb3c46a5c74b3e42f5d3204de7 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 13:22:13 -0500 Subject: [PATCH 054/187] - rtp / rtcp transports should not have constructor in IDL --- ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h | 1 - ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h | 1 - 4 files changed, 12 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp index 556757cf..fc39064d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp @@ -38,9 +38,4 @@ wrapper::impl::org::ortc::RTCRtcpTransport::~RTCRtcpTransport() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtcpTransport::wrapper_init_org_ortc_RTCRtcpTransport() -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h index e706e978..1dfb9e30 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h @@ -17,7 +17,6 @@ namespace wrapper { RTCRtcpTransport(); virtual ~RTCRtcpTransport(); - virtual void wrapper_init_org_ortc_RTCRtcpTransport() override; }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp index cde167af..54ac98f8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp @@ -38,9 +38,4 @@ wrapper::impl::org::ortc::RTCRtpTransport::~RTCRtpTransport() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpTransport::wrapper_init_org_ortc_RTCRtpTransport() -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h index d33e4c40..0a8121ce 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h @@ -17,7 +17,6 @@ namespace wrapper { RTCRtpTransport(); virtual ~RTCRtpTransport(); - virtual void wrapper_init_org_ortc_RTCRtpTransport() override; }; } // ortc From d093115007b925c40aaa074b08532391a8f97b0f Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 13:50:42 -0500 Subject: [PATCH 055/187] - getCertificates returns a binary list of values from DTLS transport in IDL --- ortc/idl/DtlsTransport.idl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ortc/idl/DtlsTransport.idl b/ortc/idl/DtlsTransport.idl index 8f290037..2892c02c 100644 --- a/ortc/idl/DtlsTransport.idl +++ b/ortc/idl/DtlsTransport.idl @@ -100,6 +100,7 @@ namespace org RTCStatsProvider { typedef std::list CertificateList; + typedef std::list BinaryList; /// /// A RTCDtlsTransport instance is constructed using an RTCIceTransport @@ -159,7 +160,7 @@ namespace org /// selection of the remote certificate, which is completed once /// RTCDtlsTransportState transitions to "Connected". /// - binary getRemoteCertificates(); + BinaryList getRemoteCertificates(); /// /// Start DTLS transport negotiation with the parameters of the remote From fbbeb4e5a115fa6a7757ea64cfc6ab7487b2c91d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 13:52:10 -0500 Subject: [PATCH 056/187] - getCertificates returns a binary list of values from DTLS transport in IDL --- ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp | 4 ++-- ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp index a0cae6d2..4a90695c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp @@ -61,9 +61,9 @@ wrapper::org::ortc::RTCDtlsParametersPtr wrapper::impl::org::ortc::RTCDtlsTransp } //------------------------------------------------------------------------------ -SecureByteBlockPtr wrapper::impl::org::ortc::RTCDtlsTransport::getRemoteCertificates() +shared_ptr< list< SecureByteBlockPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getRemoteCertificates() { - SecureByteBlockPtr result {}; + shared_ptr< list< SecureByteBlockPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h index ec258fce..9218b2b8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h @@ -27,7 +27,7 @@ namespace wrapper { shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > certificates ) override; virtual wrapper::org::ortc::RTCDtlsParametersPtr remoteParameters() override; - virtual SecureByteBlockPtr getRemoteCertificates() override; + virtual shared_ptr< list< SecureByteBlockPtr > > getRemoteCertificates() override; virtual void start(wrapper::org::ortc::RTCDtlsParametersPtr remoteParameters) override; virtual void stop() override; From 185921a7703050e998a9e5c864f1ce1b6705723a Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 15:08:51 -0500 Subject: [PATCH 057/187] - selected candidate pair in ICE transport was returning wrong object in IDL - remove constructor from error and dtls transport state change event in IDL --- ortc/idl/DtlsTransport.idl | 3 +++ ortc/idl/IceTransport.idl | 2 +- ortc/idl/error.idl | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ortc/idl/DtlsTransport.idl b/ortc/idl/DtlsTransport.idl index 2892c02c..174add64 100644 --- a/ortc/idl/DtlsTransport.idl +++ b/ortc/idl/DtlsTransport.idl @@ -83,6 +83,9 @@ namespace org /// struct RTCDtlsTransportStateChangeEvent { + [constructor, delete] + void RTCDtlsTransportStateChangeEvent(); + /// /// Gets the new RTCDtlsTransportState that caused the event. /// diff --git a/ortc/idl/IceTransport.idl b/ortc/idl/IceTransport.idl index a3e6fa24..a528fb32 100644 --- a/ortc/idl/IceTransport.idl +++ b/ortc/idl/IceTransport.idl @@ -150,7 +150,7 @@ namespace org /// selected pair, nullptr is returned. /// [getter] - CandidateList selectedCandidatePair; + RTCIceCandidatePair selectedCandidatePair; /// /// The first time Start() is called, candidate connectivity checks are diff --git a/ortc/idl/error.idl b/ortc/idl/error.idl index c50463d9..b93c14b0 100644 --- a/ortc/idl/error.idl +++ b/ortc/idl/error.idl @@ -61,6 +61,9 @@ namespace org /// interface ErrorEvent { + [constructor, delete] + void ErrorEvent(); + /// /// Gets the error information associated with this event (if any). /// From 8959c841e7ce89b389d6050a837cd2181d0c94bd Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 15:10:05 -0500 Subject: [PATCH 058/187] - selected candidate pair in ICE transport was returning wrong object in IDL - remove constructor from error and dtls transport state change event in IDL --- ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h | 1 - .../impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp | 5 ----- .../wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h | 1 - ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp | 4 ++-- ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h | 2 +- 6 files changed, 3 insertions(+), 15 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp index 5a37b67e..9784ebc5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::ErrorEvent::~ErrorEvent() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::ErrorEvent::wrapper_init_org_ortc_ErrorEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::ErrorPtr wrapper::impl::org::ortc::ErrorEvent::get_error() { diff --git a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h index bdc5cad1..1416c33f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h @@ -17,7 +17,6 @@ namespace wrapper { ErrorEvent(); virtual ~ErrorEvent(); - virtual void wrapper_init_org_ortc_ErrorEvent() override; // properties ErrorEvent virtual wrapper::org::ortc::ErrorPtr get_error() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp index 5b0c4b47..64a023f0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::~RTCDtlsTransportSta { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::wrapper_init_org_ortc_RTCDtlsTransportStateChangeEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDtlsTransportState wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::get_state() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h index 0adb85d3..e569cb8c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCDtlsTransportStateChangeEvent(); virtual ~RTCDtlsTransportStateChangeEvent(); - virtual void wrapper_init_org_ortc_RTCDtlsTransportStateChangeEvent() override; // properties RTCDtlsTransportStateChangeEvent virtual wrapper::org::ortc::RTCDtlsTransportState get_state() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp index 59ad66ce..652a6f79 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp @@ -164,9 +164,9 @@ shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > wrapper::impl::org: } //------------------------------------------------------------------------------ -shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > wrapper::impl::org::ortc::RTCIceTransport::get_selectedCandidatePair() +wrapper::org::ortc::RTCIceCandidatePairPtr wrapper::impl::org::ortc::RTCIceTransport::get_selectedCandidatePair() { - shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > result {}; + wrapper::org::ortc::RTCIceCandidatePairPtr result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h index 283a1658..eab04715 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h @@ -56,7 +56,7 @@ namespace wrapper { virtual wrapper::org::ortc::RTCIceComponent get_component() override; virtual wrapper::org::ortc::RTCIceTransportState get_state() override; virtual shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > get_remoteCandidates() override; - virtual shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > get_selectedCandidatePair() override; + virtual wrapper::org::ortc::RTCIceCandidatePairPtr get_selectedCandidatePair() override; virtual wrapper::org::ortc::RTCIceParametersPtr get_remoteParameters() override; virtual void wrapper_onObserverCountChanged(size_t count) override; From 5258efc9d1d66869bfe1c997fbd78bb2245de124 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 17:15:38 -0500 Subject: [PATCH 059/187] - removed gatherer event constructors in IDL --- ortc/idl/IceGatherer.idl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index ccb41fb7..e26fb2f9 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -202,6 +202,9 @@ namespace org [dictionary] struct RTCIceGathererIceErrorEvent { + [constructor, delete] + void RTCIceGathererIceErrorEvent(); + /// /// Gets the RTCIceCandidate used to communicate with the STUN or TURN /// server. On a multihomed system, multiple interfaces may be sed to @@ -235,6 +238,9 @@ namespace org /// struct RTCIceGathererStateChangeEvent { + [constructor, delete] + void RTCIceGathererStateChangeEvent(); + /// /// Gets the new RTCIceGathererState that caused the event. /// @@ -248,6 +254,8 @@ namespace org /// struct RTCIceGathererCandidateEvent { + [constructor, delete] + void RTCIceGathererCandidateEvent(); /// /// Gets the ICE candidate that caused the event. /// @@ -266,6 +274,9 @@ namespace org /// struct RTCIceGathererCandidateCompleteEvent { + [constructor, delete] + void RTCIceGathererCandidateCompleteEvent(); + /// /// Gets the ICE candidate that caused the event. /// From 59a1f7c84582179e3370ca6798cb1d334ce960cf Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 17:18:49 -0500 Subject: [PATCH 060/187] - removed gatherer event constructors in IDL --- .../impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp | 5 ----- .../impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h | 1 - .../wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp | 5 ----- .../idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h | 1 - .../wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h | 1 - .../wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp | 5 ----- .../wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h | 1 - 8 files changed, 24 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp index 10bdf19e..9e0b0f0a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::~RTCIceGathererC { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::wrapper_init_org_ortc_RTCIceGathererCandidateCompleteEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::get_candidate() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h index 62e8eb1f..5cec533c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCIceGathererCandidateCompleteEvent(); virtual ~RTCIceGathererCandidateCompleteEvent(); - virtual void wrapper_init_org_ortc_RTCIceGathererCandidateCompleteEvent() override; // properties RTCIceGathererCandidateCompleteEvent virtual wrapper::org::ortc::RTCIceCandidateCompletePtr get_candidate() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp index db84083d..cdc9a0f6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::~RTCIceGathererCandidate { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::wrapper_init_org_ortc_RTCIceGathererCandidateEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::get_candidate() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h index f04883da..582c4c37 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCIceGathererCandidateEvent(); virtual ~RTCIceGathererCandidateEvent(); - virtual void wrapper_init_org_ortc_RTCIceGathererCandidateEvent() override; // properties RTCIceGathererCandidateEvent virtual wrapper::org::ortc::RTCIceCandidatePtr get_candidate() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp index 1ca9b434..5cbe6504 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp @@ -38,9 +38,4 @@ wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::~RTCIceGathererIceErrorEv { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::wrapper_init_org_ortc_RTCIceGathererIceErrorEvent() -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h index f9041ef6..ff7ad894 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCIceGathererIceErrorEvent(); virtual ~RTCIceGathererIceErrorEvent(); - virtual void wrapper_init_org_ortc_RTCIceGathererIceErrorEvent() override; }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp index 62881838..473d4c27 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::~RTCIceGathererStateCh { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::wrapper_init_org_ortc_RTCIceGathererStateChangeEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceGathererState wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::get_state() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h index 7c0e147b..2cfbc20c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCIceGathererStateChangeEvent(); virtual ~RTCIceGathererStateChangeEvent(); - virtual void wrapper_init_org_ortc_RTCIceGathererStateChangeEvent() override; // properties RTCIceGathererStateChangeEvent virtual wrapper::org::ortc::RTCIceGathererState get_state() override; From d8203fd5e2f244d8ecec116a3dceb1acbf49550e Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 19:03:12 -0500 Subject: [PATCH 061/187] - gatherer error event IDL should be getter only --- ortc/idl/IceGatherer.idl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index e26fb2f9..3cd4cb16 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -199,7 +199,6 @@ namespace org /// has experienced an ICE gathering failure (such as an authentication /// failure with TURN credentials). /// - [dictionary] struct RTCIceGathererIceErrorEvent { [constructor, delete] @@ -217,6 +216,7 @@ namespace org /// Gets the STUN or TURN URL identifying the server on which the /// failure ocurred. /// + [getter] string url; /// /// Gets the numeric STUN error code returned by the STUN or TURN @@ -225,10 +225,12 @@ namespace org /// not conflict with the STUN error code range, and HostCandidate will /// be null. /// + [getter] uint16 errorCode; /// /// Gets the STUN reason text returned by the STUN or TURN server. /// + [getter] string errorText; }; From 3a9766c4a6f7f30a0207988f6565073d670abfdb Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 19:07:22 -0500 Subject: [PATCH 062/187] - gatherer error event IDL should be getter only --- ...l_org_ortc_RTCIceGathererIceErrorEvent.cpp | 33 +++++++++++++++++++ ...mpl_org_ortc_RTCIceGathererIceErrorEvent.h | 7 ++++ 2 files changed, 40 insertions(+) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp index 5cbe6504..d3a4ea22 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp @@ -38,4 +38,37 @@ wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::~RTCIceGathererIceErrorEv { } +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_hostCandidate() +{ + wrapper::org::ortc::RTCIceCandidatePtr result {}; + return result; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::set_hostCandidate(wrapper::org::ortc::RTCIceCandidatePtr value) +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_url() +{ + String result {}; + return result; +} + +//------------------------------------------------------------------------------ +uint16_t wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_errorCode() +{ + uint16_t result {}; + return result; +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_errorText() +{ + String result {}; + return result; +} + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h index ff7ad894..8e3a8b47 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h @@ -17,6 +17,13 @@ namespace wrapper { RTCIceGathererIceErrorEvent(); virtual ~RTCIceGathererIceErrorEvent(); + + // properties RTCIceGathererIceErrorEvent + virtual wrapper::org::ortc::RTCIceCandidatePtr get_hostCandidate() override; + virtual void set_hostCandidate(wrapper::org::ortc::RTCIceCandidatePtr value) override; + virtual String get_url() override; + virtual uint16_t get_errorCode() override; + virtual String get_errorText() override; }; } // ortc From 50c21d45391b7345d1aa2eebb167e18868aa8219 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 19:35:35 -0500 Subject: [PATCH 063/187] - ice transport events should not have constructors --- ortc/idl/IceGatherer.idl | 2 +- ortc/idl/IceTransport.idl | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index 3cd4cb16..cb6cad12 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -210,7 +210,7 @@ namespace org /// contact the server, and this attribute allows the application to /// figure out on which one the failure occurred. /// - [nullable] + [getter, nullable] RTCIceCandidate hostCandidate; /// /// Gets the STUN or TURN URL identifying the server on which the diff --git a/ortc/idl/IceTransport.idl b/ortc/idl/IceTransport.idl index a528fb32..95ea04a3 100644 --- a/ortc/idl/IceTransport.idl +++ b/ortc/idl/IceTransport.idl @@ -56,6 +56,9 @@ namespace org /// struct RTCIceTransportStateChangeEvent { + [constructor, delete] + void RTCIceTransportStateChangeEvent(); + /// /// Gets the RTCIceTransportState state at the time the event fired. /// @@ -70,6 +73,9 @@ namespace org /// struct RTCIceCandidatePairChangeEvent { + [constructor, delete] + void RTCIceCandidatePairChangeEvent(); + /// /// Gets the selected RTCIceCandidatePair that caused the event. /// @@ -187,7 +193,7 @@ namespace org void start( RTCIceGatherer gatherer, RTCIceParameters remoteParameters, - RTCIceRole options + RTCIceRole role ) throws(InvalidParameters, InvalidStateError); /// From 66387aac1ab9287395def2665156ec268a31d9d7 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 19:36:54 -0500 Subject: [PATCH 064/187] - gatherer error event IDL should be getter only --- .../wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp | 5 ----- .../wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h | 1 - .../wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h | 1 - ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp | 2 +- ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h | 2 +- .../impl_org_ortc_RTCIceTransportStateChangeEvent.cpp | 5 ----- .../wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h | 1 - 8 files changed, 2 insertions(+), 20 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp index e16dbe89..ca4168d1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::~RTCIceCandidatePairCh { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::wrapper_init_org_ortc_RTCIceCandidatePairChangeEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePairPtr wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::get_candidatePair() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h index 98c856e4..ad766ca2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCIceCandidatePairChangeEvent(); virtual ~RTCIceCandidatePairChangeEvent(); - virtual void wrapper_init_org_ortc_RTCIceCandidatePairChangeEvent() override; // properties RTCIceCandidatePairChangeEvent virtual wrapper::org::ortc::RTCIceCandidatePairPtr get_candidatePair() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp index d3a4ea22..cffe7613 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp @@ -45,11 +45,6 @@ wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceGathererI return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::set_hostCandidate(wrapper::org::ortc::RTCIceCandidatePtr value) -{ -} - //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_url() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h index 8e3a8b47..c642fdc1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h @@ -20,7 +20,6 @@ namespace wrapper { // properties RTCIceGathererIceErrorEvent virtual wrapper::org::ortc::RTCIceCandidatePtr get_hostCandidate() override; - virtual void set_hostCandidate(wrapper::org::ortc::RTCIceCandidatePtr value) override; virtual String get_url() override; virtual uint16_t get_errorCode() override; virtual String get_errorText() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp index 652a6f79..b5e2d1ca 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp @@ -67,7 +67,7 @@ void wrapper::impl::org::ortc::RTCIceTransport::start( void wrapper::impl::org::ortc::RTCIceTransport::start( wrapper::org::ortc::RTCIceGathererPtr gatherer, wrapper::org::ortc::RTCIceParametersPtr remoteParameters, - wrapper::org::ortc::RTCIceRole options + wrapper::org::ortc::RTCIceRole role ) { } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h index eab04715..be6228b5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h @@ -31,7 +31,7 @@ namespace wrapper { virtual void start( wrapper::org::ortc::RTCIceGathererPtr gatherer, wrapper::org::ortc::RTCIceParametersPtr remoteParameters, - wrapper::org::ortc::RTCIceRole options + wrapper::org::ortc::RTCIceRole role ) override; virtual void start( wrapper::org::ortc::RTCIceGathererPtr gatherer, diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp index 896e7f40..6c54edbe 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::~RTCIceTransportState { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::wrapper_init_org_ortc_RTCIceTransportStateChangeEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceTransportState wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::get_state() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h index 824c9513..6078646e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCIceTransportStateChangeEvent(); virtual ~RTCIceTransportStateChangeEvent(); - virtual void wrapper_init_org_ortc_RTCIceTransportStateChangeEvent() override; // properties RTCIceTransportStateChangeEvent virtual wrapper::org::ortc::RTCIceTransportState get_state() override; From 5bd49d53260fdb4ccfc0515d3cb48c0c6352641a Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 19:56:23 -0500 Subject: [PATCH 065/187] - mistaken transport type for rtcp in rtp receiver idl --- ortc/idl/RtpReceiver.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/idl/RtpReceiver.idl b/ortc/idl/RtpReceiver.idl index 0f3a73a0..0cd39305 100644 --- a/ortc/idl/RtpReceiver.idl +++ b/ortc/idl/RtpReceiver.idl @@ -157,7 +157,7 @@ namespace org /// RTCDtlsTransport transport. /// [getter, nullable] - RTCRtpTransport rtcpTransport; + RTCRtcpTransport rtcpTransport; /// /// Set the RTP RTCDtlsTransport. If the last call to From 8fd7539b18533f6a5a1538dffbc899dfeaaf851c Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 19:57:54 -0500 Subject: [PATCH 066/187] - mistaken transport type for rtcp in rtp receiver idl --- ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp | 4 ++-- ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp index d2e0888c..48e4e18b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp @@ -128,9 +128,9 @@ wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpReceiver: } //------------------------------------------------------------------------------ -wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpReceiver::get_rtcpTransport() +wrapper::org::ortc::RTCRtcpTransportPtr wrapper::impl::org::ortc::RTCRtpReceiver::get_rtcpTransport() { - wrapper::org::ortc::RTCRtpTransportPtr result {}; + wrapper::org::ortc::RTCRtcpTransportPtr result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h index d29afb2f..71387a42 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h @@ -45,7 +45,7 @@ namespace wrapper { virtual uint64_t get_objectId() override; virtual wrapper::org::ortc::MediaStreamTrackPtr get_track() override; virtual wrapper::org::ortc::RTCRtpTransportPtr get_transport() override; - virtual wrapper::org::ortc::RTCRtpTransportPtr get_rtcpTransport() override; + virtual wrapper::org::ortc::RTCRtcpTransportPtr get_rtcpTransport() override; }; } // ortc From ab76f6cc89b9c3d8c43d393fac982c2dbbca6fcf Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 20:26:33 -0500 Subject: [PATCH 067/187] - srtp sdes lifetime remaining event will now directly contain event data in IDL --- ortc/ISRTPSDESTransport.h | 2 +- ortc/idl/SrtpSdesTransport.idl | 25 ++++++++++--------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/ortc/ISRTPSDESTransport.h b/ortc/ISRTPSDESTransport.h index 58dcc72a..0bc494ed 100644 --- a/ortc/ISRTPSDESTransport.h +++ b/ortc/ISRTPSDESTransport.h @@ -179,7 +179,7 @@ namespace ortc virtual void onSRTPSDESTransportError( ISRTPSDESTransportPtr transport, - ErrorAnyPtr errorCode + ErrorAnyPtr error ) = 0; }; diff --git a/ortc/idl/SrtpSdesTransport.idl b/ortc/idl/SrtpSdesTransport.idl index 3c55e0bd..11f3b4cb 100644 --- a/ortc/idl/SrtpSdesTransport.idl +++ b/ortc/idl/SrtpSdesTransport.idl @@ -192,32 +192,27 @@ namespace org string hash(); }; - [dictionary] - struct RTCSrtpSdesTransportLifetimeRemaining + /// + /// This is the event data associated with the + /// transport.OnLifetimeRemaining event handler. + /// + struct RTCSrtpSdesTransportLifetimeRemainingEvent { + [constructor, delete] + void RTCSrtpSdesTransportLifetimeRemainingEvent(); + /// /// Gets the least percentage remaining of all the keys in the /// SDES/SRTP transport. /// + [getter] unsigned long leastLifetimeRemainingPercentageForAllKeys; /// /// Gets the overall percentage of life remaining of all the keys in the /// SDES/SRTP transport. /// - unsigned long overallLifetimeRemainingPercentage; - }; - - /// - /// This is the event data associated with the - /// transport.OnLifetimeRemaining event handler. - /// - struct RTCSrtpSdesTransportLifetimeRemainingEvent - { - /// - /// Gets the lifetime remaining information associated with the transport. - /// [getter] - RTCSrtpSdesTransportLifetimeRemaining data; + unsigned long overallLifetimeRemainingPercentage; }; /// From f457de2256741c03bff7fb5166c024bc240b5b4d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 20:31:21 -0500 Subject: [PATCH 068/187] - srtp sdes lifetime remaining event will now directly contain event data in IDL --- ..._RTCSrtpSdesTransportLifetimeRemaining.cpp | 46 ------------------- ...tc_RTCSrtpSdesTransportLifetimeRemaining.h | 27 ----------- ...rtpSdesTransportLifetimeRemainingEvent.cpp | 8 ++-- ...CSrtpSdesTransportLifetimeRemainingEvent.h | 4 +- ortc/idl/wrapper/types.h | 1 - .../ortclib.wrapper.vcxproj | 2 - .../ortclib.wrapper.vcxproj.filters | 6 --- 7 files changed, 7 insertions(+), 87 deletions(-) delete mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp delete mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp deleted file mode 100644 index 708870d3..00000000 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by zsLibEventingTool - -#include "impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h" - -using ::zsLib::String; -using ::zsLib::Optional; -using ::zsLib::Any; -using ::zsLib::AnyPtr; -using ::zsLib::AnyHolder; -using ::zsLib::Promise; -using ::zsLib::PromisePtr; -using ::zsLib::PromiseWithHolder; -using ::zsLib::PromiseWithHolderPtr; -using ::zsLib::eventing::SecureByteBlock; -using ::zsLib::eventing::SecureByteBlockPtr; -using ::std::shared_ptr; -using ::std::weak_ptr; -using ::std::make_shared; -using ::std::list; -using ::std::set; -using ::std::map; - -//------------------------------------------------------------------------------ -wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemaining::RTCSrtpSdesTransportLifetimeRemaining() -{ -} - -//------------------------------------------------------------------------------ -wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingPtr wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemaining::wrapper_create() -{ - auto pThis = make_shared(); - pThis->thisWeak_ = pThis; - return pThis; -} - -//------------------------------------------------------------------------------ -wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemaining::~RTCSrtpSdesTransportLifetimeRemaining() -{ -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemaining::wrapper_init_org_ortc_RTCSrtpSdesTransportLifetimeRemaining() -{ -} - - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h deleted file mode 100644 index d64730b6..00000000 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by zsLibEventingTool - -#pragma once - -#include "types.h" -#include "generated/org_ortc_RTCSrtpSdesTransportLifetimeRemaining.h" - - -namespace wrapper { - namespace impl { - namespace org { - namespace ortc { - - struct RTCSrtpSdesTransportLifetimeRemaining : public wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemaining - { - RTCSrtpSdesTransportLifetimeRemainingWeakPtr thisWeak_; - - RTCSrtpSdesTransportLifetimeRemaining(); - virtual ~RTCSrtpSdesTransportLifetimeRemaining(); - virtual void wrapper_init_org_ortc_RTCSrtpSdesTransportLifetimeRemaining() override; - }; - - } // ortc - } // org - } // namespace impl -} // namespace wrapper - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp index 6b7e4a60..4d782429 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp @@ -39,14 +39,16 @@ wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::~RTCSrtpSd } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::wrapper_init_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent() +unsigned long wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::get_leastLifetimeRemainingPercentageForAllKeys() { + unsigned long result {}; + return result; } //------------------------------------------------------------------------------ -wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingPtr wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::get_data() +unsigned long wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::get_overallLifetimeRemainingPercentage() { - wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingPtr result {}; + unsigned long result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h index 9306057c..7da98673 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h @@ -17,10 +17,10 @@ namespace wrapper { RTCSrtpSdesTransportLifetimeRemainingEvent(); virtual ~RTCSrtpSdesTransportLifetimeRemainingEvent(); - virtual void wrapper_init_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent() override; // properties RTCSrtpSdesTransportLifetimeRemainingEvent - virtual wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingPtr get_data() override; + virtual unsigned long get_leastLifetimeRemainingPercentageForAllKeys() override; + virtual unsigned long get_overallLifetimeRemainingPercentage() override; }; } // ortc diff --git a/ortc/idl/wrapper/types.h b/ortc/idl/wrapper/types.h index bd4432de..2e5516a5 100644 --- a/ortc/idl/wrapper/types.h +++ b/ortc/idl/wrapper/types.h @@ -163,7 +163,6 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesKeyParameters); ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesParameters); ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesTransport); - ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesTransportLifetimeRemaining); ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesTransportLifetimeRemainingEvent); ZS_DECLARE_STRUCT_PTR(RTCSrtpTransportStats); ZS_DECLARE_STRUCT_PTR(RTCSsrcConflictEvent); diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 001541a6..120de42a 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -175,7 +175,6 @@ - @@ -489,7 +488,6 @@ - diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index 5a5950c5..4638251d 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -396,9 +396,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - ortc\idl\wrapper @@ -872,9 +869,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - ortc\idl\wrapper From 398a3882a2714864c04a1a44533e44d9415f54e3 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 20:59:31 -0500 Subject: [PATCH 069/187] - log level and component had wrong case in IDL --- ortc/idl/Logger.idl | 67 +++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/ortc/idl/Logger.idl b/ortc/idl/Logger.idl index f24c6b68..c97f2cb0 100644 --- a/ortc/idl/Logger.idl +++ b/ortc/idl/Logger.idl @@ -45,27 +45,27 @@ namespace org /// /// Do not log any log messages. /// - None, + none, /// /// Log only the most important logger information. /// - Basic, + basic, /// /// Log a few more details from the logger information. /// - Detail, + detail, /// /// Log a level appropriate to debug the engine. /// - Debug, + debug, /// /// Log a level to trace the code path within the engine. /// - Trace, + trace, /// /// Log every possible mundane detail possible. /// - Insane + insane }; /// @@ -78,121 +78,122 @@ namespace org /// The low level socket, aynchronous eventing, and OS abstraction /// library. /// - ZsLib, + zsLib, /// /// The socket monitor within the low level socket abstraction /// library. /// - ZsLibSocket, + zsLibSocket, /// /// The servers support library for the ORTC library. /// - Services, + services, /// /// The DNS services support library for the ORTC library. /// - ServicesDns, + servicesDns, /// /// The TURN services support library for the ORTC library. /// - ServicesTurn, + servicesTurn, /// /// The HTTP services support library for the ORTC library. /// - ServicesHttp, + servicesHttp, /// /// The wire level tracing of services support for the ORTC library. /// This component also includes the details of the STUN packet(s). /// - ServicesWire, + servicesWire, /// /// All STUN related request processing (minus the STUN on the wire). /// - ServicesStun, + servicesStun, /// /// The C++ ORTC library (for all objects who don't have their own /// trace level). /// - OrtcLib, + ortcLib, /// /// The C++ ORTC media area. /// - OrtcLibWebrtc, + ortcLibWebrtc, /// /// The C++ ORTC DTLS transport object. /// - OrtcLibDtlsTransport, + ortcLibDtlsTransport, /// /// The C++ ORTC ICE gatherer object. /// - OrtcLibIceGatherer, + ortcLibIceGatherer, /// /// The C++ ORTC ICE gatherer router object. /// - OrtcLibIceGathererRouter, + ortcLibIceGathererRouter, /// /// The C++ ORTC ICE transport object. /// - OrtcLibIceTransport, + ortcLibIceTransport, /// /// The C++ ORTC ICE transport controller object. /// - OrtcLibIceTransportController, + ortcLibIceTransportController, /// /// The C++ ORTC media devices object. /// - OrtcLibMediaDevices, + ortcLibMediaDevices, /// /// The C++ ORTC media stream track object. /// - OrtcLibMediaStreamTrack, + ortcLibMediaStreamTrack, /// /// The C++ ORTC rtp / rtcp packet related traces. /// - OrtcLibRtpRtcpPacket, + ortcLibRtpRtcpPacket, /// /// The C++ ORTC rtp listener object. /// - OrtcLibRtpListener, + ortcLibRtpListener, /// /// The C++ ORTC rtp listener object. /// - OrtcLibRtpMediaEngine, + ortcLibRtpMediaEngine, /// /// The C++ ORTC rtp receiver object. /// - OrtcLibRtpReceiver, + ortcLibRtpReceiver, /// /// The C++ ORTC rtp sender object. /// - OrtcLibRtpSender, + ortcLibRtpSender, /// /// The C++ ORTC rtp type structure tracing (parsers, helpers and /// other). /// - OrtcLibRtpTypes, + ortcLibRtpTypes, /// /// The C++ SCTP and data channel related objects. /// - OrtcLibSctpDataChannel, + ortcLibSctpDataChannel, /// /// The C++ SRTP related objects. /// - OrtcLibSrtp, + ortcLibSrtp, /// /// The C++ SRTP related objects. /// - OrtcLibStats, + ortcLibStats, /// /// The C++ ORTC Adapter library. /// - OrtcLibAdapter, + ortcLibAdapter, }; } /// /// An API used to control the logging engine within the ORTC library. /// + [static] interface Logger { /// From 07e47b93aec9305ee7ded9110adffe80a1cf0be8 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 26 Feb 2017 21:00:48 -0500 Subject: [PATCH 070/187] - log level and component had wrong case in IDL --- ortc/idl/wrapper/impl_org_ortc_Logger.cpp | 18 ------------------ ortc/idl/wrapper/impl_org_ortc_Logger.h | 4 ---- 2 files changed, 22 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp index 45d52226..2ebb8666 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp @@ -20,29 +20,11 @@ using ::std::list; using ::std::set; using ::std::map; -//------------------------------------------------------------------------------ -wrapper::impl::org::ortc::Logger::Logger() -{ -} - -//------------------------------------------------------------------------------ -wrapper::org::ortc::LoggerPtr wrapper::org::ortc::Logger::wrapper_create() -{ - auto pThis = make_shared(); - pThis->thisWeak_ = pThis; - return pThis; -} - //------------------------------------------------------------------------------ wrapper::impl::org::ortc::Logger::~Logger() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::Logger::wrapper_init_org_ortc_Logger() -{ -} - //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::setDefaultLogLevel(wrapper::org::ortc::log::Level level) { diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.h b/ortc/idl/wrapper/impl_org_ortc_Logger.h index f245686c..8bf7e09e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Logger.h +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.h @@ -13,11 +13,7 @@ namespace wrapper { struct Logger : public wrapper::org::ortc::Logger { - LoggerWeakPtr thisWeak_; - - Logger(); virtual ~Logger(); - virtual void wrapper_init_org_ortc_Logger() override; }; } // ortc From 084fadbe90a032c4c0b37f0887c83f8611973644 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 00:44:00 -0500 Subject: [PATCH 071/187] - certificate binary list has to be put into a structure for CX --- ortc/IMediaDevices.h | 13 +++++++------ ortc/cpp/ortc_MediaDevices.cpp | 4 ++++ ortc/idl/DtlsTransport.idl | 14 +++++++++++++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ortc/IMediaDevices.h b/ortc/IMediaDevices.h index 84635d3d..0c97b45c 100644 --- a/ortc/IMediaDevices.h +++ b/ortc/IMediaDevices.h @@ -48,13 +48,13 @@ namespace ortc interaction IMediaDevicesTypes : public IMediaStreamTrackTypes { - ZS_DECLARE_STRUCT_PTR(SupportedConstraints) - ZS_DECLARE_STRUCT_PTR(Device) - ZS_DECLARE_STRUCT_PTR(DeviceList) - ZS_DECLARE_STRUCT_PTR(MediaStreamTrackList) + ZS_DECLARE_STRUCT_PTR(SupportedConstraints); + ZS_DECLARE_STRUCT_PTR(Device); + ZS_DECLARE_STRUCT_PTR(DeviceList); + ZS_DECLARE_STRUCT_PTR(MediaStreamTrackList); - ZS_DECLARE_TYPEDEF_PTR(PromiseWith, PromiseWithMediaStreamTrackList) - ZS_DECLARE_TYPEDEF_PTR(PromiseWith, PromiseWithDeviceList) + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith, PromiseWithMediaStreamTrackList); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith, PromiseWithDeviceList); enum DeviceKinds { @@ -86,6 +86,7 @@ namespace ortc bool mSampleSize {false}; bool mEchoCancellation {false}; bool mLatency {false}; + bool mChannelCount {false}; bool mDeviceID {false}; bool mGroupID {false}; diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index c0e02a92..5ca064e4 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -850,6 +850,7 @@ namespace ortc IHelper::adoptElementValue(elem, "sampleSize", mSampleSize); IHelper::adoptElementValue(elem, "echoCancellation", mEchoCancellation); IHelper::adoptElementValue(elem, "latency", mLatency); + IHelper::adoptElementValue(elem, "channelCount", mChannelCount); IHelper::adoptElementValue(elem, "deviceId", mDeviceID); IHelper::adoptElementValue(elem, "groupId", mGroupID); @@ -872,6 +873,7 @@ namespace ortc IHelper::debugAppend(resultEl, "sample rate", mSampleRate); IHelper::debugAppend(resultEl, "echo cancellation", mEchoCancellation); IHelper::debugAppend(resultEl, "latency", mLatency); + IHelper::debugAppend(resultEl, "channel count", mChannelCount); IHelper::debugAppend(resultEl, "device id", mDeviceID); IHelper::debugAppend(resultEl, "group id", mGroupID); @@ -902,6 +904,8 @@ namespace ortc hasher->update(":"); hasher->update(mLatency); hasher->update(":"); + hasher->update(mChannelCount); + hasher->update(":"); hasher->update(mDeviceID); hasher->update(":"); hasher->update(mGroupID); diff --git a/ortc/idl/DtlsTransport.idl b/ortc/idl/DtlsTransport.idl index 174add64..c7702fe7 100644 --- a/ortc/idl/DtlsTransport.idl +++ b/ortc/idl/DtlsTransport.idl @@ -77,6 +77,18 @@ namespace org string hash(); }; + /// + /// Contains a single binary array of certificate data. + /// + struct RTCDtlsCertificateBinary + { + [constructor, delete] + void RTCDtlsCertificateBinary(); + + [getter] + binary certificate; + }; + /// /// The OnStateChange event of the RTCDtlsTransport object uses the /// RTCDtlsTransportStateChangeEvent interface. @@ -103,7 +115,7 @@ namespace org RTCStatsProvider { typedef std::list CertificateList; - typedef std::list BinaryList; + typedef std::list BinaryList; /// /// A RTCDtlsTransport instance is constructed using an RTCIceTransport From f9a79b4b22884a68c9fa266dec82ca1db74e22fa Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 00:46:18 -0500 Subject: [PATCH 072/187] - certificate binary list has to be put into a structure for CX --- ...impl_org_ortc_RTCDtlsCertificateBinary.cpp | 48 +++++++++++++++++++ .../impl_org_ortc_RTCDtlsCertificateBinary.h | 29 +++++++++++ .../impl_org_ortc_RTCDtlsTransport.cpp | 4 +- .../wrapper/impl_org_ortc_RTCDtlsTransport.h | 2 +- ortc/idl/wrapper/types.h | 1 + 5 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp new file mode 100644 index 00000000..4d25312c --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp @@ -0,0 +1,48 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDtlsCertificateBinary.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsCertificateBinary::RTCDtlsCertificateBinary() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtlsCertificateBinaryPtr wrapper::org::ortc::RTCDtlsCertificateBinary::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsCertificateBinary::~RTCDtlsCertificateBinary() +{ +} + +//------------------------------------------------------------------------------ +SecureByteBlockPtr wrapper::impl::org::ortc::RTCDtlsCertificateBinary::get_certificate() +{ + SecureByteBlockPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h new file mode 100644 index 00000000..b2cbb179 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h @@ -0,0 +1,29 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDtlsCertificateBinary.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDtlsCertificateBinary : public wrapper::org::ortc::RTCDtlsCertificateBinary + { + RTCDtlsCertificateBinaryWeakPtr thisWeak_; + + RTCDtlsCertificateBinary(); + virtual ~RTCDtlsCertificateBinary(); + + // properties RTCDtlsCertificateBinary + virtual SecureByteBlockPtr get_certificate() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp index 4a90695c..0150a9a1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp @@ -61,9 +61,9 @@ wrapper::org::ortc::RTCDtlsParametersPtr wrapper::impl::org::ortc::RTCDtlsTransp } //------------------------------------------------------------------------------ -shared_ptr< list< SecureByteBlockPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getRemoteCertificates() +shared_ptr< list< wrapper::org::ortc::RTCDtlsCertificateBinaryPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getRemoteCertificates() { - shared_ptr< list< SecureByteBlockPtr > > result {}; + shared_ptr< list< wrapper::org::ortc::RTCDtlsCertificateBinaryPtr > > result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h index 9218b2b8..46788d95 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h @@ -27,7 +27,7 @@ namespace wrapper { shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > certificates ) override; virtual wrapper::org::ortc::RTCDtlsParametersPtr remoteParameters() override; - virtual shared_ptr< list< SecureByteBlockPtr > > getRemoteCertificates() override; + virtual shared_ptr< list< wrapper::org::ortc::RTCDtlsCertificateBinaryPtr > > getRemoteCertificates() override; virtual void start(wrapper::org::ortc::RTCDtlsParametersPtr remoteParameters) override; virtual void stop() override; diff --git a/ortc/idl/wrapper/types.h b/ortc/idl/wrapper/types.h index 2e5516a5..4562ceea 100644 --- a/ortc/idl/wrapper/types.h +++ b/ortc/idl/wrapper/types.h @@ -82,6 +82,7 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCDataChannelStateChangeEvent); ZS_DECLARE_STRUCT_PTR(RTCDataChannelStats); ZS_DECLARE_STRUCT_PTR(RTCDataTransport); + ZS_DECLARE_STRUCT_PTR(RTCDtlsCertificateBinary); ZS_DECLARE_STRUCT_PTR(RTCDtlsFingerprint); ZS_DECLARE_STRUCT_PTR(RTCDtlsParameters); ZS_DECLARE_STRUCT_PTR(RTCDtlsTransport); From 52cd4e19931c9f0c7161444d1869ae30832e79de Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 10:17:16 -0500 Subject: [PATCH 073/187] - data transport should not have constructor in IDL - added promise reason error for overconstrained error --- ortc/idl/DataChannel.idl | 2 ++ ortc/idl/MediaStreamTrack.idl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ortc/idl/DataChannel.idl b/ortc/idl/DataChannel.idl index f80bff88..bd95eadf 100644 --- a/ortc/idl/DataChannel.idl +++ b/ortc/idl/DataChannel.idl @@ -35,6 +35,8 @@ namespace org { interface RTCDataTransport { + [constructor, delete] + void RTCDataTransport(); }; /// diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index 5280e08f..1bdced1b 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -565,7 +565,7 @@ namespace org /// string message; }; - + typedef PromiseRejectionReason PromiseRejectionReasonOverconstrainedError; /// /// This error event fires for each affected track (when multiple tracks From cde9b554ce2bcd6b68fe51ec316ba5a31ef46009 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 10:18:56 -0500 Subject: [PATCH 074/187] - data transport should not have constructor in IDL - added promise reason error for overconstrained error --- ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp | 5 ----- ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h | 1 - 2 files changed, 6 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp index 79453272..359af22b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp @@ -38,9 +38,4 @@ wrapper::impl::org::ortc::RTCDataTransport::~RTCDataTransport() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCDataTransport::wrapper_init_org_ortc_RTCDataTransport() -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h index 02f3b8f5..5da5250c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h @@ -17,7 +17,6 @@ namespace wrapper { RTCDataTransport(); virtual ~RTCDataTransport(); - virtual void wrapper_init_org_ortc_RTCDataTransport() override; }; } // ortc From d46ce72eaddc4ab12bb6f516b63800a160dd4783 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 11:29:52 -0500 Subject: [PATCH 075/187] - added SCTP transport listener event --- ortc/idl/SctpTransport.idl | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/ortc/idl/SctpTransport.idl b/ortc/idl/SctpTransport.idl index a01dc723..ba37b2f2 100644 --- a/ortc/idl/SctpTransport.idl +++ b/ortc/idl/SctpTransport.idl @@ -33,7 +33,31 @@ namespace org { namespace ortc { - interface RTCSctpTransportListener {}; + interface RTCSctpTransport; + + /// + /// Event indicating a new incoming SCTP transport. + /// + struct RTCSctpTransportListenerEvent + { + [constructor, delete] + void RTCSctpTransportListenerEvent(); + + /// + /// Gets the new incoming SCTP transport. + /// + [getter] + RTCSctpTransport transport; + }; + + interface RTCSctpTransportListener + { + [constructor, delete] + void RTCSctpTransportListener(); + + [event] + void onTransport(RTCSctpTransport transport); + }; /// /// The RTCSctpCapabilities represents object represents the capabilities From 0aab634b50f7b10ead2dea85a053846fa250b9fb Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 11:42:47 -0500 Subject: [PATCH 076/187] - added sctp transport listener event --- ...impl_org_ortc_RTCSctpTransportListener.cpp | 2 +- .../impl_org_ortc_RTCSctpTransportListener.h | 3 +- ...org_ortc_RTCSctpTransportListenerEvent.cpp | 48 +++++++++++++++++++ ...l_org_ortc_RTCSctpTransportListenerEvent.h | 29 +++++++++++ ortc/idl/wrapper/types.h | 1 + 5 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp index 092990e8..9b0dfd91 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp @@ -39,7 +39,7 @@ wrapper::impl::org::ortc::RTCSctpTransportListener::~RTCSctpTransportListener() } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCSctpTransportListener::wrapper_init_org_ortc_RTCSctpTransportListener() +void wrapper::impl::org::ortc::RTCSctpTransportListener::wrapper_onObserverCountChanged(size_t count) { } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h index b191926c..92b6e136 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h @@ -17,7 +17,8 @@ namespace wrapper { RTCSctpTransportListener(); virtual ~RTCSctpTransportListener(); - virtual void wrapper_init_org_ortc_RTCSctpTransportListener() override; + + virtual void wrapper_onObserverCountChanged(size_t count) override; }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp new file mode 100644 index 00000000..acac077f --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp @@ -0,0 +1,48 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCSctpTransportListenerEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::RTCSctpTransportListenerEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportListenerEventPtr wrapper::org::ortc::RTCSctpTransportListenerEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::~RTCSctpTransportListenerEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCSctpTransportPtr wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::get_transport() +{ + wrapper::org::ortc::RTCSctpTransportPtr result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h new file mode 100644 index 00000000..55be5bc1 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h @@ -0,0 +1,29 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCSctpTransportListenerEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCSctpTransportListenerEvent : public wrapper::org::ortc::RTCSctpTransportListenerEvent + { + RTCSctpTransportListenerEventWeakPtr thisWeak_; + + RTCSctpTransportListenerEvent(); + virtual ~RTCSctpTransportListenerEvent(); + + // properties RTCSctpTransportListenerEvent + virtual wrapper::org::ortc::RTCSctpTransportPtr get_transport() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/types.h b/ortc/idl/wrapper/types.h index 4562ceea..bd382fce 100644 --- a/ortc/idl/wrapper/types.h +++ b/ortc/idl/wrapper/types.h @@ -158,6 +158,7 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCSctpCapabilities); ZS_DECLARE_STRUCT_PTR(RTCSctpTransport); ZS_DECLARE_STRUCT_PTR(RTCSctpTransportListener); + ZS_DECLARE_STRUCT_PTR(RTCSctpTransportListenerEvent); ZS_DECLARE_STRUCT_PTR(RTCSctpTransportStateChangeEvent); ZS_DECLARE_STRUCT_PTR(RTCSctpTransportStats); ZS_DECLARE_STRUCT_PTR(RTCSrtpSdesCryptoParameters); From bc715c2cde0f87af6124f89c1cc14138715fdb8d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 11:49:54 -0500 Subject: [PATCH 077/187] - sctp transport listener needs to fire a listener event in IDL --- ortc/idl/SctpTransport.idl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ortc/idl/SctpTransport.idl b/ortc/idl/SctpTransport.idl index ba37b2f2..9906b9f0 100644 --- a/ortc/idl/SctpTransport.idl +++ b/ortc/idl/SctpTransport.idl @@ -55,8 +55,11 @@ namespace org [constructor, delete] void RTCSctpTransportListener(); + /// + /// Events when the a new SCTP transport has arrived. + /// [event] - void onTransport(RTCSctpTransport transport); + void onTransport(RTCSctpTransportListenerEvent event); }; /// From f202c98888bd93b6d07d27032a3641f2c8b61d12 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 12:56:22 -0500 Subject: [PATCH 078/187] - data channel event message does not need event data message indirection in IDL --- ortc/idl/DataChannel.idl | 35 ++++++++++++++--------------------- ortc/idl/SctpTransport.idl | 8 ++++++++ 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/ortc/idl/DataChannel.idl b/ortc/idl/DataChannel.idl index bd95eadf..fbf538ee 100644 --- a/ortc/idl/DataChannel.idl +++ b/ortc/idl/DataChannel.idl @@ -116,31 +116,15 @@ namespace org string hash(); }; - /// - /// RTCMessageEventData represents data arriving from the RTCDataChannel. - /// - [dictionary] - struct RTCMessageEventData - { - /// - /// Gets the binary message being sent. Only set if the data was binary. - /// - [getter] - binary binary; - - /// - /// Gets the binary message being sent. Only set if the data was text. - /// - [getter] - string text; - }; - /// /// RTCDataChannelStateChangeEvent represents the ready state event /// fired when the RTCDataChannel state is changed. /// struct RTCDataChannelStateChangeEvent { + [constructor, delete] + void RTCDataChannelStateChangeEvent(); + /// /// The RTCDataChannelState that cased the event to fire. /// @@ -154,11 +138,20 @@ namespace org /// struct RTCMessageEvent { + [constructor, delete] + void RTCMessageEvent(); + + /// + /// Gets the binary message being sent. Only set if the data was binary. + /// + [getter] + binary binary; + /// - /// Gets the binary message being sent. + /// Gets the binary message being sent. Only set if the data was text. /// [getter] - RTCMessageEventData data; + string text; }; /// diff --git a/ortc/idl/SctpTransport.idl b/ortc/idl/SctpTransport.idl index 9906b9f0..98fd5e82 100644 --- a/ortc/idl/SctpTransport.idl +++ b/ortc/idl/SctpTransport.idl @@ -123,9 +123,13 @@ namespace org /// struct RTCSctpTransportStateChangeEvent { + [constructor, delete] + void RTCSctpTransportStateChangeEvent(); + /// /// The RTCSctpTransportState that cased the event to fire. /// + [getter] RTCSctpTransportState state; }; @@ -137,10 +141,14 @@ namespace org /// struct RTCDataChannelEvent { + [constructor, delete] + void RTCDataChannelEvent(); + /// /// Gets the RTCDataChannel that was constructed when upon receiving a /// new RTCDataChannel from a remote peer. /// + [getter] RTCDataChannel dataChannel; }; From 6ced4a51c69968bba5ac49a3b9cc2bd2efd5e882 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 13:07:01 -0500 Subject: [PATCH 079/187] - data channel event message does not need event data message indirection in IDL --- .../impl_org_ortc_RTCDataChannelEvent.cpp | 10 ---- .../impl_org_ortc_RTCDataChannelEvent.h | 2 - ...rg_ortc_RTCDataChannelStateChangeEvent.cpp | 5 -- ..._org_ortc_RTCDataChannelStateChangeEvent.h | 1 - .../wrapper/impl_org_ortc_RTCMessageEvent.cpp | 8 ++- .../wrapper/impl_org_ortc_RTCMessageEvent.h | 4 +- .../impl_org_ortc_RTCMessageEventData.cpp | 60 ------------------- .../impl_org_ortc_RTCMessageEventData.h | 31 ---------- ..._ortc_RTCSctpTransportStateChangeEvent.cpp | 10 ---- ...rg_ortc_RTCSctpTransportStateChangeEvent.h | 2 - ortc/idl/wrapper/types.h | 1 - .../ortclib.wrapper.vcxproj | 2 - .../ortclib.wrapper.vcxproj.filters | 6 -- 13 files changed, 7 insertions(+), 135 deletions(-) delete mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp delete mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.h diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp index 537df769..37a697ee 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCDataChannelEvent::~RTCDataChannelEvent() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCDataChannelEvent::wrapper_init_org_ortc_RTCDataChannelEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDataChannelPtr wrapper::impl::org::ortc::RTCDataChannelEvent::get_dataChannel() { @@ -50,9 +45,4 @@ wrapper::org::ortc::RTCDataChannelPtr wrapper::impl::org::ortc::RTCDataChannelEv return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCDataChannelEvent::set_dataChannel(wrapper::org::ortc::RTCDataChannelPtr value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h index 04837cfd..0080ece2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h @@ -17,11 +17,9 @@ namespace wrapper { RTCDataChannelEvent(); virtual ~RTCDataChannelEvent(); - virtual void wrapper_init_org_ortc_RTCDataChannelEvent() override; // properties RTCDataChannelEvent virtual wrapper::org::ortc::RTCDataChannelPtr get_dataChannel() override; - virtual void set_dataChannel(wrapper::org::ortc::RTCDataChannelPtr value) override; }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp index ca30624d..440d0a83 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::~RTCDataChannelStateCh { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::wrapper_init_org_ortc_RTCDataChannelStateChangeEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDataChannelState wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::get_state() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h index 81c8c2a5..32fb8eeb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCDataChannelStateChangeEvent(); virtual ~RTCDataChannelStateChangeEvent(); - virtual void wrapper_init_org_ortc_RTCDataChannelStateChangeEvent() override; // properties RTCDataChannelStateChangeEvent virtual wrapper::org::ortc::RTCDataChannelState get_state() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp index 3a02eda6..7231dbdd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp @@ -39,14 +39,16 @@ wrapper::impl::org::ortc::RTCMessageEvent::~RTCMessageEvent() } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCMessageEvent::wrapper_init_org_ortc_RTCMessageEvent() +SecureByteBlockPtr wrapper::impl::org::ortc::RTCMessageEvent::get_binary() { + SecureByteBlockPtr result {}; + return result; } //------------------------------------------------------------------------------ -wrapper::org::ortc::RTCMessageEventDataPtr wrapper::impl::org::ortc::RTCMessageEvent::get_data() +String wrapper::impl::org::ortc::RTCMessageEvent::get_text() { - wrapper::org::ortc::RTCMessageEventDataPtr result {}; + String result {}; return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h index 5da23dbb..8f96f679 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h @@ -17,10 +17,10 @@ namespace wrapper { RTCMessageEvent(); virtual ~RTCMessageEvent(); - virtual void wrapper_init_org_ortc_RTCMessageEvent() override; // properties RTCMessageEvent - virtual wrapper::org::ortc::RTCMessageEventDataPtr get_data() override; + virtual SecureByteBlockPtr get_binary() override; + virtual String get_text() override; }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp deleted file mode 100644 index 648189db..00000000 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by zsLibEventingTool - -#include "impl_org_ortc_RTCMessageEventData.h" - -using ::zsLib::String; -using ::zsLib::Optional; -using ::zsLib::Any; -using ::zsLib::AnyPtr; -using ::zsLib::AnyHolder; -using ::zsLib::Promise; -using ::zsLib::PromisePtr; -using ::zsLib::PromiseWithHolder; -using ::zsLib::PromiseWithHolderPtr; -using ::zsLib::eventing::SecureByteBlock; -using ::zsLib::eventing::SecureByteBlockPtr; -using ::std::shared_ptr; -using ::std::weak_ptr; -using ::std::make_shared; -using ::std::list; -using ::std::set; -using ::std::map; - -//------------------------------------------------------------------------------ -wrapper::impl::org::ortc::RTCMessageEventData::RTCMessageEventData() -{ -} - -//------------------------------------------------------------------------------ -wrapper::org::ortc::RTCMessageEventDataPtr wrapper::org::ortc::RTCMessageEventData::wrapper_create() -{ - auto pThis = make_shared(); - pThis->thisWeak_ = pThis; - return pThis; -} - -//------------------------------------------------------------------------------ -wrapper::impl::org::ortc::RTCMessageEventData::~RTCMessageEventData() -{ -} - -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCMessageEventData::wrapper_init_org_ortc_RTCMessageEventData() -{ -} - -//------------------------------------------------------------------------------ -SecureByteBlockPtr wrapper::impl::org::ortc::RTCMessageEventData::get_binary() -{ - SecureByteBlockPtr result {}; - return result; -} - -//------------------------------------------------------------------------------ -String wrapper::impl::org::ortc::RTCMessageEventData::get_text() -{ - String result {}; - return result; -} - - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.h b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.h deleted file mode 100644 index cdd3a793..00000000 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEventData.h +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by zsLibEventingTool - -#pragma once - -#include "types.h" -#include "generated/org_ortc_RTCMessageEventData.h" - - -namespace wrapper { - namespace impl { - namespace org { - namespace ortc { - - struct RTCMessageEventData : public wrapper::org::ortc::RTCMessageEventData - { - RTCMessageEventDataWeakPtr thisWeak_; - - RTCMessageEventData(); - virtual ~RTCMessageEventData(); - virtual void wrapper_init_org_ortc_RTCMessageEventData() override; - - // properties RTCMessageEventData - virtual SecureByteBlockPtr get_binary() override; - virtual String get_text() override; - }; - - } // ortc - } // org - } // namespace impl -} // namespace wrapper - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp index 763d5927..c8266a52 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::~RTCSctpTransportSta { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::wrapper_init_org_ortc_RTCSctpTransportStateChangeEvent() -{ -} - //------------------------------------------------------------------------------ wrapper::org::ortc::RTCSctpTransportState wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::get_state() { @@ -50,9 +45,4 @@ wrapper::org::ortc::RTCSctpTransportState wrapper::impl::org::ortc::RTCSctpTrans return result; } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::set_state(wrapper::org::ortc::RTCSctpTransportState value) -{ -} - diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h index d0e84351..c8c55674 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h @@ -17,11 +17,9 @@ namespace wrapper { RTCSctpTransportStateChangeEvent(); virtual ~RTCSctpTransportStateChangeEvent(); - virtual void wrapper_init_org_ortc_RTCSctpTransportStateChangeEvent() override; // properties RTCSctpTransportStateChangeEvent virtual wrapper::org::ortc::RTCSctpTransportState get_state() override; - virtual void set_state(wrapper::org::ortc::RTCSctpTransportState value) override; }; } // ortc diff --git a/ortc/idl/wrapper/types.h b/ortc/idl/wrapper/types.h index bd382fce..7d4af8ff 100644 --- a/ortc/idl/wrapper/types.h +++ b/ortc/idl/wrapper/types.h @@ -118,7 +118,6 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCMediaStreamStats); ZS_DECLARE_STRUCT_PTR(RTCMediaStreamTrackStats); ZS_DECLARE_STRUCT_PTR(RTCMessageEvent); - ZS_DECLARE_STRUCT_PTR(RTCMessageEventData); ZS_DECLARE_STRUCT_PTR(RTCOutboundRtpStreamStats); ZS_DECLARE_STRUCT_PTR(RTCRtcpFeedback); ZS_DECLARE_STRUCT_PTR(RTCRtcpParameters); diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 120de42a..4f14d959 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -129,7 +129,6 @@ - @@ -442,7 +441,6 @@ - diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index 4638251d..e4f335b7 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -279,9 +279,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - ortc\idl\wrapper @@ -752,9 +749,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - ortc\idl\wrapper From a75229d4dd7f530b0d485943026fbf49aafecd42 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 13:54:16 -0500 Subject: [PATCH 080/187] - data channel state changed event IDL should be renamed statechange --- ortc/idl/DataChannel.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/idl/DataChannel.idl b/ortc/idl/DataChannel.idl index fbf538ee..43973fc0 100644 --- a/ortc/idl/DataChannel.idl +++ b/ortc/idl/DataChannel.idl @@ -260,7 +260,7 @@ namespace org //// changes. /// [event] - void onStateChanged(RTCDataChannelStateChangeEvent event); + void onStateChange(RTCDataChannelStateChangeEvent event); /// /// The error event handler for the RTCDataChannel. From 4f9136c93aade74b0f1a50b639d5636609834357 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 16:19:24 -0500 Subject: [PATCH 081/187] - dtmf sender was missing tone event in IDL --- ortc/idl/DtmfSender.idl | 21 +++++++++++++++++++-- ortc/idl/RtpSender.idl | 3 +++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ortc/idl/DtmfSender.idl b/ortc/idl/DtmfSender.idl index 1ac3624c..37d3c46f 100644 --- a/ortc/idl/DtmfSender.idl +++ b/ortc/idl/DtmfSender.idl @@ -33,7 +33,24 @@ All rights reserved. namespace org { namespace ortc - { + { + /// + /// The RTCDTMFToneChangeEvent dictionary provides information on the DTMF tone causing a tonechange event. + /// + struct RTCDTMFToneChangeEvent + { + [constructor, delete] + void RTCDTMFToneChangeEvent(); + + /// + /// Gets the character for the tone that has just begun playout (see insertDtmf()). If the + /// value is the empty string, it indicates that the toneBuffer is an empty string and that + /// the previous tones have completed playback. + /// + [getter] + string tone; + }; + /// /// An RTCDtmfSender instance allows sending DTMF tones to/from the remote /// peer, as per [RFC4733]. @@ -131,7 +148,7 @@ namespace org /// interface to return the character for each tone as it is played out. /// [event] - void onToneChange(); + void onToneChange(RTCDTMFToneChangeEvent event); }; } diff --git a/ortc/idl/RtpSender.idl b/ortc/idl/RtpSender.idl index f2fa1062..ebe03207 100644 --- a/ortc/idl/RtpSender.idl +++ b/ortc/idl/RtpSender.idl @@ -40,6 +40,9 @@ namespace org /// struct RTCSsrcConflictEvent { + [constructor, delete] + void RTCSsrcConflictEvent(); + /// /// Gets the ssrc attribute represents the conflicting SSRC that caused /// the event. From 59565956696b9a948ce2c66e63542dde5b79ea99 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 16:37:01 -0500 Subject: [PATCH 082/187] - dtmf sender was named incorrectly in IDL --- ortc/idl/DtmfSender.idl | 10 ++-- ...er.cpp => impl_org_ortc_RTCDtmfSender.cpp} | 32 ++++++------- ...Sender.h => impl_org_ortc_RTCDtmfSender.h} | 16 +++---- .../impl_org_ortc_RTCDtmfToneChangeEvent.cpp | 48 +++++++++++++++++++ .../impl_org_ortc_RTCDtmfToneChangeEvent.h | 29 +++++++++++ .../impl_org_ortc_RTCSsrcConflictEvent.cpp | 5 -- .../impl_org_ortc_RTCSsrcConflictEvent.h | 1 - ortc/idl/wrapper/types.h | 3 +- 8 files changed, 108 insertions(+), 36 deletions(-) rename ortc/idl/wrapper/{impl_org_ortc_RTCRtpDtmfSender.cpp => impl_org_ortc_RTCDtmfSender.cpp} (65%) rename ortc/idl/wrapper/{impl_org_ortc_RTCRtpDtmfSender.h => impl_org_ortc_RTCDtmfSender.h} (70%) create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp create mode 100644 ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h diff --git a/ortc/idl/DtmfSender.idl b/ortc/idl/DtmfSender.idl index 37d3c46f..34a04d22 100644 --- a/ortc/idl/DtmfSender.idl +++ b/ortc/idl/DtmfSender.idl @@ -37,10 +37,10 @@ namespace org /// /// The RTCDTMFToneChangeEvent dictionary provides information on the DTMF tone causing a tonechange event. /// - struct RTCDTMFToneChangeEvent + struct RTCDtmfToneChangeEvent { [constructor, delete] - void RTCDTMFToneChangeEvent(); + void RTCDtmfToneChangeEvent(); /// /// Gets the character for the tone that has just begun playout (see insertDtmf()). If the @@ -55,14 +55,14 @@ namespace org /// An RTCDtmfSender instance allows sending DTMF tones to/from the remote /// peer, as per [RFC4733]. /// - interface RTCRtpDtmfSender + interface RTCDtmfSender { /// /// Construct an instance of the RTCDtmfSender associated to an /// RTCRtpSender. /// [constructor] - void RTCRtpDtmfSender(RTCRtpSender sender) throws (InvalidStateError); + void RTCDtmfSender(RTCRtpSender sender) throws (InvalidStateError); /// /// Gets a unique object instance identifier for this object. @@ -148,7 +148,7 @@ namespace org /// interface to return the character for each tone as it is played out. /// [event] - void onToneChange(RTCDTMFToneChangeEvent event); + void onToneChange(RTCDtmfToneChangeEvent event); }; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp similarity index 65% rename from ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp rename to ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp index 1b33e4a0..d69b2b09 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp @@ -1,6 +1,6 @@ // Generated by zsLibEventingTool -#include "impl_org_ortc_RTCRtpDtmfSender.h" +#include "impl_org_ortc_RTCDtmfSender.h" using ::zsLib::String; using ::zsLib::Optional; @@ -21,42 +21,42 @@ using ::std::set; using ::std::map; //------------------------------------------------------------------------------ -wrapper::impl::org::ortc::RTCRtpDtmfSender::RTCRtpDtmfSender() +wrapper::impl::org::ortc::RTCDtmfSender::RTCDtmfSender() { } //------------------------------------------------------------------------------ -wrapper::org::ortc::RTCRtpDtmfSenderPtr wrapper::org::ortc::RTCRtpDtmfSender::wrapper_create() +wrapper::org::ortc::RTCDtmfSenderPtr wrapper::org::ortc::RTCDtmfSender::wrapper_create() { - auto pThis = make_shared(); + auto pThis = make_shared(); pThis->thisWeak_ = pThis; return pThis; } //------------------------------------------------------------------------------ -wrapper::impl::org::ortc::RTCRtpDtmfSender::~RTCRtpDtmfSender() +wrapper::impl::org::ortc::RTCDtmfSender::~RTCDtmfSender() { } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpDtmfSender::wrapper_init_org_ortc_RTCRtpDtmfSender(wrapper::org::ortc::RTCRtpSenderPtr sender) +void wrapper::impl::org::ortc::RTCDtmfSender::wrapper_init_org_ortc_RTCDtmfSender(wrapper::org::ortc::RTCRtpSenderPtr sender) { } //------------------------------------------------------------------------------ -bool wrapper::impl::org::ortc::RTCRtpDtmfSender::canInsertDtmf() +bool wrapper::impl::org::ortc::RTCDtmfSender::canInsertDtmf() { bool result {}; return result; } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpDtmfSender::insertDtmf(String tones) +void wrapper::impl::org::ortc::RTCDtmfSender::insertDtmf(String tones) { } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpDtmfSender::insertDtmf( +void wrapper::impl::org::ortc::RTCDtmfSender::insertDtmf( String tones, ::zsLib::Milliseconds duration ) @@ -64,7 +64,7 @@ void wrapper::impl::org::ortc::RTCRtpDtmfSender::insertDtmf( } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpDtmfSender::insertDtmf( +void wrapper::impl::org::ortc::RTCDtmfSender::insertDtmf( String tones, ::zsLib::Milliseconds duration, ::zsLib::Milliseconds interToneGap @@ -73,42 +73,42 @@ void wrapper::impl::org::ortc::RTCRtpDtmfSender::insertDtmf( } //------------------------------------------------------------------------------ -uint64_t wrapper::impl::org::ortc::RTCRtpDtmfSender::get_objectId() +uint64_t wrapper::impl::org::ortc::RTCDtmfSender::get_objectId() { uint64_t result {}; return result; } //------------------------------------------------------------------------------ -wrapper::org::ortc::RTCRtpSenderPtr wrapper::impl::org::ortc::RTCRtpDtmfSender::get_sender() +wrapper::org::ortc::RTCRtpSenderPtr wrapper::impl::org::ortc::RTCDtmfSender::get_sender() { wrapper::org::ortc::RTCRtpSenderPtr result {}; return result; } //------------------------------------------------------------------------------ -String wrapper::impl::org::ortc::RTCRtpDtmfSender::get_toneBuffer() +String wrapper::impl::org::ortc::RTCDtmfSender::get_toneBuffer() { String result {}; return result; } //------------------------------------------------------------------------------ -::zsLib::Milliseconds wrapper::impl::org::ortc::RTCRtpDtmfSender::get_duration() +::zsLib::Milliseconds wrapper::impl::org::ortc::RTCDtmfSender::get_duration() { ::zsLib::Milliseconds result {}; return result; } //------------------------------------------------------------------------------ -::zsLib::Milliseconds wrapper::impl::org::ortc::RTCRtpDtmfSender::get_interToneGap() +::zsLib::Milliseconds wrapper::impl::org::ortc::RTCDtmfSender::get_interToneGap() { ::zsLib::Milliseconds result {}; return result; } //------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCRtpDtmfSender::wrapper_onObserverCountChanged(size_t count) +void wrapper::impl::org::ortc::RTCDtmfSender::wrapper_onObserverCountChanged(size_t count) { } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.h similarity index 70% rename from ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.h rename to ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.h index bb0b4b80..0710b2ef 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpDtmfSender.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.h @@ -3,7 +3,7 @@ #pragma once #include "types.h" -#include "generated/org_ortc_RTCRtpDtmfSender.h" +#include "generated/org_ortc_RTCDtmfSender.h" namespace wrapper { @@ -11,15 +11,15 @@ namespace wrapper { namespace org { namespace ortc { - struct RTCRtpDtmfSender : public wrapper::org::ortc::RTCRtpDtmfSender + struct RTCDtmfSender : public wrapper::org::ortc::RTCDtmfSender { - RTCRtpDtmfSenderWeakPtr thisWeak_; + RTCDtmfSenderWeakPtr thisWeak_; - RTCRtpDtmfSender(); - virtual ~RTCRtpDtmfSender(); + RTCDtmfSender(); + virtual ~RTCDtmfSender(); - // methods RTCRtpDtmfSender - virtual void wrapper_init_org_ortc_RTCRtpDtmfSender(wrapper::org::ortc::RTCRtpSenderPtr sender) override; + // methods RTCDtmfSender + virtual void wrapper_init_org_ortc_RTCDtmfSender(wrapper::org::ortc::RTCRtpSenderPtr sender) override; virtual bool canInsertDtmf() override; virtual void insertDtmf(String tones) override; virtual void insertDtmf( @@ -32,7 +32,7 @@ namespace wrapper { ::zsLib::Milliseconds interToneGap ) override; - // properties RTCRtpDtmfSender + // properties RTCDtmfSender virtual uint64_t get_objectId() override; virtual wrapper::org::ortc::RTCRtpSenderPtr get_sender() override; virtual String get_toneBuffer() override; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp new file mode 100644 index 00000000..ff481f6d --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp @@ -0,0 +1,48 @@ +// Generated by zsLibEventingTool + +#include "impl_org_ortc_RTCDtmfToneChangeEvent.h" + +using ::zsLib::String; +using ::zsLib::Optional; +using ::zsLib::Any; +using ::zsLib::AnyPtr; +using ::zsLib::AnyHolder; +using ::zsLib::Promise; +using ::zsLib::PromisePtr; +using ::zsLib::PromiseWithHolder; +using ::zsLib::PromiseWithHolderPtr; +using ::zsLib::eventing::SecureByteBlock; +using ::zsLib::eventing::SecureByteBlockPtr; +using ::std::shared_ptr; +using ::std::weak_ptr; +using ::std::make_shared; +using ::std::list; +using ::std::set; +using ::std::map; + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::RTCDtmfToneChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +wrapper::org::ortc::RTCDtmfToneChangeEventPtr wrapper::org::ortc::RTCDtmfToneChangeEvent::wrapper_create() +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::~RTCDtmfToneChangeEvent() +{ +} + +//------------------------------------------------------------------------------ +String wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::get_tone() +{ + String result {}; + return result; +} + + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h new file mode 100644 index 00000000..14cb7714 --- /dev/null +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h @@ -0,0 +1,29 @@ +// Generated by zsLibEventingTool + +#pragma once + +#include "types.h" +#include "generated/org_ortc_RTCDtmfToneChangeEvent.h" + + +namespace wrapper { + namespace impl { + namespace org { + namespace ortc { + + struct RTCDtmfToneChangeEvent : public wrapper::org::ortc::RTCDtmfToneChangeEvent + { + RTCDtmfToneChangeEventWeakPtr thisWeak_; + + RTCDtmfToneChangeEvent(); + virtual ~RTCDtmfToneChangeEvent(); + + // properties RTCDtmfToneChangeEvent + virtual String get_tone() override; + }; + + } // ortc + } // org + } // namespace impl +} // namespace wrapper + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp index 4dfed090..4831d06b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp @@ -38,11 +38,6 @@ wrapper::impl::org::ortc::RTCSsrcConflictEvent::~RTCSsrcConflictEvent() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::RTCSsrcConflictEvent::wrapper_init_org_ortc_RTCSsrcConflictEvent() -{ -} - //------------------------------------------------------------------------------ uint32_t wrapper::impl::org::ortc::RTCSsrcConflictEvent::get_ssrc() { diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h index 9df32952..fe17d918 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h @@ -17,7 +17,6 @@ namespace wrapper { RTCSsrcConflictEvent(); virtual ~RTCSsrcConflictEvent(); - virtual void wrapper_init_org_ortc_RTCSsrcConflictEvent() override; // properties RTCSsrcConflictEvent virtual uint32_t get_ssrc() override; diff --git a/ortc/idl/wrapper/types.h b/ortc/idl/wrapper/types.h index 7d4af8ff..7adc0b51 100644 --- a/ortc/idl/wrapper/types.h +++ b/ortc/idl/wrapper/types.h @@ -88,6 +88,8 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCDtlsTransport); ZS_DECLARE_STRUCT_PTR(RTCDtlsTransportStateChangeEvent); ZS_DECLARE_STRUCT_PTR(RTCDtlsTransportStats); + ZS_DECLARE_STRUCT_PTR(RTCDtmfSender); + ZS_DECLARE_STRUCT_PTR(RTCDtmfToneChangeEvent); ZS_DECLARE_STRUCT_PTR(RTCIceCandidate); ZS_DECLARE_STRUCT_PTR(RTCIceCandidateAttributes); ZS_DECLARE_STRUCT_PTR(RTCIceCandidateComplete); @@ -129,7 +131,6 @@ namespace wrapper { ZS_DECLARE_STRUCT_PTR(RTCRtpCodecParameterSettings); ZS_DECLARE_STRUCT_PTR(RTCRtpCodecParameters); ZS_DECLARE_STRUCT_PTR(RTCRtpContributingSource); - ZS_DECLARE_STRUCT_PTR(RTCRtpDtmfSender); ZS_DECLARE_STRUCT_PTR(RTCRtpEncodingParameters); ZS_DECLARE_STRUCT_PTR(RTCRtpFecParameters); ZS_DECLARE_STRUCT_PTR(RTCRtpFlexFecCodecCapabilityParameters); From 0312a196a94df1179752f20055c48d46c9f2a92e Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 16:37:12 -0500 Subject: [PATCH 083/187] - dtmf sender was missing tone event in IDL --- .../ortclib.wrapper.vcxproj | 9 ++++--- .../ortclib.wrapper.vcxproj.filters | 27 ++++++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 4f14d959..da98d5d5 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -99,6 +99,8 @@ + + @@ -140,7 +142,6 @@ - @@ -254,6 +255,8 @@ + + @@ -295,7 +298,6 @@ - @@ -411,6 +413,8 @@ + + @@ -452,7 +456,6 @@ - diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index e4f335b7..40baaf0b 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -306,9 +306,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - ortc\idl\wrapper @@ -483,6 +480,12 @@ ortc\idl\wrapper + + ortc\idl\wrapper + + + ortc\idl\wrapper + @@ -776,9 +779,6 @@ ortc\idl\wrapper - - ortc\idl\wrapper - ortc\idl\wrapper @@ -1211,9 +1211,6 @@ ortc\idl\wrapper\generated - - ortc\idl\wrapper\generated - ortc\idl\wrapper\generated @@ -1418,5 +1415,17 @@ ortc\idl\wrapper\generated + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper + \ No newline at end of file From 8031bcef40871fb00777d7d33958fe78df1d6977 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 18:55:34 -0500 Subject: [PATCH 084/187] - missing logger IDL from project file --- projects/msvs/ortclib.Universal/ortclib.vcxproj | 8 ++++++++ projects/msvs/ortclib.Universal/ortclib.vcxproj.filters | 3 +++ 2 files changed, 11 insertions(+) diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj b/projects/msvs/ortclib.Universal/ortclib.vcxproj index abb13b28..d0929a43 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj @@ -342,6 +342,14 @@ true true + + true + true + true + true + true + true + true true diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters index 39e28506..7de050a4 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters @@ -570,5 +570,8 @@ ortc\idl\adapter + + ortc\idl + \ No newline at end of file From 40ed4280f41618bc4a3bb192bef47043a69ddfc2 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 18:56:58 -0500 Subject: [PATCH 085/187] - added missing impl and generated IDL files to project --- .../ortclib.wrapper.vcxproj | 5 +++++ .../ortclib.wrapper.vcxproj.filters | 21 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index da98d5d5..ec97adf1 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -94,6 +94,7 @@ + @@ -169,6 +170,7 @@ + @@ -250,6 +252,7 @@ + @@ -408,6 +411,7 @@ + @@ -483,6 +487,7 @@ + diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index 40baaf0b..936cc31b 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -486,6 +486,12 @@ ortc\idl\wrapper + + ortc\idl\wrapper + + + ortc\idl\wrapper + @@ -1415,6 +1421,18 @@ ortc\idl\wrapper\generated + + ortc\idl\wrapper + + + ortc\idl\wrapper\generated + + + ortc\idl\wrapper + + + ortc\idl\wrapper + ortc\idl\wrapper @@ -1424,8 +1442,5 @@ ortc\idl\wrapper\generated - - ortc\idl\wrapper - \ No newline at end of file From 9e7163888e44e29e1d2fc24ad1bdfa8e0f648557 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 19:01:02 -0500 Subject: [PATCH 086/187] - added IDL C++ glue layer implementation --- ortc/idl/wrapper/impl_org_ortc.cpp | 4 +- .../impl_org_ortc_ConstrainBoolean.cpp | 56 +- .../wrapper/impl_org_ortc_ConstrainBoolean.h | 8 +- ...pl_org_ortc_ConstrainBooleanParameters.cpp | 50 +- ...impl_org_ortc_ConstrainBooleanParameters.h | 8 +- .../wrapper/impl_org_ortc_ConstrainDouble.cpp | 60 +- .../wrapper/impl_org_ortc_ConstrainDouble.h | 8 +- .../impl_org_ortc_ConstrainDoubleRange.cpp | 57 +- .../impl_org_ortc_ConstrainDoubleRange.h | 7 +- .../wrapper/impl_org_ortc_ConstrainLong.cpp | 58 +- .../idl/wrapper/impl_org_ortc_ConstrainLong.h | 8 +- .../impl_org_ortc_ConstrainLongRange.cpp | 56 +- .../impl_org_ortc_ConstrainLongRange.h | 8 +- .../wrapper/impl_org_ortc_ConstrainString.cpp | 45 +- .../wrapper/impl_org_ortc_ConstrainString.h | 8 +- ...mpl_org_ortc_ConstrainStringParameters.cpp | 68 +- .../impl_org_ortc_ConstrainStringParameters.h | 8 +- ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp | 11 +- ortc/idl/wrapper/impl_org_ortc_Dispatcher.h | 3 + .../idl/wrapper/impl_org_ortc_DoubleRange.cpp | 52 +- ortc/idl/wrapper/impl_org_ortc_DoubleRange.h | 8 +- ortc/idl/wrapper/impl_org_ortc_Error.cpp | 34 +- ortc/idl/wrapper/impl_org_ortc_Error.h | 9 +- ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp | 28 +- ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h | 8 +- ortc/idl/wrapper/impl_org_ortc_Helper.cpp | 798 +++++++++++++++++- ortc/idl/wrapper/impl_org_ortc_Helper.h | 101 +++ ortc/idl/wrapper/impl_org_ortc_Json.cpp | 25 +- ortc/idl/wrapper/impl_org_ortc_Json.h | 5 + ortc/idl/wrapper/impl_org_ortc_Logger.cpp | 41 +- ortc/idl/wrapper/impl_org_ortc_Logger.h | 1 - ortc/idl/wrapper/impl_org_ortc_LongRange.cpp | 50 +- ortc/idl/wrapper/impl_org_ortc_LongRange.h | 8 +- .../wrapper/impl_org_ortc_MediaDeviceInfo.cpp | 54 +- .../wrapper/impl_org_ortc_MediaDeviceInfo.h | 9 +- .../wrapper/impl_org_ortc_MediaDevices.cpp | 90 +- ortc/idl/wrapper/impl_org_ortc_MediaDevices.h | 19 +- .../idl/wrapper/impl_org_ortc_MediaSource.cpp | 21 +- ortc/idl/wrapper/impl_org_ortc_MediaSource.h | 6 + .../impl_org_ortc_MediaStreamConstraints.cpp | 59 +- .../impl_org_ortc_MediaStreamConstraints.h | 9 +- .../impl_org_ortc_MediaStreamTrack.cpp | 135 ++- .../wrapper/impl_org_ortc_MediaStreamTrack.h | 35 +- .../impl_org_ortc_MediaTrackCapabilities.cpp | 152 +++- .../impl_org_ortc_MediaTrackCapabilities.h | 10 +- .../impl_org_ortc_MediaTrackConstraintSet.cpp | 83 +- .../impl_org_ortc_MediaTrackConstraintSet.h | 8 +- .../impl_org_ortc_MediaTrackConstraints.cpp | 97 ++- .../impl_org_ortc_MediaTrackConstraints.h | 8 +- .../impl_org_ortc_MediaTrackSettings.cpp | 72 +- .../impl_org_ortc_MediaTrackSettings.h | 7 +- ...rg_ortc_MediaTrackSupportedConstraints.cpp | 72 +- ..._org_ortc_MediaTrackSupportedConstraints.h | 9 +- .../wrapper/impl_org_ortc_MessageQueue.cpp | 30 +- ortc/idl/wrapper/impl_org_ortc_MessageQueue.h | 10 +- ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp | 51 +- ortc/idl/wrapper/impl_org_ortc_OrtcLib.h | 6 +- .../impl_org_ortc_OrtcLibWithDispatcher.cpp | 22 +- .../impl_org_ortc_OrtcLibWithDispatcher.h | 6 +- .../impl_org_ortc_OverconstrainedError.cpp | 16 +- .../impl_org_ortc_OverconstrainedError.h | 6 + ...mpl_org_ortc_OverconstrainedErrorEvent.cpp | 13 +- .../impl_org_ortc_OverconstrainedErrorEvent.h | 4 +- .../wrapper/impl_org_ortc_RTCCertificate.cpp | 60 +- .../wrapper/impl_org_ortc_RTCCertificate.h | 11 +- .../impl_org_ortc_RTCCertificateStats.cpp | 58 +- .../impl_org_ortc_RTCCertificateStats.h | 7 +- ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp | 61 +- ortc/idl/wrapper/impl_org_ortc_RTCCodec.h | 7 +- .../wrapper/impl_org_ortc_RTCDataChannel.cpp | 118 ++- .../wrapper/impl_org_ortc_RTCDataChannel.h | 38 +- .../impl_org_ortc_RTCDataChannelEvent.cpp | 19 +- .../impl_org_ortc_RTCDataChannelEvent.h | 8 +- ...impl_org_ortc_RTCDataChannelParameters.cpp | 60 +- .../impl_org_ortc_RTCDataChannelParameters.h | 9 +- ...rg_ortc_RTCDataChannelStateChangeEvent.cpp | 19 +- ..._org_ortc_RTCDataChannelStateChangeEvent.h | 8 +- .../impl_org_ortc_RTCDataChannelStats.cpp | 71 +- .../impl_org_ortc_RTCDataChannelStats.h | 7 +- .../impl_org_ortc_RTCDataTransport.cpp | 32 +- .../wrapper/impl_org_ortc_RTCDataTransport.h | 9 +- ...impl_org_ortc_RTCDtlsCertificateBinary.cpp | 33 +- .../impl_org_ortc_RTCDtlsCertificateBinary.h | 9 +- .../impl_org_ortc_RTCDtlsFingerprint.cpp | 49 +- .../impl_org_ortc_RTCDtlsFingerprint.h | 9 +- .../impl_org_ortc_RTCDtlsParameters.cpp | 62 +- .../wrapper/impl_org_ortc_RTCDtlsParameters.h | 9 +- .../impl_org_ortc_RTCDtlsTransport.cpp | 127 ++- .../wrapper/impl_org_ortc_RTCDtlsTransport.h | 31 +- ..._ortc_RTCDtlsTransportStateChangeEvent.cpp | 16 +- ...rg_ortc_RTCDtlsTransportStateChangeEvent.h | 6 +- .../impl_org_ortc_RTCDtlsTransportStats.cpp | 51 +- .../impl_org_ortc_RTCDtlsTransportStats.h | 7 +- .../wrapper/impl_org_ortc_RTCDtmfSender.cpp | 79 +- .../idl/wrapper/impl_org_ortc_RTCDtmfSender.h | 25 +- .../impl_org_ortc_RTCDtmfToneChangeEvent.cpp | 18 +- .../impl_org_ortc_RTCDtmfToneChangeEvent.h | 7 +- .../wrapper/impl_org_ortc_RTCIceCandidate.cpp | 79 +- .../wrapper/impl_org_ortc_RTCIceCandidate.h | 10 +- ...mpl_org_ortc_RTCIceCandidateAttributes.cpp | 68 +- .../impl_org_ortc_RTCIceCandidateAttributes.h | 7 +- .../impl_org_ortc_RTCIceCandidateComplete.cpp | 50 +- .../impl_org_ortc_RTCIceCandidateComplete.h | 10 +- .../impl_org_ortc_RTCIceCandidatePair.cpp | 52 +- .../impl_org_ortc_RTCIceCandidatePair.h | 9 +- ...rg_ortc_RTCIceCandidatePairChangeEvent.cpp | 17 +- ..._org_ortc_RTCIceCandidatePairChangeEvent.h | 7 +- ...impl_org_ortc_RTCIceCandidatePairStats.cpp | 85 +- .../impl_org_ortc_RTCIceCandidatePairStats.h | 7 +- ...l_org_ortc_RTCIceGatherInterfacePolicy.cpp | 46 +- ...mpl_org_ortc_RTCIceGatherInterfacePolicy.h | 10 +- .../impl_org_ortc_RTCIceGatherOptions.cpp | 67 +- .../impl_org_ortc_RTCIceGatherOptions.h | 9 +- .../wrapper/impl_org_ortc_RTCIceGatherer.cpp | 140 ++- .../wrapper/impl_org_ortc_RTCIceGatherer.h | 45 +- .../impl_org_ortc_RTCIceGathererCandidate.cpp | 83 +- .../impl_org_ortc_RTCIceGathererCandidate.h | 9 +- ...c_RTCIceGathererCandidateCompleteEvent.cpp | 14 +- ...rtc_RTCIceGathererCandidateCompleteEvent.h | 7 +- ..._org_ortc_RTCIceGathererCandidateEvent.cpp | 24 +- ...pl_org_ortc_RTCIceGathererCandidateEvent.h | 11 +- ...l_org_ortc_RTCIceGathererIceErrorEvent.cpp | 28 +- ...mpl_org_ortc_RTCIceGathererIceErrorEvent.h | 8 +- ...rg_ortc_RTCIceGathererStateChangeEvent.cpp | 16 +- ..._org_ortc_RTCIceGathererStateChangeEvent.h | 7 +- .../impl_org_ortc_RTCIceGathererStats.cpp | 55 +- .../impl_org_ortc_RTCIceGathererStats.h | 7 +- .../impl_org_ortc_RTCIceParameters.cpp | 53 +- .../wrapper/impl_org_ortc_RTCIceParameters.h | 9 +- .../wrapper/impl_org_ortc_RTCIceServer.cpp | 58 +- ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h | 9 +- .../wrapper/impl_org_ortc_RTCIceTransport.cpp | 175 +++- .../wrapper/impl_org_ortc_RTCIceTransport.h | 38 +- ...mpl_org_ortc_RTCIceTransportController.cpp | 42 +- .../impl_org_ortc_RTCIceTransportController.h | 11 +- .../impl_org_ortc_RTCIceTransportOptions.cpp | 50 +- .../impl_org_ortc_RTCIceTransportOptions.h | 9 +- ...g_ortc_RTCIceTransportStateChangeEvent.cpp | 17 +- ...org_ortc_RTCIceTransportStateChangeEvent.h | 7 +- .../impl_org_ortc_RTCIceTransportStats.cpp | 61 +- .../impl_org_ortc_RTCIceTransportStats.h | 7 +- .../idl/wrapper/impl_org_ortc_RTCIdentity.cpp | 76 +- ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h | 7 +- .../impl_org_ortc_RTCIdentityAssertion.cpp | 29 +- .../impl_org_ortc_RTCIdentityAssertion.h | 7 +- .../impl_org_ortc_RTCIdentityError.cpp | 30 +- .../wrapper/impl_org_ortc_RTCIdentityError.h | 8 +- .../impl_org_ortc_RTCIdentityResult.cpp | 26 +- .../wrapper/impl_org_ortc_RTCIdentityResult.h | 7 +- ...impl_org_ortc_RTCInboundRtpStreamStats.cpp | 97 +-- .../impl_org_ortc_RTCInboundRtpStreamStats.h | 7 +- .../impl_org_ortc_RTCMediaStreamStats.cpp | 51 +- .../impl_org_ortc_RTCMediaStreamStats.h | 7 +- ...impl_org_ortc_RTCMediaStreamTrackStats.cpp | 91 +- .../impl_org_ortc_RTCMediaStreamTrackStats.h | 7 +- .../wrapper/impl_org_ortc_RTCMessageEvent.cpp | 20 +- .../wrapper/impl_org_ortc_RTCMessageEvent.h | 8 +- ...mpl_org_ortc_RTCOutboundRtpStreamStats.cpp | 91 +- .../impl_org_ortc_RTCOutboundRtpStreamStats.h | 8 +- .../wrapper/impl_org_ortc_RTCRtcpFeedback.cpp | 49 +- .../wrapper/impl_org_ortc_RTCRtcpFeedback.h | 9 +- .../impl_org_ortc_RTCRtcpParameters.cpp | 53 +- .../wrapper/impl_org_ortc_RTCRtcpParameters.h | 9 +- .../impl_org_ortc_RTCRtcpTransport.cpp | 38 +- .../wrapper/impl_org_ortc_RTCRtcpTransport.h | 9 +- .../impl_org_ortc_RTCRtpCapabilities.cpp | 77 +- .../impl_org_ortc_RTCRtpCapabilities.h | 9 +- .../impl_org_ortc_RTCRtpCodecCapability.cpp | 88 +- .../impl_org_ortc_RTCRtpCodecCapability.h | 9 +- ..._org_ortc_RTCRtpCodecCapabilityOptions.cpp | 28 +- ...pl_org_ortc_RTCRtpCodecCapabilityOptions.h | 9 +- ...g_ortc_RTCRtpCodecCapabilityParameters.cpp | 49 +- ...org_ortc_RTCRtpCodecCapabilityParameters.h | 9 +- ..._org_ortc_RTCRtpCodecParameterSettings.cpp | 53 +- ...pl_org_ortc_RTCRtpCodecParameterSettings.h | 9 +- .../impl_org_ortc_RTCRtpCodecParameters.cpp | 77 +- .../impl_org_ortc_RTCRtpCodecParameters.h | 9 +- ...impl_org_ortc_RTCRtpContributingSource.cpp | 40 +- .../impl_org_ortc_RTCRtpContributingSource.h | 9 +- ...impl_org_ortc_RTCRtpEncodingParameters.cpp | 79 +- .../impl_org_ortc_RTCRtpEncodingParameters.h | 9 +- .../impl_org_ortc_RTCRtpFecParameters.cpp | 56 +- .../impl_org_ortc_RTCRtpFecParameters.h | 10 +- ...RTCRtpFlexFecCodecCapabilityParameters.cpp | 67 +- ...c_RTCRtpFlexFecCodecCapabilityParameters.h | 10 +- ...tc_RTCRtpFlexFecCodecParameterSettings.cpp | 67 +- ...ortc_RTCRtpFlexFecCodecParameterSettings.h | 10 +- ...tc_RTCRtpH264CodecCapabilityParameters.cpp | 79 +- ...ortc_RTCRtpH264CodecCapabilityParameters.h | 10 +- ..._ortc_RTCRtpH264CodecParameterSettings.cpp | 81 +- ...rg_ortc_RTCRtpH264CodecParameterSettings.h | 10 +- .../impl_org_ortc_RTCRtpHeaderExtension.cpp | 55 +- .../impl_org_ortc_RTCRtpHeaderExtension.h | 9 +- ...g_ortc_RTCRtpHeaderExtensionParameters.cpp | 53 +- ...org_ortc_RTCRtpHeaderExtensionParameters.h | 9 +- .../wrapper/impl_org_ortc_RTCRtpListener.cpp | 90 +- .../wrapper/impl_org_ortc_RTCRtpListener.h | 29 +- ..._ortc_RTCRtpOpusCodecCapabilityOptions.cpp | 73 +- ...rg_ortc_RTCRtpOpusCodecCapabilityOptions.h | 10 +- ...tc_RTCRtpOpusCodecCapabilityParameters.cpp | 69 +- ...ortc_RTCRtpOpusCodecCapabilityParameters.h | 10 +- ..._ortc_RTCRtpOpusCodecParameterSettings.cpp | 88 +- ...rg_ortc_RTCRtpOpusCodecParameterSettings.h | 10 +- .../impl_org_ortc_RTCRtpParameters.cpp | 98 ++- .../wrapper/impl_org_ortc_RTCRtpParameters.h | 9 +- .../wrapper/impl_org_ortc_RTCRtpReceiver.cpp | 88 +- .../wrapper/impl_org_ortc_RTCRtpReceiver.h | 20 +- ...g_ortc_RTCRtpRedCodecParameterSettings.cpp | 64 +- ...org_ortc_RTCRtpRedCodecParameterSettings.h | 10 +- ...rtc_RTCRtpRtxCodecCapabilityParameters.cpp | 57 +- ..._ortc_RTCRtpRtxCodecCapabilityParameters.h | 10 +- ...g_ortc_RTCRtpRtxCodecParameterSettings.cpp | 57 +- ...org_ortc_RTCRtpRtxCodecParameterSettings.h | 10 +- .../impl_org_ortc_RTCRtpRtxParameters.cpp | 49 +- .../impl_org_ortc_RTCRtpRtxParameters.h | 9 +- .../wrapper/impl_org_ortc_RTCRtpSender.cpp | 97 ++- ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h | 26 +- .../impl_org_ortc_RTCRtpStreamStats.cpp | 78 +- .../wrapper/impl_org_ortc_RTCRtpStreamStats.h | 7 +- .../wrapper/impl_org_ortc_RTCRtpTransport.cpp | 38 +- .../wrapper/impl_org_ortc_RTCRtpTransport.h | 9 +- .../impl_org_ortc_RTCRtpUnhandledEvent.cpp | 33 +- .../impl_org_ortc_RTCRtpUnhandledEvent.h | 17 +- ...rtc_RTCRtpVp8CodecCapabilityParameters.cpp | 60 +- ..._ortc_RTCRtpVp8CodecCapabilityParameters.h | 10 +- ...g_ortc_RTCRtpVp8CodecParameterSettings.cpp | 60 +- ...org_ortc_RTCRtpVp8CodecParameterSettings.h | 10 +- .../impl_org_ortc_RTCSctpCapabilities.cpp | 56 +- .../impl_org_ortc_RTCSctpCapabilities.h | 9 +- .../impl_org_ortc_RTCSctpTransport.cpp | 109 ++- .../wrapper/impl_org_ortc_RTCSctpTransport.h | 30 +- ...impl_org_ortc_RTCSctpTransportListener.cpp | 58 +- .../impl_org_ortc_RTCSctpTransportListener.h | 23 +- ...org_ortc_RTCSctpTransportListenerEvent.cpp | 18 +- ...l_org_ortc_RTCSctpTransportListenerEvent.h | 8 +- ..._ortc_RTCSctpTransportStateChangeEvent.cpp | 19 +- ...rg_ortc_RTCSctpTransportStateChangeEvent.h | 8 +- .../impl_org_ortc_RTCSctpTransportStats.cpp | 52 +- .../impl_org_ortc_RTCSctpTransportStats.h | 7 +- ...l_org_ortc_RTCSrtpSdesCryptoParameters.cpp | 67 +- ...mpl_org_ortc_RTCSrtpSdesCryptoParameters.h | 9 +- ...impl_org_ortc_RTCSrtpSdesKeyParameters.cpp | 56 +- .../impl_org_ortc_RTCSrtpSdesKeyParameters.h | 9 +- .../impl_org_ortc_RTCSrtpSdesParameters.cpp | 59 +- .../impl_org_ortc_RTCSrtpSdesParameters.h | 9 +- .../impl_org_ortc_RTCSrtpSdesTransport.cpp | 94 ++- .../impl_org_ortc_RTCSrtpSdesTransport.h | 31 +- ...rtpSdesTransportLifetimeRemainingEvent.cpp | 23 +- ...CSrtpSdesTransportLifetimeRemainingEvent.h | 11 +- .../impl_org_ortc_RTCSrtpTransportStats.cpp | 47 +- .../impl_org_ortc_RTCSrtpTransportStats.h | 7 +- .../impl_org_ortc_RTCSsrcConflictEvent.cpp | 18 +- .../impl_org_ortc_RTCSsrcConflictEvent.h | 8 +- ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp | 45 +- ortc/idl/wrapper/impl_org_ortc_RTCStats.h | 8 +- .../impl_org_ortc_RTCStatsProvider.cpp | 21 +- .../wrapper/impl_org_ortc_RTCStatsProvider.h | 7 +- .../wrapper/impl_org_ortc_RTCStatsReport.cpp | 15 +- .../wrapper/impl_org_ortc_RTCStatsReport.h | 7 +- .../wrapper/impl_org_ortc_RTCStatsTypeSet.cpp | 28 +- .../wrapper/impl_org_ortc_RTCStatsTypeSet.h | 7 +- ortc/idl/wrapper/impl_org_ortc_Settings.cpp | 21 +- ortc/idl/wrapper/impl_org_ortc_Settings.h | 6 +- .../impl_org_ortc_StringOrStringList.cpp | 55 +- .../impl_org_ortc_StringOrStringList.h | 8 +- .../impl_org_ortc_adapter_MediaStream.cpp | 117 ++- .../impl_org_ortc_adapter_MediaStream.h | 31 +- ...impl_org_ortc_adapter_RTCAnswerOptions.cpp | 24 +- .../impl_org_ortc_adapter_RTCAnswerOptions.h | 9 +- ..._org_ortc_adapter_RTCCapabilityOptions.cpp | 30 +- ...pl_org_ortc_adapter_RTCCapabilityOptions.h | 9 +- ...impl_org_ortc_adapter_RTCConfiguration.cpp | 56 +- .../impl_org_ortc_adapter_RTCConfiguration.h | 9 +- .../impl_org_ortc_adapter_RTCIceCandidate.cpp | 101 ++- .../impl_org_ortc_adapter_RTCIceCandidate.h | 9 +- ...apter_RTCMediaStreamTrackConfiguration.cpp | 39 +- ...adapter_RTCMediaStreamTrackConfiguration.h | 10 +- ...org_ortc_adapter_RTCOfferAnswerOptions.cpp | 29 +- ...l_org_ortc_adapter_RTCOfferAnswerOptions.h | 9 +- .../impl_org_ortc_adapter_RTCOfferOptions.cpp | 31 +- .../impl_org_ortc_adapter_RTCOfferOptions.h | 9 +- ...adapter_RTCPeerConnectionIceErrorEvent.cpp | 38 +- ...c_adapter_RTCPeerConnectionIceErrorEvent.h | 9 +- ...ortc_adapter_RTCPeerConnectionIceEvent.cpp | 8 +- ...g_ortc_adapter_RTCPeerConnectionIceEvent.h | 4 +- ...org_ortc_adapter_RTCSessionDescription.cpp | 85 +- ...l_org_ortc_adapter_RTCSessionDescription.h | 9 +- ...er_RTCSessionDescriptionConnectionData.cpp | 51 +- ...pter_RTCSessionDescriptionConnectionData.h | 9 +- ...essionDescriptionConnectionDataDetails.cpp | 54 +- ...CSessionDescriptionConnectionDataDetails.h | 9 +- ...apter_RTCSessionDescriptionDescription.cpp | 106 ++- ...adapter_RTCSessionDescriptionDescription.h | 9 +- ...TCSessionDescriptionDescriptionDetails.cpp | 64 +- ..._RTCSessionDescriptionDescriptionDetails.h | 9 +- ...adapter_RTCSessionDescriptionMediaLine.cpp | 61 +- ...c_adapter_RTCSessionDescriptionMediaLine.h | 9 +- ..._RTCSessionDescriptionMediaLineDetails.cpp | 57 +- ...er_RTCSessionDescriptionMediaLineDetails.h | 9 +- ...pter_RTCSessionDescriptionRtpMediaLine.cpp | 59 +- ...dapter_RTCSessionDescriptionRtpMediaLine.h | 9 +- ...adapter_RTCSessionDescriptionRtpSender.cpp | 61 +- ...c_adapter_RTCSessionDescriptionRtpSender.h | 9 +- ..._RTCSessionDescriptionRtpSenderDetails.cpp | 48 +- ...er_RTCSessionDescriptionRtpSenderDetails.h | 9 +- ...ter_RTCSessionDescriptionSctpMediaLine.cpp | 61 +- ...apter_RTCSessionDescriptionSctpMediaLine.h | 9 +- ...adapter_RTCSessionDescriptionTransport.cpp | 55 +- ...c_adapter_RTCSessionDescriptionTransport.h | 9 +- ...CSessionDescriptionTransportParameters.cpp | 72 +- ...RTCSessionDescriptionTransportParameters.h | 9 +- .../impl_org_ortc_adapter_RTCTrackEvent.cpp | 41 +- .../impl_org_ortc_adapter_RTCTrackEvent.h | 9 +- 313 files changed, 9877 insertions(+), 1407 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc.cpp b/ortc/idl/wrapper/impl_org_ortc.cpp index b0203054..65fb9e41 100644 --- a/ortc/idl/wrapper/impl_org_ortc.cpp +++ b/ortc/idl/wrapper/impl_org_ortc.cpp @@ -1,5 +1,5 @@ #include -namespace wrapper { namespace impl { namespace org { ZS_IMPLEMENT_SUBSYSTEM(ortc_wrapper); } } } -namespace wrapper { namespace impl { namespace org { namespace adapter { ZS_IMPLEMENT_SUBSYSTEM(ortc_adapter_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_IMPLEMENT_SUBSYSTEM(ortc_adapter_wrapper); } } } } } diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp index b64ad85c..b575a546 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ConstrainBoolean.h" +#include "impl_org_ortc_ConstrainBooleanParameters.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +47,70 @@ void wrapper::impl::org::ortc::ConstrainBoolean::wrapper_init_org_ortc_Constrain //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainBoolean::wrapper_init_org_ortc_ConstrainBoolean(wrapper::org::ortc::ConstrainBooleanPtr source) { + if (!source) return; + + wrapper::org::ortc::ConstrainBooleanPtr pThis = thisWeak_.lock(); + (*pThis) = (*source); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainBoolean::wrapper_init_org_ortc_ConstrainBoolean(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::ConstrainBooleanPtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::ConstrainBooleanPtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainBoolean::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("ConstrainBoolean")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::ConstrainBoolean::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBooleanPtr wrapper::impl::org::ortc::ConstrainBoolean::toWrapper(NativeConstrainBooleanPtr native) +{ + if (!native) return ConstrainBooleanPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBooleanPtr wrapper::impl::org::ortc::ConstrainBoolean::toWrapper(const NativeConstrainBoolean &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->value = native.mValue; + if (native.mParameters.hasValue()) { + pThis->parameters = ConstrainBooleanParameters::toWrapper(native.mParameters.value()); + } + + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBoolean::NativeConstrainBooleanPtr wrapper::impl::org::ortc::ConstrainBoolean::toNative(wrapper::org::ortc::ConstrainBooleanPtr wrapper) +{ + auto result = make_shared(); + + result->mValue = wrapper->value; + if (wrapper->parameters.hasValue()) { + if (wrapper->parameters.value()) { + result->mParameters = *ConstrainBooleanParameters::toNative(wrapper->parameters.value()); + } + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h index 342116d6..25fc9e45 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ConstrainBoolean.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct ConstrainBoolean : public wrapper::org::ortc::ConstrainBoolean { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IConstraints::ConstrainBoolean, NativeConstrainBoolean); + ConstrainBooleanWeakPtr thisWeak_; ConstrainBoolean(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_ConstrainBoolean(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static ConstrainBooleanPtr toWrapper(NativeConstrainBooleanPtr native); + static ConstrainBooleanPtr toWrapper(const NativeConstrainBoolean &native); + static NativeConstrainBooleanPtr toNative(wrapper::org::ortc::ConstrainBooleanPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp index 9be45c9d..e8b2962f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ConstrainBooleanParameters.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +46,65 @@ void wrapper::impl::org::ortc::ConstrainBooleanParameters::wrapper_init_org_ortc //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainBooleanParameters::wrapper_init_org_ortc_ConstrainBooleanParameters(wrapper::org::ortc::ConstrainBooleanParametersPtr source) { + if (!source) return; + wrapper::org::ortc::ConstrainBooleanParametersPtr pThis = thisWeak_.lock(); + (*pThis) = (*source); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainBooleanParameters::wrapper_init_org_ortc_ConstrainBooleanParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::ConstrainBooleanParametersPtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::ConstrainBooleanParametersPtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainBooleanParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("ConstrainBooleanParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::ConstrainBooleanParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBooleanParametersPtr wrapper::impl::org::ortc::ConstrainBooleanParameters::toWrapper(NativeConstrainBooleanParametersPtr native) +{ + if (!native) return ConstrainBooleanParametersPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBooleanParametersPtr wrapper::impl::org::ortc::ConstrainBooleanParameters::toWrapper(const NativeConstrainBooleanParameters &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->exact = native.mExact; + pThis->ideal = native.mIdeal; + + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainBooleanParameters::NativeConstrainBooleanParametersPtr wrapper::impl::org::ortc::ConstrainBooleanParameters::toNative(wrapper::org::ortc::ConstrainBooleanParametersPtr wrapper) +{ + if (!wrapper) return NativeConstrainBooleanParametersPtr(); + + auto result = make_shared(); + result->mExact = wrapper->exact; + result->mIdeal = wrapper->ideal; + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h index 7ff66e23..44dd8a43 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ConstrainBooleanParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct ConstrainBooleanParameters : public wrapper::org::ortc::ConstrainBooleanParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IConstraints::ConstrainBooleanParameters, NativeConstrainBooleanParameters); + ConstrainBooleanParametersWeakPtr thisWeak_; ConstrainBooleanParameters(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_ConstrainBooleanParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static ConstrainBooleanParametersPtr toWrapper(NativeConstrainBooleanParametersPtr native); + static ConstrainBooleanParametersPtr toWrapper(const NativeConstrainBooleanParameters &native); + static NativeConstrainBooleanParametersPtr toNative(wrapper::org::ortc::ConstrainBooleanParametersPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp index 687fff88..703afa1e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ConstrainDouble.h" +#include "impl_org_ortc_ConstrainDoubleRange.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +47,74 @@ void wrapper::impl::org::ortc::ConstrainDouble::wrapper_init_org_ortc_ConstrainD //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainDouble::wrapper_init_org_ortc_ConstrainDouble(wrapper::org::ortc::ConstrainDoublePtr source) { + if (!source) return; + + wrapper::org::ortc::ConstrainDoublePtr pThis = thisWeak_.lock(); + (*pThis) = (*source); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainDouble::wrapper_init_org_ortc_ConstrainDouble(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + wrapper::org::ortc::ConstrainDoublePtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::ConstrainDoublePtr pThis = thisWeak_.lock(); + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainDouble::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("ConstrainDouble")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::ConstrainDouble::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDoublePtr wrapper::impl::org::ortc::ConstrainDouble::toWrapper(NativeConstrainDoublePtr native) +{ + if (!native) return ConstrainDoublePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDoublePtr wrapper::impl::org::ortc::ConstrainDouble::toWrapper(const NativeConstrainDouble &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->value = native.mValue; + if (native.mRange.hasValue()) { + pThis->range = ConstrainDoubleRange::toWrapper(native.mRange.value()); + } + + pThis->wrapper_init_org_ortc_ConstrainDouble(); + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDouble::NativeConstrainDoublePtr wrapper::impl::org::ortc::ConstrainDouble::toNative(wrapper::org::ortc::ConstrainDoublePtr wrapper) +{ + if (!wrapper) return NativeConstrainDoublePtr(); + + auto result = make_shared(); + result->mValue = wrapper->value; + if (wrapper->range.hasValue()) { + auto native = ConstrainDoubleRange::toNative(wrapper->range.value()); + if (native) { + result->mRange = *native; + } + } + return result; +} + diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h index 67ca0056..c4b567f6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ConstrainDouble.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct ConstrainDouble : public wrapper::org::ortc::ConstrainDouble { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes::ConstrainDouble, NativeConstrainDouble); + ConstrainDoubleWeakPtr thisWeak_; ConstrainDouble(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_ConstrainDouble(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static ConstrainDoublePtr toWrapper(NativeConstrainDoublePtr native); + static ConstrainDoublePtr toWrapper(const NativeConstrainDouble &native); + static NativeConstrainDoublePtr toNative(wrapper::org::ortc::ConstrainDoublePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp index a30ee18e..990c3441 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ConstrainDoubleRange.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +46,72 @@ void wrapper::impl::org::ortc::ConstrainDoubleRange::wrapper_init_org_ortc_Const //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainDoubleRange::wrapper_init_org_ortc_ConstrainDoubleRange(wrapper::org::ortc::ConstrainDoubleRangePtr source) { + if (!source) return; + + wrapper::org::ortc::ConstrainDoubleRangePtr pThis = thisWeak_.lock(); + (*pThis) = (*source); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainDoubleRange::wrapper_init_org_ortc_ConstrainDoubleRange(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::ConstrainDoubleRangePtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::ConstrainDoubleRangePtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainDoubleRange::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("ConstrainDoubleRange")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::ConstrainDoubleRange::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDoubleRangePtr wrapper::impl::org::ortc::ConstrainDoubleRange::toWrapper(NativeConstrainDoubleRangePtr native) +{ + if (!native) return ConstrainDoubleRangePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDoubleRangePtr wrapper::impl::org::ortc::ConstrainDoubleRange::toWrapper(const NativeConstrainDoubleRange &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->min = native.mMin; + pThis->max = native.mMax; + pThis->exact = native.mExact; + pThis->ideal = native.mIdeal; + + pThis->wrapper_init_org_ortc_ConstrainDoubleRange(); + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainDoubleRange::NativeConstrainDoubleRangePtr wrapper::impl::org::ortc::ConstrainDoubleRange::toNative(wrapper::org::ortc::ConstrainDoubleRangePtr wrapper) +{ + if (!wrapper) return NativeConstrainDoubleRangePtr(); + + auto native = make_shared(); + native->mMin = wrapper->min; + native->mMax = wrapper->max; + native->mExact = wrapper->exact; + native->mIdeal = wrapper->ideal; + + return native; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h index f2df00af..a50a81ba 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ConstrainDoubleRange.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,7 @@ namespace wrapper { struct ConstrainDoubleRange : public wrapper::org::ortc::ConstrainDoubleRange { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IConstraints::ConstrainDoubleRange, NativeConstrainDoubleRange); ConstrainDoubleRangeWeakPtr thisWeak_; ConstrainDoubleRange(); @@ -24,6 +25,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_ConstrainDoubleRange(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static ConstrainDoubleRangePtr toWrapper(NativeConstrainDoubleRangePtr native); + static ConstrainDoubleRangePtr toWrapper(const NativeConstrainDoubleRange &native); + static NativeConstrainDoubleRangePtr toNative(wrapper::org::ortc::ConstrainDoubleRangePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp index 38456576..9667be77 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ConstrainLong.h" +#include "impl_org_ortc_ConstrainLongRange.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +47,72 @@ void wrapper::impl::org::ortc::ConstrainLong::wrapper_init_org_ortc_ConstrainLon //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainLong::wrapper_init_org_ortc_ConstrainLong(wrapper::org::ortc::ConstrainLongPtr source) { + if (!source) return; + + wrapper::org::ortc::ConstrainLongPtr pThis = thisWeak_.lock(); + (*pThis) = (*source); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainLong::wrapper_init_org_ortc_ConstrainLong(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + wrapper::org::ortc::ConstrainLongPtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::ConstrainLongPtr pThis = thisWeak_.lock(); + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainLong::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("ConstrainLong")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::ConstrainLong::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLongPtr wrapper::impl::org::ortc::ConstrainLong::toWrapper(NativeConstrainLongPtr native) +{ + if (!native) return ConstrainLongPtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLongPtr wrapper::impl::org::ortc::ConstrainLong::toWrapper(const NativeConstrainLong &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->value = native.mValue; + if (native.mRange.hasValue()) { + pThis->range = ConstrainLongRange::toWrapper(native.mRange.value()); + } + + pThis->wrapper_init_org_ortc_ConstrainLong(); + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLong::NativeConstrainLongPtr wrapper::impl::org::ortc::ConstrainLong::toNative(wrapper::org::ortc::ConstrainLongPtr wrapper) +{ + if (!wrapper) return NativeConstrainLongPtr(); + + auto result = make_shared(); + result->mValue = wrapper->value; + if (wrapper->range.hasValue()) { + auto native = ConstrainLongRange::toNative(wrapper->range.value()); + if (native) { + result->mRange = *native; + } + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h index 18807f42..e26e6e3a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ConstrainLong.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct ConstrainLong : public wrapper::org::ortc::ConstrainLong { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes::ConstrainLong, NativeConstrainLong); + ConstrainLongWeakPtr thisWeak_; ConstrainLong(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_ConstrainLong(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static ConstrainLongPtr toWrapper(NativeConstrainLongPtr native); + static ConstrainLongPtr toWrapper(const NativeConstrainLong &native); + static NativeConstrainLongPtr toNative(wrapper::org::ortc::ConstrainLongPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp index e0cfabaf..965a8e8d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ConstrainLongRange.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +46,71 @@ void wrapper::impl::org::ortc::ConstrainLongRange::wrapper_init_org_ortc_Constra //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainLongRange::wrapper_init_org_ortc_ConstrainLongRange(wrapper::org::ortc::ConstrainLongRangePtr source) { + if (!source) return; + + wrapper::org::ortc::ConstrainLongRangePtr pThis = thisWeak_.lock(); + (*pThis) = (*source); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainLongRange::wrapper_init_org_ortc_ConstrainLongRange(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::ConstrainLongRangePtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::ConstrainLongRangePtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainLongRange::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("ConstrainLongRange")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::ConstrainLongRange::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLongRangePtr wrapper::impl::org::ortc::ConstrainLongRange::toWrapper(NativeConstrainLongRangePtr native) +{ + if (!native) return ConstrainLongRangePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLongRangePtr wrapper::impl::org::ortc::ConstrainLongRange::toWrapper(const NativeConstrainLongRange &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->min = native.mMin; + pThis->max = native.mMax; + pThis->exact = native.mExact; + pThis->ideal = native.mIdeal; + + pThis->wrapper_init_org_ortc_ConstrainLongRange(); + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainLongRange::NativeConstrainLongRangePtr wrapper::impl::org::ortc::ConstrainLongRange::toNative(wrapper::org::ortc::ConstrainLongRangePtr wrapper) +{ + if (!wrapper) return NativeConstrainLongRangePtr(); + + auto native = make_shared(); + native->mMin = wrapper->min; + native->mMax = wrapper->max; + native->mExact = wrapper->exact; + native->mIdeal = wrapper->ideal; + + return native; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h index 8977f278..77680c33 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ConstrainLongRange.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct ConstrainLongRange : public wrapper::org::ortc::ConstrainLongRange { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IConstraints::ConstrainLongRange, NativeConstrainLongRange); + ConstrainLongRangeWeakPtr thisWeak_; ConstrainLongRange(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_ConstrainLongRange(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static ConstrainLongRangePtr toWrapper(NativeConstrainLongRangePtr native); + static ConstrainLongRangePtr toWrapper(const NativeConstrainLongRange &native); + static NativeConstrainLongRangePtr toNative(wrapper::org::ortc::ConstrainLongRangePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp index fd0a554f..1f28d120 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ConstrainString.h" +#include "impl_org_ortc_StringOrStringList.h" +#include "impl_org_ortc_ConstrainStringParameters.h" using ::zsLib::String; using ::zsLib::Optional; @@ -67,4 +68,46 @@ String wrapper::impl::org::ortc::ConstrainString::hash() return result; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainStringPtr wrapper::impl::org::ortc::ConstrainString::toWrapper(NativeConstrainStringPtr native) +{ + if (!native) return ConstrainStringPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainStringPtr wrapper::impl::org::ortc::ConstrainString::toWrapper(const NativeConstrainString &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + if (native.mValue.hasValue()) { + pThis->value = StringOrStringList::toWrapper(native.mValue.value()); + } + if (native.mParameters.hasValue()) { + pThis->parameters = ConstrainStringParameters::toWrapper(native.mParameters); + } + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainString::NativeConstrainStringPtr wrapper::impl::org::ortc::ConstrainString::toNative(wrapper::org::ortc::ConstrainStringPtr wrapper) +{ + if (!wrapper) return NativeConstrainStringPtr(); + + auto result = make_shared(); + + if (wrapper->value.hasValue()) { + if (wrapper->value.value()) { + result->mValue = *StringOrStringList::toNative(wrapper->value.value()); + } + } + if (wrapper->parameters.hasValue()) { + if (wrapper->parameters.value()) { + result->mParameters = *ConstrainStringParameters::toNative(wrapper->parameters.value()); + } + } + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.h index b15635c5..ba0b4cb1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainString.h +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainString.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ConstrainString.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct ConstrainString : public wrapper::org::ortc::ConstrainString { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IConstraints::ConstrainString, NativeConstrainString); + ConstrainStringWeakPtr thisWeak_; ConstrainString(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_ConstrainString(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static ConstrainStringPtr toWrapper(NativeConstrainStringPtr native); + static ConstrainStringPtr toWrapper(const NativeConstrainString &native); + static NativeConstrainStringPtr toNative(wrapper::org::ortc::ConstrainStringPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp index f1757547..384c14f8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ConstrainStringParameters.h" +#include "impl_org_ortc_StringOrStringList.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +47,82 @@ void wrapper::impl::org::ortc::ConstrainStringParameters::wrapper_init_org_ortc_ //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainStringParameters::wrapper_init_org_ortc_ConstrainStringParameters(wrapper::org::ortc::ConstrainStringParametersPtr source) { + if (!source) return; + wrapper::org::ortc::ConstrainStringParametersPtr pThis = thisWeak_.lock(); + + auto native = toNative(source); + if (!native) return; + + wrapper::org::ortc::ConstrainStringParametersPtr wrapper = toWrapper(native); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::ConstrainStringParameters::wrapper_init_org_ortc_ConstrainStringParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::ConstrainStringParametersPtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::ConstrainStringParametersPtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::ConstrainStringParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("ConstrainStringParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::ConstrainStringParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainStringParametersPtr wrapper::impl::org::ortc::ConstrainStringParameters::toWrapper(NativeConstrainStringParametersPtr native) +{ + if (!native) return ConstrainStringParametersPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainStringParametersPtr wrapper::impl::org::ortc::ConstrainStringParameters::toWrapper(const NativeConstrainStringParameters &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + if (native.mExact.hasValue()) { + pThis->exact = StringOrStringList::toWrapper(native.mExact.value()); + } + if (native.mIdeal.hasValue()) { + pThis->ideal = StringOrStringList::toWrapper(native.mIdeal.value()); + } + + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::ConstrainStringParameters::NativeConstrainStringParametersPtr wrapper::impl::org::ortc::ConstrainStringParameters::toNative(wrapper::org::ortc::ConstrainStringParametersPtr wrapper) +{ + if (!wrapper) return NativeConstrainStringParametersPtr(); + + auto result = make_shared< NativeConstrainStringParameters >(); + if (wrapper->exact.hasValue()) { + if (wrapper->exact.value()) { + result->mExact = *StringOrStringList::toNative(wrapper->exact.value()); + } + } + if (wrapper->ideal.hasValue()) { + if (wrapper->ideal.value()) { + result->mIdeal = *StringOrStringList::toNative(wrapper->ideal.value()); + } + } + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h index 80db5e3b..76e1429f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ConstrainStringParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct ConstrainStringParameters : public wrapper::org::ortc::ConstrainStringParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IConstraints::ConstrainStringParameters, NativeConstrainStringParameters); + ConstrainStringParametersWeakPtr thisWeak_; ConstrainStringParameters(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_ConstrainStringParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static ConstrainStringParametersPtr toWrapper(NativeConstrainStringParametersPtr native); + static ConstrainStringParametersPtr toWrapper(const NativeConstrainStringParameters &native); + static NativeConstrainStringParametersPtr toNative(wrapper::org::ortc::ConstrainStringParametersPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp index 6478fdc5..7ab81013 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_Dispatcher.h" @@ -41,6 +40,7 @@ wrapper::impl::org::ortc::Dispatcher::~Dispatcher() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::Dispatcher::wrapper_init_org_ortc_Dispatcher(AnyPtr source) { + native_ = source; } //------------------------------------------------------------------------------ @@ -55,4 +55,13 @@ void wrapper::org::ortc::Dispatcher::set_source(AnyPtr value) { } +//------------------------------------------------------------------------------ +AnyPtr wrapper::impl::org::ortc::Dispatcher::toNative(wrapper::org::ortc::DispatcherPtr wrapper) +{ + if (!wrapper) return AnyPtr(); + auto impl = std::dynamic_pointer_cast(wrapper); + if (!impl) return AnyPtr(); + + return impl->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.h b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.h index 4c2f980f..309dc1f9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Dispatcher.h +++ b/ortc/idl/wrapper/impl_org_ortc_Dispatcher.h @@ -14,12 +14,15 @@ namespace wrapper { struct Dispatcher : public wrapper::org::ortc::Dispatcher { DispatcherWeakPtr thisWeak_; + AnyPtr native_; Dispatcher(); virtual ~Dispatcher(); // methods Dispatcher virtual void wrapper_init_org_ortc_Dispatcher(AnyPtr source) override; + + static AnyPtr toNative(wrapper::org::ortc::DispatcherPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp index 6b31597b..ed8163f4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_DoubleRange.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,6 +46,7 @@ void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange(double value) { + min = max = value; } //------------------------------------------------------------------------------ @@ -54,25 +55,66 @@ void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange( double max ) { + this->min = min; + this->max = max; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::DoubleRange::wrapper_init_org_ortc_DoubleRange(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::DoubleRangePtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::DoubleRangePtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::DoubleRange::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("DoubleRange")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::DoubleRange::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::DoubleRangePtr wrapper::impl::org::ortc::DoubleRange::toWrapper(NativeCapabilityDoublePtr native) +{ + if (!native) return DoubleRangePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::DoubleRangePtr wrapper::impl::org::ortc::DoubleRange::toWrapper(const NativeCapabilityDouble &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->min = native.mMin; + pThis->max = native.mMax; + + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::DoubleRange::NativeCapabilityDoublePtr wrapper::impl::org::ortc::DoubleRange::toNative(wrapper::org::ortc::DoubleRangePtr wrapper) +{ + if (!wrapper) return NativeCapabilityDoublePtr(); + + auto result = make_shared(); + + result->mMin = wrapper->min; + result->mMax = wrapper->max; + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h index 01b7aae3..d5bdd033 100644 --- a/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h +++ b/ortc/idl/wrapper/impl_org_ortc_DoubleRange.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_DoubleRange.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,7 @@ namespace wrapper { struct DoubleRange : public wrapper::org::ortc::DoubleRange { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ICapabilities::CapabilityDouble, NativeCapabilityDouble); DoubleRangeWeakPtr thisWeak_; DoubleRange(); @@ -28,6 +29,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_DoubleRange(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + + static DoubleRangePtr toWrapper(NativeCapabilityDoublePtr native); + static DoubleRangePtr toWrapper(const NativeCapabilityDouble &native); + static NativeCapabilityDoublePtr toNative(wrapper::org::ortc::DoubleRangePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_Error.cpp b/ortc/idl/wrapper/impl_org_ortc_Error.cpp index 0cd4d5ac..99c312cb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Error.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Error.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_Error.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::Error::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::Error::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::Error::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::Error::Error() { @@ -43,4 +47,32 @@ void wrapper::impl::org::ortc::Error::wrapper_init_org_ortc_Error() { } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->errorCode = SafeInterrorCode)>(native.mErrorCode); + pThis->name = native.mName; + pThis->reason = native.mReason; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + result->mErrorCode = SafeIntmErrorCode)>(wrapper->errorCode); + result->mName = wrapper->name; + result->mReason = wrapper->reason; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_Error.h b/ortc/idl/wrapper/impl_org_ortc_Error.h index a478d7a9..3be44507 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Error.h +++ b/ortc/idl/wrapper/impl_org_ortc_Error.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_Error.h" +#include namespace wrapper { namespace impl { @@ -13,11 +13,18 @@ namespace wrapper { struct Error : public wrapper::org::ortc::Error { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ErrorAny, NativeType); + ZS_DECLARE_TYPEDEF_PTR(Error, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::Error, WrapperType); ErrorWeakPtr thisWeak_; Error(); virtual ~Error(); virtual void wrapper_init_org_ortc_Error() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp index 9784ebc5..37ed35d0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_ErrorEvent.h" +#include "impl_org_ortc_Error.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::ErrorEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::ErrorEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::ErrorEvent::ErrorEvent() { @@ -41,8 +44,27 @@ wrapper::impl::org::ortc::ErrorEvent::~ErrorEvent() //------------------------------------------------------------------------------ wrapper::org::ortc::ErrorPtr wrapper::impl::org::ortc::ErrorEvent::get_error() { - wrapper::org::ortc::ErrorPtr result {}; - return result; + return error_; } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(::ortc::ErrorAnyPtr error) +{ + if (!error) return WrapperImplTypePtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->error_ = Error::toWrapper(error); + return pThis; +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(wrapper::org::ortc::ErrorPtr error) +{ + if (!error) return WrapperImplTypePtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->error_ = error; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h index 1416c33f..fae497f9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_ErrorEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,19 @@ namespace wrapper { struct ErrorEvent : public wrapper::org::ortc::ErrorEvent { + ZS_DECLARE_TYPEDEF_PTR(ErrorEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::ErrorEvent, WrapperType); ErrorEventWeakPtr thisWeak_; + wrapper::org::ortc::ErrorPtr error_; ErrorEvent(); virtual ~ErrorEvent(); // properties ErrorEvent virtual wrapper::org::ortc::ErrorPtr get_error() override; + + static WrapperImplTypePtr toWrapper(::ortc::ErrorAnyPtr error); + static WrapperImplTypePtr toWrapper(wrapper::org::ortc::ErrorPtr error); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp index b6c5fabd..90ad8efb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp @@ -4,9 +4,12 @@ #include "impl_org_ortc_MediaStreamTrack.h" #include "impl_org_ortc_RTCStatsTypeSet.h" #include "impl_org_ortc_RTCStatsReport.h" +#include "impl_org_ortc_OverconstrainedError.h" +#include "impl_org_ortc_Error.h" #include #include +#include namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } @@ -18,6 +21,736 @@ namespace wrapper { namespace adapter { } // namespace adapater + //--------------------------------------------------------------------- + zsLib::IMessageQueuePtr Helper::getGuiQueue() + { + return zsLib::IMessageQueueThread::singletonUsingCurrentGUIThreadsMessageQueue(); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::log::Level Helper::toWrapper(zsLib::Log::Level level) + { + switch (level) + { + case zsLib::Log::Level::None: return wrapper::org::ortc::log::Level_none; + case zsLib::Log::Level::Basic: return wrapper::org::ortc::log::Level_basic; + case zsLib::Log::Level::Detail: return wrapper::org::ortc::log::Level_detail; + case zsLib::Log::Level::Debug: return wrapper::org::ortc::log::Level_debug; + case zsLib::Log::Level::Trace: return wrapper::org::ortc::log::Level_trace; + case zsLib::Log::Level::Insane: return wrapper::org::ortc::log::Level_insane; + } + ZS_THROW_INVALID_ARGUMENT("level is unknown"); + return toWrapper(zsLib::Log::Level_First); + } + + //--------------------------------------------------------------------- + zsLib::Log::Level Helper::toNative(wrapper::org::ortc::log::Level level) + { + switch (level) + { + case wrapper::org::ortc::log::Level_none: return zsLib::Log::Level::None; + case wrapper::org::ortc::log::Level_basic: return zsLib::Log::Level::Basic; + case wrapper::org::ortc::log::Level_detail: return zsLib::Log::Level::Detail; + case wrapper::org::ortc::log::Level_debug: return zsLib::Log::Level::Debug; + case wrapper::org::ortc::log::Level_trace: return zsLib::Log::Level::Trace; + case wrapper::org::ortc::log::Level_insane: return zsLib::Log::Level::Insane; + } + ZS_THROW_INVALID_ARGUMENT("level is unknown"); + return zsLib::Log::Level_First; + } + + //--------------------------------------------------------------------- + const char *Helper::toNative(wrapper::org::ortc::log::Component component) + { + const char *componentStr{}; + switch (component) { + case wrapper::org::ortc::log::Component_zsLib: componentStr = "zsLib"; break; + case wrapper::org::ortc::log::Component_zsLibSocket: componentStr = "zsLib_socket"; break; + case wrapper::org::ortc::log::Component_services: componentStr = "ortc_services"; break; + case wrapper::org::ortc::log::Component_servicesDns: componentStr = "ortc_services_dns"; break; + case wrapper::org::ortc::log::Component_servicesTurn: componentStr = "ortc_services_turn"; break; + case wrapper::org::ortc::log::Component_servicesHttp: componentStr = "ortc_services_http"; break; + case wrapper::org::ortc::log::Component_servicesWire: componentStr = "ortc_services_wire"; break; + case wrapper::org::ortc::log::Component_servicesStun: componentStr = "ortc_services_stun"; break; + case wrapper::org::ortc::log::Component_ortcLib: componentStr = "ortclib"; break; + case wrapper::org::ortc::log::Component_ortcLibWebrtc: componentStr = "ortclib_webrtc"; break; + case wrapper::org::ortc::log::Component_ortcLibDtlsTransport: componentStr = "ortclib_dtlstransport"; break; + case wrapper::org::ortc::log::Component_ortcLibIceGatherer: componentStr = "ortclib_icegatherer"; break; + case wrapper::org::ortc::log::Component_ortcLibIceGathererRouter: componentStr = "ortclib_icegatherer_router"; break; + case wrapper::org::ortc::log::Component_ortcLibIceTransport: componentStr = "ortclib_icetransport"; break; + case wrapper::org::ortc::log::Component_ortcLibIceTransportController: componentStr = "ortclib_icetransport_controller"; break; + case wrapper::org::ortc::log::Component_ortcLibMediaDevices: componentStr = "ortclib_mediadevices"; break; + case wrapper::org::ortc::log::Component_ortcLibMediaStreamTrack: componentStr = "ortclib_mediastreamtrack"; break; + case wrapper::org::ortc::log::Component_ortcLibRtpRtcpPacket: componentStr = "ortclib_rtp_rtcp_packet"; break; + case wrapper::org::ortc::log::Component_ortcLibRtpListener: componentStr = "ortclib_rtplistener"; break; + case wrapper::org::ortc::log::Component_ortcLibRtpMediaEngine: componentStr = "ortclib_rtpmediaengine"; break; + case wrapper::org::ortc::log::Component_ortcLibRtpReceiver: componentStr = "ortclib_rtpreceiver"; break; + case wrapper::org::ortc::log::Component_ortcLibRtpSender: componentStr = "ortclib_rtpsender"; break; + case wrapper::org::ortc::log::Component_ortcLibRtpTypes: componentStr = "ortclib_rtptypes"; break; + case wrapper::org::ortc::log::Component_ortcLibSctpDataChannel: componentStr = "ortclib_sctp_datachannel"; break; + case wrapper::org::ortc::log::Component_ortcLibSrtp: componentStr = "ortclib_srtp"; break; + case wrapper::org::ortc::log::Component_ortcLibStats: componentStr = "ortclib_stats"; break; + case wrapper::org::ortc::log::Component_ortcLibAdapter: componentStr = "ortclib_adapter"; break; + }; + ZS_THROW_INVALID_ARGUMENT_IF(!componentStr); + return componentStr; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::MediaStreamTrackKind Helper::toWrapper(IMediaStreamTrackTypes::Kinds kind) + { + switch (kind) + { + case IMediaStreamTrackTypes::Kind_Audio: return wrapper::org::ortc::MediaStreamTrackKind::MediaStreamTrackKind_audio; + case IMediaStreamTrackTypes::Kind_Video: return wrapper::org::ortc::MediaStreamTrackKind::MediaStreamTrackKind_video; + } + ZS_THROW_INVALID_ARGUMENT("kind is unknown"); + return toWrapper(IMediaStreamTrackTypes::Kind_First); + } + + //--------------------------------------------------------------------- + ::ortc::IMediaStreamTrackTypes::Kinds Helper::toNative(wrapper::org::ortc::MediaStreamTrackKind kind) + { + switch (kind) + { + case wrapper::org::ortc::MediaStreamTrackKind::MediaStreamTrackKind_audio: return IMediaStreamTrackTypes::Kind_Audio; + case wrapper::org::ortc::MediaStreamTrackKind::MediaStreamTrackKind_video: return IMediaStreamTrackTypes::Kind_Video; + } + ZS_THROW_INVALID_ARGUMENT("kind is unknown"); + return IMediaStreamTrackTypes::Kind_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::MediaStreamTrackState Helper::toWrapper(IMediaStreamTrackTypes::States state) + { + switch (state) + { + case IMediaStreamTrackTypes::State_Live: return wrapper::org::ortc::MediaStreamTrackState::MediaStreamTrackState_live; + case IMediaStreamTrackTypes::State_Ended: return wrapper::org::ortc::MediaStreamTrackState::MediaStreamTrackState_ended; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return wrapper::org::ortc::MediaStreamTrackState::MediaStreamTrackState_ended; + } + + //--------------------------------------------------------------------- + ::ortc::IMediaDevicesTypes::DeviceKinds Helper::toNative(wrapper::org::ortc::MediaDeviceKind kind) + { + switch (kind) + { + case wrapper::org::ortc::MediaDeviceKind_audioInput: return ::ortc::IMediaDevicesTypes::DeviceKind_AudioInput; + case wrapper::org::ortc::MediaDeviceKind_audioOutput: return ::ortc::IMediaDevicesTypes::DeviceKind_AudioOutput; + case wrapper::org::ortc::MediaDeviceKind_videoInput: return ::ortc::IMediaDevicesTypes::DeviceKind_VideoInput; + } + + ZS_THROW_INVALID_ARGUMENT("kind is unknown"); + return ::ortc::IMediaDevicesTypes::DeviceKind_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::MediaDeviceKind Helper::toWrapper(::ortc::IMediaDevicesTypes::DeviceKinds kind) + { + switch (kind) + { + case ::ortc::IMediaDevicesTypes::DeviceKind_AudioInput: return wrapper::org::ortc::MediaDeviceKind_audioInput; + case ::ortc::IMediaDevicesTypes::DeviceKind_AudioOutput: return wrapper::org::ortc::MediaDeviceKind_audioOutput; + case ::ortc::IMediaDevicesTypes::DeviceKind_VideoInput: return wrapper::org::ortc::MediaDeviceKind_videoInput; + } + ZS_THROW_INVALID_ARGUMENT("kind is unknown"); + return toWrapper(::ortc::IMediaDevicesTypes::DeviceKind_First); + } + + //--------------------------------------------------------------------- + ::ortc::IStatsReportTypes::StatsTypes Helper::toNative(wrapper::org::ortc::RTCStatsType type) + { + switch (type) + { + case wrapper::org::ortc::RTCStatsType_inboundRtp: return ::ortc::IStatsReportTypes::StatsType_InboundRTP; + case wrapper::org::ortc::RTCStatsType_outboundRtp: return ::ortc::IStatsReportTypes::StatsType_OutboundRTP; + case wrapper::org::ortc::RTCStatsType_codec: return ::ortc::IStatsReportTypes::StatsType_Codec; + case wrapper::org::ortc::RTCStatsType_sctpTransport: return ::ortc::IStatsReportTypes::StatsType_SCTPTransport; + case wrapper::org::ortc::RTCStatsType_dataChannel: return ::ortc::IStatsReportTypes::StatsType_DataChannel; + case wrapper::org::ortc::RTCStatsType_stream: return ::ortc::IStatsReportTypes::StatsType_Stream; + case wrapper::org::ortc::RTCStatsType_track: return ::ortc::IStatsReportTypes::StatsType_Track; + case wrapper::org::ortc::RTCStatsType_iceGatherer: return ::ortc::IStatsReportTypes::StatsType_ICEGatherer; + case wrapper::org::ortc::RTCStatsType_iceTransport: return ::ortc::IStatsReportTypes::StatsType_ICETransport; + case wrapper::org::ortc::RTCStatsType_dtlsTransport: return ::ortc::IStatsReportTypes::StatsType_DTLSTransport; + case wrapper::org::ortc::RTCStatsType_srtpTransport: return ::ortc::IStatsReportTypes::StatsType_SRTPTransport; + case wrapper::org::ortc::RTCStatsType_certificate: return ::ortc::IStatsReportTypes::StatsType_Certificate; + case wrapper::org::ortc::RTCStatsType_candidate: return ::ortc::IStatsReportTypes::StatsType_Candidate; + case wrapper::org::ortc::RTCStatsType_candidatePair: return ::ortc::IStatsReportTypes::StatsType_CandidatePair; + case wrapper::org::ortc::RTCStatsType_localCandidate: return ::ortc::IStatsReportTypes::StatsType_LocalCandidate; + case wrapper::org::ortc::RTCStatsType_remoteCandidate: return ::ortc::IStatsReportTypes::StatsType_RemoteCandidate; + } + + ZS_THROW_INVALID_ARGUMENT("stats type is unknown"); + return ::ortc::IStatsReportTypes::StatsType_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCStatsType Helper::toWrapper(::ortc::IStatsReportTypes::StatsTypes type) + { + switch (type) + { + case ::ortc::IStatsReportTypes::StatsType_InboundRTP: return wrapper::org::ortc::RTCStatsType_inboundRtp; + case ::ortc::IStatsReportTypes::StatsType_OutboundRTP: return wrapper::org::ortc::RTCStatsType_outboundRtp; + case ::ortc::IStatsReportTypes::StatsType_Codec: return wrapper::org::ortc::RTCStatsType_codec; + case ::ortc::IStatsReportTypes::StatsType_SCTPTransport: return wrapper::org::ortc::RTCStatsType_sctpTransport; + case ::ortc::IStatsReportTypes::StatsType_DataChannel: return wrapper::org::ortc::RTCStatsType_dataChannel; + case ::ortc::IStatsReportTypes::StatsType_Stream: return wrapper::org::ortc::RTCStatsType_stream; + case ::ortc::IStatsReportTypes::StatsType_Track: return wrapper::org::ortc::RTCStatsType_track; + case ::ortc::IStatsReportTypes::StatsType_ICEGatherer: return wrapper::org::ortc::RTCStatsType_iceGatherer; + case ::ortc::IStatsReportTypes::StatsType_ICETransport: return wrapper::org::ortc::RTCStatsType_iceTransport; + case ::ortc::IStatsReportTypes::StatsType_DTLSTransport: return wrapper::org::ortc::RTCStatsType_dtlsTransport; + case ::ortc::IStatsReportTypes::StatsType_SRTPTransport: return wrapper::org::ortc::RTCStatsType_srtpTransport; + case ::ortc::IStatsReportTypes::StatsType_Certificate: return wrapper::org::ortc::RTCStatsType_certificate; + case ::ortc::IStatsReportTypes::StatsType_Candidate: return wrapper::org::ortc::RTCStatsType_candidate; + case ::ortc::IStatsReportTypes::StatsType_CandidatePair: return wrapper::org::ortc::RTCStatsType_candidatePair; + case ::ortc::IStatsReportTypes::StatsType_LocalCandidate: return wrapper::org::ortc::RTCStatsType_localCandidate; + case ::ortc::IStatsReportTypes::StatsType_RemoteCandidate: return wrapper::org::ortc::RTCStatsType_remoteCandidate; + } + ZS_THROW_INVALID_ARGUMENT("stats type is unknown"); + return toWrapper(::ortc::IStatsReportTypes::StatsType_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCSctpTransportState Helper::toWrapper(::ortc::ISCTPTransportTypes::States state) + { + switch (state) + { + case ::ortc::ISCTPTransportTypes::State_New: return wrapper::org::ortc::RTCSctpTransportState_new; + case ::ortc::ISCTPTransportTypes::State_Connecting: return wrapper::org::ortc::RTCSctpTransportState_connecting; + case ::ortc::ISCTPTransportTypes::State_Connected: return wrapper::org::ortc::RTCSctpTransportState_connected; + case ::ortc::ISCTPTransportTypes::State_Closed: return wrapper::org::ortc::RTCSctpTransportState_closed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return toWrapper(::ortc::ISCTPTransportTypes::State_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCDataChannelState Helper::toWrapper(::ortc::IDataChannelTypes::States state) + { + switch (state) + { + case ::ortc::IDataChannelTypes::State_Connecting: return wrapper::org::ortc::RTCDataChannelState_connecting; + case ::ortc::IDataChannelTypes::State_Open: return wrapper::org::ortc::RTCDataChannelState_open; + case ::ortc::IDataChannelTypes::State_Closing: return wrapper::org::ortc::RTCDataChannelState_closing; + case ::ortc::IDataChannelTypes::State_Closed: return wrapper::org::ortc::RTCDataChannelState_closed; + } + ZS_THROW_INVALID_ARGUMENT("data channel state is unknown"); + return toWrapper(::ortc::IDataChannelTypes::State_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceCandidatePairState Helper::toWrapper(::ortc::IStatsReportTypes::StatsICECandidatePairStates state) + { + switch (state) + { + case ::ortc::IStatsReportTypes::StatsICECandidatePairState_Frozen: return wrapper::org::ortc::RTCIceCandidatePairState_frozen; + case ::ortc::IStatsReportTypes::StatsICECandidatePairState_Waiting: return wrapper::org::ortc::RTCIceCandidatePairState_waiting; + case ::ortc::IStatsReportTypes::StatsICECandidatePairState_InProgress: return wrapper::org::ortc::RTCIceCandidatePairState_inProgress; + case ::ortc::IStatsReportTypes::StatsICECandidatePairState_Failed: return wrapper::org::ortc::RTCIceCandidatePairState_failed; + case ::ortc::IStatsReportTypes::StatsICECandidatePairState_Succeeded: return wrapper::org::ortc::RTCIceCandidatePairState_succeeded; + case ::ortc::IStatsReportTypes::StatsICECandidatePairState_Cancelled: return wrapper::org::ortc::RTCIceCandidatePairState_failed; + } + ZS_THROW_INVALID_ARGUMENT("ICE candidate pair state is unknown"); + return toWrapper(::ortc::IStatsReportTypes::StatsICECandidatePairState_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::adapter::RTCPeerConnectionSignalingMode Helper::toWrapper(::ortc::adapter::IPeerConnectionTypes::SignalingModes mode) + { + switch (mode) + { + case ::ortc::adapter::IPeerConnectionTypes::SignalingMode_JSON: return wrapper::org::ortc::adapter::RTCPeerConnectionSignalingMode_json; + case ::ortc::adapter::IPeerConnectionTypes::SignalingMode_SDP: return wrapper::org::ortc::adapter::RTCPeerConnectionSignalingMode_sdp; + } + ZS_THROW_INVALID_ARGUMENT("signaling mode is unknown"); + return toWrapper(::ortc::adapter::IPeerConnectionTypes::SignalingMode_First); + } + + //--------------------------------------------------------------------- + ::ortc::adapter::IPeerConnectionTypes::SignalingModes Helper::toNative(wrapper::org::ortc::adapter::RTCPeerConnectionSignalingMode mode) + { + switch (mode) + { + case wrapper::org::ortc::adapter::RTCPeerConnectionSignalingMode_json: return ::ortc::adapter::IPeerConnectionTypes::SignalingMode_JSON; + case wrapper::org::ortc::adapter::RTCPeerConnectionSignalingMode_sdp: return ::ortc::adapter::IPeerConnectionTypes::SignalingMode_SDP; + } + ZS_THROW_INVALID_ARGUMENT("signaling mode is unknown"); + return ::ortc::adapter::IPeerConnectionTypes::SignalingMode_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::adapter::RTCRtcpMuxPolicy Helper::toWrapper(::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicies policy) + { + switch (policy) + { + case ::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicy_Negotiated: return wrapper::org::ortc::adapter::RTCRtcpMuxPolicy_negotiated; + case ::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicy_Require: return wrapper::org::ortc::adapter::RTCRtcpMuxPolicy_require; + } + ZS_THROW_INVALID_ARGUMENT("mux policy mode is unknown"); + return toWrapper(::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicy_First); + } + + //--------------------------------------------------------------------- + ::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicies Helper::toNative(wrapper::org::ortc::adapter::RTCRtcpMuxPolicy policy) + { + switch (policy) + { + case wrapper::org::ortc::adapter::RTCRtcpMuxPolicy_negotiated: return ::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicy_Negotiated; + case wrapper::org::ortc::adapter::RTCRtcpMuxPolicy_require: return ::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicy_Require; + } + ZS_THROW_INVALID_ARGUMENT("mux policy is unknown"); + return ::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicy_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::adapter::RTCBundlePolicy Helper::toWrapper(::ortc::adapter::IPeerConnectionTypes::BundlePolicies policy) + { + switch (policy) + { + case ::ortc::adapter::IPeerConnectionTypes::BundlePolicy_Balanced: return wrapper::org::ortc::adapter::RTCBundlePolicy_balanced; + case ::ortc::adapter::IPeerConnectionTypes::BundlePolicy_MaxCompat: return wrapper::org::ortc::adapter::RTCBundlePolicy_maxCompat; + case ::ortc::adapter::IPeerConnectionTypes::BundlePolicy_MaxBundle: return wrapper::org::ortc::adapter::RTCBundlePolicy_maxBundle; + } + ZS_THROW_INVALID_ARGUMENT("bundle policy mode is unknown"); + return toWrapper(::ortc::adapter::IPeerConnectionTypes::BundlePolicy_First); + } + + //--------------------------------------------------------------------- + ::ortc::adapter::IPeerConnectionTypes::BundlePolicies Helper::toNative(wrapper::org::ortc::adapter::RTCBundlePolicy policy) + { + switch (policy) + { + case wrapper::org::ortc::adapter::RTCBundlePolicy_balanced: return ::ortc::adapter::IPeerConnectionTypes::BundlePolicy_Balanced; + case wrapper::org::ortc::adapter::RTCBundlePolicy_maxCompat: return ::ortc::adapter::IPeerConnectionTypes::BundlePolicy_MaxCompat; + case wrapper::org::ortc::adapter::RTCBundlePolicy_maxBundle: return ::ortc::adapter::IPeerConnectionTypes::BundlePolicy_MaxBundle; + } + ZS_THROW_INVALID_ARGUMENT("bundle policy is unknown"); + return ::ortc::adapter::IPeerConnectionTypes::BundlePolicy_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceGatherFilterPolicy Helper::toWrapper(::ortc::IICEGathererTypes::FilterPolicies policy) + { + return static_cast(static_cast::type>(policy)); + } + + //--------------------------------------------------------------------- + ::ortc::IICEGathererTypes::FilterPolicies Helper::toNative(wrapper::org::ortc::RTCIceGatherFilterPolicy policy) + { + return static_cast<::ortc::IICEGathererTypes::FilterPolicies>(static_cast::type>(policy)); + } + + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceCredentialType Helper::toWrapper(::ortc::IICEGathererTypes::CredentialTypes type) + { + switch (type) + { + case ::ortc::IICEGathererTypes::CredentialType_Password: return wrapper::org::ortc::RTCIceCredentialType_password; + case ::ortc::IICEGathererTypes::CredentialType_Token: return wrapper::org::ortc::RTCIceCredentialType_token; + } + ZS_THROW_INVALID_ARGUMENT("credential type is unknown"); + return toWrapper(::ortc::IICEGathererTypes::CredentialType_First); + } + + //--------------------------------------------------------------------- + ::ortc::IICEGathererTypes::CredentialTypes Helper::toNative(wrapper::org::ortc::RTCIceCredentialType type) + { + switch (type) + { + case wrapper::org::ortc::RTCIceCredentialType_password: return ::ortc::IICEGathererTypes::CredentialType_Password; + case wrapper::org::ortc::RTCIceCredentialType_token: return ::ortc::IICEGathererTypes::CredentialType_Token; + } + ZS_THROW_INVALID_ARGUMENT("credential type is unknown"); + return ::ortc::IICEGathererTypes::CredentialType_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceGathererState Helper::toWrapper(::ortc::IICEGathererTypes::States state) + { + switch (state) + { + case ::ortc::IICEGathererTypes::State_New: return wrapper::org::ortc::RTCIceGathererState_new; + case ::ortc::IICEGathererTypes::State_Gathering: return wrapper::org::ortc::RTCIceGathererState_gathering; + case ::ortc::IICEGathererTypes::State_Complete: return wrapper::org::ortc::RTCIceGathererState_complete; + case ::ortc::IICEGathererTypes::State_Closed: return wrapper::org::ortc::RTCIceGathererState_closed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return toWrapper(::ortc::IICEGathererTypes::State_First); + } + + //--------------------------------------------------------------------- + ::ortc::IICEGathererTypes::States Helper::toNative(wrapper::org::ortc::RTCIceGathererState state) + { + switch (state) + { + case wrapper::org::ortc::RTCIceGathererState_new: return ::ortc::IICEGathererTypes::State_New; + case wrapper::org::ortc::RTCIceGathererState_gathering: return ::ortc::IICEGathererTypes::State_Gathering; + case wrapper::org::ortc::RTCIceGathererState_complete: return ::ortc::IICEGathererTypes::State_Complete; + case wrapper::org::ortc::RTCIceGathererState_closed: return ::ortc::IICEGathererTypes::State_Closed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return ::ortc::IICEGathererTypes::State_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceCandidateType Helper::toWrapper(::ortc::IICETypes::CandidateTypes type) + { + switch (type) + { + case ::ortc::IICETypes::CandidateType_Host: return wrapper::org::ortc::RTCIceCandidateType_host; + case ::ortc::IICETypes::CandidateType_Srflex: return wrapper::org::ortc::RTCIceCandidateType_srflex; + case ::ortc::IICETypes::CandidateType_Prflx: return wrapper::org::ortc::RTCIceCandidateType_prflx; + case ::ortc::IICETypes::CandidateType_Relay: return wrapper::org::ortc::RTCIceCandidateType_relay; + } + ZS_THROW_INVALID_ARGUMENT("ice candidate type is unknown"); + return toWrapper(::ortc::IICETypes::CandidateType_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceComponent Helper::toWrapper(::ortc::IICETypes::Components component) + { + switch (component) + { + case ::ortc::IICETypes::Component_RTP: return wrapper::org::ortc::RTCIceComponent_rtp; + case ::ortc::IICETypes::Component_RTCP: return wrapper::org::ortc::RTCIceComponent_rtcp; + } + ZS_THROW_INVALID_ARGUMENT("component is unknown"); + return toWrapper(::ortc::IICETypes::Component_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceProtocol Helper::toWrapper(::ortc::IICETypes::Protocols protocol) + { + switch (protocol) + { + case ::ortc::IICETypes::Protocol_UDP: return wrapper::org::ortc::RTCIceProtocol_udp; + case ::ortc::IICETypes::Protocol_TCP: return wrapper::org::ortc::RTCIceProtocol_tcp; + } + ZS_THROW_INVALID_ARGUMENT("protocol is unknown"); + return toWrapper(::ortc::IICETypes::Protocol_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceTcpCandidateType Helper::toWrapper(::ortc::IICETypes::TCPCandidateTypes type) + { + switch (type) + { + case ::ortc::IICETypes::TCPCandidateType_Active: return wrapper::org::ortc::RTCIceTcpCandidateType_active; + case ::ortc::IICETypes::TCPCandidateType_Passive: return wrapper::org::ortc::RTCIceTcpCandidateType_passive; + case ::ortc::IICETypes::TCPCandidateType_SO: return wrapper::org::ortc::RTCIceTcpCandidateType_so; + } + ZS_THROW_INVALID_ARGUMENT("tcp candidate type is unknown"); + return toWrapper(::ortc::IICETypes::TCPCandidateType_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceTransportState Helper::toWrapper(::ortc::IICETransportTypes::States state) + { + switch (state) + { + case ::ortc::IICETransportTypes::State_New: return wrapper::org::ortc::RTCIceTransportState_new; + case ::ortc::IICETransportTypes::State_Checking: return wrapper::org::ortc::RTCIceTransportState_checking; + case ::ortc::IICETransportTypes::State_Connected: return wrapper::org::ortc::RTCIceTransportState_connected; + case ::ortc::IICETransportTypes::State_Completed: return wrapper::org::ortc::RTCIceTransportState_completed; + case ::ortc::IICETransportTypes::State_Disconnected: return wrapper::org::ortc::RTCIceTransportState_disconnected; + case ::ortc::IICETransportTypes::State_Failed: return wrapper::org::ortc::RTCIceTransportState_failed; + case ::ortc::IICETransportTypes::State_Closed: return wrapper::org::ortc::RTCIceTransportState_closed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return toWrapper(::ortc::IICETransportTypes::State_First); + } + + //--------------------------------------------------------------------- + ::ortc::IICETransportTypes::States Helper::toNative(wrapper::org::ortc::RTCIceTransportState state) + { + switch (state) + { + case wrapper::org::ortc::RTCIceTransportState_new: return ::ortc::IICETransportTypes::State_New; + case wrapper::org::ortc::RTCIceTransportState_checking: return ::ortc::IICETransportTypes::State_Checking; + case wrapper::org::ortc::RTCIceTransportState_connected: return ::ortc::IICETransportTypes::State_Connected; + case wrapper::org::ortc::RTCIceTransportState_completed: return ::ortc::IICETransportTypes::State_Completed; + case wrapper::org::ortc::RTCIceTransportState_disconnected: return ::ortc::IICETransportTypes::State_Disconnected; + case wrapper::org::ortc::RTCIceTransportState_failed: return ::ortc::IICETransportTypes::State_Failed; + case wrapper::org::ortc::RTCIceTransportState_closed: return ::ortc::IICETransportTypes::State_Closed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return ::ortc::IICETransportTypes::State_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCIceRole Helper::toWrapper(::ortc::IICETypes::Roles role) + { + switch (role) + { + case ::ortc::IICETypes::Role_Controlling: return wrapper::org::ortc::RTCIceRole_controlling; + case ::ortc::IICETypes::Role_Controlled: return wrapper::org::ortc::RTCIceRole_controlled; + } + ZS_THROW_INVALID_ARGUMENT("role is unknown"); + return toWrapper(::ortc::IICETypes::Role_First); + } + + //--------------------------------------------------------------------- + ::ortc::IICETypes::Roles Helper::toNative(wrapper::org::ortc::RTCIceRole role) + { + switch (role) + { + case wrapper::org::ortc::RTCIceRole_controlling: return ::ortc::IICETypes::Role_Controlling; + case wrapper::org::ortc::RTCIceRole_controlled: return ::ortc::IICETypes::Role_Controlled; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return ::ortc::IICETypes::Role_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal Helper::toWrapper(::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signals signal) + { + switch (signal) + { + case ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signal_Auto: return wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal_auto; + case ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signal_Music: return wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal_music; + case ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signal_Voice: return wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal_voice; + } + ZS_THROW_INVALID_ARGUMENT("signal type is unknown"); + return toWrapper(::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signal_First); + } + + //--------------------------------------------------------------------- + ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signals Helper::toNative(wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal signal) + { + switch (signal) + { + case wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal_auto: return ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signal_Auto; + case wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal_music: return ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signal_Music; + case wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal_voice: return ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signal_Voice; + } + ZS_THROW_INVALID_ARGUMENT("signal type is unknown"); + return ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signal_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication Helper::toWrapper(::ortc::IRTPTypes::OpusCodecCapabilityOptions::Applications application) + { + switch (application) + { + case ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Application_VoIP: return wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication_voip; + case ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Application_Audio: return wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication_audio; + case ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Application_LowDelay: return wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication_lowDelay; + } + ZS_THROW_INVALID_ARGUMENT("application type is unknown"); + return toWrapper(::ortc::IRTPTypes::OpusCodecCapabilityOptions::Application_First); + } + + //--------------------------------------------------------------------- + ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Applications Helper::toNative(wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication application) + { + switch (application) + { + case wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication_voip: return ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Application_VoIP; + case wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication_audio: return ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Application_Audio; + case wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication_lowDelay: return ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Application_LowDelay; + } + ZS_THROW_INVALID_ARGUMENT("application type is unknown"); + return ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Application_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP Helper::toWrapper(::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToPs top) + { + switch (top) + { + case ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_1DInterleavedFEC: return wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP_n1DInterleavedFEC; + case ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_1DNonInterleavedFEC: return wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP_n1DNonInterleavedFEC; + case ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_2DParityFEEC: return wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP_n2DParityFEEC; + case ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_Reserved: return wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP_reserved; + } + ZS_THROW_INVALID_ARGUMENT("ToP is unknown"); + return toWrapper(::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_First); + } + + //--------------------------------------------------------------------- + ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToPs Helper::toNative(wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP top) + { + switch (top) + { + case wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP_n1DInterleavedFEC: return ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_1DInterleavedFEC; + case wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP_n1DNonInterleavedFEC: return ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_1DNonInterleavedFEC; + case wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP_n2DParityFEEC: return ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_2DParityFEEC; + case wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP_reserved: return ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_Reserved; + } + ZS_THROW_INVALID_ARGUMENT("ToP is unknown"); + return ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToP_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCRtpDegradationPreference Helper::toWrapper(::ortc::IRTPTypes::DegradationPreferences preference) + { + switch (preference) + { + case ::ortc::IRTPTypes::DegradationPreference_MaintainFramerate: return wrapper::org::ortc::RTCRtpDegradationPreference_maintainFramerate; + case ::ortc::IRTPTypes::DegradationPreference_MaintainResolution: return wrapper::org::ortc::RTCRtpDegradationPreference_maintainResolution; + case ::ortc::IRTPTypes::DegradationPreference_Balanced: return wrapper::org::ortc::RTCRtpDegradationPreference_balanced; + } + ZS_THROW_INVALID_ARGUMENT("preference is unknown"); + return toWrapper(::ortc::IRTPTypes::DegradationPreference_First); + } + + //--------------------------------------------------------------------- + ::ortc::IRTPTypes::DegradationPreferences Helper::toNative(wrapper::org::ortc::RTCRtpDegradationPreference preference) + { + switch (preference) + { + case wrapper::org::ortc::RTCRtpDegradationPreference_maintainFramerate: return ::ortc::IRTPTypes::DegradationPreference_MaintainFramerate; + case wrapper::org::ortc::RTCRtpDegradationPreference_maintainResolution: return ::ortc::IRTPTypes::DegradationPreference_MaintainResolution; + case wrapper::org::ortc::RTCRtpDegradationPreference_balanced: return ::ortc::IRTPTypes::DegradationPreference_Balanced; + } + ZS_THROW_INVALID_ARGUMENT("preference is unknown"); + return ::ortc::IRTPTypes::DegradationPreference_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCRtpPriorityType Helper::toWrapper(::ortc::IRTPTypes::PriorityTypes type) + { + switch (type) + { + case ::ortc::IRTPTypes::PriorityType_VeryLow: return wrapper::org::ortc::RTCRtpPriorityType_veryLow; + case ::ortc::IRTPTypes::PriorityType_Low: return wrapper::org::ortc::RTCRtpPriorityType_low; + case ::ortc::IRTPTypes::PriorityType_Medium: return wrapper::org::ortc::RTCRtpPriorityType_medium; + case ::ortc::IRTPTypes::PriorityType_High: return wrapper::org::ortc::RTCRtpPriorityType_high; + } + ZS_THROW_INVALID_ARGUMENT("type is unknown"); + return toWrapper(::ortc::IRTPTypes::PriorityType_First); + } + + //--------------------------------------------------------------------- + ::ortc::IRTPTypes::PriorityTypes Helper::toNative(wrapper::org::ortc::RTCRtpPriorityType type) + { + switch (type) + { + case wrapper::org::ortc::RTCRtpPriorityType_veryLow: return ::ortc::IRTPTypes::PriorityType_VeryLow; + case wrapper::org::ortc::RTCRtpPriorityType_low: return ::ortc::IRTPTypes::PriorityType_Low; + case wrapper::org::ortc::RTCRtpPriorityType_medium: return ::ortc::IRTPTypes::PriorityType_Medium; + case wrapper::org::ortc::RTCRtpPriorityType_high: return ::ortc::IRTPTypes::PriorityType_High; + } + ZS_THROW_INVALID_ARGUMENT("type is unknown"); + return ::ortc::IRTPTypes::PriorityType_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType Helper::toWrapper(::ortc::adapter::ISessionDescriptionTypes::SignalingTypes type) + { + switch (type) + { + case ::ortc::adapter::ISessionDescriptionTypes::SignalingType_JSON: return wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_json; + case ::ortc::adapter::ISessionDescriptionTypes::SignalingType_SDPOffer: return wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_sdpOffer; + case ::ortc::adapter::ISessionDescriptionTypes::SignalingType_SDPPranswer: return wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_sdpPranswer; + case ::ortc::adapter::ISessionDescriptionTypes::SignalingType_SDPAnswer: return wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_sdpAnswer; + case ::ortc::adapter::ISessionDescriptionTypes::SignalingType_SDPRollback: return wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_sdpRollback; + } + ZS_THROW_INVALID_ARGUMENT("type is unknown"); + return toWrapper(::ortc::adapter::ISessionDescriptionTypes::SignalingType_First); + } + + //--------------------------------------------------------------------- + ::ortc::adapter::ISessionDescriptionTypes::SignalingTypes Helper::toNative(wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType type) + { + switch (type) + { + case wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_json: return ::ortc::adapter::ISessionDescriptionTypes::SignalingType_JSON; + case wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_sdpOffer: return ::ortc::adapter::ISessionDescriptionTypes::SignalingType_SDPOffer; + case wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_sdpPranswer: return ::ortc::adapter::ISessionDescriptionTypes::SignalingType_SDPPranswer; + case wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_sdpAnswer: return ::ortc::adapter::ISessionDescriptionTypes::SignalingType_SDPAnswer; + case wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType_sdpRollback: return ::ortc::adapter::ISessionDescriptionTypes::SignalingType_SDPRollback; + } + ZS_THROW_INVALID_ARGUMENT("type is unknown"); + return ::ortc::adapter::ISessionDescriptionTypes::SignalingType_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCDtlsRole Helper::toWrapper(::ortc::IDTLSTransportTypes::Roles role) + { + switch (role) + { + case ::ortc::IDTLSTransportTypes::Role_Auto: return wrapper::org::ortc::RTCDtlsRole_auto; + case ::ortc::IDTLSTransportTypes::Role_Client: return wrapper::org::ortc::RTCDtlsRole_client; + case ::ortc::IDTLSTransportTypes::Role_Server: return wrapper::org::ortc::RTCDtlsRole_server; + } + ZS_THROW_INVALID_ARGUMENT("role is unknown"); + return toWrapper(::ortc::IDTLSTransportTypes::Role_First); + } + + //--------------------------------------------------------------------- + ::ortc::IDTLSTransportTypes::Roles Helper::toNative(wrapper::org::ortc::RTCDtlsRole role) + { + switch (role) + { + case wrapper::org::ortc::RTCDtlsRole_auto: return ::ortc::IDTLSTransportTypes::Role_Auto; + case wrapper::org::ortc::RTCDtlsRole_client: return ::ortc::IDTLSTransportTypes::Role_Client; + case wrapper::org::ortc::RTCDtlsRole_server: return ::ortc::IDTLSTransportTypes::Role_Server; + } + ZS_THROW_INVALID_ARGUMENT("role is unknown"); + return ::ortc::IDTLSTransportTypes::Role_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::RTCDtlsTransportState Helper::toWrapper(::ortc::IDTLSTransportTypes::States state) + { + switch (state) + { + case ::ortc::IDTLSTransportTypes::State_New: return wrapper::org::ortc::RTCDtlsTransportState_new; + case ::ortc::IDTLSTransportTypes::State_Connecting: return wrapper::org::ortc::RTCDtlsTransportState_connecting; + case ::ortc::IDTLSTransportTypes::State_Connected: return wrapper::org::ortc::RTCDtlsTransportState_connected; + case ::ortc::IDTLSTransportTypes::State_Closed: return wrapper::org::ortc::RTCDtlsTransportState_closed; + case ::ortc::IDTLSTransportTypes::State_Failed: return wrapper::org::ortc::RTCDtlsTransportState_failed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return toWrapper(::ortc::IDTLSTransportTypes::State_First); + } + + //--------------------------------------------------------------------- + ::ortc::IDTLSTransportTypes::States Helper::toNative(wrapper::org::ortc::RTCDtlsTransportState state) + { + switch (state) + { + case wrapper::org::ortc::RTCDtlsTransportState_new: return ::ortc::IDTLSTransportTypes::State_New; + case wrapper::org::ortc::RTCDtlsTransportState_connecting: return ::ortc::IDTLSTransportTypes::State_Connecting; + case wrapper::org::ortc::RTCDtlsTransportState_connected: return ::ortc::IDTLSTransportTypes::State_Connected; + case wrapper::org::ortc::RTCDtlsTransportState_closed: return ::ortc::IDTLSTransportTypes::State_Closed; + case wrapper::org::ortc::RTCDtlsTransportState_failed: return ::ortc::IDTLSTransportTypes::State_Failed; + } + ZS_THROW_INVALID_ARGUMENT("role is unknown"); + return ::ortc::IDTLSTransportTypes::State_First; + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection Helper::toWrapper(::ortc::adapter::ISessionDescriptionTypes::MediaDirections direction) + { + switch (direction) + { + case ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_SendReceive: return wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection_sendReceive; + case ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_SendOnly: return wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection_sendOnly; + case ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_ReceiveOnly: return wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection_receiveOnly; + case ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_Inactive: return wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection_inactive; + } + ZS_THROW_INVALID_ARGUMENT("direction is unknown"); + return toWrapper(::ortc::adapter::ISessionDescriptionTypes::MediaDirection_First); + } + + //--------------------------------------------------------------------- + ::ortc::adapter::ISessionDescriptionTypes::MediaDirections Helper::toNative(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection direction) + { + switch (direction) + { + case wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection_sendReceive: return ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_SendReceive; + case wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection_sendOnly: return ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_SendOnly; + case wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection_receiveOnly: return ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_ReceiveOnly; + case wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection_inactive: return ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_Inactive; + } + ZS_THROW_INVALID_ARGUMENT("direction is unknown"); + return ::ortc::adapter::ISessionDescriptionTypes::MediaDirection_First; + } //--------------------------------------------------------------------- Helper::WrapperMediaStreamTrackListPtr Helper::toWrapper(MediaStreamTrackListPtr tracks) @@ -25,7 +758,7 @@ namespace wrapper { auto result = make_shared(); for (auto iter = tracks->begin(); iter != tracks->end(); ++iter) { - auto native = wrapper::impl::org::ortc::MediaStreamTrack::createFromNative(*iter); + auto native = wrapper::impl::org::ortc::MediaStreamTrack::toWrapper(*iter); if (!native) continue; result->push_back(native); } @@ -47,6 +780,54 @@ namespace wrapper { return result; } + //--------------------------------------------------------------------- + PromisePtr Helper::toWrapper(PromisePtr promise) + { + if (!promise) return promise; + + auto result = Promise::create(getGuiQueue()); + + promise->thenClosure([promise, result] { + if (promise->isRejected()) { + reject(promise, result); + return; + } + + result->resolve(); + }); + return result; + } + + //--------------------------------------------------------------------- + void Helper::reject( + PromisePtr nativePromise, + PromisePtr wrapperPromise + ) + { + { + auto reason = nativePromise->reason<::ortc::ErrorAny>(); + if (reason) { + auto wrapper = Error::toWrapper(reason); + auto holder = make_shared< AnyHolder >(); + holder->value_ = wrapper; + wrapperPromise->reject(holder); + return; + } + } + { + auto reason = nativePromise->reason<::ortc::IMediaStreamTrackTypes::OverconstrainedError>(); + if (reason) { + auto wrapper = OverconstrainedError::toWrapper(reason); + auto holder = make_shared< AnyHolder >(); + holder->value_ = wrapper; + wrapperPromise->reject(holder); + return; + } + } + wrapperPromise->reject(); + return; + } + //--------------------------------------------------------------------- Helper::PromiseWithStatsReportPtr Helper::getStats(IStatsProviderPtr native, wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { @@ -56,20 +837,21 @@ namespace wrapper { auto value = wrapper::impl::org::ortc::RTCStatsTypeSet::toNative(statTypes); ZS_THROW_INVALID_ARGUMENT_IF(!value); - auto result = native->getStats(*value); - if (!result) return PromiseWithStatsReportPtr(); + auto promise = native->getStats(*value); + if (!promise) return PromiseWithStatsReportPtr(); - auto promise = PromiseWithStatsReport::create(); + auto result = PromiseWithStatsReport::create(); - result->thenClosure([promise, result]() + promise->thenClosure([result, promise]() { - if (result->isRejected()) + if (promise->isRejected()) { - promise->reject(); + result->reject(); return; } - promise->resolve(wrapper::impl::org::ortc::RTCStatsReport::createFromNative(result->value())); + result->resolve(wrapper::impl::org::ortc::RTCStatsReport::toWrapper(promise->value())); }); + return result; } } // namespace ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.h b/ortc/idl/wrapper/impl_org_ortc_Helper.h index 99a6b7f1..fc07f6e7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.h +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.h @@ -5,7 +5,16 @@ #include "types.h" #include "generated/org_ortc_Json.h" +#include #include +#include +#include +#include +#include +#include + +#include +#include namespace wrapper { namespace impl { @@ -17,6 +26,7 @@ namespace wrapper { typedef PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > PromiseWithStatsReport; ZS_DECLARE_PTR(PromiseWithStatsReport); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes, IMediaStreamTrackTypes); ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsProvider, IStatsProvider); typedef list< ::ortc::IMediaStreamTrackPtr > MediaStreamTrackList; @@ -25,11 +35,102 @@ namespace wrapper { typedef list< wrapper::org::ortc::MediaStreamTrackPtr > WrapperMediaStreamTrackList; ZS_DECLARE_PTR(WrapperMediaStreamTrackList); + static zsLib::IMessageQueuePtr getGuiQueue(); + + static wrapper::org::ortc::log::Level toWrapper(zsLib::Log::Level level); + static zsLib::Log::Level toNative(wrapper::org::ortc::log::Level level); + + static const char *toNative(wrapper::org::ortc::log::Component component); + + static wrapper::org::ortc::MediaStreamTrackKind toWrapper(IMediaStreamTrackTypes::Kinds kind); + static IMediaStreamTrackTypes::Kinds toNative(wrapper::org::ortc::MediaStreamTrackKind kind); + + static wrapper::org::ortc::MediaStreamTrackState toWrapper(IMediaStreamTrackTypes::States state); + + static ::ortc::IMediaDevicesTypes::DeviceKinds toNative(wrapper::org::ortc::MediaDeviceKind kind); + static wrapper::org::ortc::MediaDeviceKind toWrapper(::ortc::IMediaDevicesTypes::DeviceKinds kind); + + static ::ortc::IStatsReportTypes::StatsTypes toNative(wrapper::org::ortc::RTCStatsType type); + static wrapper::org::ortc::RTCStatsType toWrapper(::ortc::IStatsReportTypes::StatsTypes type); + + static wrapper::org::ortc::RTCSctpTransportState toWrapper(::ortc::ISCTPTransportTypes::States state); + static wrapper::org::ortc::RTCDataChannelState toWrapper(::ortc::IDataChannelTypes::States state); + + static wrapper::org::ortc::RTCIceCandidatePairState toWrapper(::ortc::IStatsReportTypes::StatsICECandidatePairStates state); + + static wrapper::org::ortc::adapter::RTCPeerConnectionSignalingMode toWrapper(::ortc::adapter::IPeerConnectionTypes::SignalingModes mode); + static ::ortc::adapter::IPeerConnectionTypes::SignalingModes toNative(wrapper::org::ortc::adapter::RTCPeerConnectionSignalingMode mode); + + static wrapper::org::ortc::adapter::RTCRtcpMuxPolicy toWrapper(::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicies policy); + static ::ortc::adapter::IPeerConnectionTypes::RTCPMuxPolicies toNative(wrapper::org::ortc::adapter::RTCRtcpMuxPolicy policy); + + static wrapper::org::ortc::adapter::RTCBundlePolicy toWrapper(::ortc::adapter::IPeerConnectionTypes::BundlePolicies policy); + static ::ortc::adapter::IPeerConnectionTypes::BundlePolicies toNative(wrapper::org::ortc::adapter::RTCBundlePolicy policy); + + static wrapper::org::ortc::RTCIceGatherFilterPolicy toWrapper(::ortc::IICEGathererTypes::FilterPolicies policy); + static ::ortc::IICEGathererTypes::FilterPolicies toNative(wrapper::org::ortc::RTCIceGatherFilterPolicy policy); + + static wrapper::org::ortc::RTCIceCredentialType toWrapper(::ortc::IICEGathererTypes::CredentialTypes policy); + static ::ortc::IICEGathererTypes::CredentialTypes toNative(wrapper::org::ortc::RTCIceCredentialType policy); + + static wrapper::org::ortc::RTCIceGathererState toWrapper(::ortc::IICEGathererTypes::States state); + static ::ortc::IICEGathererTypes::States toNative(wrapper::org::ortc::RTCIceGathererState state); + + static wrapper::org::ortc::RTCIceComponent toWrapper(::ortc::IICETypes::Components component); + static wrapper::org::ortc::RTCIceProtocol toWrapper(::ortc::IICETypes::Protocols protocol); + static wrapper::org::ortc::RTCIceCandidateType toWrapper(::ortc::IICETypes::CandidateTypes type); + static wrapper::org::ortc::RTCIceTcpCandidateType toWrapper(::ortc::IICETypes::TCPCandidateTypes type); + + static wrapper::org::ortc::RTCIceTransportState toWrapper(::ortc::IICETransportTypes::States state); + static ::ortc::IICETransportTypes::States toNative(wrapper::org::ortc::RTCIceTransportState state); + + static wrapper::org::ortc::RTCIceRole toWrapper(::ortc::IICETypes::Roles role); + static ::ortc::IICETypes::Roles toNative(wrapper::org::ortc::RTCIceRole role); + + static wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal toWrapper(::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signals signal); + static ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Signals toNative(wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsSignal signal); + + static wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication toWrapper(::ortc::IRTPTypes::OpusCodecCapabilityOptions::Applications application); + static ::ortc::IRTPTypes::OpusCodecCapabilityOptions::Applications toNative(wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsApplication application); + + static wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP toWrapper(::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToPs top); + static ::ortc::IRTPTypes::FlexFECCodecCapabilityParameters::ToPs toNative(wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersToP top); + + static wrapper::org::ortc::RTCRtpDegradationPreference toWrapper(::ortc::IRTPTypes::DegradationPreferences preference); + static ::ortc::IRTPTypes::DegradationPreferences toNative(wrapper::org::ortc::RTCRtpDegradationPreference preference); + + static wrapper::org::ortc::RTCRtpPriorityType toWrapper(::ortc::IRTPTypes::PriorityTypes type); + static ::ortc::IRTPTypes::PriorityTypes toNative(wrapper::org::ortc::RTCRtpPriorityType type); + + static wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType toWrapper(::ortc::adapter::ISessionDescriptionTypes::SignalingTypes type); + static ::ortc::adapter::ISessionDescriptionTypes::SignalingTypes toNative(wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType type); + + static wrapper::org::ortc::RTCDtlsRole toWrapper(::ortc::IDTLSTransportTypes::Roles role); + static ::ortc::IDTLSTransportTypes::Roles toNative(wrapper::org::ortc::RTCDtlsRole role); + + static wrapper::org::ortc::RTCDtlsTransportState toWrapper(::ortc::IDTLSTransportTypes::States state); + static ::ortc::IDTLSTransportTypes::States toNative(wrapper::org::ortc::RTCDtlsTransportState state); + + static wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection toWrapper(::ortc::adapter::ISessionDescriptionTypes::MediaDirections direction); + static ::ortc::adapter::ISessionDescriptionTypes::MediaDirections toNative(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaDirection direction); + static WrapperMediaStreamTrackListPtr toWrapper(MediaStreamTrackListPtr tracks); static MediaStreamTrackListPtr toNative(WrapperMediaStreamTrackListPtr tracks); + static PromisePtr toWrapper(PromisePtr promise); + static void reject( + PromisePtr nativePromise, + PromisePtr wrapperPromise + ); + static PromiseWithStatsReportPtr getStats(IStatsProviderPtr native, wrapper::org::ortc::RTCStatsTypeSetPtr statTypes); + template + static void optionalSafeIntConvert(const optionalType1 &inputType, optionalType2 &outputType) + { + outputType = inputType.hasValue() ? optionalType2(SafeInt(inputType.value())) : optionalType2(); + } + }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_Json.cpp b/ortc/idl/wrapper/impl_org_ortc_Json.cpp index 60a605b8..b713d563 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Json.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Json.cpp @@ -2,6 +2,8 @@ #include "impl_org_ortc_Json.h" +#include + using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; @@ -20,6 +22,8 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(zsLib::eventing::IHelper, UseHelper); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::Json::Json() { @@ -41,13 +45,30 @@ wrapper::impl::org::ortc::Json::~Json() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::Json::wrapper_init_org_ortc_Json(String jsonString) { + native_ = UseHelper::toJSON(jsonString); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::Json::toString() { - String result {}; - return result; + if (!native_) return String(); + return UseHelper::toString(native_); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::JsonPtr wrapper::impl::org::ortc::Json::toWrapper(zsLib::XML::ElementPtr rootEl) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = rootEl; + return pThis; +} +//------------------------------------------------------------------------------ +zsLib::XML::ElementPtr wrapper::impl::org::ortc::Json::toNative(wrapper::org::ortc::JsonPtr wrapper) +{ + if (!wrapper) return zsLib::XML::ElementPtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return zsLib::XML::ElementPtr(); + return result->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_Json.h b/ortc/idl/wrapper/impl_org_ortc_Json.h index a8bae18f..3293eb17 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Json.h +++ b/ortc/idl/wrapper/impl_org_ortc_Json.h @@ -5,6 +5,7 @@ #include "types.h" #include "generated/org_ortc_Json.h" +#include namespace wrapper { namespace impl { @@ -14,6 +15,7 @@ namespace wrapper { struct Json : public wrapper::org::ortc::Json { JsonWeakPtr thisWeak_; + zsLib::XML::ElementPtr native_; Json(); virtual ~Json(); @@ -21,6 +23,9 @@ namespace wrapper { // methods Json virtual void wrapper_init_org_ortc_Json(String jsonString) override; virtual String toString() override; + + static JsonPtr toWrapper(zsLib::XML::ElementPtr rootEl); + static zsLib::XML::ElementPtr toNative(wrapper::org::ortc::JsonPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp index 2ebb8666..28d18643 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_Logger.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,14 @@ using ::std::list; using ::std::set; using ::std::map; +#include + +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +using namespace wrapper::impl::org::ortc; + +ZS_DECLARE_TYPEDEF_PTR(::ortc::services::ILogger, UseLogger); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::Logger::~Logger() { @@ -28,6 +36,7 @@ wrapper::impl::org::ortc::Logger::~Logger() //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::setDefaultLogLevel(wrapper::org::ortc::log::Level level) { + UseLogger::setLogLevel(Helper::toNative(level)); } //------------------------------------------------------------------------------ @@ -36,6 +45,7 @@ void wrapper::org::ortc::Logger::setLogLevel( wrapper::org::ortc::log::Level level ) { + UseLogger::setLogLevel(Helper::toNative(component), Helper::toNative(level)); } //------------------------------------------------------------------------------ @@ -44,11 +54,13 @@ void wrapper::org::ortc::Logger::setLogLevel( wrapper::org::ortc::log::Level level ) { + UseLogger::setLogLevel(component, Helper::toNative(level)); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::installStdOutLogger(bool colorizeOutput) { + UseLogger::installStdOutLogger(colorizeOutput); } //------------------------------------------------------------------------------ @@ -57,6 +69,7 @@ void wrapper::org::ortc::Logger::installFileLogger( bool colorizeOutput ) { + UseLogger::installFileLogger(fileName, colorizeOutput); } //------------------------------------------------------------------------------ @@ -66,6 +79,7 @@ void wrapper::org::ortc::Logger::installTelnetLogger( bool colorizeOutput ) { + UseLogger::installTelnetLogger(listenPort, maxWaitForSocketToBeAvailable, colorizeOutput); } //------------------------------------------------------------------------------ @@ -75,62 +89,67 @@ void wrapper::org::ortc::Logger::installOutgoingTelnetLogger( String sendStringUponConnection ) { + UseLogger::installOutgoingTelnetLogger(serverHostWithPort, colorizeOutput, sendStringUponConnection); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::installDebuggerLogger() { + UseLogger::installDebuggerLogger(); } //------------------------------------------------------------------------------ bool wrapper::org::ortc::Logger::isTelnetLoggerListening() { - bool result {}; - return result; + return UseLogger::isTelnetLoggerListening(); } //------------------------------------------------------------------------------ bool wrapper::org::ortc::Logger::isTelnetLoggerConnected() { - bool result {}; - return result; + return UseLogger::isTelnetLoggerConnected(); } //------------------------------------------------------------------------------ bool wrapper::org::ortc::Logger::isOutgoingTelnetLoggerConnected() { - bool result {}; - return result; + return UseLogger::isOutgoingTelnetLoggerConnected(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::uninstallStdOutLogger() { + UseLogger::uninstallStdOutLogger(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::uninstallFileLogger() { + UseLogger::uninstallFileLogger(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::uninstallTelnetLogger() { + UseLogger::uninstallTelnetLogger(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::uninstallOutgoingTelnetLogger() { + UseLogger::uninstallOutgoingTelnetLogger(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::uninstallDebuggerLogger() { + UseLogger::uninstallDebuggerLogger(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::setDefaultEventingLevel(wrapper::org::ortc::log::Level level) { + UseLogger::setEventingLevel(Helper::toNative(level)); } //------------------------------------------------------------------------------ @@ -139,6 +158,7 @@ void wrapper::org::ortc::Logger::setEventingLevel( wrapper::org::ortc::log::Level level ) { + UseLogger::setEventingLevel(Helper::toNative(component), Helper::toNative(level)); } //------------------------------------------------------------------------------ @@ -147,6 +167,7 @@ void wrapper::org::ortc::Logger::setEventingLevel( wrapper::org::ortc::log::Level level ) { + UseLogger::setEventingLevel(component, Helper::toNative(level)); } //------------------------------------------------------------------------------ @@ -156,6 +177,7 @@ void wrapper::org::ortc::Logger::installEventingListener( ::zsLib::Seconds maxWaitForSocketToBeAvailable ) { + UseLogger::installEventingListener(listenPort, sharedSecret, maxWaitForSocketToBeAvailable); } //------------------------------------------------------------------------------ @@ -164,16 +186,17 @@ void wrapper::org::ortc::Logger::connectToEventingServer( String serverHostWithPort ) { + UseLogger::connectToEventingServer(serverHostWithPort, sharedSecret); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::uninstallEventingListener() { + UseLogger::uninstallEventingListener(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::disconnectEventingServer() { + UseLogger::disconnectEventingServer(); } - - diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.h b/ortc/idl/wrapper/impl_org_ortc_Logger.h index 8bf7e09e..bf4bcc35 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Logger.h +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.h @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #pragma once diff --git a/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp b/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp index 4f7bbba5..01a25fdf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_LongRange.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_LongRange.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,6 +46,7 @@ void wrapper::impl::org::ortc::LongRange::wrapper_init_org_ortc_LongRange() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::LongRange::wrapper_init_org_ortc_LongRange(long value) { + min = max = value; } //------------------------------------------------------------------------------ @@ -54,25 +55,64 @@ void wrapper::impl::org::ortc::LongRange::wrapper_init_org_ortc_LongRange( long max ) { + this->min = min; + this->max = max; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::LongRange::wrapper_init_org_ortc_LongRange(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::LongRangePtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::LongRangePtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::LongRange::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("LongRange")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::LongRange::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::LongRangePtr wrapper::impl::org::ortc::LongRange::toWrapper(NativeCapabilityLongPtr native) +{ + if (!native) return LongRangePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::LongRangePtr wrapper::impl::org::ortc::LongRange::toWrapper(const NativeCapabilityLong &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->min = native.mMin; + pThis->max = native.mMax; + + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::LongRange::NativeCapabilityLongPtr wrapper::impl::org::ortc::LongRange::toNative(wrapper::org::ortc::LongRangePtr wrapper) +{ + if (!wrapper) return NativeCapabilityLongPtr(); + + auto result = make_shared(); + result->mMin = wrapper->min; + result->mMax = wrapper->max; + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_LongRange.h b/ortc/idl/wrapper/impl_org_ortc_LongRange.h index 9b49f1f8..5482b432 100644 --- a/ortc/idl/wrapper/impl_org_ortc_LongRange.h +++ b/ortc/idl/wrapper/impl_org_ortc_LongRange.h @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #pragma once @@ -6,6 +5,8 @@ #include "generated/org_ortc_LongRange.h" +#include + namespace wrapper { namespace impl { namespace org { @@ -13,6 +14,7 @@ namespace wrapper { struct LongRange : public wrapper::org::ortc::LongRange { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ICapabilities::CapabilityLong, NativeCapabilityLong); LongRangeWeakPtr thisWeak_; LongRange(); @@ -28,6 +30,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_LongRange(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static LongRangePtr toWrapper(NativeCapabilityLongPtr native); + static LongRangePtr toWrapper(const NativeCapabilityLong &native); + static NativeCapabilityLongPtr toNative(wrapper::org::ortc::LongRangePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp index 0b1df7fa..c14021a0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaDeviceInfo.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaDeviceInfo::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaDeviceInfo::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaDeviceInfo::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::MediaDeviceInfo::MediaDeviceInfo() { @@ -46,25 +51,64 @@ void wrapper::impl::org::ortc::MediaDeviceInfo::wrapper_init_org_ortc_MediaDevic //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaDeviceInfo::wrapper_init_org_ortc_MediaDeviceInfo(wrapper::org::ortc::MediaDeviceInfoPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaDeviceInfo::wrapper_init_org_ortc_MediaDeviceInfo(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaDeviceInfo::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaDeviceInfo::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->kind = Helper::toWrapper(native.mKind); + pThis->label = native.mLabel; + pThis->deviceId = native.mDeviceID; + pThis->groupId = native.mGroupID; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mKind = Helper::toNative(wrapper->kind); + result->mLabel = wrapper->label; + result->mDeviceID = wrapper->deviceId; + result->mGroupID = wrapper->groupId; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h index 851497c5..2bf22cdb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaDeviceInfo.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct MediaDeviceInfo : public wrapper::org::ortc::MediaDeviceInfo { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaDevicesTypes::Device, NativeType); + ZS_DECLARE_TYPEDEF_PTR(MediaDeviceInfo, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::MediaDeviceInfo, WrapperType); MediaDeviceInfoWeakPtr thisWeak_; MediaDeviceInfo(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_MediaDeviceInfo(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp index afb3a69a..5cf7416d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp @@ -1,6 +1,13 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaDevices.h" +#include "impl_org_ortc_MediaStreamConstraints.h" +#include "impl_org_ortc_MediaStreamTrack.h" +#include "impl_org_ortc_MediaDeviceInfo.h" +#include "impl_org_ortc_MediaTrackSupportedConstraints.h" +#include "impl_org_ortc_Helper.h" + + +#include using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +27,11 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaDevices::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaDevices::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaDevices::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaDevices::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::MediaDevices::MediaDevices() { @@ -41,34 +53,100 @@ wrapper::impl::org::ortc::MediaDevices::~MediaDevices() //------------------------------------------------------------------------------ wrapper::org::ortc::MediaTrackSupportedConstraintsPtr wrapper::org::ortc::MediaDevices::getSupportedConstraints() { - wrapper::org::ortc::MediaTrackSupportedConstraintsPtr result {}; - return result; + return wrapper::impl::org::ortc::MediaTrackSupportedConstraints::toWrapper(NativeType::getSupportedConstraints()); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > wrapper::org::ortc::MediaDevices::enumerateDevices() { - shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > > > result {}; + ZS_DECLARE_TYPEDEF_PTR(PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaDeviceInfoPtr > > >, PromiseWithType); + + auto promise = NativeType::enumerateDevices(); + + auto result = PromiseWithType::create(wrapper::impl::org::ortc::Helper::getGuiQueue()); + + promise->thenClosure([promise, result] { + if (promise->isRejected()) { + wrapper::impl::org::ortc::Helper::reject(promise, result); + return; + } + auto wrapperList = make_shared< list< wrapper::org::ortc::MediaDeviceInfoPtr > >(); + auto nativeList = promise->value(); + for (auto iter = nativeList->begin(); iter != nativeList->end(); ++iter) { + auto wrapper = wrapper::impl::org::ortc::MediaDeviceInfo::toWrapper(*iter); + if (!wrapper) continue; + wrapperList->push_back(wrapper); + } + + result->resolve(wrapperList); + }); + return result; } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > wrapper::org::ortc::MediaDevices::getUserMedia(wrapper::org::ortc::MediaStreamConstraintsPtr constraints) { - shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > > > result {}; + ZS_DECLARE_TYPEDEF_PTR(PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > >, PromiseWithType); + + auto native = wrapper::impl::org::ortc::MediaStreamConstraints::toNative(constraints); + if (!native) return PromiseWithType::createRejected(wrapper::impl::org::ortc::Helper::getGuiQueue()); + auto promise = NativeType::getUserMedia(*native); + + auto result = PromiseWithType::create(wrapper::impl::org::ortc::Helper::getGuiQueue()); + + promise->thenClosure([promise, result] { + if (promise->isRejected()) { + wrapper::impl::org::ortc::Helper::reject(promise, result); + return; + } + auto wrapperList = make_shared< list< wrapper::org::ortc::MediaStreamTrackPtr > >(); + auto nativeList = promise->value(); + for (auto iter = nativeList->begin(); iter != nativeList->end(); ++iter) { + auto wrapper = wrapper::impl::org::ortc::MediaStreamTrack::toWrapper(*iter); + if (!wrapper) continue; + wrapperList->push_back(wrapper); + } + + result->resolve(wrapperList); + }); + return result; } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaDevicesPtr wrapper::org::ortc::MediaDevices::get_singleton() { - wrapper::org::ortc::MediaDevicesPtr result {}; + zsLib::AutoRecursiveLock lock(*zsLib::IHelper::getGlobalLock()); + static zsLib::SingletonLazySharedPtr singleton(wrapper_create()); + auto result = singleton.singleton(); return result; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaDevices::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onMediaDevicesChanged() +{ + onDeviceChange(); } +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = ::ortc::IMediaDevices::subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h index fad0e845..d1792fbd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h @@ -1,24 +1,39 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaDevices.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct MediaDevices : public wrapper::org::ortc::MediaDevices + struct MediaDevices : public wrapper::org::ortc::MediaDevices, + public ::ortc::IMediaDevicesDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaDevices, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaDevices, IMediaDevices); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaDevicesSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(MediaDevices, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::MediaDevices, WrapperType); MediaDevicesWeakPtr thisWeak_; + //NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; MediaDevices(); virtual ~MediaDevices(); virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onMediaDevicesChanged(); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp index 72f02eac..3b39982a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp @@ -46,20 +46,31 @@ void wrapper::impl::org::ortc::MediaSource::wrapper_init_org_ortc_MediaSource() //------------------------------------------------------------------------------ AnyPtr wrapper::impl::org::ortc::MediaSource::get_source() { - AnyPtr result {}; - return result; + zsLib::AutoLock lock(lock_); + return source_; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaSource::set_source(AnyPtr value) { + zsLib::AutoLock lock(lock_); + source_ = value; } //------------------------------------------------------------------------------ AnyPtr wrapper::impl::org::ortc::MediaSource::get_track() { - AnyPtr result {}; - return result; + auto holder = make_shared< AnyHolder >(); + holder->value_ = track_; + return holder; } - +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaSourcePtr wrapper::impl::org::ortc::MediaSource::createWithTrack(MediaStreamTrackPtr track) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->track_ = track; + pThis->wrapper_init_org_ortc_MediaSource(); + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.h b/ortc/idl/wrapper/impl_org_ortc_MediaSource.h index 7f93e49e..49fce987 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaSource.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.h @@ -14,6 +14,10 @@ namespace wrapper { struct MediaSource : public wrapper::org::ortc::MediaSource { MediaSourceWeakPtr thisWeak_; + MediaStreamTrackPtr track_; + + zsLib::Lock lock_; + AnyPtr source_; MediaSource(); virtual ~MediaSource(); @@ -23,6 +27,8 @@ namespace wrapper { virtual AnyPtr get_source() override; virtual void set_source(AnyPtr value) override; virtual AnyPtr get_track() override; + + static MediaSourcePtr createWithTrack(MediaStreamTrackPtr track); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp index 6f8aa0c3..d2c4a1fc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaStreamConstraints.h" +#include "impl_org_ortc_MediaTrackConstraints.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamConstraints::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamConstraints::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamConstraints::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::MediaStreamConstraints::MediaStreamConstraints() { @@ -46,18 +51,28 @@ void wrapper::impl::org::ortc::MediaStreamConstraints::wrapper_init_org_ortc_Med //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaStreamConstraints::wrapper_init_org_ortc_MediaStreamConstraints(wrapper::org::ortc::MediaStreamConstraintsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaStreamConstraints::wrapper_init_org_ortc_MediaStreamConstraints(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaStreamConstraints::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ @@ -67,4 +82,42 @@ String wrapper::impl::org::ortc::MediaStreamConstraints::hash() return result; } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + if (native.mAudio) { + pThis->audio = MediaTrackConstraints::toWrapper(native.mAudio); + } + if (native.mVideo) { + pThis->video = MediaTrackConstraints::toWrapper(native.mVideo); + } + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + if (wrapper->audio.hasValue()) { + if (wrapper->audio.value()) { + result->mAudio = MediaTrackConstraints::toNative(wrapper->audio.value()); + } + } + if (wrapper->video.hasValue()) { + if (wrapper->video.value()) { + result->mVideo = MediaTrackConstraints::toNative(wrapper->video.value()); + } + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h index 3d37c731..eb15a1bf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaStreamConstraints.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct MediaStreamConstraints : public wrapper::org::ortc::MediaStreamConstraints { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes::Constraints, NativeType); + ZS_DECLARE_TYPEDEF_PTR(MediaStreamConstraints, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::MediaStreamConstraints, WrapperType); MediaStreamConstraintsWeakPtr thisWeak_; MediaStreamConstraints(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_MediaStreamConstraints(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp index 1d6060a2..8a905bf6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp @@ -1,6 +1,12 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaStreamTrack.h" +#include "impl_org_ortc_MediaTrackCapabilities.h" +#include "impl_org_ortc_MediaTrackConstraints.h" +#include "impl_org_ortc_MediaTrackSettings.h" +#include "impl_org_ortc_MediaSource.h" +#include "impl_org_ortc_OverconstrainedError.h" +#include "impl_org_ortc_OverconstrainedErrorEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +26,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamTrack::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamTrack::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamTrack::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamTrack::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::MediaStreamTrack::MediaStreamTrack() { @@ -41,126 +54,186 @@ wrapper::impl::org::ortc::MediaStreamTrack::~MediaStreamTrack() //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::MediaStreamTrack::clone() { - wrapper::org::ortc::MediaStreamTrackPtr result {}; - return result; + return toWrapper(native_->clone()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaStreamTrack::stop() { + return native_->stop(); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaTrackCapabilitiesPtr wrapper::impl::org::ortc::MediaStreamTrack::getCapabilities() { - wrapper::org::ortc::MediaTrackCapabilitiesPtr result {}; - return result; + return MediaTrackCapabilities::toWrapper(native_->getCapabilities()); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaTrackConstraintsPtr wrapper::impl::org::ortc::MediaStreamTrack::getConstraints() { - wrapper::org::ortc::MediaTrackConstraintsPtr result {}; - return result; + return MediaTrackConstraints::toWrapper(native_->getConstraints()); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaTrackSettingsPtr wrapper::impl::org::ortc::MediaStreamTrack::getSettings() { - wrapper::org::ortc::MediaTrackSettingsPtr result {}; - return result; + return MediaTrackSettings::toWrapper(native_->getSettings()); } //------------------------------------------------------------------------------ PromisePtr wrapper::impl::org::ortc::MediaStreamTrack::applyConstraints(wrapper::org::ortc::MediaTrackConstraintsPtr constraints) { - PromisePtr result {}; - return result; + ZS_THROW_INVALID_ARGUMENT_IF(!constraints); + + return Helper::toWrapper(native_->applyConstraints(*MediaTrackConstraints::toNative(constraints))); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::MediaStreamTrack::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackKind wrapper::impl::org::ortc::MediaStreamTrack::get_kind() { - wrapper::org::ortc::MediaStreamTrackKind result {}; - return result; + return Helper::toWrapper(native_->kind()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaStreamTrack::get_id() { - String result {}; - return result; + return native_->id(); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaStreamTrack::get_deviceId() { - String result {}; - return result; + return native_->deviceID(); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaStreamTrack::get_label() { - String result {}; - return result; + return native_->label(); } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::MediaStreamTrack::get_enabled() { - bool result {}; - return result; + return native_->enabled(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaStreamTrack::set_enabled(bool value) { + native_->enabled(value); } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::MediaStreamTrack::get_muted() { - bool result {}; - return result; + return native_->muted(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaStreamTrack::set_muted(bool value) { + native_->muted(value); } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::MediaStreamTrack::get_remote() { - bool result {}; - return result; + return native_->remote(); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackState wrapper::impl::org::ortc::MediaStreamTrack::get_readyState() { - wrapper::org::ortc::MediaStreamTrackState result {}; - return result; + return Helper::toWrapper(native_->readyState()); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaSourcePtr wrapper::impl::org::ortc::MediaStreamTrack::get_source() { - wrapper::org::ortc::MediaSourcePtr result {}; - return result; + zsLib::AutoLock lock(lock_); + if (mediaSource_) return mediaSource_; + + mediaSource_ = MediaSource::createWithTrack(thisWeak_.lock()); + return mediaSource_; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaStreamTrack::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamTrack::onMediaStreamTrackMute( + IMediaStreamTrackPtr track, + bool isMuted + ) +{ + if (isMuted) { + onMute(); + } else { + onUnmute(); + } +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamTrack::onMediaStreamTrackEnded(IMediaStreamTrackPtr track) +{ + onEnded(); +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::MediaStreamTrack::onMediaStreamTrackOverConstrained( + IMediaStreamTrackPtr track, + OverconstrainedErrorPtr error + ) +{ + onOverConstrained(OverconstrainedErrorEvent::toWrapper(wrapper::impl::org::ortc::OverconstrainedError::toWrapper(error))); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h index be496102..b4a1b0d2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h @@ -1,19 +1,32 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaStreamTrack.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct MediaStreamTrack : public wrapper::org::ortc::MediaStreamTrack + struct MediaStreamTrack : public wrapper::org::ortc::MediaStreamTrack, + public ::ortc::IMediaStreamTrackDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrack, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrack, IMediaStreamTrack); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(MediaStreamTrack, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::MediaStreamTrack, WrapperType); + MediaStreamTrackWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_ {true}; + NativeTypeSubscriptionPtr subscription_; + MediaSourcePtr mediaSource_; MediaStreamTrack(); virtual ~MediaStreamTrack(); @@ -41,8 +54,26 @@ namespace wrapper { virtual wrapper::org::ortc::MediaSourcePtr get_source() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + // IMediaStreamTrackDelegate + virtual void onMediaStreamTrackMute( + IMediaStreamTrackPtr track, + bool isMuted + ) override; + + virtual void onMediaStreamTrackEnded(IMediaStreamTrackPtr track) override; + virtual void onMediaStreamTrackOverConstrained( + IMediaStreamTrackPtr track, + OverconstrainedErrorPtr error + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; + } // ortc } // org } // namespace impl diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp index f312e71a..cc95001d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaTrackCapabilities.h" +#include "impl_org_ortc_LongRange.h" +#include "impl_org_ortc_DoubleRange.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +48,165 @@ void wrapper::impl::org::ortc::MediaTrackCapabilities::wrapper_init_org_ortc_Med //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackCapabilities::wrapper_init_org_ortc_MediaTrackCapabilities(wrapper::org::ortc::MediaTrackCapabilitiesPtr source) { + wrapper::org::ortc::MediaTrackCapabilitiesPtr pThis = thisWeak_.lock(); + wrapper::org::ortc::MediaTrackCapabilitiesPtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackCapabilities::wrapper_init_org_ortc_MediaTrackCapabilities(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + wrapper::org::ortc::MediaTrackCapabilitiesPtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + wrapper::org::ortc::MediaTrackCapabilitiesPtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackCapabilities::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaTrackCapabilities::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackCapabilitiesPtr wrapper::impl::org::ortc::MediaTrackCapabilities::toWrapper(NativeCapabilitiesPtr native) +{ + if (!native) return MediaTrackCapabilitiesPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackCapabilitiesPtr wrapper::impl::org::ortc::MediaTrackCapabilities::toWrapper(const NativeCapabilities &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + if (native.mWidth.hasValue()) { + pThis->width = LongRange::toWrapper(native.mWidth.value()); + } + if (native.mHeight.hasValue()) { + pThis->height = LongRange::toWrapper(native.mHeight.value()); + } + if (native.mAspectRatio.hasValue()) { + pThis->aspectRatio = DoubleRange::toWrapper(native.mAspectRatio.value()); + } + if (native.mFrameRate.hasValue()) { + pThis->frameRate = DoubleRange::toWrapper(native.mFrameRate.value()); + } + if (native.mFacingMode.hasValue()) { + pThis->facingMode = make_shared< list< String > >(); + for (auto iter = native.mFacingMode.value().begin(); iter != native.mFacingMode.value().end(); ++iter) + { + pThis->facingMode->push_back(*iter); + } + } + if (native.mVolume.hasValue()) { + pThis->volume = DoubleRange::toWrapper(native.mVolume.value()); + } + if (native.mSampleRate.hasValue()) { + pThis->sampleRate = LongRange::toWrapper(native.mSampleRate.value()); + } + if (native.mSampleSize.hasValue()) { + pThis->sampleSize = LongRange::toWrapper(native.mSampleSize.value()); + } + if (native.mEchoCancellation.hasValue()) { + pThis->echoCancellation = make_shared< list< bool > >(); + for (auto iter = native.mEchoCancellation.value().begin(); iter != native.mEchoCancellation.value().end(); ++iter) + { + pThis->echoCancellation->push_back(*iter); + } + } + if (native.mLatency.hasValue()) { + pThis->latency = DoubleRange::toWrapper(native.mLatency.value()); + } + if (native.mChannelCount.hasValue()) { + pThis->channelCount = LongRange::toWrapper(native.mChannelCount.value()); + } + pThis->deviceId = native.mDeviceID; + pThis->groupId = native.mGroupID; + + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackCapabilities::NativeCapabilitiesPtr wrapper::impl::org::ortc::MediaTrackCapabilities::toNative(wrapper::org::ortc::MediaTrackCapabilitiesPtr wrapper) +{ + if (!wrapper) return NativeCapabilitiesPtr(); + + auto native = make_shared< NativeCapabilities >(); + + if (wrapper->width.hasValue()) { + if (wrapper->width.value()) { + native->mWidth = *LongRange::toNative(wrapper->width); + } + } + if (wrapper->height.hasValue()) { + if (wrapper->height.value()) { + native->mHeight = *LongRange::toNative(wrapper->height); + } + } + if (wrapper->aspectRatio.hasValue()) { + if (wrapper->aspectRatio.value()) { + native->mAspectRatio = *DoubleRange::toNative(wrapper->aspectRatio); + } + } + if (wrapper->frameRate.hasValue()) { + if (wrapper->frameRate.value()) { + native->mFrameRate = *DoubleRange::toNative(wrapper->frameRate); + } + } + if (wrapper->facingMode) { + auto value = make_shared(); + for (auto iter = wrapper->facingMode->begin(); iter != wrapper->facingMode->end(); ++iter) { + value->insert(*iter); + } + native->mFacingMode = *value; + } + if (wrapper->volume.hasValue()) { + if (wrapper->volume.value()) { + native->mVolume = *DoubleRange::toNative(wrapper->volume); + } + } + if (wrapper->sampleRate.hasValue()) { + if (wrapper->sampleRate.value()) { + native->mSampleRate = *LongRange::toNative(wrapper->sampleRate); + } + } + if (wrapper->sampleSize.hasValue()) { + if (wrapper->sampleSize.value()) { + native->mSampleSize = *LongRange::toNative(wrapper->sampleSize); + } + } + if (wrapper->echoCancellation) { + auto value = make_shared(); + for (auto iter = wrapper->echoCancellation->begin(); iter != wrapper->echoCancellation->end(); ++iter) { + value->insert(*iter); + } + native->mEchoCancellation = *value; + } + if (wrapper->latency.hasValue()) { + if (wrapper->latency.value()) { + native->mLatency = *DoubleRange::toNative(wrapper->latency); + } + } + if (wrapper->channelCount.hasValue()) { + if (wrapper->channelCount.value()) { + native->mChannelCount = *LongRange::toNative(wrapper->channelCount); + } + } + native->mDeviceID = wrapper->deviceId; + native->mGroupID = wrapper->groupId; + + return native; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h index 801abc32..39ee9206 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaTrackCapabilities.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,10 @@ namespace wrapper { struct MediaTrackCapabilities : public wrapper::org::ortc::MediaTrackCapabilities { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes::Capabilities, NativeCapabilities); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ICapabilities::CapabilityString, NativeCapabilityString); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ICapabilities::CapabilityBoolean, NativeCapabilityBoolean); + MediaTrackCapabilitiesWeakPtr thisWeak_; MediaTrackCapabilities(); @@ -24,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_MediaTrackCapabilities(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static MediaTrackCapabilitiesPtr toWrapper(NativeCapabilitiesPtr native); + static MediaTrackCapabilitiesPtr toWrapper(const NativeCapabilities &native); + static NativeCapabilitiesPtr toNative(wrapper::org::ortc::MediaTrackCapabilitiesPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp index 1698957e..696c3ad4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp @@ -1,6 +1,10 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaTrackConstraintSet.h" +#include "impl_org_ortc_ConstrainLong.h" +#include "impl_org_ortc_ConstrainDouble.h" +#include "impl_org_ortc_ConstrainString.h" +#include "impl_org_ortc_ConstrainBoolean.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +50,94 @@ void wrapper::impl::org::ortc::MediaTrackConstraintSet::wrapper_init_org_ortc_Me //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackConstraintSet::wrapper_init_org_ortc_MediaTrackConstraintSet(wrapper::org::ortc::MediaTrackConstraintSetPtr source) { + if (!source) return; + wrapper::org::ortc::MediaTrackConstraintSetPtr pThis = thisWeak_.lock(); + + auto native = toNative(source); + if (!native) return; + + wrapper::org::ortc::MediaTrackConstraintSetPtr wrapper = toWrapper(native); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackConstraintSet::wrapper_init_org_ortc_MediaTrackConstraintSet(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::MediaTrackConstraintSetPtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::MediaTrackConstraintSetPtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackConstraintSet::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaTrackConstraintSet::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraintSetPtr wrapper::impl::org::ortc::MediaTrackConstraintSet::toWrapper(NativeConstraintSetPtr native) +{ + if (!native) return MediaTrackConstraintSetPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraintSetPtr wrapper::impl::org::ortc::MediaTrackConstraintSet::toWrapper(const NativeConstraintSet &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->width = ConstrainLong::toWrapper(native.mWidth); + pThis->height = ConstrainLong::toWrapper(native.mHeight); + pThis->aspectRatio = ConstrainDouble::toWrapper(native.mAspectRatio); + pThis->frameRate = ConstrainDouble::toWrapper(native.mFrameRate); + pThis->facingMode = ConstrainString::toWrapper(native.mFacingMode); + pThis->volume = ConstrainDouble::toWrapper(native.mVolume); + pThis->sampleRate = ConstrainLong::toWrapper(native.mSampleRate); + pThis->sampleSize = ConstrainLong::toWrapper(native.mSampleSize); + pThis->echoCancellation = ConstrainBoolean::toWrapper(native.mEchoCancellation); + pThis->latency = ConstrainDouble::toWrapper(native.mLatency); + pThis->channelCount = ConstrainLong::toWrapper(native.mChannelCount); + pThis->deviceId = ConstrainString::toWrapper(native.mDeviceID); + pThis->groupId = ConstrainString::toWrapper(native.mGroupID); + + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraintSet::NativeConstraintSetPtr wrapper::impl::org::ortc::MediaTrackConstraintSet::toNative(wrapper::org::ortc::MediaTrackConstraintSetPtr wrapper) +{ + if (!wrapper) return NativeConstraintSetPtr(); + + auto result = make_shared(); + + result->mWidth = *ConstrainLong::toNative(wrapper->width); + result->mHeight = *ConstrainLong::toNative(wrapper->height); + result->mAspectRatio = *ConstrainDouble::toNative(wrapper->aspectRatio); + result->mFrameRate = *ConstrainDouble::toNative(wrapper->frameRate); + result->mFacingMode = *ConstrainString::toNative(wrapper->facingMode); + result->mVolume = *ConstrainDouble::toNative(wrapper->volume); + result->mSampleRate = *ConstrainLong::toNative(wrapper->sampleRate); + result->mSampleSize = *ConstrainLong::toNative(wrapper->sampleSize); + result->mEchoCancellation = *ConstrainBoolean::toNative(wrapper->echoCancellation); + result->mLatency = *ConstrainDouble::toNative(wrapper->latency); + result->mChannelCount = *ConstrainLong::toNative(wrapper->channelCount); + result->mDeviceID = *ConstrainString::toNative(wrapper->deviceId); + result->mGroupID = *ConstrainString::toNative(wrapper->groupId); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h index 9acee3df..aef17194 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaTrackConstraintSet.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct MediaTrackConstraintSet : public wrapper::org::ortc::MediaTrackConstraintSet { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes::ConstraintSet, NativeConstraintSet); + MediaTrackConstraintSetWeakPtr thisWeak_; MediaTrackConstraintSet(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_MediaTrackConstraintSet(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static MediaTrackConstraintSetPtr toWrapper(NativeConstraintSetPtr native); + static MediaTrackConstraintSetPtr toWrapper(const NativeConstraintSet &native); + static NativeConstraintSetPtr toNative(wrapper::org::ortc::MediaTrackConstraintSetPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp index 84ce5ff5..ca4ba6dc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp @@ -1,6 +1,11 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaTrackConstraints.h" +#include "impl_org_ortc_MediaTrackConstraintSet.h" +#include "impl_org_ortc_ConstrainLong.h" +#include "impl_org_ortc_ConstrainDouble.h" +#include "impl_org_ortc_ConstrainString.h" +#include "impl_org_ortc_ConstrainBoolean.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,15 +46,13 @@ wrapper::impl::org::ortc::MediaTrackConstraints::~MediaTrackConstraints() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackConstraints::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaTrackConstraints::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ @@ -60,11 +63,95 @@ void wrapper::impl::org::ortc::MediaTrackConstraints::wrapper_init_org_ortc_Medi //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackConstraints::wrapper_init_org_ortc_MediaTrackConstraints(wrapper::org::ortc::MediaTrackConstraintsPtr source) { + if (!source) return; + wrapper::org::ortc::MediaTrackConstraintsPtr pThis = thisWeak_.lock(); + + auto native = toNative(source); + if (!native) return; + + wrapper::org::ortc::MediaTrackConstraintsPtr wrapper = toWrapper(native); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackConstraints::wrapper_init_org_ortc_MediaTrackConstraints(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::MediaTrackConstraintsPtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::MediaTrackConstraintsPtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraintsPtr wrapper::impl::org::ortc::MediaTrackConstraints::toWrapper(NativeTrackConstraintsPtr native) +{ + if (!native) return MediaTrackConstraintsPtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraintsPtr wrapper::impl::org::ortc::MediaTrackConstraints::toWrapper(const NativeTrackConstraints &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->width = ConstrainLong::toWrapper(native.mWidth); + pThis->height = ConstrainLong::toWrapper(native.mHeight); + pThis->aspectRatio = ConstrainDouble::toWrapper(native.mAspectRatio); + pThis->frameRate = ConstrainDouble::toWrapper(native.mFrameRate); + pThis->facingMode = ConstrainString::toWrapper(native.mFacingMode); + pThis->volume = ConstrainDouble::toWrapper(native.mVolume); + pThis->sampleRate = ConstrainLong::toWrapper(native.mSampleRate); + pThis->sampleSize = ConstrainLong::toWrapper(native.mSampleSize); + pThis->echoCancellation = ConstrainBoolean::toWrapper(native.mEchoCancellation); + pThis->latency = ConstrainDouble::toWrapper(native.mLatency); + pThis->channelCount = ConstrainLong::toWrapper(native.mChannelCount); + pThis->deviceId = ConstrainString::toWrapper(native.mDeviceID); + pThis->groupId = ConstrainString::toWrapper(native.mGroupID); + + pThis->advanced = make_shared< list< wrapper::org::ortc::MediaTrackConstraintSetPtr > >(); + + for (auto iter = native.mAdvanced.begin(); iter != native.mAdvanced.end(); ++iter) + { + pThis->advanced->push_back(wrapper::impl::org::ortc::MediaTrackConstraintSet::toWrapper(*iter)); + } + + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackConstraints::NativeTrackConstraintsPtr wrapper::impl::org::ortc::MediaTrackConstraints::toNative(wrapper::org::ortc::MediaTrackConstraintsPtr wrapper) +{ + if (wrapper) return NativeTrackConstraintsPtr(); + + auto result = make_shared(); + + result->mWidth = *ConstrainLong::toNative(wrapper->width); + result->mHeight = *ConstrainLong::toNative(wrapper->height); + result->mAspectRatio = *ConstrainDouble::toNative(wrapper->aspectRatio); + result->mFrameRate = *ConstrainDouble::toNative(wrapper->frameRate); + result->mFacingMode = *ConstrainString::toNative(wrapper->facingMode); + result->mVolume = *ConstrainDouble::toNative(wrapper->volume); + result->mSampleRate = *ConstrainLong::toNative(wrapper->sampleRate); + result->mSampleSize = *ConstrainLong::toNative(wrapper->sampleSize); + result->mEchoCancellation = *ConstrainBoolean::toNative(wrapper->echoCancellation); + result->mLatency = *ConstrainDouble::toNative(wrapper->latency); + result->mChannelCount = *ConstrainLong::toNative(wrapper->channelCount); + result->mDeviceID = *ConstrainString::toNative(wrapper->deviceId); + result->mGroupID = *ConstrainString::toNative(wrapper->groupId); + + if (wrapper->advanced) { + for (auto iter = wrapper->advanced->begin(); iter != wrapper->advanced->end(); ++iter) + { + result->mAdvanced.push_back(wrapper::impl::org::ortc::MediaTrackConstraintSet::toNative(*iter)); + } + } + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h index 2dd35cfb..b175cc2a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaTrackConstraints.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct MediaTrackConstraints : public wrapper::org::ortc::MediaTrackConstraints { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes::TrackConstraints, NativeTrackConstraints); + MediaTrackConstraintsWeakPtr thisWeak_; MediaTrackConstraints(); @@ -26,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_MediaTrackConstraints() override; virtual void wrapper_init_org_ortc_MediaTrackConstraints(wrapper::org::ortc::MediaTrackConstraintsPtr source) override; virtual void wrapper_init_org_ortc_MediaTrackConstraints(wrapper::org::ortc::JsonPtr json) override; + + static MediaTrackConstraintsPtr toWrapper(NativeTrackConstraintsPtr native); + static MediaTrackConstraintsPtr toWrapper(const NativeTrackConstraints &native); + static NativeTrackConstraintsPtr toNative(wrapper::org::ortc::MediaTrackConstraintsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp index a5a32f37..d6355395 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaTrackSettings.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +46,87 @@ void wrapper::impl::org::ortc::MediaTrackSettings::wrapper_init_org_ortc_MediaTr //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackSettings::wrapper_init_org_ortc_MediaTrackSettings(wrapper::org::ortc::MediaTrackSettingsPtr source) { + if (!source) return; + + wrapper::org::ortc::MediaTrackSettingsPtr wrapper = source; + wrapper::org::ortc::MediaTrackSettingsPtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackSettings::wrapper_init_org_ortc_MediaTrackSettings(wrapper::org::ortc::JsonPtr json) { + auto rootEl = Json::toNative(json); + if (!rootEl) return; + + auto native = Settings::create(rootEl); + if (!native) return; + + wrapper::org::ortc::MediaTrackSettingsPtr wrapper = toWrapper(native); + if (!wrapper) return; + + wrapper::org::ortc::MediaTrackSettingsPtr pThis = thisWeak_.lock(); + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackSettings::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaTrackSettings::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackSettingsPtr wrapper::impl::org::ortc::MediaTrackSettings::toWrapper(SettingsPtr native) +{ + if (!native) return MediaTrackSettingsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->width = native->mWidth; + pThis->height = native->mHeight; + pThis->aspectRatio = native->mAspectRatio; + pThis->frameRate = native->mFrameRate; + pThis->facingMode = native->mFacingMode; + pThis->volume = native->mVolume; + pThis->sampleRate = native->mSampleRate; + pThis->sampleSize = native->mSampleSize; + pThis->echoCancellation = native->mEchoCancellation; + pThis->latency = native->mLatency; + pThis->channelCount = native->mChannelCount; + pThis->deviceId = native->mDeviceID; + pThis->groupId = native->mGroupID; + pThis->wrapper_init_org_ortc_MediaTrackSettings(); + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::MediaTrackSettings::SettingsPtr wrapper::impl::org::ortc::MediaTrackSettings::toNative(MediaTrackSettingsPtr wrapper) +{ + if (!wrapper) return SettingsPtr(); + + auto native = Settings::create(); + + native->mWidth = wrapper->width; + native->mHeight = wrapper->height; + native->mAspectRatio = wrapper->aspectRatio; + native->mFrameRate = wrapper->frameRate; + native->mFacingMode = wrapper->facingMode; + native->mVolume = wrapper->volume; + native->mSampleRate = wrapper->sampleRate; + native->mSampleSize = wrapper->sampleSize; + native->mEchoCancellation = wrapper->echoCancellation; + native->mLatency = wrapper->latency; + native->mChannelCount = wrapper->channelCount; + native->mDeviceID = wrapper->deviceId; + native->mGroupID = wrapper->groupId; + + return native; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h index f45d6150..2ece0232 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaTrackSettings.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct MediaTrackSettings : public wrapper::org::ortc::MediaTrackSettings { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes::Settings, Settings); + MediaTrackSettingsWeakPtr thisWeak_; MediaTrackSettings(); @@ -24,6 +26,9 @@ namespace wrapper { virtual void wrapper_init_org_ortc_MediaTrackSettings(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static MediaTrackSettingsPtr toWrapper(SettingsPtr native); + static SettingsPtr toNative(MediaTrackSettingsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp index 82cffe33..24e7fd42 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaTrackSupportedConstraints.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaTrackSupportedConstraints::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaTrackSupportedConstraints::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaTrackSupportedConstraints::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::MediaTrackSupportedConstraints::MediaTrackSupportedConstraints() { @@ -46,25 +50,83 @@ void wrapper::impl::org::ortc::MediaTrackSupportedConstraints::wrapper_init_org_ //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackSupportedConstraints::wrapper_init_org_ortc_MediaTrackSupportedConstraints(wrapper::org::ortc::MediaTrackSupportedConstraintsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::MediaTrackSupportedConstraints::wrapper_init_org_ortc_MediaTrackSupportedConstraints(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaTrackSupportedConstraints::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("MediaTrackSupportedConstraints")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaTrackSupportedConstraints::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->width = native.mWidth; + pThis->height = native.mHeight; + pThis->aspectRatio = native.mAspectRatio; + pThis->frameRate = native.mFrameRate; + pThis->facingMode = native.mFacingMode; + pThis->volume = native.mVolume; + pThis->sampleRate = native.mSampleRate; + pThis->sampleSize = native.mSampleSize; + pThis->echoCancellation = native.mEchoCancellation; + pThis->latency = native.mLatency; + pThis->channelCount = native.mChannelCount; + pThis->deviceId = native.mDeviceID; + pThis->groupId = native.mGroupID; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mWidth = wrapper->width; + result->mHeight = wrapper->height; + result->mAspectRatio = wrapper->aspectRatio; + result->mFrameRate = wrapper->frameRate; + result->mFacingMode = wrapper->facingMode; + result->mVolume = wrapper->volume; + result->mSampleRate = wrapper->sampleRate; + result->mSampleSize = wrapper->sampleSize; + result->mEchoCancellation = wrapper->echoCancellation; + result->mLatency = wrapper->latency; + result->mChannelCount = wrapper->channelCount; + result->mDeviceID = wrapper->deviceId; + result->mGroupID = wrapper->groupId; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h index 2cf48459..269bcbe6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MediaTrackSupportedConstraints.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct MediaTrackSupportedConstraints : public wrapper::org::ortc::MediaTrackSupportedConstraints { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaDevicesTypes::SupportedConstraints, NativeType); + ZS_DECLARE_TYPEDEF_PTR(MediaTrackSupportedConstraints, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::MediaTrackSupportedConstraints, WrapperType); MediaTrackSupportedConstraintsWeakPtr thisWeak_; MediaTrackSupportedConstraints(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_MediaTrackSupportedConstraints(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp index da8faf43..a3d9ded5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp @@ -1,7 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MessageQueue.h" +#include + using ::zsLib::String; using ::zsLib::Optional; using ::zsLib::Any; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MessageQueue::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MessageQueue::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MessageQueue::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::MessageQueue::MessageQueue() { @@ -41,8 +46,27 @@ wrapper::impl::org::ortc::MessageQueue::~MessageQueue() //------------------------------------------------------------------------------ wrapper::org::ortc::MessageQueuePtr wrapper::org::ortc::MessageQueue::getDefaultForUi() { - wrapper::org::ortc::MessageQueuePtr result {}; - return result; + return wrapper::impl::org::ortc::MessageQueue::toWrapper(zsLib::IMessageQueueThread::singletonUsingCurrentGUIThreadsMessageQueue()); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto impl = std::dynamic_pointer_cast(wrapper); + if (!impl) return NativeTypePtr(); + + return impl->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.h b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.h index b8e1f4cd..c4cb7153 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MessageQueue.h +++ b/ortc/idl/wrapper/impl_org_ortc_MessageQueue.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_MessageQueue.h" +#include namespace wrapper { namespace impl { @@ -13,14 +13,20 @@ namespace wrapper { struct MessageQueue : public wrapper::org::ortc::MessageQueue { + ZS_DECLARE_TYPEDEF_PTR(::zsLib::IMessageQueue, NativeType); + ZS_DECLARE_TYPEDEF_PTR(MessageQueue, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::MessageQueue, WrapperType); MessageQueueWeakPtr thisWeak_; + NativeTypePtr native_; MessageQueue(); virtual ~MessageQueue(); + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc } // org } // namespace impl } // namespace wrapper - diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp index fd023691..af4b78fd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_OrtcLib.h" +#include "impl_org_ortc_MessageQueue.h" +#include "impl_org_ortc_Helper.h" + +#include using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +23,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OrtcLib::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OrtcLib::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OrtcLib::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::OrtcLib::~OrtcLib() { @@ -28,35 +35,37 @@ wrapper::impl::org::ortc::OrtcLib::~OrtcLib() //------------------------------------------------------------------------------ void wrapper::org::ortc::OrtcLib::setup() { + setup(wrapper::org::ortc::MessageQueue::getDefaultForUi()); } //------------------------------------------------------------------------------ void wrapper::org::ortc::OrtcLib::setup(wrapper::org::ortc::MessageQueuePtr queue) { + NativeType::setup(wrapper::impl::org::ortc::MessageQueue::toNative(queue)); } //------------------------------------------------------------------------------ void wrapper::org::ortc::OrtcLib::startMediaTracing() { + NativeType::startMediaTracing(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::OrtcLib::stopMediaTracing() { + NativeType::stopMediaTracing(); } //------------------------------------------------------------------------------ bool wrapper::org::ortc::OrtcLib::isMediaTracing() { - bool result {}; - return result; + return NativeType::isMediaTracing(); } //------------------------------------------------------------------------------ bool wrapper::org::ortc::OrtcLib::saveMediaTrace(String filename) { - bool result {}; - return result; + return NativeType::saveMediaTrace(filename); } //------------------------------------------------------------------------------ @@ -65,37 +74,53 @@ bool wrapper::org::ortc::OrtcLib::saveMediaTrace( int port ) { - bool result {}; - return result; + return NativeType::saveMediaTrace(host, port); } //------------------------------------------------------------------------------ PromisePtr wrapper::org::ortc::OrtcLib::notifyGoingToBackground() { - PromisePtr result {}; - return result; + struct Notified : public Any, + public ::ortc::services::IBackgroundingCompletionDelegate + { + virtual void onBackgroundingReady(::ortc::services::IBackgroundingQueryPtr query) + { + promise_->resolve(); + promise_.reset(); + } + + PromisePtr promise_; + ::ortc::services::IBackgroundingQueryPtr query_; + }; + + auto observer = make_shared(); + observer->promise_ = Promise::create(wrapper::impl::org::ortc::Helper::getGuiQueue()); + observer->promise_->setReferenceHolder(observer); + observer->query_ = ::ortc::services::IBackgrounding::notifyGoingToBackground(); + observer->promise_->background(); + return observer->promise_; } //------------------------------------------------------------------------------ void wrapper::org::ortc::OrtcLib::notifyGoingToBackgroundNow() { + ::ortc::services::IBackgrounding::notifyGoingToBackgroundNow(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::OrtcLib::notifyReturningFromBackground() { + ::ortc::services::IBackgrounding::notifyReturningFromBackground(); } //------------------------------------------------------------------------------ ::zsLib::Milliseconds wrapper::org::ortc::OrtcLib::get_ntpServerTime() { - ::zsLib::Milliseconds result {}; - return result; + return NativeType::ntpServerTime(); } //------------------------------------------------------------------------------ void wrapper::org::ortc::OrtcLib::set_ntpServerTime(::zsLib::Milliseconds value) { + NativeType::ntpServerTime(value); } - - diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.h b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.h index a8d28a4d..c30499cb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.h +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_OrtcLib.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,10 @@ namespace wrapper { struct OrtcLib : public wrapper::org::ortc::OrtcLib { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IORTC, NativeType); + ZS_DECLARE_TYPEDEF_PTR(OrtcLib, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::OrtcLib, WrapperType); + virtual ~OrtcLib(); }; diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp index 85a0833d..ddfc41d5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_OrtcLibWithDispatcher.h" +#include "impl_org_ortc_OrtcLib.h" +#include "impl_org_ortc_Dispatcher.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OrtcLibWithDispatcher::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OrtcLibWithDispatcher::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OrtcLibWithDispatcher::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::OrtcLibWithDispatcher::~OrtcLibWithDispatcher() { @@ -28,6 +33,21 @@ wrapper::impl::org::ortc::OrtcLibWithDispatcher::~OrtcLibWithDispatcher() //------------------------------------------------------------------------------ void wrapper::org::ortc::OrtcLibWithDispatcher::setup(wrapper::org::ortc::DispatcherPtr dispatcher) { + typedef zsLib::AnyHolder< Windows::UI::Core::CoreDispatcher^ > AnyDispatchHolder; + + auto any = wrapper::impl::org::ortc::Dispatcher::toNative(dispatcher); + if (!any) { + wrapper::org::ortc::OrtcLib::setup(); + return; + } + + auto holder = std::dynamic_pointer_cast(wrapper::impl::org::ortc::Dispatcher::toNative(dispatcher)); + if (!holder) { + wrapper::org::ortc::OrtcLib::setup(); + return; + } + + NativeType::setup(holder->value_); } diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.h b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.h index 7453d77b..932efe59 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.h +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_OrtcLibWithDispatcher.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,10 @@ namespace wrapper { struct OrtcLibWithDispatcher : public wrapper::org::ortc::OrtcLibWithDispatcher { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IORTC, NativeType); + ZS_DECLARE_TYPEDEF_PTR(OrtcLibWithDispatcher, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::OrtcLibWithDispatcher, WrapperType); + virtual ~OrtcLibWithDispatcher(); }; diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp index da89781f..2e3be861 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_OverconstrainedError.h" @@ -20,6 +19,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OverconstrainedError::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OverconstrainedError::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::OverconstrainedError::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::OverconstrainedError::OverconstrainedError() { @@ -43,4 +46,15 @@ void wrapper::impl::org::ortc::OverconstrainedError::wrapper_init_org_ortc_Overc { } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return OverconstrainedErrorPtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->name = native->mName; + pThis->message = native->mMessage; + pThis->constraint = native->mConstraint; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h index 09996502..6c00b78e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h @@ -5,6 +5,7 @@ #include "types.h" #include "generated/org_ortc_OverconstrainedError.h" +#include namespace wrapper { namespace impl { @@ -13,11 +14,16 @@ namespace wrapper { struct OverconstrainedError : public wrapper::org::ortc::OverconstrainedError { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrackTypes::OverconstrainedError, NativeType); + ZS_DECLARE_TYPEDEF_PTR(OverconstrainedError, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::OverconstrainedError, WrapperType); OverconstrainedErrorWeakPtr thisWeak_; OverconstrainedError(); virtual ~OverconstrainedError(); virtual void wrapper_init_org_ortc_OverconstrainedError() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp index 10cee491..76886f09 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_OverconstrainedErrorEvent.h" +#include "impl_org_ortc_OverconstrainedError.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,8 +46,15 @@ void wrapper::impl::org::ortc::OverconstrainedErrorEvent::wrapper_init_org_ortc_ //------------------------------------------------------------------------------ wrapper::org::ortc::OverconstrainedErrorPtr wrapper::impl::org::ortc::OverconstrainedErrorEvent::get_error() { - wrapper::org::ortc::OverconstrainedErrorPtr result {}; - return result; + return error_; } +wrapper::impl::org::ortc::OverconstrainedErrorEventPtr wrapper::impl::org::ortc::OverconstrainedErrorEvent::toWrapper(OverconstrainedErrorPtr error) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->error_ = error; + pThis->wrapper_init_org_ortc_OverconstrainedErrorEvent(); + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h index 6009074e..7105f9bf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #pragma once @@ -14,6 +13,7 @@ namespace wrapper { struct OverconstrainedErrorEvent : public wrapper::org::ortc::OverconstrainedErrorEvent { OverconstrainedErrorEventWeakPtr thisWeak_; + OverconstrainedErrorPtr error_; OverconstrainedErrorEvent(); virtual ~OverconstrainedErrorEvent(); @@ -21,6 +21,8 @@ namespace wrapper { // properties OverconstrainedErrorEvent virtual wrapper::org::ortc::OverconstrainedErrorPtr get_error() override; + + static OverconstrainedErrorEventPtr toWrapper(OverconstrainedErrorPtr error); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp index e512a620..347ad1fd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCCertificate.h" +#include "impl_org_ortc_RTCDtlsFingerprint.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,43 +43,77 @@ wrapper::impl::org::ortc::RTCCertificate::~RTCCertificate() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate() { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > result {}; - return result; + return impl::org::ortc::RTCCertificate::toWrapper(::ortc::ICertificate::generateCertificate()); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(String keygenAlgorithm) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > result {}; - return result; + if (keygenAlgorithm.isEmpty()) return generateCertificate(); + return impl::org::ortc::RTCCertificate::toWrapper(::ortc::ICertificate::generateCertificate(keygenAlgorithm)); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > wrapper::org::ortc::RTCCertificate::generateCertificate(wrapper::org::ortc::JsonPtr keygenAlgorithm) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr > > result {}; - return result; + if (!keygenAlgorithm) return generateCertificate(); + + auto native = impl::org::ortc::Json::toNative(keygenAlgorithm); + if (!native) return generateCertificate(); + + return impl::org::ortc::RTCCertificate::toWrapper(::ortc::ICertificate::generateCertificate(native)); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCCertificate::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCCertificate::get_expires() { - ::zsLib::Time result {}; - return result; + return native_->expires(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDtlsFingerprintPtr wrapper::impl::org::ortc::RTCCertificate::get_fingerprint() { - wrapper::org::ortc::RTCDtlsFingerprintPtr result {}; + return RTCDtlsFingerprint::toWrapper(native_->fingerprint()); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificate::PromiseWithTypePtr wrapper::impl::org::ortc::RTCCertificate::toWrapper(NativePromiseWithCertificatePtr promise) +{ + if (!promise) return PromiseWithTypePtr(); + + auto result = PromiseWithType::create(Helper::getGuiQueue()); + promise->thenClosure([result, promise] { + if (promise->isRejected()) { + Helper::reject(promise, result); + return; + } + + result->resolve(toWrapper(promise->value())); + }); + return result; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificatePtr wrapper::impl::org::ortc::RTCCertificate::toWrapper(NativeTypePtr native) +{ + if (!native) return RTCCertificatePtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificate::NativeTypePtr wrapper::impl::org::ortc::RTCCertificate::toNative(wrapper::org::ortc::RTCCertificatePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h index e0a5e318..8ab3a6d6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCCertificate.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,12 @@ namespace wrapper { struct RTCCertificate : public wrapper::org::ortc::RTCCertificate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ICertificate, NativeType); + ZS_DECLARE_TYPEDEF_PTR(PromiseWithHolderPtr< wrapper::org::ortc::RTCCertificatePtr >, PromiseWithType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ICertificateTypes::PromiseWithCertificate, NativePromiseWithCertificate); + RTCCertificateWeakPtr thisWeak_; + NativeTypePtr native_; RTCCertificate(); virtual ~RTCCertificate(); @@ -22,6 +27,10 @@ namespace wrapper { virtual uint64_t get_objectId() override; virtual ::zsLib::Time get_expires() override; virtual wrapper::org::ortc::RTCDtlsFingerprintPtr get_fingerprint() override; + + static PromiseWithTypePtr toWrapper(NativePromiseWithCertificatePtr promise); + static RTCCertificatePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(wrapper::org::ortc::RTCCertificatePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp index ff868ac9..5e0c9daa 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCCertificateStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,86 +42,101 @@ wrapper::impl::org::ortc::RTCCertificateStats::~RTCCertificateStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCCertificateStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCCertificateStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCertificateStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCCertificateStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCCertificateStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCertificateStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCertificateStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCCertificateStats::wrapper_init_org_ortc_RTCCertificateStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCCertificateStats::wrapper_init_org_ortc_RTCCertificateStats(wrapper::org::ortc::RTCCertificateStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCCertificateStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCCertificateStats::wrapper_init_org_ortc_RTCCertificateStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCertificateStats::get_fingerprint() { - String result {}; - return result; + return native_->mFingerprint; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCertificateStats::get_fingerprintAlgorithm() { - String result {}; - return result; + return native_->mFingerprintAlgorithm; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCertificateStats::get_base64Certificate() { - String result {}; - return result; + return native_->mBase64Certificate; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCertificateStats::get_issuerCertificateId() { - String result {}; - return result; + return native_->mIssuerCertificateID; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificateStatsPtr wrapper::impl::org::ortc::RTCCertificateStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCCertificateStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCertificateStats::NativeStatsPtr wrapper::impl::org::ortc::RTCCertificateStats::toNative(wrapper::org::ortc::RTCCertificateStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h index df867c7c..5c4b2d58 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCCertificateStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCCertificateStats : public wrapper::org::ortc::RTCCertificateStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::CertificateStats, NativeStats); RTCCertificateStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCCertificateStats(); virtual ~RTCCertificateStats(); @@ -38,6 +40,9 @@ namespace wrapper { virtual String get_fingerprintAlgorithm() override; virtual String get_base64Certificate() override; virtual String get_issuerCertificateId() override; + + static RTCCertificateStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCCertificateStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp index a5b28fef..7fb07899 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCCodec.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,93 +42,107 @@ wrapper::impl::org::ortc::RTCCodec::~RTCCodec() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCCodec::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCCodec")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCodec::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCCodec::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCCodec::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCodec::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCodec::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCCodec::wrapper_init_org_ortc_RTCCodec() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCCodec::wrapper_init_org_ortc_RTCCodec(wrapper::org::ortc::RTCCodecPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCCodec(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCCodec::wrapper_init_org_ortc_RTCCodec(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ Optional< uint8_t > wrapper::impl::org::ortc::RTCCodec::get_payloadType() { - Optional< uint8_t > result {}; - return result; + return native_->mPayloadType; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCodec::get_codec() { - String result {}; - return result; + return native_->mCodec; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCCodec::get_clockRate() { - unsigned long result {}; - return result; + return native_->mClockRate; } //------------------------------------------------------------------------------ Optional< unsigned long > wrapper::impl::org::ortc::RTCCodec::get_channels() { - Optional< unsigned long > result {}; - return result; + return native_->mChannels; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCCodec::get_parameters() { - String result {}; - return result; + return native_->mParameters; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCodecPtr wrapper::impl::org::ortc::RTCCodec::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCCodecPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCCodec::NativeStatsPtr wrapper::impl::org::ortc::RTCCodec::toNative(wrapper::org::ortc::RTCCodecPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.h b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.h index 0c242e3e..b5fbb3c2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCodec.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCodec.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCCodec.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCCodec : public wrapper::org::ortc::RTCCodec { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::Codec, NativeStats); RTCCodecWeakPtr thisWeak_; + NativeStatsPtr native_; RTCCodec(); virtual ~RTCCodec(); @@ -39,6 +41,9 @@ namespace wrapper { virtual unsigned long get_clockRate() override; virtual Optional< unsigned long > get_channels() override; virtual String get_parameters() override; + + static RTCCodecPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCCodecPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp index 2b8f70fb..42fd9fd8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp @@ -1,6 +1,11 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDataChannel.h" +#include "impl_org_ortc_RTCDataChannelParameters.h" +#include "impl_org_ortc_RTCDataTransport.h" +#include "impl_org_ortc_RTCMessageEvent.h" +#include "impl_org_ortc_RTCDataChannelStateChangeEvent.h" +#include "impl_org_ortc_ErrorEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +25,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannel::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannel::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannel::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannel::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDataChannel::RTCDataChannel() { @@ -41,8 +53,7 @@ wrapper::impl::org::ortc::RTCDataChannel::~RTCDataChannel() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDataChannel::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ @@ -51,85 +62,158 @@ void wrapper::impl::org::ortc::RTCDataChannel::wrapper_init_org_ortc_RTCDataChan wrapper::org::ortc::RTCDataChannelParametersPtr params ) { + auto native = RTCDataChannelParameters::toNative(params); + ZS_THROW_INVALID_ARGUMENT_IF(!params); + native_ = NativeType::create(thisWeak_.lock(), RTCDataTransport::toNative(transport), *native); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannel::close() { + native_->close(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannel::send(String text) { + native_->send(text); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannel::send(SecureByteBlockPtr data) { + if (!data) return; + native_->send(*data); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCDataChannel::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDataTransportPtr wrapper::impl::org::ortc::RTCDataChannel::get_transport() { - wrapper::org::ortc::RTCDataTransportPtr result {}; - return result; + return RTCDataTransport::toWrapper(native_->transport()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDataChannelParametersPtr wrapper::impl::org::ortc::RTCDataChannel::get_parameters() { - wrapper::org::ortc::RTCDataChannelParametersPtr result {}; - return result; + return RTCDataChannelParameters::toWrapper(native_->parameters()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDataChannelState wrapper::impl::org::ortc::RTCDataChannel::get_readyState() { - wrapper::org::ortc::RTCDataChannelState result {}; - return result; + return Helper::toWrapper(native_->readyState()); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCDataChannel::get_bufferedAmount() { - uint64_t result {}; - return result; + return SafeInt(native_->bufferedAmount()); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCDataChannel::get_bufferedAmountLowThreshold() { - uint64_t result {}; - return result; + return SafeInt(native_->bufferedAmountLowThreshold()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannel::set_bufferedAmountLowThreshold(uint64_t value) { + native_->bufferedAmountLowThreshold(SafeInt(value)); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDataChannel::get_binaryType() { - String result {}; - return result; + return native_->binaryType(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannel::set_binaryType(String value) { + native_->binaryType(value); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannel::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); } +//------------------------------------------------------------------------------ +void WrapperImplType::onDataChannelStateChange( + IDataChannelPtr channel, + ::ortc::IDataChannelTypes::States state +) +{ + onStateChange(RTCDataChannelStateChangeEvent::toWrapper(state)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onDataChannelError( + IDataChannelPtr channel, + ::ortc::ErrorAnyPtr error +) +{ + onError(ErrorEvent::toWrapper(error)); +} +//------------------------------------------------------------------------------ +void WrapperImplType::onDataChannelBufferedAmountLow(IDataChannelPtr channel) +{ + onBufferedAmountLow(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onDataChannelMessage( + IDataChannelPtr channel, + MessageEventDataPtr data +) +{ + onMessage(RTCMessageEvent::toWrapper(data)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h index e938cbef..285478fc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h @@ -1,19 +1,31 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDataChannel.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCDataChannel : public wrapper::org::ortc::RTCDataChannel + struct RTCDataChannel : public wrapper::org::ortc::RTCDataChannel, + public ::ortc::IDataChannelDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataChannel, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataChannel, IDataChannel); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataChannelSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCDataChannel, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDataChannel, WrapperType); + RTCDataChannelWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCDataChannel(); virtual ~RTCDataChannel(); @@ -42,6 +54,28 @@ namespace wrapper { virtual void set_binaryType(String value) override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onDataChannelStateChange( + IDataChannelPtr channel, + ::ortc::IDataChannelTypes::States state + ) override; + + virtual void onDataChannelError( + IDataChannelPtr channel, + ::ortc::ErrorAnyPtr error + ) override; + + virtual void onDataChannelBufferedAmountLow(IDataChannelPtr channel) override; + + virtual void onDataChannelMessage( + IDataChannelPtr channel, + MessageEventDataPtr data + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp index 37a697ee..5d9f4d6c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDataChannelEvent.h" +#include "impl_org_ortc_RTCDataChannel.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDataChannelEvent::RTCDataChannelEvent() { @@ -41,8 +45,15 @@ wrapper::impl::org::ortc::RTCDataChannelEvent::~RTCDataChannelEvent() //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDataChannelPtr wrapper::impl::org::ortc::RTCDataChannelEvent::get_dataChannel() { - wrapper::org::ortc::RTCDataChannelPtr result {}; - return result; + return RTCDataChannel::toWrapper(native_); } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h index 0080ece2..bd98713e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDataChannelEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,19 @@ namespace wrapper { struct RTCDataChannelEvent : public wrapper::org::ortc::RTCDataChannelEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataChannel, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCDataChannelEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDataChannelEvent, WrapperType); RTCDataChannelEventWeakPtr thisWeak_; + NativeTypePtr native_; RTCDataChannelEvent(); virtual ~RTCDataChannelEvent(); // properties RTCDataChannelEvent virtual wrapper::org::ortc::RTCDataChannelPtr get_dataChannel() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp index 95391f4a..bab0ac1a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDataChannelParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDataChannelParameters::RTCDataChannelParameters() { @@ -46,25 +51,70 @@ void wrapper::impl::org::ortc::RTCDataChannelParameters::wrapper_init_org_ortc_R //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannelParameters::wrapper_init_org_ortc_RTCDataChannelParameters(wrapper::org::ortc::RTCDataChannelParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannelParameters::wrapper_init_org_ortc_RTCDataChannelParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDataChannelParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCDataChannelParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDataChannelParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->label = native.mLabel; + pThis->ordered = native.mOrdered; + pThis->maxPacketLifetime = native.mMaxPacketLifetime; + pThis->maxRetransmits = native.mMaxRetransmits; + pThis->protocol = native.mProtocol; + pThis->negotiated = native.mNegotiated; + Helper::optionalSafeIntConvert(native.mID, pThis->id); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mLabel = wrapper->label; + result->mOrdered = wrapper->ordered; + result->mMaxPacketLifetime = wrapper->maxPacketLifetime; + result->mMaxRetransmits = wrapper->maxRetransmits; + result->mProtocol = wrapper->protocol; + result->mNegotiated = wrapper->negotiated; + Helper::optionalSafeIntConvert(wrapper->id, result->mID); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h index 4354c412..15200d8e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDataChannelParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCDataChannelParameters : public wrapper::org::ortc::RTCDataChannelParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataChannelTypes::Parameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCDataChannelParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDataChannelParameters, WrapperType); RTCDataChannelParametersWeakPtr thisWeak_; RTCDataChannelParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCDataChannelParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp index 440d0a83..a86d077b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDataChannelStateChangeEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::RTCDataChannelStateChangeEvent() { @@ -41,8 +45,15 @@ wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::~RTCDataChannelStateCh //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDataChannelState wrapper::impl::org::ortc::RTCDataChannelStateChangeEvent::get_state() { - wrapper::org::ortc::RTCDataChannelState result {}; - return result; + return Helper::toWrapper(native_); } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeType native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h index 32fb8eeb..e5e059ce 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDataChannelStateChangeEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,19 @@ namespace wrapper { struct RTCDataChannelStateChangeEvent : public wrapper::org::ortc::RTCDataChannelStateChangeEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataChannelTypes::States, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCDataChannelStateChangeEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDataChannelStateChangeEvent, WrapperType); RTCDataChannelStateChangeEventWeakPtr thisWeak_; + NativeType native_; RTCDataChannelStateChangeEvent(); virtual ~RTCDataChannelStateChangeEvent(); // properties RTCDataChannelStateChangeEvent virtual wrapper::org::ortc::RTCDataChannelState get_state() override; + + static WrapperImplTypePtr toWrapper(NativeType native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp index 9b9ae68d..0f8cf0ce 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDataChannelStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,114 +42,126 @@ wrapper::impl::org::ortc::RTCDataChannelStats::~RTCDataChannelStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDataChannelStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCDataChannelStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDataChannelStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCDataChannelStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCDataChannelStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDataChannelStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDataChannelStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannelStats::wrapper_init_org_ortc_RTCDataChannelStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannelStats::wrapper_init_org_ortc_RTCDataChannelStats(wrapper::org::ortc::RTCDataChannelStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCDataChannelStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDataChannelStats::wrapper_init_org_ortc_RTCDataChannelStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDataChannelStats::get_label() { - String result {}; - return result; + return native_->mLabel; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDataChannelStats::get_protocol() { - String result {}; - return result; + return native_->mProtocol; } //------------------------------------------------------------------------------ long wrapper::impl::org::ortc::RTCDataChannelStats::get_dataChannelId() { - long result {}; - return result; + return native_->mDataChannelID; } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDataChannelState wrapper::impl::org::ortc::RTCDataChannelStats::get_state() { - wrapper::org::ortc::RTCDataChannelState result {}; - return result; + return Helper::toWrapper(native_->mState); } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCDataChannelStats::get_messagesSent() { - unsigned long result {}; - return result; + return native_->mMessagesSent; } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCDataChannelStats::get_bytesSent() { - unsigned long long result {}; - return result; + return native_->mBytesSent; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCDataChannelStats::get_messagesReceived() { - unsigned long result {}; - return result; + return native_->mMessagesReceived; } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCDataChannelStats::get_bytesReceived() { - unsigned long long result {}; - return result; + return native_->mBytesReceived; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelStatsPtr wrapper::impl::org::ortc::RTCDataChannelStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCDataChannelStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDataChannelStats::NativeStatsPtr wrapper::impl::org::ortc::RTCDataChannelStats::toNative(wrapper::org::ortc::RTCDataChannelStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h index 755f51a5..69ad67f1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDataChannelStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCDataChannelStats : public wrapper::org::ortc::RTCDataChannelStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::DataChannelStats, NativeStats); RTCDataChannelStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCDataChannelStats(); virtual ~RTCDataChannelStats(); @@ -42,6 +44,9 @@ namespace wrapper { virtual unsigned long long get_bytesSent() override; virtual unsigned long get_messagesReceived() override; virtual unsigned long long get_bytesReceived() override; + + static RTCDataChannelStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCDataChannelStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp index 359af22b..31437d0d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDataTransport.h" +#include "impl_org_ortc_RTCSctpTransport.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataTransport::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataTransport::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataTransport::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDataTransport::RTCDataTransport() { @@ -38,4 +42,30 @@ wrapper::impl::org::ortc::RTCDataTransport::~RTCDataTransport() { } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCSctpTransport::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return impl->native_; + } + return NativeTypePtr(); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h index 5da5250c..0a5f586f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDataTransport.h" +#include namespace wrapper { namespace impl { @@ -13,10 +13,17 @@ namespace wrapper { struct RTCDataTransport : public wrapper::org::ortc::RTCDataTransport { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataTransport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCDataTransport, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDataTransport, WrapperType); RTCDataTransportWeakPtr thisWeak_; + NativeTypePtr native_; RTCDataTransport(); virtual ~RTCDataTransport(); + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp index 4d25312c..e0f4d2f5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDtlsCertificateBinary.h" @@ -20,6 +19,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsCertificateBinary::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsCertificateBinary::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsCertificateBinary::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDtlsCertificateBinary::RTCDtlsCertificateBinary() { @@ -41,8 +44,32 @@ wrapper::impl::org::ortc::RTCDtlsCertificateBinary::~RTCDtlsCertificateBinary() //------------------------------------------------------------------------------ SecureByteBlockPtr wrapper::impl::org::ortc::RTCDtlsCertificateBinary::get_certificate() { - SecureByteBlockPtr result {}; - return result; + return native_; } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = make_shared(native); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto impl = std::dynamic_pointer_cast(wrapper); + if (!impl) return NativeTypePtr(); + + return impl->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h index b2cbb179..d8b2a3d2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #pragma once @@ -13,13 +12,21 @@ namespace wrapper { struct RTCDtlsCertificateBinary : public wrapper::org::ortc::RTCDtlsCertificateBinary { + ZS_DECLARE_TYPEDEF_PTR(::zsLib::eventing::SecureByteBlock, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCDtlsCertificateBinary, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDtlsCertificateBinary, WrapperType); RTCDtlsCertificateBinaryWeakPtr thisWeak_; + SecureByteBlockPtr native_; RTCDtlsCertificateBinary(); virtual ~RTCDtlsCertificateBinary(); // properties RTCDtlsCertificateBinary virtual SecureByteBlockPtr get_certificate() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp index 519dc4d3..1400ee61 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDtlsFingerprint.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsFingerprint::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsFingerprint::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsFingerprint::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDtlsFingerprint::RTCDtlsFingerprint() { @@ -46,25 +50,60 @@ void wrapper::impl::org::ortc::RTCDtlsFingerprint::wrapper_init_org_ortc_RTCDtls //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsFingerprint::wrapper_init_org_ortc_RTCDtlsFingerprint(wrapper::org::ortc::RTCDtlsFingerprintPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsFingerprint::wrapper_init_org_ortc_RTCDtlsFingerprint(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDtlsFingerprint::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtlsFingerprint::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->algorithm = native.mAlgorithm; + pThis->value = native.mValue; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mAlgorithm = wrapper->algorithm; + result->mValue = wrapper->value; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h index 460128b7..7cfa2454 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDtlsFingerprint.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCDtlsFingerprint : public wrapper::org::ortc::RTCDtlsFingerprint { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ICertificateTypes::Fingerprint, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCDtlsFingerprint, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDtlsFingerprint, WrapperType); RTCDtlsFingerprintWeakPtr thisWeak_; RTCDtlsFingerprint(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCDtlsFingerprint(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp index a702a3a5..0d5b3c30 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDtlsParameters.h" +#include "impl_org_ortc_RTCDtlsFingerprint.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDtlsParameters::RTCDtlsParameters() { @@ -46,25 +52,71 @@ void wrapper::impl::org::ortc::RTCDtlsParameters::wrapper_init_org_ortc_RTCDtlsP //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsParameters::wrapper_init_org_ortc_RTCDtlsParameters(wrapper::org::ortc::RTCDtlsParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsParameters::wrapper_init_org_ortc_RTCDtlsParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDtlsParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCDtlsParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtlsParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->role = Helper::toWrapper(native.mRole); + pThis->fingerprints = make_shared< list< wrapper::org::ortc::RTCDtlsFingerprintPtr > >(); + for (auto iter = native.mFingerprints.begin(); iter != native.mFingerprints.end(); ++iter) { + auto wrapper = RTCDtlsFingerprint::toWrapper(*iter); + if (!wrapper) continue; + pThis->fingerprints->push_back(wrapper); + } + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mRole = Helper::toNative(wrapper->role); + if (wrapper->fingerprints) { + for (auto iter = wrapper->fingerprints->begin(); iter != wrapper->fingerprints->end(); ++iter) { + auto native = RTCDtlsFingerprint::toNative(*iter); + if (!native) continue; + result->mFingerprints.push_back(*native); + } + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h index dfe42b3a..e616bd1d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDtlsParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCDtlsParameters : public wrapper::org::ortc::RTCDtlsParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDTLSTransportTypes::Parameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCDtlsParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDtlsParameters, WrapperType); RTCDtlsParametersWeakPtr thisWeak_; RTCDtlsParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCDtlsParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp index 0150a9a1..73858248 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp @@ -1,6 +1,12 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDtlsTransport.h" +#include "impl_org_ortc_RTCDtlsParameters.h" +#include "impl_org_ortc_RTCIceTransport.h" +#include "impl_org_ortc_RTCCertificate.h" +#include "impl_org_ortc_RTCDtlsTransportStateChangeEvent.h" +#include "impl_org_ortc_RTCDtlsCertificateBinary.h" +#include "impl_org_ortc_ErrorEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +26,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsTransport::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsTransport::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsTransport::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsTransport::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDtlsTransport::RTCDtlsTransport() { @@ -41,8 +54,7 @@ wrapper::impl::org::ortc::RTCDtlsTransport::~RTCDtlsTransport() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ @@ -51,70 +63,155 @@ void wrapper::impl::org::ortc::RTCDtlsTransport::wrapper_init_org_ortc_RTCDtlsTr shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > certificates ) { + ZS_THROW_INVALID_ARGUMENT_IF(!iceTransport); + + list< ::ortc::ICertificatePtr > nativeList; + if (certificates) { + for (auto iter = certificates->begin(); iter != certificates->end(); ++iter) { + auto native = RTCCertificate::toNative(*iter); + if (!native) continue; + nativeList.push_back(native); + } + } + + native_ = IDTLSTransport::create(thisWeak_.lock(), RTCIceTransport::toNative(iceTransport), nativeList); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDtlsParametersPtr wrapper::impl::org::ortc::RTCDtlsTransport::remoteParameters() { - wrapper::org::ortc::RTCDtlsParametersPtr result {}; - return result; + return RTCDtlsParameters::toWrapper(native_->getRemoteParameters()); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCDtlsCertificateBinaryPtr > > wrapper::impl::org::ortc::RTCDtlsTransport::getRemoteCertificates() { - shared_ptr< list< wrapper::org::ortc::RTCDtlsCertificateBinaryPtr > > result {}; + auto result = make_shared< list< wrapper::org::ortc::RTCDtlsCertificateBinaryPtr > >(); + auto native = native_->getRemoteCertificates(); + if (native) { + for (auto iter = native->begin(); iter != native->end(); ++iter) { + auto wrapper = RTCDtlsCertificateBinary::toWrapper(*iter); + if (!wrapper) continue; + result->push_back(wrapper); + } + } return result; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsTransport::start(wrapper::org::ortc::RTCDtlsParametersPtr remoteParameters) { + ZS_THROW_INVALID_ARGUMENT_IF(!remoteParameters); + auto native = RTCDtlsParameters::toNative(remoteParameters); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + native_->start(*native); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsTransport::stop() { + native_->stop(); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCDtlsTransport::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > wrapper::impl::org::ortc::RTCDtlsTransport::get_certificates() { - shared_ptr< list< wrapper::org::ortc::RTCCertificatePtr > > result {}; + auto result = make_shared< list< wrapper::org::ortc::RTCCertificatePtr > >(); + auto native = native_->certificates(); + if (native) { + for (auto iter = native->begin(); iter != native->end(); ++iter) { + auto wrapper = RTCCertificate::toWrapper(*iter); + if (!wrapper) continue; + result->push_back(wrapper); + } + } return result; } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceTransportPtr wrapper::impl::org::ortc::RTCDtlsTransport::get_transport() { - wrapper::org::ortc::RTCIceTransportPtr result {}; - return result; + return RTCIceTransport::toWrapper(native_->transport()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDtlsTransportState wrapper::impl::org::ortc::RTCDtlsTransport::get_state() { - wrapper::org::ortc::RTCDtlsTransportState result {}; - return result; + return Helper::toWrapper(native_->state()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDtlsParametersPtr wrapper::impl::org::ortc::RTCDtlsTransport::get_localParameters() { - wrapper::org::ortc::RTCDtlsParametersPtr result {}; - return result; + return RTCDtlsParameters::toWrapper(native_->getLocalParameters()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsTransport::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); } +//------------------------------------------------------------------------------ +void WrapperImplType::onDTLSTransportStateChange( + IDTLSTransportPtr transport, + IDTLSTransport::States state + ) +{ + onStateChange(RTCDtlsTransportStateChangeEvent::toWrapper(Helper::toWrapper(state))); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onDTLSTransportError( + IDTLSTransportPtr transport, + ::ortc::ErrorAnyPtr error + ) +{ + onError(ErrorEvent::toWrapper(error)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h index 46788d95..a3fb390b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h @@ -1,19 +1,30 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDtlsTransport.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCDtlsTransport : public wrapper::org::ortc::RTCDtlsTransport + struct RTCDtlsTransport : public wrapper::org::ortc::RTCDtlsTransport, + public ::ortc::IDTLSTransportDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDTLSTransport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDTLSTransport, IDTLSTransport); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDTLSTransportSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCDtlsTransport, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDtlsTransport, WrapperType); RTCDtlsTransportWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCDtlsTransport(); virtual ~RTCDtlsTransport(); @@ -39,6 +50,22 @@ namespace wrapper { virtual wrapper::org::ortc::RTCDtlsParametersPtr get_localParameters() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + // IDTLSTransportDelegate + virtual void onDTLSTransportStateChange( + IDTLSTransportPtr transport, + IDTLSTransport::States state + ) override; + + virtual void onDTLSTransportError( + IDTLSTransportPtr transport, + ::ortc::ErrorAnyPtr error + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp index 64a023f0..33d44a23 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDtlsTransportStateChangeEvent.h" @@ -20,6 +19,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::RTCDtlsTransportStateChangeEvent() { @@ -41,8 +43,14 @@ wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::~RTCDtlsTransportSta //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDtlsTransportState wrapper::impl::org::ortc::RTCDtlsTransportStateChangeEvent::get_state() { - wrapper::org::ortc::RTCDtlsTransportState result {}; - return result; + return state_; } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(wrapper::org::ortc::RTCDtlsTransportState state) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->state_ = state; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h index e569cb8c..15d81b9f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #pragma once @@ -13,13 +12,18 @@ namespace wrapper { struct RTCDtlsTransportStateChangeEvent : public wrapper::org::ortc::RTCDtlsTransportStateChangeEvent { + ZS_DECLARE_TYPEDEF_PTR(RTCDtlsTransportStateChangeEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDtlsTransportStateChangeEvent, WrapperType); RTCDtlsTransportStateChangeEventWeakPtr thisWeak_; + wrapper::org::ortc::RTCDtlsTransportState state_ {wrapper::org::ortc::RTCDtlsTransportState_new}; RTCDtlsTransportStateChangeEvent(); virtual ~RTCDtlsTransportStateChangeEvent(); // properties RTCDtlsTransportStateChangeEvent virtual wrapper::org::ortc::RTCDtlsTransportState get_state() override; + + static WrapperImplTypePtr toWrapper(wrapper::org::ortc::RTCDtlsTransportState state); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp index 94e7efe2..76fdfb02 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDtlsTransportStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,72 +42,88 @@ wrapper::impl::org::ortc::RTCDtlsTransportStats::~RTCDtlsTransportStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCDtlsTransportStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCDtlsTransportStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtlsTransportStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCDtlsTransportStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCDtlsTransportStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtlsTransportStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtlsTransportStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsTransportStats::wrapper_init_org_ortc_RTCDtlsTransportStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsTransportStats::wrapper_init_org_ortc_RTCDtlsTransportStats(wrapper::org::ortc::RTCDtlsTransportStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCDtlsTransportStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtlsTransportStats::wrapper_init_org_ortc_RTCDtlsTransportStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtlsTransportStats::get_localCertificateId() { - String result {}; - return result; + return native_->mLocalCertificateID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtlsTransportStats::get_remoteCertificateId() { - String result {}; - return result; + return native_->mRemoteCertificateID; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsTransportStatsPtr wrapper::impl::org::ortc::RTCDtlsTransportStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCDtlsTransportStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCDtlsTransportStats::NativeStatsPtr wrapper::impl::org::ortc::RTCDtlsTransportStats::toNative(wrapper::org::ortc::RTCDtlsTransportStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h index 06023d2c..b8f99d29 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDtlsTransportStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCDtlsTransportStats : public wrapper::org::ortc::RTCDtlsTransportStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::DTLSTransportStats, NativeStats); RTCDtlsTransportStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCDtlsTransportStats(); virtual ~RTCDtlsTransportStats(); @@ -36,6 +38,9 @@ namespace wrapper { // properties RTCDtlsTransportStats virtual String get_localCertificateId() override; virtual String get_remoteCertificateId() override; + + static RTCDtlsTransportStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCDtlsTransportStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp index d69b2b09..06251fe7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDtmfSender.h" +#include "impl_org_ortc_RTCRtpSender.h" +#include "impl_org_ortc_RTCDtmfToneChangeEvent.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfSender::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfSender::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfSender::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfSender::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDtmfSender::RTCDtmfSender() { @@ -41,18 +49,19 @@ wrapper::impl::org::ortc::RTCDtmfSender::~RTCDtmfSender() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtmfSender::wrapper_init_org_ortc_RTCDtmfSender(wrapper::org::ortc::RTCRtpSenderPtr sender) { + native_ = NativeType::create(thisWeak_.lock(), RTCRtpSender::toNative(sender)); } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCDtmfSender::canInsertDtmf() { - bool result {}; - return result; + return native_->canInsertDTMF(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtmfSender::insertDtmf(String tones) { + native_->insertDTMF(tones); } //------------------------------------------------------------------------------ @@ -61,6 +70,7 @@ void wrapper::impl::org::ortc::RTCDtmfSender::insertDtmf( ::zsLib::Milliseconds duration ) { + native_->insertDTMF(tones, duration); } //------------------------------------------------------------------------------ @@ -70,46 +80,89 @@ void wrapper::impl::org::ortc::RTCDtmfSender::insertDtmf( ::zsLib::Milliseconds interToneGap ) { + native_->insertDTMF(tones, duration, interToneGap); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCDtmfSender::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpSenderPtr wrapper::impl::org::ortc::RTCDtmfSender::get_sender() { - wrapper::org::ortc::RTCRtpSenderPtr result {}; - return result; + return RTCRtpSender::toWrapper(native_->sender()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtmfSender::get_toneBuffer() { - String result {}; - return result; + return native_->toneBuffer(); } //------------------------------------------------------------------------------ ::zsLib::Milliseconds wrapper::impl::org::ortc::RTCDtmfSender::get_duration() { - ::zsLib::Milliseconds result {}; - return result; + return native_->duration(); } //------------------------------------------------------------------------------ ::zsLib::Milliseconds wrapper::impl::org::ortc::RTCDtmfSender::get_interToneGap() { - ::zsLib::Milliseconds result {}; - return result; + return native_->interToneGap(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCDtmfSender::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onDTMFSenderToneChanged( + IDTMFSenderPtr sender, + String tone +) +{ + onToneChange(RTCDtmfToneChangeEvent::toWrapper(tone)); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.h index 0710b2ef..405be85b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.h @@ -1,19 +1,30 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCDtmfSender.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCDtmfSender : public wrapper::org::ortc::RTCDtmfSender + struct RTCDtmfSender : public wrapper::org::ortc::RTCDtmfSender, + public ::ortc::IDTMFSenderDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDTMFSender, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDTMFSender, IDTMFSender); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDTMFSenderSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCDtmfSender, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDtmfSender, WrapperType); RTCDtmfSenderWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCDtmfSender(); virtual ~RTCDtmfSender(); @@ -40,6 +51,16 @@ namespace wrapper { virtual ::zsLib::Milliseconds get_interToneGap() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onDTMFSenderToneChanged( + IDTMFSenderPtr sender, + String tone + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp index ff481f6d..9be1d4a6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCDtmfToneChangeEvent.h" @@ -20,6 +19,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::RTCDtmfToneChangeEvent() { @@ -41,8 +44,17 @@ wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::~RTCDtmfToneChangeEvent() //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCDtmfToneChangeEvent::get_tone() { - String result {}; - return result; + return native_; +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeType native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h index 14cb7714..1ae5b621 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #pragma once @@ -13,13 +12,19 @@ namespace wrapper { struct RTCDtmfToneChangeEvent : public wrapper::org::ortc::RTCDtmfToneChangeEvent { + ZS_DECLARE_TYPEDEF_PTR(String, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCDtmfToneChangeEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCDtmfToneChangeEvent, WrapperType); RTCDtmfToneChangeEventWeakPtr thisWeak_; + NativeType native_; RTCDtmfToneChangeEvent(); virtual ~RTCDtmfToneChangeEvent(); // properties RTCDtmfToneChangeEvent virtual String get_tone() override; + + static WrapperImplTypePtr toWrapper(NativeType native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp index 5a535303..d75c841f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceCandidate.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidate::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidate::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidate::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceCandidate::RTCIceCandidate() { @@ -41,104 +47,119 @@ wrapper::impl::org::ortc::RTCIceCandidate::~RTCIceCandidate() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidate::wrapper_init_org_ortc_RTCIceCandidate() { + native_ = make_shared< NativeType >(); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidate::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidate::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceCandidate::get_component() { - wrapper::org::ortc::RTCIceComponent result {}; - return result; + return Helper::toWrapper(native_->mComponent); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidate::get_interfaceType() { - String result {}; - return result; + return native_->mInterfaceType; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidate::get_foundation() { - String result {}; - return result; + return native_->mFoundation; } //------------------------------------------------------------------------------ uint32_t wrapper::impl::org::ortc::RTCIceCandidate::get_priority() { - uint32_t result {}; - return result; + return native_->mPriority; } //------------------------------------------------------------------------------ uint32_t wrapper::impl::org::ortc::RTCIceCandidate::get_unfreezePriority() { - uint32_t result {}; - return result; + return native_->mUnfreezePriority; } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceProtocol wrapper::impl::org::ortc::RTCIceCandidate::get_protocol() { - wrapper::org::ortc::RTCIceProtocol result {}; - return result; + return Helper::toWrapper(native_->mProtocol); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidate::get_ip() { - String result {}; - return result; + return native_->mIP; } //------------------------------------------------------------------------------ uint16_t wrapper::impl::org::ortc::RTCIceCandidate::get_port() { - uint16_t result {}; - return result; + return native_->mPort; } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidateType wrapper::impl::org::ortc::RTCIceCandidate::get_candidateType() { - wrapper::org::ortc::RTCIceCandidateType result {}; - return result; + return Helper::toWrapper(native_->mCandidateType); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceTcpCandidateType wrapper::impl::org::ortc::RTCIceCandidate::get_tcpType() { - wrapper::org::ortc::RTCIceTcpCandidateType result {}; - return result; + return Helper::toWrapper(native_->mTCPType); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidate::get_relatedAddress() { - String result {}; - return result; + return native_->mRelatedAddress; } //------------------------------------------------------------------------------ uint16_t wrapper::impl::org::ortc::RTCIceCandidate::get_relatedPort() { - uint16_t result {}; - return result; + return native_->mRelatedPort; +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + return std::dynamic_pointer_cast(wrapper)->native_; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(wrapper::org::ortc::RTCIceGathererCandidatePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + + return result->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h index a83265b3..f54e0b1b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceCandidate.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,11 @@ namespace wrapper { struct RTCIceCandidate : public wrapper::org::ortc::RTCIceCandidate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETypes::Candidate, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceCandidate, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceCandidate, WrapperType); RTCIceCandidateWeakPtr thisWeak_; + NativeTypePtr native_; RTCIceCandidate(); virtual ~RTCIceCandidate(); @@ -38,6 +42,10 @@ namespace wrapper { virtual wrapper::org::ortc::RTCIceTcpCandidateType get_tcpType() override; virtual String get_relatedAddress() override; virtual uint16_t get_relatedPort() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + static NativeTypePtr toNative(wrapper::org::ortc::RTCIceGathererCandidatePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp index 4606c92a..4e8ce48d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceCandidateAttributes.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,107 +42,120 @@ wrapper::impl::org::ortc::RTCIceCandidateAttributes::~RTCIceCandidateAttributes( //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidateAttributes::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCIceCandidateAttributes")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidateAttributes::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidateAttributes::wrapper_init_org_ortc_RTCIceCandidateAttributes() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidateAttributes::wrapper_init_org_ortc_RTCIceCandidateAttributes(wrapper::org::ortc::RTCIceCandidateAttributesPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCIceCandidateAttributes(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidateAttributes::wrapper_init_org_ortc_RTCIceCandidateAttributes(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_relatedId() { - String result {}; - return result; + return native_->mRelatedID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_ipAddress() { - String result {}; - return result; + return native_->mIPAddress; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_portNumber() { - unsigned long result {}; - return result; + return native_->mPortNumber; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_transport() { - String result {}; - return result; + return native_->mTransport; } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidateType wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_candidateType() { - wrapper::org::ortc::RTCIceCandidateType result {}; - return result; + return Helper::toWrapper(native_->mCandidateType); } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_priority() { - unsigned long result {}; - return result; + return native_->mPriority; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidateAttributes::get_addressSourceUrl() { - String result {}; - return result; + return native_->mAddressSourceURL; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidateAttributesPtr wrapper::impl::org::ortc::RTCIceCandidateAttributes::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCIceCandidateAttributesPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidateAttributes::NativeStatsPtr wrapper::impl::org::ortc::RTCIceCandidateAttributes::toNative(wrapper::org::ortc::RTCIceCandidateAttributesPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h index 7521cb23..c8a458f4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceCandidateAttributes.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCIceCandidateAttributes : public wrapper::org::ortc::RTCIceCandidateAttributes { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::ICECandidateAttributes, NativeStats); RTCIceCandidateAttributesWeakPtr thisWeak_; + NativeStatsPtr native_; RTCIceCandidateAttributes(); virtual ~RTCIceCandidateAttributes(); @@ -41,6 +43,9 @@ namespace wrapper { virtual wrapper::org::ortc::RTCIceCandidateType get_candidateType() override; virtual unsigned long get_priority() override; virtual String get_addressSourceUrl() override; + + static RTCIceCandidateAttributesPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCIceCandidateAttributesPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp index 7ce77b72..eb937f8c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceCandidateComplete.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidateComplete::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidateComplete::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidateComplete::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceCandidateComplete::RTCIceCandidateComplete() { @@ -41,34 +47,60 @@ wrapper::impl::org::ortc::RTCIceCandidateComplete::~RTCIceCandidateComplete() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidateComplete::wrapper_init_org_ortc_RTCIceCandidateComplete() { + native_ = make_shared< NativeType >(); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidateComplete::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidateComplete::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceCandidateComplete::get_component() { - wrapper::org::ortc::RTCIceComponent result {}; - return result; + return Helper::toWrapper(native_->mComponent); } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCIceCandidateComplete::get_complete() { - bool result {}; - return result; + return native_->mComplete; +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + return std::dynamic_pointer_cast(wrapper)->native_; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(wrapper::org::ortc::RTCIceGathererCandidatePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + + return result->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h index 65532270..4c15367c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceCandidateComplete.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,11 @@ namespace wrapper { struct RTCIceCandidateComplete : public wrapper::org::ortc::RTCIceCandidateComplete { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETypes::CandidateComplete, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceCandidateComplete, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceCandidateComplete, WrapperType); RTCIceCandidateCompleteWeakPtr thisWeak_; + NativeTypePtr native_; RTCIceCandidateComplete(); virtual ~RTCIceCandidateComplete(); @@ -28,6 +32,10 @@ namespace wrapper { // properties RTCIceCandidateComplete virtual bool get_complete() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + static NativeTypePtr toNative(wrapper::org::ortc::RTCIceGathererCandidatePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp index ccd1107c..b41b3696 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceCandidatePair.h" +#include "impl_org_ortc_RTCIceCandidate.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidatePair::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidatePair::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidatePair::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceCandidatePair::RTCIceCandidatePair() { @@ -46,49 +51,78 @@ void wrapper::impl::org::ortc::RTCIceCandidatePair::wrapper_init_org_ortc_RTCIce //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidatePair::wrapper_init_org_ortc_RTCIceCandidatePair(wrapper::org::ortc::RTCIceCandidatePairPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidatePair::wrapper_init_org_ortc_RTCIceCandidatePair(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidatePair::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidatePair::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceCandidatePair::get_local() { - wrapper::org::ortc::RTCIceCandidatePtr result {}; - return result; + return RTCIceCandidate::toWrapper(native_->mLocal); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidatePair::set_local(wrapper::org::ortc::RTCIceCandidatePtr value) { + native_->mLocal = RTCIceCandidate::toNative(value); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceCandidatePair::get_remote() { - wrapper::org::ortc::RTCIceCandidatePtr result {}; - return result; + return RTCIceCandidate::toWrapper(native_->mRemote); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidatePair::set_remote(wrapper::org::ortc::RTCIceCandidatePtr value) { + native_->mRemote = RTCIceCandidate::toNative(value); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto impl = std::dynamic_pointer_cast(wrapper); + if (!impl) return NativeTypePtr(); + return impl->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h index 1e0c1260..a5f53b69 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceCandidatePair.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,11 @@ namespace wrapper { struct RTCIceCandidatePair : public wrapper::org::ortc::RTCIceCandidatePair { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETransportTypes::CandidatePair, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceCandidatePair, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceCandidatePair, WrapperType); RTCIceCandidatePairWeakPtr thisWeak_; + NativeTypePtr native_; RTCIceCandidatePair(); virtual ~RTCIceCandidatePair(); @@ -30,6 +34,9 @@ namespace wrapper { virtual void set_local(wrapper::org::ortc::RTCIceCandidatePtr value) override; virtual wrapper::org::ortc::RTCIceCandidatePtr get_remote() override; virtual void set_remote(wrapper::org::ortc::RTCIceCandidatePtr value) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp index ca4168d1..51afe624 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceCandidatePairChangeEvent.h" +#include "impl_org_ortc_RTCIceCandidatePair.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::RTCIceCandidatePairChangeEvent() { @@ -41,8 +44,14 @@ wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::~RTCIceCandidatePairCh //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePairPtr wrapper::impl::org::ortc::RTCIceCandidatePairChangeEvent::get_candidatePair() { - wrapper::org::ortc::RTCIceCandidatePairPtr result {}; - return result; + return RTCIceCandidatePair::toWrapper(candidatePair_); } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(::ortc::IICETransportTypes::CandidatePairPtr candidatePair) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->candidatePair_ = candidatePair; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h index ad766ca2..7aee89d5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceCandidatePairChangeEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,18 @@ namespace wrapper { struct RTCIceCandidatePairChangeEvent : public wrapper::org::ortc::RTCIceCandidatePairChangeEvent { + ZS_DECLARE_TYPEDEF_PTR(RTCIceCandidatePairChangeEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceCandidatePairChangeEvent, WrapperType); RTCIceCandidatePairChangeEventWeakPtr thisWeak_; + ::ortc::IICETransportTypes::CandidatePairPtr candidatePair_; RTCIceCandidatePairChangeEvent(); virtual ~RTCIceCandidatePairChangeEvent(); // properties RTCIceCandidatePairChangeEvent virtual wrapper::org::ortc::RTCIceCandidatePairPtr get_candidatePair() override; + + static WrapperImplTypePtr toWrapper(::ortc::IICETransportTypes::CandidatePairPtr candidatePair); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp index 0ac929a6..6be7dc40 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceCandidatePairStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,149 +42,155 @@ wrapper::impl::org::ortc::RTCIceCandidatePairStats::~RTCIceCandidatePairStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceCandidatePairStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCIceCandidatePairStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidatePairStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidatePairStats::wrapper_init_org_ortc_RTCIceCandidatePairStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidatePairStats::wrapper_init_org_ortc_RTCIceCandidatePairStats(wrapper::org::ortc::RTCIceCandidatePairStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCIceCandidatePairStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceCandidatePairStats::wrapper_init_org_ortc_RTCIceCandidatePairStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_transportId() { - String result {}; - return result; + return native_->mTransportID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_localCandidateId() { - String result {}; - return result; + return native_->mLocalCandidateID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_remoteCandidateId() { - String result {}; - return result; + return native_->mRemoteCandidateID; } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePairState wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_state() { - wrapper::org::ortc::RTCIceCandidatePairState result {}; - return result; + return Helper::toWrapper(native_->mState); } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_priority() { - unsigned long long result {}; - return result; + return native_->mPriority; } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_nominated() { - bool result {}; - return result; + return native_->mNominated; } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_writable() { - bool result {}; - return result; + return native_->mWritable; } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_readable() { - bool result {}; - return result; + return native_->mReadable; } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_bytesSent() { - unsigned long long result {}; - return result; + return native_->mBytesSent; } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_bytesReceived() { - unsigned long long result {}; - return result; + return native_->mBytesReceived; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_roundTripTime() { - double result {}; - return result; + return native_->mRoundTripTime; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_availableOutgoingBitrate() { - double result {}; - return result; + return native_->mAvailableOutgoingBitrate; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCIceCandidatePairStats::get_availableIncomingBitrate() { - double result {}; - return result; + return native_->mAvailableIncomingBitrate; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidatePairStatsPtr wrapper::impl::org::ortc::RTCIceCandidatePairStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCIceCandidatePairStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceCandidatePairStats::NativeStatsPtr wrapper::impl::org::ortc::RTCIceCandidatePairStats::toNative(wrapper::org::ortc::RTCIceCandidatePairStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h index 1c51ab68..49bb76f5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceCandidatePairStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCIceCandidatePairStats : public wrapper::org::ortc::RTCIceCandidatePairStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::ICECandidatePairStats, NativeStats); RTCIceCandidatePairStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCIceCandidatePairStats(); virtual ~RTCIceCandidatePairStats(); @@ -47,6 +49,9 @@ namespace wrapper { virtual double get_roundTripTime() override; virtual double get_availableOutgoingBitrate() override; virtual double get_availableIncomingBitrate() override; + + static RTCIceCandidatePairStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCIceCandidatePairStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp index e313c214..9aef9cae 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGatherInterfacePolicy.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +47,60 @@ void wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::wrapper_init_org_ort //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::wrapper_init_org_ortc_RTCIceGatherInterfacePolicy(wrapper::org::ortc::RTCIceGatherInterfacePolicyPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::wrapper_init_org_ortc_RTCIceGatherInterfacePolicy(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::WrapperImplTypePtr wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::WrapperImplTypePtr wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->interfaceType = native.mInterfaceType; + pThis->gatherPolicy = Helper::toWrapper(native.mGatherPolicy); + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::NativeTypePtr wrapper::impl::org::ortc::RTCIceGatherInterfacePolicy::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + result->mInterfaceType = wrapper->interfaceType; + result->mGatherPolicy = Helper::toNative(wrapper->gatherPolicy); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h index 70d314bc..f31f30aa 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGatherInterfacePolicy.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,10 @@ namespace wrapper { struct RTCIceGatherInterfacePolicy : public wrapper::org::ortc::RTCIceGatherInterfacePolicy { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICEGathererTypes::InterfacePolicy, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceGatherInterfacePolicy, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceGatherInterfacePolicy, WrapperType); + RTCIceGatherInterfacePolicyWeakPtr thisWeak_; RTCIceGatherInterfacePolicy(); @@ -24,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCIceGatherInterfacePolicy(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp index b000a996..c6e1b882 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGatherOptions.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_RTCIceGatherInterfacePolicy.h" +#include "impl_org_ortc_RTCIceServer.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +48,80 @@ void wrapper::impl::org::ortc::RTCIceGatherOptions::wrapper_init_org_ortc_RTCIce //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherOptions::wrapper_init_org_ortc_RTCIceGatherOptions(wrapper::org::ortc::RTCIceGatherOptionsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherOptions::wrapper_init_org_ortc_RTCIceGatherOptions(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceGatherOptions::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCIceGatherOptions")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGatherOptions::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherOptions::WrapperImplTypePtr wrapper::impl::org::ortc::RTCIceGatherOptions::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherOptions::WrapperImplTypePtr wrapper::impl::org::ortc::RTCIceGatherOptions::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->continuousGathering = native.mContinuousGathering; + pThis->interfacePolicies = make_shared< list >(); + for (auto iter = native.mInterfacePolicies.begin(); iter != native.mInterfacePolicies.end(); ++iter) { + pThis->interfacePolicies->push_back(RTCIceGatherInterfacePolicy::toWrapper(*iter)); + } + pThis->iceServers = make_shared< list >(); + for (auto iter = native.mICEServers.begin(); iter != native.mICEServers.end(); ++iter) { + pThis->iceServers->push_back(RTCIceServer::toWrapper(*iter)); + } + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGatherOptions::NativeTypePtr wrapper::impl::org::ortc::RTCIceGatherOptions::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + result->mContinuousGathering = wrapper->continuousGathering; + if (wrapper->interfacePolicies) { + for (auto iter = wrapper->interfacePolicies->begin(); iter != wrapper->interfacePolicies->end(); ++iter) { + auto value = RTCIceGatherInterfacePolicy::toNative(*iter); + if (!value) continue; + result->mInterfacePolicies.push_back(*value); + } + } + if (wrapper->iceServers) { + for (auto iter = wrapper->iceServers->begin(); iter != wrapper->iceServers->end(); ++iter) { + auto value = RTCIceServer::toNative(*iter); + if (!value) continue; + result->mICEServers.push_back(*value); + } + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h index ea71979e..2d9ea690 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGatherOptions.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCIceGatherOptions : public wrapper::org::ortc::RTCIceGatherOptions { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICEGathererTypes::Options, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceGatherOptions, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceGatherOptions, WrapperType); RTCIceGatherOptionsWeakPtr thisWeak_; RTCIceGatherOptions(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCIceGatherOptions(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp index d2800ca8..d3b92301 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp @@ -1,6 +1,13 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGatherer.h" +#include "impl_org_ortc_RTCIceCandidate.h" +#include "impl_org_ortc_RTCIceParameters.h" +#include "impl_org_ortc_RTCIceGatherOptions.h" +#include "impl_org_ortc_RTCIceGathererStateChangeEvent.h" +#include "impl_org_ortc_RTCIceGathererCandidateEvent.h" +#include "impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h" +#include "impl_org_ortc_RTCIceGathererIceErrorEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +27,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGatherer::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGatherer::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGatherer::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGatherer::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceGatherer::RTCIceGatherer() { @@ -41,75 +55,173 @@ wrapper::impl::org::ortc::RTCIceGatherer::~RTCIceGatherer() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceGatherer::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherer::wrapper_init_org_ortc_RTCIceGatherer(wrapper::org::ortc::RTCIceGatherOptionsPtr options) { + auto native = RTCIceGatherOptions::toNative(options); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + + native_ = NativeType::create(thisWeak_.lock(), *native); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceGathererPtr wrapper::impl::org::ortc::RTCIceGatherer::createAssociatedGatherer() { - wrapper::org::ortc::RTCIceGathererPtr result {}; - return result; + return RTCIceGatherer::toWrapper(native_->createAssociatedGatherer(::ortc::IICEGathererDelegatePtr())); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherer::gather() { + native_->gather(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherer::gather(wrapper::org::ortc::RTCIceGatherOptionsPtr options) { + auto native = RTCIceGatherOptions::toNative(options); + if (!native) { + gather(); + return; + } + native_->gather(*native); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherer::close() { + native_->close(); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCIceGatherer::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceGatherer::get_component() { - wrapper::org::ortc::RTCIceComponent result {}; - return result; + return Helper::toWrapper(native_->component()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceGathererState wrapper::impl::org::ortc::RTCIceGatherer::get_state() { - wrapper::org::ortc::RTCIceGathererState result {}; - return result; + return Helper::toWrapper(native_->state()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceParametersPtr wrapper::impl::org::ortc::RTCIceGatherer::get_localParameters() { - wrapper::org::ortc::RTCIceParametersPtr result {}; - return result; + return RTCIceParameters::toWrapper(native_->getLocalParameters()); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > wrapper::impl::org::ortc::RTCIceGatherer::get_localCandidates() { - shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > result {}; + auto result = make_shared< list< wrapper::org::ortc::RTCIceCandidatePtr > >(); + + auto nativeList = native_->getLocalCandidates(); + if (nativeList) { + for (auto iter = nativeList->begin(); iter != nativeList->end(); ++iter) { + auto wrapper = RTCIceCandidate::toWrapper(make_shared<::ortc::IICETypes::Candidate>(*iter)); + if (!wrapper) continue; + result->push_back(wrapper); + } + } return result; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGatherer::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); } +//------------------------------------------------------------------------------ +void WrapperImplType::onICEGathererStateChange( + IICEGathererPtr gatherer, + IICEGatherer::States state +) +{ + onStateChange(RTCIceGathererStateChangeEvent::toWrapper(state)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onICEGathererLocalCandidate( + IICEGathererPtr gatherer, + CandidatePtr candidate +) +{ + onLocalCandidate(RTCIceGathererCandidateEvent::toWrapper(candidate)); +} +//------------------------------------------------------------------------------ +void WrapperImplType::onICEGathererLocalCandidateComplete( + IICEGathererPtr gatherer, + CandidateCompletePtr candidate +) +{ + onLocalCandidateComplete(RTCIceGathererCandidateCompleteEvent::toWrapper(candidate)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onICEGathererLocalCandidateGone( + IICEGathererPtr gatherer, + CandidatePtr candidate +) +{ + onLocalCandidateGone(RTCIceGathererCandidateEvent::toWrapper(candidate)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onICEGathererError( + IICEGathererPtr gatherer, + ErrorEventPtr errorEvent +) +{ + onError(RTCIceGathererIceErrorEvent::toWrapper(errorEvent)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h index 463ef982..6dc1236f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h @@ -1,19 +1,30 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGatherer.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCIceGatherer : public wrapper::org::ortc::RTCIceGatherer + struct RTCIceGatherer : public wrapper::org::ortc::RTCIceGatherer, + public ::ortc::IICEGathererDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICEGatherer, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICEGatherer, IICEGatherer); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICEGathererSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCIceGatherer, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceGatherer, WrapperType); RTCIceGathererWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCIceGatherer(); virtual ~RTCIceGatherer(); @@ -36,6 +47,36 @@ namespace wrapper { virtual shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > get_localCandidates() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onICEGathererStateChange( + IICEGathererPtr gatherer, + IICEGatherer::States state + ) override; + + virtual void onICEGathererLocalCandidate( + IICEGathererPtr gatherer, + CandidatePtr candidate + ) override; + + virtual void onICEGathererLocalCandidateComplete( + IICEGathererPtr gatherer, + CandidateCompletePtr candidate + ) override; + + virtual void onICEGathererLocalCandidateGone( + IICEGathererPtr gatherer, + CandidatePtr candidate + ) override; + + virtual void onICEGathererError( + IICEGathererPtr gatherer, + ErrorEventPtr errorEvent + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp index 9822a5d5..f63915db 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGathererCandidate.h" +#include "impl_org_ortc_RTCIceCandidate.h" +#include "impl_org_ortc_RTCIceCandidateComplete.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +23,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererCandidate::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererCandidate::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererCandidate::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceGathererCandidate::RTCIceGathererCandidate() { @@ -41,29 +49,86 @@ wrapper::impl::org::ortc::RTCIceGathererCandidate::~RTCIceGathererCandidate() //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceGathererCandidatePtr wrapper::org::ortc::RTCIceGathererCandidate::create(wrapper::org::ortc::JsonPtr json) { - wrapper::org::ortc::RTCIceGathererCandidatePtr result {}; - return result; + auto result = ::ortc::IICETypes::GatherCandidate::create(impl::org::ortc::Json::toNative(json)); + { + auto native = std::dynamic_pointer_cast<::ortc::IICETypes::Candidate>(result); + if (native) return wrapper::impl::org::ortc::RTCIceCandidate::toWrapper(native); + } + { + auto native = std::dynamic_pointer_cast<::ortc::IICETypes::CandidateComplete>(result); + if (native) return wrapper::impl::org::ortc::RTCIceCandidateComplete::toWrapper(native); + } + return WrapperImplTypePtr(); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceGathererCandidate::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + { + auto native = std::dynamic_pointer_cast<::ortc::IICETypes::Candidate>(native_); + if (native) return Json::toWrapper(native->createElement()); + } + { + auto native = std::dynamic_pointer_cast<::ortc::IICETypes::CandidateComplete>(native_); + if (native) return Json::toWrapper(native->createElement()); + } + return JsonPtr(); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererCandidate::hash() { - String result {}; - return result; + { + auto native = std::dynamic_pointer_cast<::ortc::IICETypes::Candidate>(native_); + if (native) return native->hash(); + } + { + auto native = std::dynamic_pointer_cast<::ortc::IICETypes::CandidateComplete>(native_); + if (native) return native->hash(); + } + return String(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceGathererCandidate::get_component() { - wrapper::org::ortc::RTCIceComponent result {}; - return result; + return Helper::toWrapper(native_->mComponent); } +//------------------------------------------------------------------------------ +WrapperTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperTypePtr(); + + { + auto converted = std::dynamic_pointer_cast<::ortc::IICETypes::Candidate>(native); + if (converted) return RTCIceCandidate::toWrapper(converted); + } + { + auto converted = std::dynamic_pointer_cast<::ortc::IICETypes::CandidateComplete>(native); + if (converted) return RTCIceCandidateComplete::toWrapper(converted); + } + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + { + wrapper::org::ortc::RTCIceCandidatePtr impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCIceCandidate::toNative(impl); + } + + { + wrapper::org::ortc::RTCIceCandidateCompletePtr impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCIceCandidateComplete::toNative(impl); + } + + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h index dca8b679..18b23f25 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGathererCandidate.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,11 @@ namespace wrapper { struct RTCIceGathererCandidate : public wrapper::org::ortc::RTCIceGathererCandidate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETypes::GatherCandidate, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceGathererCandidate, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceGathererCandidate, WrapperType); RTCIceGathererCandidateWeakPtr thisWeak_; + NativeTypePtr native_; RTCIceGathererCandidate(); virtual ~RTCIceGathererCandidate(); @@ -24,6 +28,9 @@ namespace wrapper { // properties RTCIceGathererCandidate virtual wrapper::org::ortc::RTCIceComponent get_component() override; + + static WrapperTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp index 9e0b0f0a..dfa4e8d5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h" +#include "impl_org_ortc_RTCIceCandidateComplete.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::RTCIceGathererCandidateCompleteEvent() { @@ -45,4 +48,11 @@ wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::impl::org::ortc::RTCIceG return result; } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(::ortc::IICEGathererTypes::CandidateCompletePtr candidate) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->candidate_ = RTCIceCandidateComplete::toWrapper(candidate); + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h index 5cec533c..367e38e6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGathererCandidateCompleteEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,18 @@ namespace wrapper { struct RTCIceGathererCandidateCompleteEvent : public wrapper::org::ortc::RTCIceGathererCandidateCompleteEvent { + ZS_DECLARE_TYPEDEF_PTR(RTCIceGathererCandidateCompleteEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceGathererCandidateCompleteEvent, WrapperType); RTCIceGathererCandidateCompleteEventWeakPtr thisWeak_; + wrapper::org::ortc::RTCIceCandidateCompletePtr candidate_; RTCIceGathererCandidateCompleteEvent(); virtual ~RTCIceGathererCandidateCompleteEvent(); // properties RTCIceGathererCandidateCompleteEvent virtual wrapper::org::ortc::RTCIceCandidateCompletePtr get_candidate() override; + + static WrapperImplTypePtr toWrapper(::ortc::IICEGathererTypes::CandidateCompletePtr candidate); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp index cdc9a0f6..ec9c233e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGathererCandidateEvent.h" +#include "impl_org_ortc_RTCIceCandidate.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::RTCIceGathererCandidateEvent() { @@ -41,15 +44,24 @@ wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::~RTCIceGathererCandidate //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::get_candidate() { - wrapper::org::ortc::RTCIceCandidatePtr result {}; - return result; + return candidate_; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererCandidateEvent::get_url() { - String result {}; - return result; + return url_; } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper( + ::ortc::IICEGathererTypes::CandidatePtr candidate, + const String &url +) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->candidate_ = RTCIceCandidate::toWrapper(candidate); + pThis->url_ = url; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h index 582c4c37..7ff17ace 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGathererCandidateEvent.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,11 @@ namespace wrapper { struct RTCIceGathererCandidateEvent : public wrapper::org::ortc::RTCIceGathererCandidateEvent { + ZS_DECLARE_TYPEDEF_PTR(RTCIceGathererCandidateEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceGathererCandidateEvent, WrapperType); RTCIceGathererCandidateEventWeakPtr thisWeak_; + wrapper::org::ortc::RTCIceCandidatePtr candidate_; + String url_; RTCIceGathererCandidateEvent(); virtual ~RTCIceGathererCandidateEvent(); @@ -21,6 +25,11 @@ namespace wrapper { // properties RTCIceGathererCandidateEvent virtual wrapper::org::ortc::RTCIceCandidatePtr get_candidate() override; virtual String get_url() override; + + static WrapperImplTypePtr toWrapper( + ::ortc::IICEGathererTypes::CandidatePtr candidate, + const String &url = String() + ); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp index cffe7613..fe02e365 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGathererIceErrorEvent.h" +#include "impl_org_ortc_RTCIceCandidate.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::RTCIceGathererIceErrorEvent() { @@ -41,29 +46,32 @@ wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::~RTCIceGathererIceErrorEv //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePtr wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_hostCandidate() { - wrapper::org::ortc::RTCIceCandidatePtr result {}; - return result; + return RTCIceCandidate::toWrapper(native_->mHostCandidate); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_url() { - String result {}; - return result; + return native_->mURL; } //------------------------------------------------------------------------------ uint16_t wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_errorCode() { - uint16_t result {}; - return result; + return native_->mErrorCode; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererIceErrorEvent::get_errorText() { - String result {}; - return result; + return native_->mErrorText; } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h index c642fdc1..b1e6b64a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGathererIceErrorEvent.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,11 @@ namespace wrapper { struct RTCIceGathererIceErrorEvent : public wrapper::org::ortc::RTCIceGathererIceErrorEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICEGathererTypes::ErrorEvent, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceGathererIceErrorEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceGathererIceErrorEvent, WrapperType); RTCIceGathererIceErrorEventWeakPtr thisWeak_; + NativeTypePtr native_; RTCIceGathererIceErrorEvent(); virtual ~RTCIceGathererIceErrorEvent(); @@ -23,6 +27,8 @@ namespace wrapper { virtual String get_url() override; virtual uint16_t get_errorCode() override; virtual String get_errorText() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp index 473d4c27..2b449f01 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGathererStateChangeEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::RTCIceGathererStateChangeEvent() { @@ -41,8 +44,15 @@ wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::~RTCIceGathererStateCh //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceGathererState wrapper::impl::org::ortc::RTCIceGathererStateChangeEvent::get_state() { - wrapper::org::ortc::RTCIceGathererState result {}; - return result; + return Helper::toWrapper(state_); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(::ortc::IICEGathererTypes::States state) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->state_ = state; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h index 2cfbc20c..24b4173c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGathererStateChangeEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,18 @@ namespace wrapper { struct RTCIceGathererStateChangeEvent : public wrapper::org::ortc::RTCIceGathererStateChangeEvent { + ZS_DECLARE_TYPEDEF_PTR(RTCIceGathererStateChangeEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceGathererStateChangeEvent, WrapperType); RTCIceGathererStateChangeEventWeakPtr thisWeak_; + ::ortc::IICEGathererTypes::States state_ { ::ortc::IICEGathererTypes::State_First}; RTCIceGathererStateChangeEvent(); virtual ~RTCIceGathererStateChangeEvent(); // properties RTCIceGathererStateChangeEvent virtual wrapper::org::ortc::RTCIceGathererState get_state() override; + + static WrapperImplTypePtr toWrapper(::ortc::IICEGathererTypes::States state); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp index 5bc1172f..6fe2f658 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceGathererStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,79 +42,95 @@ wrapper::impl::org::ortc::RTCIceGathererStats::~RTCIceGathererStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceGathererStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCIceGathererStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCIceGathererStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCIceGathererStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGathererStats::wrapper_init_org_ortc_RTCIceGathererStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGathererStats::wrapper_init_org_ortc_RTCIceGathererStats(wrapper::org::ortc::RTCIceGathererStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCIceGathererStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceGathererStats::wrapper_init_org_ortc_RTCIceGathererStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCIceGathererStats::get_bytesSent() { - unsigned long long result {}; - return result; + return native_->mBytesSent; } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCIceGathererStats::get_bytesReceived() { - unsigned long long result {}; - return result; + return native_->mBytesReceived; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceGathererStats::get_rtcpGathererStatsId() { - String result {}; - return result; + return native_->mRTCPGathererStatsID; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererStatsPtr wrapper::impl::org::ortc::RTCIceGathererStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCIceGathererStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceGathererStats::NativeStatsPtr wrapper::impl::org::ortc::RTCIceGathererStats::toNative(wrapper::org::ortc::RTCIceGathererStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h index 53b7bfce..798411ad 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceGathererStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCIceGathererStats : public wrapper::org::ortc::RTCIceGathererStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::ICEGathererStats, NativeStats); RTCIceGathererStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCIceGathererStats(); virtual ~RTCIceGathererStats(); @@ -37,6 +39,9 @@ namespace wrapper { virtual unsigned long long get_bytesSent() override; virtual unsigned long long get_bytesReceived() override; virtual String get_rtcpGathererStatsId() override; + + static RTCIceGathererStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCIceGathererStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp index 1484f91f..1f695f12 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceParameters.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceParameters::RTCIceParameters() { @@ -46,25 +50,64 @@ void wrapper::impl::org::ortc::RTCIceParameters::wrapper_init_org_ortc_RTCIcePar //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceParameters::wrapper_init_org_ortc_RTCIceParameters(wrapper::org::ortc::RTCIceParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceParameters::wrapper_init_org_ortc_RTCIceParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCIceParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->useUnfreezePriority = native.mUseUnfreezePriority; + pThis->usernameFragment = native.mUsernameFragment; + pThis->password = native.mPassword; + pThis->iceLite = native.mICELite; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mUseUnfreezePriority = wrapper->useUnfreezePriority; + result->mUsernameFragment = wrapper->usernameFragment; + result->mPassword = wrapper->password; + result->mICELite = wrapper->iceLite; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h index cedcbc79..8c5b4ea1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCIceParameters : public wrapper::org::ortc::RTCIceParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETypes::Parameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceParameters, WrapperType); RTCIceParametersWeakPtr thisWeak_; RTCIceParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCIceParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp index 9dbccc77..bec0e722 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceServer.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +47,72 @@ void wrapper::impl::org::ortc::RTCIceServer::wrapper_init_org_ortc_RTCIceServer( //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceServer::wrapper_init_org_ortc_RTCIceServer(wrapper::org::ortc::RTCIceServerPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceServer::wrapper_init_org_ortc_RTCIceServer(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceServer::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCIceServer")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceServer::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceServer::WrapperImplTypePtr wrapper::impl::org::ortc::RTCIceServer::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceServer::WrapperImplTypePtr wrapper::impl::org::ortc::RTCIceServer::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->urls = make_shared< list >(native.mURLs); + pThis->username = native.mUserName; + pThis->credential = native.mCredential; + pThis->credentialType = Helper::toWrapper(native.mCredentialType); + return pThis; + + + shared_ptr< list< String > > urls{}; + String username{}; + String credential{}; + wrapper::org::ortc::RTCIceCredentialType credentialType{ wrapper::org::ortc::RTCIceCredentialType_password }; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceServer::NativeTypePtr wrapper::impl::org::ortc::RTCIceServer::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + if (wrapper->urls) { + result->mURLs = *(wrapper->urls); + } + result->mUserName = wrapper->username; + result->mCredential = wrapper->credential; + result->mCredentialType = Helper::toNative(wrapper->credentialType); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h index 3a386603..0cd07282 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceServer.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCIceServer : public wrapper::org::ortc::RTCIceServer { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICEGathererTypes::Server, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceServer, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceServer, WrapperType); RTCIceServerWeakPtr thisWeak_; RTCIceServer(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCIceServer(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp index b5e2d1ca..67f27260 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp @@ -1,6 +1,15 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceTransport.h" +#include "impl_org_ortc_RTCIceParameters.h" +#include "impl_org_ortc_RTCIceCandidate.h" +#include "impl_org_ortc_RTCIceCandidatePair.h" +#include "impl_org_ortc_RTCIceGatherer.h" +#include "impl_org_ortc_RTCIceGathererCandidate.h" +#include "impl_org_ortc_RTCIceParameters.h" +#include "impl_org_ortc_RTCIceTransportOptions.h" +#include "impl_org_ortc_RTCIceTransportStateChangeEvent.h" +#include "impl_org_ortc_RTCIceCandidatePairChangeEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +29,14 @@ using ::std::list; using ::std::set; using ::std::map; + +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransport::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransport::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransport::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransport::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceTransport::RTCIceTransport() { @@ -41,18 +58,19 @@ wrapper::impl::org::ortc::RTCIceTransport::~RTCIceTransport() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCIceTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransport::wrapper_init_org_ortc_RTCIceTransport() { + native_ = NativeType::create(thisWeak_.lock()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransport::wrapper_init_org_ortc_RTCIceTransport(wrapper::org::ortc::RTCIceGathererPtr gatherer) { + native_ = NativeType::create(thisWeak_.lock(), RTCIceGatherer::toNative(gatherer)); } //------------------------------------------------------------------------------ @@ -61,6 +79,10 @@ void wrapper::impl::org::ortc::RTCIceTransport::start( wrapper::org::ortc::RTCIceParametersPtr remoteParameters ) { + auto nativeParams = RTCIceParameters::toNative(remoteParameters); + ZS_THROW_INVALID_ARGUMENT_IF(!nativeParams); + + native_->start(RTCIceGatherer::toNative(gatherer), *nativeParams); } //------------------------------------------------------------------------------ @@ -70,6 +92,13 @@ void wrapper::impl::org::ortc::RTCIceTransport::start( wrapper::org::ortc::RTCIceRole role ) { + auto nativeParams = RTCIceParameters::toNative(remoteParameters); + ZS_THROW_INVALID_ARGUMENT_IF(!nativeParams); + + ::ortc::IICETransport::Options optionalOptions; + optionalOptions.mRole = Helper::toNative(role); + + native_->start(RTCIceGatherer::toNative(gatherer), *nativeParams, optionalOptions); } //------------------------------------------------------------------------------ @@ -79,38 +108,66 @@ void wrapper::impl::org::ortc::RTCIceTransport::start( wrapper::org::ortc::RTCIceTransportOptionsPtr options ) { + auto nativeParams = RTCIceParameters::toNative(remoteParameters); + ZS_THROW_INVALID_ARGUMENT_IF(!nativeParams); + + auto nativeOptions = RTCIceTransportOptions::toNative(options); + Optional<::ortc::IICETransport::Options> optionalOptions; + if (nativeOptions) { + optionalOptions = *nativeOptions; + } + + native_->start(RTCIceGatherer::toNative(gatherer), *nativeParams, optionalOptions); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransport::stop() { + native_->stop(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceTransportPtr wrapper::impl::org::ortc::RTCIceTransport::createAssociatedTransport() { - wrapper::org::ortc::RTCIceTransportPtr result {}; - return result; + return RTCIceTransport::toWrapper(native_->createAssociatedTransport(::ortc::IICETransportDelegatePtr())); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransport::addRemoteCandidate(wrapper::org::ortc::RTCIceGathererCandidatePtr remoteCandidate) { + auto native = RTCIceGathererCandidate::toNative(remoteCandidate); + if (!native) return; + native_->addRemoteCandidate(*native); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransport::setRemoteCandidates(shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > remoteCandidates) { + list< ::ortc::IICETypes::Candidate > nativeList; + if (remoteCandidates) { + for (auto iter = remoteCandidates->begin(); iter != remoteCandidates->end(); ++iter) { + auto native = RTCIceCandidate::toNative(*iter); + if (!native) continue; + nativeList.push_back(*native); + } + } + native_->setRemoteCandidates(nativeList); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransport::removeRemoteCandidate(wrapper::org::ortc::RTCIceGathererCandidatePtr remoteCandidate) { + auto native = RTCIceGathererCandidate::toNative(remoteCandidate); + if (!native) return; + native_->removeRemoteCandidate(*native); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransport::keepWarm(wrapper::org::ortc::RTCIceCandidatePairPtr candidatePair) { + auto native = RTCIceCandidatePair::toNative(candidatePair); + if (!native) return; + native_->keepWarm(*native); } //------------------------------------------------------------------------------ @@ -119,67 +176,145 @@ void wrapper::impl::org::ortc::RTCIceTransport::keepWarm( bool keepWarm ) { + auto native = RTCIceCandidatePair::toNative(candidatePair); + if (!native) return; + native_->keepWarm(*native, keepWarm); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCIceTransport::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceGathererPtr wrapper::impl::org::ortc::RTCIceTransport::get_gatherer() { - wrapper::org::ortc::RTCIceGathererPtr result {}; - return result; + return RTCIceGatherer::toWrapper(native_->iceGatherer()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceRole wrapper::impl::org::ortc::RTCIceTransport::get_role() { - wrapper::org::ortc::RTCIceRole result {}; - return result; + return Helper::toWrapper(native_->role()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceComponent wrapper::impl::org::ortc::RTCIceTransport::get_component() { - wrapper::org::ortc::RTCIceComponent result {}; - return result; + return Helper::toWrapper(native_->component()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceTransportState wrapper::impl::org::ortc::RTCIceTransport::get_state() { - wrapper::org::ortc::RTCIceTransportState result {}; - return result; + return Helper::toWrapper(native_->state()); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > wrapper::impl::org::ortc::RTCIceTransport::get_remoteCandidates() { - shared_ptr< list< wrapper::org::ortc::RTCIceCandidatePtr > > result {}; + auto result = make_shared< list< wrapper::org::ortc::RTCIceCandidatePtr > >(); + auto native = native_->getRemoteCandidates(); + if (native) { + for (auto iter = native->begin(); iter != native->end(); ++iter) { + auto wrapper = RTCIceCandidate::toWrapper(make_shared<::ortc::IICETypes::Candidate>(*iter)); + if (!wrapper) continue; + result->push_back(wrapper); + } + } return result; } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidatePairPtr wrapper::impl::org::ortc::RTCIceTransport::get_selectedCandidatePair() { - wrapper::org::ortc::RTCIceCandidatePairPtr result {}; - return result; + return RTCIceCandidatePair::toWrapper(native_->getSelectedCandidatePair()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceParametersPtr wrapper::impl::org::ortc::RTCIceTransport::get_remoteParameters() { - wrapper::org::ortc::RTCIceParametersPtr result {}; - return result; + return RTCIceParameters::toWrapper(native_->getRemoteParameters()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransport::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onICETransportStateChange( + IICETransportPtr transport, + IICETransport::States state +) +{ + onStateChange(RTCIceTransportStateChangeEvent::toWrapper(state)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onICETransportCandidatePairAvailable( + IICETransportPtr transport, + CandidatePairPtr candidatePair +) +{ + onCandidatePairAvailable(RTCIceCandidatePairChangeEvent::toWrapper(candidatePair)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onICETransportCandidatePairGone( + IICETransportPtr transport, + CandidatePairPtr candidatePair +) +{ + onCandidatePairGone(RTCIceCandidatePairChangeEvent::toWrapper(candidatePair)); } +//------------------------------------------------------------------------------ +void WrapperImplType::onICETransportCandidatePairChanged( + IICETransportPtr transport, + CandidatePairPtr candidatePair +) +{ + onCandidatePairChange(RTCIceCandidatePairChangeEvent::toWrapper(candidatePair)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h index be6228b5..16de14cb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h @@ -1,19 +1,30 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceTransport.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCIceTransport : public wrapper::org::ortc::RTCIceTransport + struct RTCIceTransport : public wrapper::org::ortc::RTCIceTransport, + public ::ortc::IICETransportDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETransport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETransport, IICETransport); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETransportSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCIceTransport, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceTransport, WrapperType); RTCIceTransportWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCIceTransport(); virtual ~RTCIceTransport(); @@ -60,6 +71,29 @@ namespace wrapper { virtual wrapper::org::ortc::RTCIceParametersPtr get_remoteParameters() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onICETransportStateChange( + IICETransportPtr transport, + IICETransport::States state + ) override; + virtual void onICETransportCandidatePairAvailable( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; + virtual void onICETransportCandidatePairGone( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; + + virtual void onICETransportCandidatePairChanged( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp index 615fe121..27d5640c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceTransportController.h" +#include "impl_org_ortc_RTCIceTransport.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,12 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportController::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportController::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportController::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceTransportController::RTCIceTransportController() { @@ -41,11 +48,13 @@ wrapper::impl::org::ortc::RTCIceTransportController::~RTCIceTransportController( //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransportController::wrapper_init_org_ortc_RTCIceTransportController() { + native_ = NativeType::create(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransportController::addTransport(wrapper::org::ortc::RTCIceTransportPtr transport) { + return native_->addTransport(RTCIceTransport::toNative(transport)); } //------------------------------------------------------------------------------ @@ -54,20 +63,45 @@ void wrapper::impl::org::ortc::RTCIceTransportController::addTransport( uint64_t index ) { + size_t native = SafeInt(index); + return native_->addTransport(RTCIceTransport::toNative(transport), native); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCIceTransportController::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCIceTransportPtr > > wrapper::impl::org::ortc::RTCIceTransportController::get_transports() { - shared_ptr< list< wrapper::org::ortc::RTCIceTransportPtr > > result {}; + auto result = make_shared< list< wrapper::org::ortc::RTCIceTransportPtr > >(); + auto native = native_->getTransports(); + for (auto iter = native.begin(); iter != native.end(); ++iter) { + auto wrapper = RTCIceTransport::toWrapper(*iter); + if (!wrapper) continue; + result->push_back(wrapper); + } return result; } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h index 422266b9..3e9c73f6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceTransportController.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,13 @@ namespace wrapper { struct RTCIceTransportController : public wrapper::org::ortc::RTCIceTransportController { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETransportController, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETransportController, IICETransportController); + ZS_DECLARE_TYPEDEF_PTR(RTCIceTransportController, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceTransportController, WrapperType); + RTCIceTransportControllerWeakPtr thisWeak_; + NativeTypePtr native_; RTCIceTransportController(); virtual ~RTCIceTransportController(); @@ -29,6 +35,9 @@ namespace wrapper { // properties RTCIceTransportController virtual uint64_t get_objectId() override; virtual shared_ptr< list< wrapper::org::ortc::RTCIceTransportPtr > > get_transports() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp index 0d16bf89..7b2be74c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceTransportOptions.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportOptions::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportOptions::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportOptions::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceTransportOptions::RTCIceTransportOptions() { @@ -46,25 +51,60 @@ void wrapper::impl::org::ortc::RTCIceTransportOptions::wrapper_init_org_ortc_RTC //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransportOptions::wrapper_init_org_ortc_RTCIceTransportOptions(wrapper::org::ortc::RTCIceTransportOptionsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransportOptions::wrapper_init_org_ortc_RTCIceTransportOptions(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceTransportOptions::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCIceTransportOptions")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceTransportOptions::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->aggressiveIce = native.mAggressiveICE; + pThis->role = Helper::toWrapper(native.mRole); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mAggressiveICE = wrapper->aggressiveIce; + result->mRole = Helper::toNative(wrapper->role); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h index e1433ed0..c789f14b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceTransportOptions.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCIceTransportOptions : public wrapper::org::ortc::RTCIceTransportOptions { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IICETransportTypes::Options, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceTransportOptions, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceTransportOptions, WrapperType); RTCIceTransportOptionsWeakPtr thisWeak_; RTCIceTransportOptions(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCIceTransportOptions(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp index 6c54edbe..37dd8f61 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceTransportStateChangeEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::RTCIceTransportStateChangeEvent() { @@ -41,8 +44,14 @@ wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::~RTCIceTransportState //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceTransportState wrapper::impl::org::ortc::RTCIceTransportStateChangeEvent::get_state() { - wrapper::org::ortc::RTCIceTransportState result {}; - return result; + return Helper::toWrapper(state_); } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(::ortc::IICETransportTypes::States state) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->state_ = state; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h index 6078646e..bebeb857 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceTransportStateChangeEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,18 @@ namespace wrapper { struct RTCIceTransportStateChangeEvent : public wrapper::org::ortc::RTCIceTransportStateChangeEvent { + ZS_DECLARE_TYPEDEF_PTR(RTCIceTransportStateChangeEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCIceTransportStateChangeEvent, WrapperType); RTCIceTransportStateChangeEventWeakPtr thisWeak_; + ::ortc::IICETransportTypes::States state_ { ::ortc::IICETransportTypes::State_First}; RTCIceTransportStateChangeEvent(); virtual ~RTCIceTransportStateChangeEvent(); // properties RTCIceTransportStateChangeEvent virtual wrapper::org::ortc::RTCIceTransportState get_state() override; + + static WrapperImplTypePtr toWrapper(::ortc::IICETransportTypes::States state); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp index 8ec5723a..7be89d15 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIceTransportStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,93 +42,107 @@ wrapper::impl::org::ortc::RTCIceTransportStats::~RTCIceTransportStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCIceTransportStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCIceTransportStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceTransportStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCIceTransportStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCIceTransportStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceTransportStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceTransportStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransportStats::wrapper_init_org_ortc_RTCIceTransportStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransportStats::wrapper_init_org_ortc_RTCIceTransportStats(wrapper::org::ortc::RTCIceTransportStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCIceTransportStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCIceTransportStats::wrapper_init_org_ortc_RTCIceTransportStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCIceTransportStats::get_bytesSent() { - unsigned long long result {}; - return result; + return native_->mBytesSent; } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCIceTransportStats::get_bytesReceived() { - unsigned long long result {}; - return result; + return native_->mBytesReceived; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceTransportStats::get_rtcpTransportStatsId() { - String result {}; - return result; + return native_->mRTCPTransportStatsID; } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCIceTransportStats::get_activeConnection() { - bool result {}; - return result; + return native_->mActiveConnection; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCIceTransportStats::get_selectedCandidatePairId() { - String result {}; - return result; + return native_->mSelectedCandidatePairID; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportStatsPtr wrapper::impl::org::ortc::RTCIceTransportStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCIceTransportStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIceTransportStats::NativeStatsPtr wrapper::impl::org::ortc::RTCIceTransportStats::toNative(wrapper::org::ortc::RTCIceTransportStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h index b6fff244..a86c8dc5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIceTransportStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCIceTransportStats : public wrapper::org::ortc::RTCIceTransportStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::ICETransportStats, NativeStats); RTCIceTransportStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCIceTransportStats(); virtual ~RTCIceTransportStats(); @@ -39,6 +41,9 @@ namespace wrapper { virtual String get_rtcpTransportStatsId() override; virtual bool get_activeConnection() override; virtual String get_selectedCandidatePairId() override; + + static RTCIceTransportStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCIceTransportStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp index b7cdeb32..d420253a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIdentity.h" +#include "impl_org_ortc_RTCIdentityAssertion.h" +#include "impl_org_ortc_RTCIdentityResult.h" +#include "impl_org_ortc_RTCIdentityError.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,8 +49,7 @@ void wrapper::impl::org::ortc::RTCIdentity::wrapper_init_org_ortc_RTCIdentity(wr //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > wrapper::impl::org::ortc::RTCIdentity::getIdentityAssertion(String provider) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; - return result; + return getIdentityAssertion(provider, String(), String()); } //------------------------------------------------------------------------------ @@ -56,8 +58,7 @@ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > w String protocol ) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; - return result; + return getIdentityAssertion(provider, protocol, String()); } //------------------------------------------------------------------------------ @@ -67,29 +68,82 @@ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > w String username ) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > result {}; + typedef PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > PromiseWithType; + + auto result = PromiseWithType::create(Helper::getGuiQueue()); + + if (protocol.isEmpty()) { + protocol = "default"; + } + + auto promise = native_->getIdentityAssertion(provider, protocol, username.hasData() ? username.c_str() : NULL); + + promise->thenClosure([promise, result] { + if (promise->isRejected()) { + typedef AnyHolder< RTCIdentityErrorPtr > AnyHolderType; + + auto nativeReason = promise->reason(); + if (nativeReason) { + auto reason = make_shared(); + reason->value_ = RTCIdentityError::toWrapper(nativeReason); + result->reject(reason); + return; + } + Helper::reject(promise, result); + return; + } + result->resolve(RTCIdentityResult::toWrapper(promise->value())); + }); + return result; } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityAssertionPtr > > wrapper::impl::org::ortc::RTCIdentity::setIdentityAssertion(String assertion) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityAssertionPtr > > result {}; + ZS_DECLARE_TYPEDEF_PTR(PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityAssertionPtr >, PromiseWithType); + + auto promise = native_->setIdentityAssertion(assertion); + if (!promise) return PromiseWithTypePtr(); + + auto result = PromiseWithType::create(Helper::getGuiQueue()); + + promise->thenClosure([promise, result] { + if (promise->isRejected()) { + Helper::reject(promise, result); + return; + } + result->resolve(RTCIdentityAssertion::toWrapper(promise->value())); + }); return result; } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCIdentity::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIdentityAssertionPtr wrapper::impl::org::ortc::RTCIdentity::get_peerIdentity() { - wrapper::org::ortc::RTCIdentityAssertionPtr result {}; - return result; + return RTCIdentityAssertion::toWrapper(native_->peerIdentity()); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityPtr wrapper::impl::org::ortc::RTCIdentity::toWrapper(NativeIdentityPtr native) +{ + if (!native) return RTCIdentityPtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentity::NativeIdentityPtr wrapper::impl::org::ortc::RTCIdentity::toNative(wrapper::org::ortc::RTCIdentityPtr wrapper) +{ + if (!wrapper) return NativeIdentityPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h index 9cbc764e..380cdb7d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIdentity.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCIdentity : public wrapper::org::ortc::RTCIdentity { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IIdentity, NativeIdentity); RTCIdentityWeakPtr thisWeak_; + NativeIdentityPtr native_; RTCIdentity(); virtual ~RTCIdentity(); @@ -35,6 +37,9 @@ namespace wrapper { // properties RTCIdentity virtual uint64_t get_objectId() override; virtual wrapper::org::ortc::RTCIdentityAssertionPtr get_peerIdentity() override; + + static RTCIdentityPtr toWrapper(NativeIdentityPtr native); + static NativeIdentityPtr toNative(wrapper::org::ortc::RTCIdentityPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp index 6480767b..db2a1baf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIdentityAssertion.h" @@ -43,4 +42,32 @@ void wrapper::impl::org::ortc::RTCIdentityAssertion::wrapper_init_org_ortc_RTCId { } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityAssertionPtr wrapper::impl::org::ortc::RTCIdentityAssertion::toWrapper(NativeAssertionPtr native) +{ + if (!native) return RTCIdentityAssertionPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityAssertionPtr wrapper::impl::org::ortc::RTCIdentityAssertion::toWrapper(const NativeAssertion &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->idp = native.mIDP; + pThis->name = native.mName; + + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityAssertion::NativeAssertionPtr wrapper::impl::org::ortc::RTCIdentityAssertion::toNative(wrapper::org::ortc::RTCIdentityAssertionPtr wrapper) +{ + if (!wrapper) return NativeAssertionPtr(); + + auto result = make_shared(); + result->mIDP = wrapper->idp; + result->mName = wrapper->name; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h index 634df220..286f1fd5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIdentityAssertion.h" +#include namespace wrapper { namespace impl { @@ -13,11 +13,16 @@ namespace wrapper { struct RTCIdentityAssertion : public wrapper::org::ortc::RTCIdentityAssertion { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IIdentityTypes::Assertion, NativeAssertion); RTCIdentityAssertionWeakPtr thisWeak_; RTCIdentityAssertion(); virtual ~RTCIdentityAssertion(); virtual void wrapper_init_org_ortc_RTCIdentityAssertion() override; + + static RTCIdentityAssertionPtr toWrapper(NativeAssertionPtr native); + static RTCIdentityAssertionPtr toWrapper(const NativeAssertion &native); + static NativeAssertionPtr toNative(wrapper::org::ortc::RTCIdentityAssertionPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp index c3b7a985..8533f560 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIdentityError.h" @@ -44,3 +43,32 @@ void wrapper::impl::org::ortc::RTCIdentityError::wrapper_init_org_ortc_RTCIdenti } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityErrorPtr wrapper::impl::org::ortc::RTCIdentityError::toWrapper(NativeErrorPtr native) +{ + if (!native) return RTCIdentityErrorPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityErrorPtr wrapper::impl::org::ortc::RTCIdentityError::toWrapper(const NativeError &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->idp = native.mIDP; + pThis->protocol = native.mProtocol; + pThis->loginUrl = native.mLoginURL; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityError::NativeErrorPtr wrapper::impl::org::ortc::RTCIdentityError::toWrapper(wrapper::org::ortc::RTCIdentityErrorPtr wrapper) +{ + if (!wrapper) return NativeErrorPtr(); + + auto result = make_shared(); + result->mIDP = wrapper->idp; + result->mProtocol = wrapper->protocol; + result->mLoginURL = wrapper->loginUrl; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h index 9e4ee681..1b3e2348 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIdentityError.h" +#include namespace wrapper { namespace impl { @@ -13,11 +13,17 @@ namespace wrapper { struct RTCIdentityError : public wrapper::org::ortc::RTCIdentityError { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IIdentityTypes::Error, NativeError); + RTCIdentityErrorWeakPtr thisWeak_; RTCIdentityError(); virtual ~RTCIdentityError(); virtual void wrapper_init_org_ortc_RTCIdentityError() override; + + static RTCIdentityErrorPtr toWrapper(NativeErrorPtr native); + static RTCIdentityErrorPtr toWrapper(const NativeError &native); + static NativeErrorPtr toWrapper(wrapper::org::ortc::RTCIdentityErrorPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp index 86644000..1298275b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCIdentityResult.h" @@ -44,3 +43,28 @@ void wrapper::impl::org::ortc::RTCIdentityResult::wrapper_init_org_ortc_RTCIdent } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityResultPtr wrapper::impl::org::ortc::RTCIdentityResult::toWrapper(NativeResultPtr native) +{ + if (!native) return RTCIdentityResultPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityResultPtr wrapper::impl::org::ortc::RTCIdentityResult::toWrapper(const NativeResult &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->assertion = native.mAssertion; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCIdentityResult::NativeResultPtr wrapper::impl::org::ortc::RTCIdentityResult::toNative(wrapper::org::ortc::RTCIdentityResultPtr wrapper) +{ + if (!wrapper) return NativeResultPtr(); + + auto result = make_shared(); + result->mAssertion = wrapper->assertion; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h index 7a28dee5..dec0b3e2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCIdentityResult.h" +#include namespace wrapper { namespace impl { @@ -13,11 +13,16 @@ namespace wrapper { struct RTCIdentityResult : public wrapper::org::ortc::RTCIdentityResult { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IIdentityTypes::Result, NativeResult); RTCIdentityResultWeakPtr thisWeak_; RTCIdentityResult(); virtual ~RTCIdentityResult(); virtual void wrapper_init_org_ortc_RTCIdentityResult() override; + + static RTCIdentityResultPtr toWrapper(NativeResultPtr native); + static RTCIdentityResultPtr toWrapper(const NativeResult &native); + static NativeResultPtr toNative(wrapper::org::ortc::RTCIdentityResultPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp index 912bcd6b..aba51318 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCInboundRtpStreamStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,177 +42,179 @@ wrapper::impl::org::ortc::RTCInboundRtpStreamStats::~RTCInboundRtpStreamStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCInboundRtpStreamStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCInboundRtpStreamStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ Optional< uint32_t > wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_ssrc() { - Optional< uint32_t > result {}; - return result; + return native_->mSSRC; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_associatedStatId() { - String result {}; - return result; + return native_->mAssociatedStatID; } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_isRemote() { - bool result {}; - return result; + return native_->mIsRemote; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_mediaType() { - String result {}; - return result; + return native_->mMediaType; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_mediaTrackId() { - String result {}; - return result; + return native_->mMediaTrackID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_transportId() { - String result {}; - return result; + return native_->mTransportID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_codecId() { - String result {}; - return result; + return native_->mCodecID; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_firCount() { - unsigned long result {}; - return result; + return native_->mFIRCount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_pliCount() { - unsigned long result {}; - return result; + return native_->mPLICount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_nackCount() { - unsigned long result {}; - return result; + return native_->mNACKCount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_sliCount() { - unsigned long result {}; - return result; + return native_->mSLICount; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCInboundRtpStreamStats::wrapper_init_org_ortc_RTCInboundRtpStreamStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCInboundRtpStreamStats::wrapper_init_org_ortc_RTCInboundRtpStreamStats(wrapper::org::ortc::RTCInboundRtpStreamStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCInboundRtpStreamStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCInboundRtpStreamStats::wrapper_init_org_ortc_RTCInboundRtpStreamStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_packetsReceived() { - unsigned long result {}; - return result; + return native_->mPacketsReceived; } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_bytesReceived() { - unsigned long long result {}; - return result; + return native_->mBytesReceived; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_packetsLost() { - unsigned long result {}; - return result; + return native_->mPacketsLost; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_jitter() { - double result {}; - return result; + return native_->mJitter; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_fractionLost() { - double result {}; - return result; + return native_->mFractionLost; } //------------------------------------------------------------------------------ ::zsLib::Milliseconds wrapper::impl::org::ortc::RTCInboundRtpStreamStats::get_endToEndDelay() { - ::zsLib::Milliseconds result {}; - return result; + return native_->mEndToEndDelay; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCInboundRtpStreamStatsPtr wrapper::impl::org::ortc::RTCInboundRtpStreamStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCInboundRtpStreamStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCInboundRtpStreamStats::NativeStatsPtr wrapper::impl::org::ortc::RTCInboundRtpStreamStats::toNative(wrapper::org::ortc::RTCInboundRtpStreamStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h index e7b11381..6d6fbe7a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCInboundRtpStreamStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCInboundRtpStreamStats : public wrapper::org::ortc::RTCInboundRtpStreamStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::InboundRTPStreamStats, NativeStats); RTCInboundRtpStreamStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCInboundRtpStreamStats(); virtual ~RTCInboundRtpStreamStats(); @@ -53,6 +55,9 @@ namespace wrapper { virtual double get_jitter() override; virtual double get_fractionLost() override; virtual ::zsLib::Milliseconds get_endToEndDelay() override; + + static RTCInboundRtpStreamStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCInboundRtpStreamStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp index a63118af..d9b401f1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCMediaStreamStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,72 +42,88 @@ wrapper::impl::org::ortc::RTCMediaStreamStats::~RTCMediaStreamStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCMediaStreamStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCMediaStreamStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMediaStreamStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCMediaStreamStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCMediaStreamStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMediaStreamStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMediaStreamStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCMediaStreamStats::wrapper_init_org_ortc_RTCMediaStreamStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCMediaStreamStats::wrapper_init_org_ortc_RTCMediaStreamStats(wrapper::org::ortc::RTCMediaStreamStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCMediaStreamStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCMediaStreamStats::wrapper_init_org_ortc_RTCMediaStreamStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMediaStreamStats::get_streamId() { - String result {}; - return result; + return native_->mStreamID; } //------------------------------------------------------------------------------ shared_ptr< list< String > > wrapper::impl::org::ortc::RTCMediaStreamStats::get_trackIds() { - shared_ptr< list< String > > result {}; - return result; + return make_shared< list >(native_->mTrackIDs); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMediaStreamStatsPtr wrapper::impl::org::ortc::RTCMediaStreamStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCMediaStreamStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMediaStreamStats::NativeStatsPtr wrapper::impl::org::ortc::RTCMediaStreamStats::toNative(wrapper::org::ortc::RTCMediaStreamStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h index 46bf443f..3cb4be29 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCMediaStreamStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCMediaStreamStats : public wrapper::org::ortc::RTCMediaStreamStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::MediaStreamStats, NativeStats); RTCMediaStreamStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCMediaStreamStats(); virtual ~RTCMediaStreamStats(); @@ -36,6 +38,9 @@ namespace wrapper { // properties RTCMediaStreamStats virtual String get_streamId() override; virtual shared_ptr< list< String > > get_trackIds() override; + + static RTCMediaStreamStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCMediaStreamStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp index 1232a5d4..e37c49fd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCMediaStreamTrackStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,156 +42,166 @@ wrapper::impl::org::ortc::RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCMediaStreamTrackStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCMediaStreamTrackStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMediaStreamTrackStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCMediaStreamTrackStats::wrapper_init_org_ortc_RTCMediaStreamTrackStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCMediaStreamTrackStats::wrapper_init_org_ortc_RTCMediaStreamTrackStats(wrapper::org::ortc::RTCMediaStreamTrackStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCMediaStreamTrackStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCMediaStreamTrackStats::wrapper_init_org_ortc_RTCMediaStreamTrackStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_trackId() { - String result {}; - return result; + return native_->mTrackID; } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_remoteSource() { - bool result {}; - return result; + return native_->mRemoteSource; } //------------------------------------------------------------------------------ shared_ptr< list< uint32_t > > wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_ssrcIds() { - shared_ptr< list< uint32_t > > result {}; + auto result = make_shared< list >(); + for (auto iter = native_->mSSRCIDs.begin(); iter != native_->mSSRCIDs.end(); ++iter) + { + result->push_back(*iter); + } return result; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_frameWidth() { - unsigned long result {}; - return result; + return native_->mFrameWidth; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_frameHeight() { - unsigned long result {}; - return result; + return native_->mFrameHeight; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesPerSecond() { - double result {}; - return result; + return native_->mFramesPerSecond; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesSent() { - unsigned long result {}; - return result; + return native_->mFramesSent; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesReceived() { - unsigned long result {}; - return result; + return native_->mFramesReceived; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesDecoded() { - unsigned long result {}; - return result; + return native_->mFramesDecoded; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesDropped() { - unsigned long result {}; - return result; + return native_->mFramesDropped; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_framesCorrupted() { - unsigned long result {}; - return result; + return native_->mFramesCorrupted; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_audioLevel() { - double result {}; - return result; + return native_->mAudioLevel; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_echoReturnLoss() { - double result {}; - return result; + return native_->mEchoReturnLoss; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCMediaStreamTrackStats::get_echoReturnLossEnhancement() { - double result {}; - return result; + return native_->mEchoReturnLossEnhancement; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMediaStreamTrackStatsPtr wrapper::impl::org::ortc::RTCMediaStreamTrackStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCMediaStreamTrackStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCMediaStreamTrackStats::NativeStatsPtr wrapper::impl::org::ortc::RTCMediaStreamTrackStats::toNative(wrapper::org::ortc::RTCMediaStreamTrackStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h index ee8bcff0..8c67efea 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCMediaStreamTrackStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCMediaStreamTrackStats : public wrapper::org::ortc::RTCMediaStreamTrackStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::MediaStreamTrackStats, NativeStats); RTCMediaStreamTrackStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCMediaStreamTrackStats(); virtual ~RTCMediaStreamTrackStats(); @@ -48,6 +50,9 @@ namespace wrapper { virtual double get_audioLevel() override; virtual double get_echoReturnLoss() override; virtual double get_echoReturnLossEnhancement() override; + + static RTCMediaStreamTrackStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCMediaStreamTrackStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp index 7231dbdd..8740dab0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCMessageEvent.h" @@ -20,6 +19,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCMessageEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCMessageEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCMessageEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCMessageEvent::RTCMessageEvent() { @@ -41,15 +44,22 @@ wrapper::impl::org::ortc::RTCMessageEvent::~RTCMessageEvent() //------------------------------------------------------------------------------ SecureByteBlockPtr wrapper::impl::org::ortc::RTCMessageEvent::get_binary() { - SecureByteBlockPtr result {}; - return result; + return native_->mBinary; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCMessageEvent::get_text() { - String result {}; - return result; + return native_->mText; } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h index 8f96f679..3e451e79 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCMessageEvent.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,11 @@ namespace wrapper { struct RTCMessageEvent : public wrapper::org::ortc::RTCMessageEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataChannelDelegate::MessageEventData, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCMessageEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCMessageEvent, WrapperType); RTCMessageEventWeakPtr thisWeak_; + NativeTypePtr native_; RTCMessageEvent(); virtual ~RTCMessageEvent(); @@ -21,6 +25,8 @@ namespace wrapper { // properties RTCMessageEvent virtual SecureByteBlockPtr get_binary() override; virtual String get_text() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp index 5368c40f..6105d676 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCOutboundRtpStreamStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,163 +42,167 @@ wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::~RTCOutboundRtpStreamStats( //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCOutboundRtpStreamStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ Optional< uint32_t > wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_ssrc() { - Optional< uint32_t > result {}; - return result; + return native_->mSSRC; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_associatedStatId() { - String result {}; - return result; + return native_->mAssociatedStatID; } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_isRemote() { - bool result {}; - return result; + return native_->mIsRemote; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_mediaType() { - String result {}; - return result; + return native_->mMediaType; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_mediaTrackId() { - String result {}; - return result; + return native_->mMediaTrackID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_transportId() { - String result {}; - return result; + return native_->mTransportID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_codecId() { - String result {}; - return result; + return native_->mCodecID; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_firCount() { - unsigned long result {}; - return result; + return native_->mFIRCount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_pliCount() { - unsigned long result {}; - return result; + return native_->mPLICount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_nackCount() { - unsigned long result {}; - return result; + return native_->mNACKCount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_sliCount() { - unsigned long result {}; - return result; + return native_->mSLICount; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::wrapper_init_org_ortc_RTCOutboundRtpStreamStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::wrapper_init_org_ortc_RTCOutboundRtpStreamStats(wrapper::org::ortc::RTCOutboundRtpStreamStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCOutboundRtpStreamStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::wrapper_init_org_ortc_RTCOutboundRtpStreamStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_packetsSent() { - unsigned long result {}; - return result; + return native_->mPacketsSent; } //------------------------------------------------------------------------------ unsigned long long wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_bytesSent() { - unsigned long long result {}; - return result; + return native_->mBytesSent; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_targetBitrate() { - double result {}; - return result; + return native_->mTargetBitrate; } //------------------------------------------------------------------------------ double wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::get_roundTripTime() { - double result {}; - return result; + return native_->mRoundTripTime; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCOutboundRtpStreamStatsPtr wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCOutboundRtpStreamStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::NativeStatsPtr wrapper::impl::org::ortc::RTCOutboundRtpStreamStats::toNative(wrapper::org::ortc::RTCOutboundRtpStreamStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h index b3665fb3..43e26870 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h @@ -1,10 +1,11 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCOutboundRtpStreamStats.h" +#include + namespace wrapper { namespace impl { @@ -13,7 +14,9 @@ namespace wrapper { struct RTCOutboundRtpStreamStats : public wrapper::org::ortc::RTCOutboundRtpStreamStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::OutboundRTPStreamStats, NativeStats); RTCOutboundRtpStreamStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCOutboundRtpStreamStats(); virtual ~RTCOutboundRtpStreamStats(); @@ -51,6 +54,9 @@ namespace wrapper { virtual unsigned long long get_bytesSent() override; virtual double get_targetBitrate() override; virtual double get_roundTripTime() override; + + static RTCOutboundRtpStreamStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCOutboundRtpStreamStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp index 45ee60d1..75e4e9e0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtcpFeedback.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpFeedback::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpFeedback::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpFeedback::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtcpFeedback::RTCRtcpFeedback() { @@ -46,25 +50,60 @@ void wrapper::impl::org::ortc::RTCRtcpFeedback::wrapper_init_org_ortc_RTCRtcpFee //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtcpFeedback::wrapper_init_org_ortc_RTCRtcpFeedback(wrapper::org::ortc::RTCRtcpFeedbackPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtcpFeedback::wrapper_init_org_ortc_RTCRtcpFeedback(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtcpFeedback::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtcpFeedback::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->type = native.mType; + pThis->parameter = native.mParameter; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mType = wrapper->type; + result->mParameter = wrapper->parameter; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h index e8481144..354f10d8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtcpFeedback.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtcpFeedback : public wrapper::org::ortc::RTCRtcpFeedback { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::RTCPFeedback, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtcpFeedback, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtcpFeedback, WrapperType); RTCRtcpFeedbackWeakPtr thisWeak_; RTCRtcpFeedback(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtcpFeedback(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp index 666e1d7a..3144b628 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtcpParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtcpParameters::RTCRtcpParameters() { @@ -46,25 +51,63 @@ void wrapper::impl::org::ortc::RTCRtcpParameters::wrapper_init_org_ortc_RTCRtcpP //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtcpParameters::wrapper_init_org_ortc_RTCRtcpParameters(wrapper::org::ortc::RTCRtcpParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtcpParameters::wrapper_init_org_ortc_RTCRtcpParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtcpParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtcpParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->ssrc = SafeIntssrc)>(native.mSSRC); + pThis->cName = native.mCName; + pThis->reducedSize = native.mReducedSize; + pThis->mux = native.mMux; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + result->mSSRC = SafeIntmSSRC)>(wrapper->ssrc); + result->mCName = wrapper->cName; + result->mReducedSize = wrapper->reducedSize; + result->mMux = wrapper->mux; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h index dc0ee686..87bbbf22 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtcpParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtcpParameters : public wrapper::org::ortc::RTCRtcpParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::RTCPParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtcpParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtcpParameters, WrapperType); RTCRtcpParametersWeakPtr thisWeak_; RTCRtcpParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtcpParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp index fc39064d..425475b1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtcpTransport.h" +#include "impl_org_ortc_RTCDtlsTransport.h" +#include "impl_org_ortc_RTCIceTransport.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpTransport::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpTransport::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtcpTransport::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtcpTransport::RTCRtcpTransport() { @@ -38,4 +44,34 @@ wrapper::impl::org::ortc::RTCRtcpTransport::~RTCRtcpTransport() { } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCDtlsTransport::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCIceTransport::toNative(impl); + } + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return impl->native_; + } + return NativeTypePtr(); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h index 1dfb9e30..8a12e0d4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtcpTransport.h" +#include namespace wrapper { namespace impl { @@ -13,10 +13,17 @@ namespace wrapper { struct RTCRtcpTransport : public wrapper::org::ortc::RTCRtcpTransport { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTCPTransport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtcpTransport, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtcpTransport, WrapperType); RTCRtcpTransportWeakPtr thisWeak_; + NativeTypePtr native_; RTCRtcpTransport(); virtual ~RTCRtcpTransport(); + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp index 1946917c..08537df0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpCapabilities.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_RTCRtpCodecCapability.h" +#include "impl_org_ortc_RTCRtpHeaderExtension.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCapabilities::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCapabilities::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCapabilities::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpCapabilities::RTCRtpCapabilities() { @@ -46,25 +52,86 @@ void wrapper::impl::org::ortc::RTCRtpCapabilities::wrapper_init_org_ortc_RTCRtpC //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpCapabilities::wrapper_init_org_ortc_RTCRtpCapabilities(wrapper::org::ortc::RTCRtpCapabilitiesPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpCapabilities::wrapper_init_org_ortc_RTCRtpCapabilities(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpCapabilities::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpCapabilities::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->codecs = make_shared< list< wrapper::org::ortc::RTCRtpCodecCapabilityPtr > >(); + for (auto iter = native.mCodecs.begin(); iter != native.mCodecs.end(); ++iter) { + auto wrapper = RTCRtpCodecCapability::toWrapper(*iter); + if (!wrapper) continue; + pThis->codecs->push_back(wrapper); + } + pThis->headerExtensions = make_shared< list< wrapper::org::ortc::RTCRtpHeaderExtensionPtr > >(); + for (auto iter = native.mHeaderExtensions.begin(); iter != native.mHeaderExtensions.end(); ++iter) { + auto wrapper = RTCRtpHeaderExtension::toWrapper(*iter); + if (!wrapper) continue; + pThis->headerExtensions->push_back(wrapper); + } + pThis->fecMechanisms = make_shared< list >(native.mFECMechanisms); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + if (wrapper->codecs) { + for (auto iter = wrapper->codecs->begin(); iter != wrapper->codecs->end(); ++iter) { + auto native = RTCRtpCodecCapability::toNative(*iter); + if (!native) continue; + result->mCodecs.push_back(*native); + } + } + if (wrapper->headerExtensions) { + for (auto iter = wrapper->headerExtensions->begin(); iter != wrapper->headerExtensions->end(); ++iter) { + auto native = RTCRtpHeaderExtension::toNative(*iter); + if (!native) continue; + result->mHeaderExtensions.push_back(*native); + } + } + if (wrapper->fecMechanisms) { + result->mFECMechanisms = *(wrapper->fecMechanisms); + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h index e0ad8131..924c8bc6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpCapabilities.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpCapabilities : public wrapper::org::ortc::RTCRtpCapabilities { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::Capabilities, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpCapabilities, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpCapabilities, WrapperType); RTCRtpCapabilitiesWeakPtr thisWeak_; RTCRtpCapabilities(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpCapabilities(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp index 5c666639..12d283d9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp @@ -1,6 +1,10 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpCodecCapability.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_RTCRtcpFeedback.h" +#include "impl_org_ortc_RTCRtpCodecCapabilityParameters.h" +#include "impl_org_ortc_RTCRtpCodecCapabilityOptions.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +24,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapability::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapability::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapability::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpCodecCapability::RTCRtpCodecCapability() { @@ -46,25 +55,94 @@ void wrapper::impl::org::ortc::RTCRtpCodecCapability::wrapper_init_org_ortc_RTCR //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpCodecCapability::wrapper_init_org_ortc_RTCRtpCodecCapability(wrapper::org::ortc::RTCRtpCodecCapabilityPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpCodecCapability::wrapper_init_org_ortc_RTCRtpCodecCapability(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpCodecCapability::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpCodecCapability::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->name = native.mName; + pThis->kind = native.mKind; + Helper::optionalSafeIntConvert(native.mClockRate, pThis->clockRate); + pThis->preferredPayloadType = native.mPreferredPayloadType; + pThis->pTime = native.mPTime; + pThis->maxPTime = native.mMaxPTime; + Helper::optionalSafeIntConvert(native.mNumChannels, pThis->numChannels); + pThis->rtcpFeedback = make_shared< list< wrapper::org::ortc::RTCRtcpFeedbackPtr > >(); + for (auto iter = native.mRTCPFeedback.begin(); iter != native.mRTCPFeedback.end(); ++iter) { + auto wrapper = RTCRtcpFeedback::toWrapper(*iter); + if (!wrapper) continue; + pThis->rtcpFeedback->push_back(wrapper); + } + pThis->parameters = RTCRtpCodecCapabilityParameters::toWrapper(native.mParameters); + pThis->options = RTCRtpCodecCapabilityOptions::toWrapper(native.mOptions); + pThis->maxTemporalLayers = native.mMaxTemporalLayers; + pThis->maxSpatialLayers = native.mMaxSpatialLayers; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + + result->mName = wrapper->name; + result->mKind = wrapper->kind; + Helper::optionalSafeIntConvert(wrapper->clockRate, result->mClockRate); + result->mPreferredPayloadType = wrapper->preferredPayloadType; + result->mPTime = wrapper->pTime; + result->mMaxPTime = wrapper->maxPTime; + Helper::optionalSafeIntConvert(wrapper->numChannels, result->mNumChannels); + if (wrapper->rtcpFeedback) { + for (auto iter = wrapper->rtcpFeedback->begin(); iter != wrapper->rtcpFeedback->end(); ++iter) { + auto native = RTCRtcpFeedback::toNative(*iter); + if (!native) continue; + result->mRTCPFeedback.push_back(*native); + } + } + result->mParameters = RTCRtpCodecCapabilityParameters::toNative(wrapper->parameters); + result->mOptions = RTCRtpCodecCapabilityOptions::toNative(wrapper->options); + result->mMaxTemporalLayers = wrapper->maxTemporalLayers; + result->mMaxSpatialLayers = wrapper->maxSpatialLayers; + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h index 7b26329c..064df5b7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpCodecCapability.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpCodecCapability : public wrapper::org::ortc::RTCRtpCodecCapability { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::CodecCapability, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpCodecCapability, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpCodecCapability, WrapperType); RTCRtpCodecCapabilityWeakPtr thisWeak_; RTCRtpCodecCapability(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpCodecCapability(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp index 7e92936d..97377636 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpCodecCapabilityOptions.h" +#include "impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::RTCRtpCodecCapabilityOptions() { @@ -38,4 +42,26 @@ wrapper::impl::org::ortc::RTCRtpCodecCapabilityOptions::~RTCRtpCodecCapabilityOp { } +//------------------------------------------------------------------------------ +WrapperTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperTypePtr(); + + { + auto wrapper = RTCRtpOpusCodecCapabilityOptions::toWrapper(native); + if (wrapper) return wrapper; + } + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h index 4a17e6ca..734198df 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpCodecCapabilityOptions.h" +#include namespace wrapper { namespace impl { @@ -13,10 +13,17 @@ namespace wrapper { struct RTCRtpCodecCapabilityOptions : public wrapper::org::ortc::RTCRtpCodecCapabilityOptions { + ZS_DECLARE_TYPEDEF_PTR(zsLib::Any, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpCodecCapabilityOptions, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpCodecCapabilityOptions, WrapperType); RTCRtpCodecCapabilityOptionsWeakPtr thisWeak_; + NativeTypePtr native_; RTCRtpCodecCapabilityOptions(); virtual ~RTCRtpCodecCapabilityOptions(); + + static WrapperTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp index 65b590a3..0742ae04 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp @@ -1,6 +1,10 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpCodecCapabilityParameters.h" +#include "impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h" +#include "impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h" +#include "impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h" +#include "impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h" +#include "impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +24,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::RTCRtpCodecCapabilityParameters() { @@ -38,4 +46,43 @@ wrapper::impl::org::ortc::RTCRtpCodecCapabilityParameters::~RTCRtpCodecCapabilit { } +//------------------------------------------------------------------------------ +WrapperTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + + { + auto wrapper = RTCRtpOpusCodecCapabilityParameters::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpVp8CodecCapabilityParameters::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpH264CodecCapabilityParameters::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpRtxCodecCapabilityParameters::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpFlexFecCodecCapabilityParameters::toWrapper(native); + if (wrapper) return wrapper; + } + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h index 55adaa95..e409bd6d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpCodecCapabilityParameters.h" +#include namespace wrapper { namespace impl { @@ -13,10 +13,17 @@ namespace wrapper { struct RTCRtpCodecCapabilityParameters : public wrapper::org::ortc::RTCRtpCodecCapabilityParameters { + ZS_DECLARE_TYPEDEF_PTR(zsLib::Any, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpCodecCapabilityParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpCodecCapabilityParameters, WrapperType); RTCRtpCodecCapabilityParametersWeakPtr thisWeak_; + NativeTypePtr native_; RTCRtpCodecCapabilityParameters(); virtual ~RTCRtpCodecCapabilityParameters(); + + static WrapperTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp index 8e74d039..928d8722 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp @@ -1,6 +1,11 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpCodecParameterSettings.h" +#include "impl_org_ortc_RTCRtpOpusCodecParameterSettings.h" +#include "impl_org_ortc_RTCRtpVp8CodecParameterSettings.h" +#include "impl_org_ortc_RTCRtpH264CodecParameterSettings.h" +#include "impl_org_ortc_RTCRtpRtxCodecParameterSettings.h" +#include "impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h" +#include "impl_org_ortc_RTCRtpRedCodecParameterSettings.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +25,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecParameterSettings::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecParameterSettings::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecParameterSettings::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpCodecParameterSettings::RTCRtpCodecParameterSettings() { @@ -38,4 +47,46 @@ wrapper::impl::org::ortc::RTCRtpCodecParameterSettings::~RTCRtpCodecParameterSet { } +//------------------------------------------------------------------------------ +WrapperTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + + { + auto wrapper = RTCRtpOpusCodecParameterSettings::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpVp8CodecParameterSettings::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpH264CodecParameterSettings::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpRtxCodecParameterSettings::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpFlexFecCodecParameterSettings::toWrapper(native); + if (wrapper) return wrapper; + } + { + auto wrapper = RTCRtpRedCodecParameterSettings::toWrapper(native); + if (wrapper) return wrapper; + } + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h index 5d6ee8eb..436df38e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpCodecParameterSettings.h" +#include namespace wrapper { namespace impl { @@ -13,10 +13,17 @@ namespace wrapper { struct RTCRtpCodecParameterSettings : public wrapper::org::ortc::RTCRtpCodecParameterSettings { + ZS_DECLARE_TYPEDEF_PTR(zsLib::Any, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpCodecParameterSettings, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpCodecParameterSettings, WrapperType); RTCRtpCodecParameterSettingsWeakPtr thisWeak_; + NativeTypePtr native_; RTCRtpCodecParameterSettings(); virtual ~RTCRtpCodecParameterSettings(); + + static WrapperTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp index a1f67953..39888dbf 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpCodecParameters.h" +#include "impl_org_ortc_RTCRtcpFeedback.h" +#include "impl_org_ortc_RTCRtpCodecParameterSettings.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +23,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpCodecParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpCodecParameters::RTCRtpCodecParameters() { @@ -46,25 +53,85 @@ void wrapper::impl::org::ortc::RTCRtpCodecParameters::wrapper_init_org_ortc_RTCR //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpCodecParameters::wrapper_init_org_ortc_RTCRtpCodecParameters(wrapper::org::ortc::RTCRtpCodecParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpCodecParameters::wrapper_init_org_ortc_RTCRtpCodecParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpCodecParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCRtpCodecParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpCodecParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->name = native.mName; + pThis->payloadType = SafeIntpayloadType)>(native.mPayloadType); + Helper::optionalSafeIntConvert(native.mClockRate, pThis->clockRate); + pThis->pTime = native.mPTime; + pThis->maxPTime = native.mMaxPTime; + Helper::optionalSafeIntConvert(native.mNumChannels, pThis->numChannels); + pThis->rtcpFeedback = make_shared< list >(); + for (auto iter = native.mRTCPFeedback.begin(); iter != native.mRTCPFeedback.end(); ++iter) { + auto wrapper = RTCRtcpFeedback::toWrapper(*iter); + if (!wrapper) continue; + pThis->rtcpFeedback->push_back(wrapper); + } + pThis->parameters = RTCRtpCodecParameterSettings::toWrapper(native.mParameters); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mName = wrapper->name; + result->mPayloadType = SafeIntmPayloadType)>(wrapper->payloadType); + Helper::optionalSafeIntConvert(wrapper->clockRate, result->mClockRate); + result->mPTime = wrapper->pTime; + result->mMaxPTime = wrapper->maxPTime; + Helper::optionalSafeIntConvert(wrapper->numChannels, result->mNumChannels); + if (wrapper->rtcpFeedback) { + for (auto iter = wrapper->rtcpFeedback->begin(); iter != wrapper->rtcpFeedback->end(); ++iter) { + auto native = RTCRtcpFeedback::toNative(*iter); + if (!native) continue; + result->mRTCPFeedback.push_back(*native); + } + } + if (wrapper->parameters) { + result->mParameters = RTCRtpCodecParameterSettings::toNative(wrapper->parameters); + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h index e687b398..a666ae2e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpCodecParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpCodecParameters : public wrapper::org::ortc::RTCRtpCodecParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::CodecParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpCodecParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpCodecParameters, WrapperType); RTCRtpCodecParametersWeakPtr thisWeak_; RTCRtpCodecParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpCodecParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp index 41b1c695..2a912c69 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpContributingSource.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpContributingSource::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpContributingSource::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpContributingSource::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpContributingSource::RTCRtpContributingSource() { @@ -46,8 +51,37 @@ void wrapper::impl::org::ortc::RTCRtpContributingSource::wrapper_init_org_ortc_R //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpContributingSource::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->timestamp = native.mTimestamp; + pThis->csrc = SafeIntcsrc)>(native.mCSRC); + pThis->audioLevel = SafeIntaudioLevel)>(native.mAudioLevel); + pThis->voiceActivityFlag = native.mVoiceActivityFlag; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + result->mTimestamp = wrapper->timestamp; + result->mCSRC = SafeIntmCSRC)>(wrapper->csrc); + result->mAudioLevel = SafeIntmAudioLevel)>(wrapper->audioLevel); + result->mVoiceActivityFlag = wrapper->voiceActivityFlag; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h index 8660a64c..3c23af67 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpContributingSource.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpContributingSource : public wrapper::org::ortc::RTCRtpContributingSource { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPReceiverTypes::ContributingSource, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpContributingSource, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpContributingSource, WrapperType); RTCRtpContributingSourceWeakPtr thisWeak_; RTCRtpContributingSource(); @@ -21,6 +24,10 @@ namespace wrapper { // methods RTCRtpContributingSource virtual void wrapper_init_org_ortc_RTCRtpContributingSource() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp index 71281f37..84472ff6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpEncodingParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_RTCRtpFecParameters.h" +#include "impl_org_ortc_RTCRtpRtxParameters.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +23,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpEncodingParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpEncodingParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpEncodingParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpEncodingParameters::RTCRtpEncodingParameters() { @@ -67,4 +74,74 @@ String wrapper::impl::org::ortc::RTCRtpEncodingParameters::hash() return result; } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mSSRC, pThis->ssrc); + Helper::optionalSafeIntConvert(native.mCodecPayloadType, pThis->codecPayloadType); + if (native.mFEC.hasValue()) { + pThis->fec = RTCRtpFecParameters::toWrapper(native.mFEC); + } + if (native.mRTX.hasValue()) { + pThis->rtx = RTCRtpRtxParameters::toWrapper(native.mRTX); + } + if (native.mPriority.hasValue()) { + pThis->priority = Helper::toWrapper(native.mPriority.value()); + } + Helper::optionalSafeIntConvert(native.mMaxBitrate, pThis->maxBitrate); + pThis->minQuality = native.mMinQuality; + pThis->resolutionScale = native.mResolutionScale; + pThis->framerateScale = native.mFramerateScale; + pThis->active = native.mActive; + pThis->encodingId = native.mEncodingID; + pThis->dependencyEncodingIds = make_shared< list >(native.mDependencyEncodingIDs); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->ssrc, result->mSSRC); + Helper::optionalSafeIntConvert(wrapper->codecPayloadType, result->mCodecPayloadType); + if (wrapper->fec.hasValue()) { + if (wrapper->fec.value()) { + auto native = RTCRtpFecParameters::toNative(wrapper->fec.value()); + if (native) { + result->mFEC = *native; + } + } + } + if (wrapper->rtx.hasValue()) { + if (wrapper->rtx.value()) { + auto native = RTCRtpRtxParameters::toNative(wrapper->rtx.value()); + if (native) { + result->mRTX = *native; + } + } + } + if (wrapper->priority.hasValue()) { + result->mPriority = Helper::toNative(wrapper->priority.value()); + } + Helper::optionalSafeIntConvert(wrapper->maxBitrate, result->mMaxBitrate); + result->mMinQuality = wrapper->minQuality; + result->mResolutionScale = wrapper->resolutionScale; + result->mFramerateScale = wrapper->framerateScale; + result->mActive = wrapper->active; + result->mEncodingID = wrapper->encodingId; + if (wrapper->dependencyEncodingIds) { + result->mDependencyEncodingIDs = (*wrapper->dependencyEncodingIds); + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h index a567d97a..0ce2b106 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpEncodingParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpEncodingParameters : public wrapper::org::ortc::RTCRtpEncodingParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::EncodingParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpEncodingParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpEncodingParameters, WrapperType); RTCRtpEncodingParametersWeakPtr thisWeak_; RTCRtpEncodingParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpEncodingParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp index dfffeac5..05d572da 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpFecParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFecParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFecParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFecParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpFecParameters::RTCRtpFecParameters() { @@ -46,25 +51,66 @@ void wrapper::impl::org::ortc::RTCRtpFecParameters::wrapper_init_org_ortc_RTCRtp //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpFecParameters::wrapper_init_org_ortc_RTCRtpFecParameters(wrapper::org::ortc::RTCRtpFecParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpFecParameters::wrapper_init_org_ortc_RTCRtpFecParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpFecParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpFecParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mSSRC, pThis->ssrc); + pThis->mechanism = native.mMechanism; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->ssrc, result->mSSRC); + result->mMechanism = wrapper->mechanism; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h index d66f8ce0..65d92538 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpFecParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpFecParameters : public wrapper::org::ortc::RTCRtpFecParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::FECParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpFecParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpFecParameters, WrapperType); RTCRtpFecParametersWeakPtr thisWeak_; RTCRtpFecParameters(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpFecParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp index fc0ca4b8..fed2fbd1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::RTCRtpFlexFecCodecCapabilityParameters() { @@ -46,25 +51,77 @@ void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::wrapper_i //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters(wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParametersPtr source) { + if (!source) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpFlexFecCodecCapabilityParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->repairWindow = native.mRepairWindow; + Helper::optionalSafeIntConvert(native.mL, pThis->l); + Helper::optionalSafeIntConvert(native.mD, pThis->d); + if (native.mToP.hasValue()) { + pThis->toP = Helper::toWrapper(native.mToP.value()); + } + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mRepairWindow = wrapper->repairWindow; + Helper::optionalSafeIntConvert(wrapper->l, result->mL); + Helper::optionalSafeIntConvert(wrapper->d, result->mD); + if (wrapper->toP.hasValue()) { + result->mToP = Helper::toNative(wrapper->toP.value()); + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h index b37d70cd..ad015428 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpFlexFecCodecCapabilityParameters : public wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::FlexFECCodecCapabilityParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpFlexFecCodecCapabilityParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpFlexFecCodecCapabilityParameters, WrapperType); RTCRtpFlexFecCodecCapabilityParametersWeakPtr thisWeak_; RTCRtpFlexFecCodecCapabilityParameters(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp index 1e2cc61a..907d2eae 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::RTCRtpFlexFecCodecParameterSettings() { @@ -41,15 +46,13 @@ wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::~RTCRtpFlexFecCod //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ @@ -60,11 +63,65 @@ void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::wrapper_init //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettingsPtr source) { + if (!source) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpFlexFecCodecParameterSettings::wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->repairWindow = native.mRepairWindow; + Helper::optionalSafeIntConvert(native.mL, pThis->l); + Helper::optionalSafeIntConvert(native.mD, pThis->d); + if (native.mToP.hasValue()) { + pThis->toP = Helper::toWrapper(native.mToP.value()); + } + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mRepairWindow = wrapper->repairWindow; + Helper::optionalSafeIntConvert(wrapper->l, result->mL); + Helper::optionalSafeIntConvert(wrapper->d, result->mD); + if (wrapper->toP.hasValue()) { + result->mToP = Helper::toNative(wrapper->toP.value()); + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h index 1883981f..f0e6684a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpFlexFecCodecParameterSettings.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpFlexFecCodecParameterSettings : public wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettings { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::FlexFECCodecParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpFlexFecCodecParameterSettings, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettings, WrapperType); RTCRtpFlexFecCodecParameterSettingsWeakPtr thisWeak_; RTCRtpFlexFecCodecParameterSettings(); @@ -26,6 +29,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings() override; virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::RTCRtpFlexFecCodecParameterSettingsPtr source) override; virtual void wrapper_init_org_ortc_RTCRtpFlexFecCodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp index 361fd0ae..932dd8d5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::RTCRtpH264CodecCapabilityParameters() { @@ -46,25 +51,89 @@ void wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::wrapper_init //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters(wrapper::org::ortc::RTCRtpH264CodecCapabilityParametersPtr source) { + if (!source) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpH264CodecCapabilityParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mProfileLevelID, pThis->profileLevelId); + pThis->packetizationModes = make_shared< list< unsigned short > >(); + for (auto iter = native.mPacketizationModes.begin(); iter != native.mPacketizationModes.end(); ++iter) { + pThis->packetizationModes->push_back(SafeInt(*iter)); + } + Helper::optionalSafeIntConvert(native.mMaxMBPS, pThis->maxMbps); + Helper::optionalSafeIntConvert(native.mMaxSMBPS, pThis->maxSMbps); + Helper::optionalSafeIntConvert(native.mMaxFS, pThis->maxFs); + Helper::optionalSafeIntConvert(native.mMaxCPB, pThis->maxCpb); + Helper::optionalSafeIntConvert(native.mMaxDPB, pThis->maxDpb); + Helper::optionalSafeIntConvert(native.mMaxBR, pThis->maxBr); + + return pThis; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->profileLevelId, result->mProfileLevelID); + if (wrapper->packetizationModes) { + for (auto iter = wrapper->packetizationModes->begin(); iter != wrapper->packetizationModes->end(); ++iter) { + result->mPacketizationModes.push_back(SafeIntmPacketizationModes)::value_type>(*iter)); + } + } + Helper::optionalSafeIntConvert(wrapper->maxMbps, result->mMaxMBPS); + Helper::optionalSafeIntConvert(wrapper->maxSMbps, result->mMaxSMBPS); + Helper::optionalSafeIntConvert(wrapper->maxFs, result->mMaxFS); + Helper::optionalSafeIntConvert(wrapper->maxCpb, result->mMaxCPB); + Helper::optionalSafeIntConvert(wrapper->maxDpb, result->mMaxDPB); + Helper::optionalSafeIntConvert(wrapper->maxBr, result->mMaxBR); + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h index 57c400af..ed597871 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpH264CodecCapabilityParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpH264CodecCapabilityParameters : public wrapper::org::ortc::RTCRtpH264CodecCapabilityParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::H264CodecCapabilityParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpH264CodecCapabilityParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpH264CodecCapabilityParameters, WrapperType); RTCRtpH264CodecCapabilityParametersWeakPtr thisWeak_; RTCRtpH264CodecCapabilityParameters(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpH264CodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp index 16496782..1e7e3ad4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpH264CodecParameterSettings.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::RTCRtpH264CodecParameterSettings() { @@ -41,15 +47,13 @@ wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::~RTCRtpH264CodecPara //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ @@ -60,11 +64,78 @@ void wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::wrapper_init_or //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings(wrapper::org::ortc::RTCRtpH264CodecParameterSettingsPtr source) { + if (!source) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpH264CodecParameterSettings::wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mProfileLevelID, pThis->profileLevelId); + pThis->packetizationModes = make_shared< list< unsigned short > >(); + for (auto iter = native.mPacketizationModes.begin(); iter != native.mPacketizationModes.end(); ++iter) { + pThis->packetizationModes->push_back(SafeInt(*iter)); + } + Helper::optionalSafeIntConvert(native.mMaxMBPS, pThis->maxMbps); + Helper::optionalSafeIntConvert(native.mMaxSMBPS, pThis->maxSMbps); + Helper::optionalSafeIntConvert(native.mMaxFS, pThis->maxFs); + Helper::optionalSafeIntConvert(native.mMaxCPB, pThis->maxCpb); + Helper::optionalSafeIntConvert(native.mMaxDPB, pThis->maxDpb); + Helper::optionalSafeIntConvert(native.mMaxBR, pThis->maxBr); + + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->profileLevelId, result->mProfileLevelID); + if (wrapper->packetizationModes) { + for (auto iter = wrapper->packetizationModes->begin(); iter != wrapper->packetizationModes->end(); ++iter) { + result->mPacketizationModes.push_back(SafeIntmPacketizationModes)::value_type>(*iter)); + } + } + Helper::optionalSafeIntConvert(wrapper->maxMbps, result->mMaxMBPS); + Helper::optionalSafeIntConvert(wrapper->maxSMbps, result->mMaxSMBPS); + Helper::optionalSafeIntConvert(wrapper->maxFs, result->mMaxFS); + Helper::optionalSafeIntConvert(wrapper->maxCpb, result->mMaxCPB); + Helper::optionalSafeIntConvert(wrapper->maxDpb, result->mMaxDPB); + Helper::optionalSafeIntConvert(wrapper->maxBr, result->mMaxBR); + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h index 2909bf34..6dd72267 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpH264CodecParameterSettings.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpH264CodecParameterSettings : public wrapper::org::ortc::RTCRtpH264CodecParameterSettings { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::H264CodecParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpH264CodecParameterSettings, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpH264CodecParameterSettings, WrapperType); RTCRtpH264CodecParameterSettingsWeakPtr thisWeak_; RTCRtpH264CodecParameterSettings(); @@ -26,6 +29,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings() override; virtual void wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings(wrapper::org::ortc::RTCRtpH264CodecParameterSettingsPtr source) override; virtual void wrapper_init_org_ortc_RTCRtpH264CodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp index 3f6e06d6..a788ab06 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpHeaderExtension.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpHeaderExtension::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpHeaderExtension::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpHeaderExtension::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpHeaderExtension::RTCRtpHeaderExtension() { @@ -46,25 +52,64 @@ void wrapper::impl::org::ortc::RTCRtpHeaderExtension::wrapper_init_org_ortc_RTCR //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpHeaderExtension::wrapper_init_org_ortc_RTCRtpHeaderExtension(wrapper::org::ortc::RTCRtpHeaderExtensionPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpHeaderExtension::wrapper_init_org_ortc_RTCRtpHeaderExtension(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpHeaderExtension::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpHeaderExtension::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->kind = native.mKind; + pThis->uri = native.mURI; + pThis->preferredId = SafeIntpreferredId)>(native.mPreferredID); + pThis->preferredEncrypt = native.mPreferredEncrypt; + return pThis; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mKind = wrapper->kind; + result->mURI = wrapper->uri; + result->mPreferredID = SafeIntmPreferredID)>(wrapper->preferredId); + result->mPreferredEncrypt = wrapper->preferredEncrypt; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h index 67d5bb53..21a1ccd4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpHeaderExtension.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpHeaderExtension : public wrapper::org::ortc::RTCRtpHeaderExtension { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::HeaderExtension, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpHeaderExtension, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpHeaderExtension, WrapperType); RTCRtpHeaderExtensionWeakPtr thisWeak_; RTCRtpHeaderExtension(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpHeaderExtension(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp index 5cbe4a02..88b21325 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpHeaderExtensionParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::RTCRtpHeaderExtensionParameters() { @@ -46,25 +52,62 @@ void wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::wrapper_init_org //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters(wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpHeaderExtensionParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->uri = native.mURI; + pThis->id = SafeIntid)>(native.mID); + pThis->encrypt = native.mEncrypt; + return pThis; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mURI = wrapper->uri; + result->mID = SafeIntmID)>(wrapper->id); + result->mEncrypt = wrapper->encrypt; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h index 7980a5b1..620e9031 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpHeaderExtensionParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpHeaderExtensionParameters : public wrapper::org::ortc::RTCRtpHeaderExtensionParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::HeaderExtensionParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpHeaderExtensionParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpHeaderExtensionParameters, WrapperType); RTCRtpHeaderExtensionParametersWeakPtr thisWeak_; RTCRtpHeaderExtensionParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpHeaderExtensionParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp index 65184bce..b2294893 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpListener.h" +#include "impl_org_ortc_RTCRtpUnhandledEvent.h" +#include "impl_org_ortc_RTCRtpTransport.h" +#include "impl_org_ortc_RTCRtpHeaderExtensionParameters.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +23,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpListener::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpListener::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpListener::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpListener::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpListener::RTCRtpListener() { @@ -41,13 +51,13 @@ wrapper::impl::org::ortc::RTCRtpListener::~RTCRtpListener() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpListener::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpListener::wrapper_init_org_ortc_RTCRtpListener(wrapper::org::ortc::RTCRtpTransportPtr transport) { + native_ = NativeType::create(thisWeak_.lock(), RTCRtpTransport::toNative(transport)); } //------------------------------------------------------------------------------ @@ -56,30 +66,96 @@ void wrapper::impl::org::ortc::RTCRtpListener::wrapper_init_org_ortc_RTCRtpListe shared_ptr< list< wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr > > headerExtensions ) { + ::ortc::IRTPTypes::HeaderExtensionParametersList nativeList; + if (headerExtensions) { + for (auto iter = headerExtensions->begin(); iter != headerExtensions->end(); ++iter) { + auto native = RTCRtpHeaderExtensionParameters::toNative(*iter); + if (!native) continue; + nativeList.push_back(*native); + } + } + native_ = NativeType::create(thisWeak_.lock(), RTCRtpTransport::toNative(transport), nativeList); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpListener::setHeaderExtensions(shared_ptr< list< wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr > > headerExtensions) { + ::ortc::IRTPTypes::HeaderExtensionParametersList nativeList; + if (headerExtensions) { + for (auto iter = headerExtensions->begin(); iter != headerExtensions->end(); ++iter) { + auto native = RTCRtpHeaderExtensionParameters::toNative(*iter); + if (!native) continue; + nativeList.push_back(*native); + } + } + native_->setHeaderExtensions(nativeList); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCRtpListener::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpListener::get_transport() { - wrapper::org::ortc::RTCRtpTransportPtr result {}; - return result; + return RTCRtpTransport::toWrapper(native_->transport()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpListener::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onRTPListenerUnhandledRTP( + IRTPListenerPtr listener, + SSRCType ssrc, + PayloadType payloadType, + const char *mid, + const char *rid +) +{ + onUnhandled(RTCRtpUnhandledEvent::toWrapper(ssrc, payloadType, mid, rid)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h index 165d58d9..886b613a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h @@ -1,19 +1,31 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpListener.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCRtpListener : public wrapper::org::ortc::RTCRtpListener + struct RTCRtpListener : public wrapper::org::ortc::RTCRtpListener, + public ::ortc::IRTPListenerDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPListener, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPListener, IRTPListener); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPListenerSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpListener, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpListener, WrapperType); + RTCRtpListenerWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCRtpListener(); virtual ~RTCRtpListener(); @@ -34,6 +46,19 @@ namespace wrapper { virtual wrapper::org::ortc::RTCRtpTransportPtr get_transport() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onRTPListenerUnhandledRTP( + IRTPListenerPtr listener, + SSRCType ssrc, + PayloadType payloadType, + const char *mid, + const char *rid + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp index a10c19c9..7f3dfc2e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::RTCRtpOpusCodecCapabilityOptions() { @@ -46,25 +51,83 @@ void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::wrapper_init_or //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions(wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptionsPtr source) { + if (!source) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityOptions::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mComplexity, pThis->complexity); + if (native.mSignal.hasValue()) { + pThis->signal = Helper::toWrapper(native.mSignal.value()); + } + if (native.mApplication.hasValue()) { + pThis->application = Helper::toWrapper(native.mApplication.value()); + } + Helper::optionalSafeIntConvert(native.mPacketLossPerc, pThis->packetLossPerc); + pThis->predictionDisabled = native.mPredictionDisabled; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->complexity, result->mComplexity); + if (wrapper->signal.hasValue()) { + result->mSignal = Helper::toNative(wrapper->signal.value()); + } + if (wrapper->application.hasValue()) { + result->mApplication = Helper::toNative(wrapper->application.value()); + } + Helper::optionalSafeIntConvert(wrapper->packetLossPerc, result->mPacketLossPerc); + result->mPredictionDisabled = wrapper->predictionDisabled; + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h index bab6f245..57c03cd5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpOpusCodecCapabilityOptions.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpOpusCodecCapabilityOptions : public wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptions { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::OpusCodecCapabilityOptions, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpOpusCodecCapabilityOptions, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpOpusCodecCapabilityOptions, WrapperType); RTCRtpOpusCodecCapabilityOptionsWeakPtr thisWeak_; RTCRtpOpusCodecCapabilityOptions(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityOptions(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp index fcdcb519..24b8922a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::RTCRtpOpusCodecCapabilityParameters() { @@ -46,25 +51,79 @@ void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::wrapper_init //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters(wrapper::org::ortc::RTCRtpOpusCodecCapabilityParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpOpusCodecCapabilityParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mMaxPlaybackRate, pThis->maxPlaybackRate); + Helper::optionalSafeIntConvert(native.mMaxAverageBitrate, pThis->maxAverageBitrate); + pThis->stereo = native.mStereo; + pThis->cbr = native.mCBR; + pThis->useInbandFec = native.mUseInbandFEC; + pThis->useDtx = native.mUseDTX; + Helper::optionalSafeIntConvert(native.mSPropMaxCaptureRate, pThis->sPropMaxCaptureRate); + pThis->sPropStereo = native.mSPropStereo; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->maxPlaybackRate, result->mMaxPlaybackRate); + Helper::optionalSafeIntConvert(wrapper->maxAverageBitrate, result->mMaxAverageBitrate); + result->mStereo = wrapper->stereo; + result->mCBR = wrapper->cbr; + result->mUseInbandFEC = wrapper->useInbandFec; + result->mUseDTX = wrapper->useDtx; + Helper::optionalSafeIntConvert(wrapper->sPropMaxCaptureRate, result->mSPropMaxCaptureRate); + result->mSPropStereo = wrapper->sPropStereo; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h index 0e16dbfc..054708be 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpOpusCodecCapabilityParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpOpusCodecCapabilityParameters : public wrapper::org::ortc::RTCRtpOpusCodecCapabilityParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::OpusCodecCapabilityParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpOpusCodecCapabilityParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpOpusCodecCapabilityParameters, WrapperType); RTCRtpOpusCodecCapabilityParametersWeakPtr thisWeak_; RTCRtpOpusCodecCapabilityParameters(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpOpusCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp index fc9622dc..ff167533 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpOpusCodecParameterSettings.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::RTCRtpOpusCodecParameterSettings() { @@ -46,25 +52,97 @@ void wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::wrapper_init_or //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings(wrapper::org::ortc::RTCRtpOpusCodecParameterSettingsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpOpusCodecParameterSettings::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mMaxPlaybackRate, pThis->maxPlaybackRate); + Helper::optionalSafeIntConvert(native.mMaxAverageBitrate, pThis->maxAverageBitrate); + pThis->stereo = native.mStereo; + pThis->cbr = native.mCBR; + pThis->useInbandFec = native.mUseInbandFEC; + pThis->useDtx = native.mUseDTX; + Helper::optionalSafeIntConvert(native.mComplexity, pThis->complexity); + if (native.mSignal.hasValue()) { + pThis->signal = Helper::toWrapper(native.mSignal.value()); + } + if (native.mApplication.hasValue()) { + pThis->application = Helper::toWrapper(native.mApplication.value()); + } + Helper::optionalSafeIntConvert(native.mPacketLossPerc, pThis->packetLossPerc); + pThis->predictionDisabled = native.mPredictionDisabled; + Helper::optionalSafeIntConvert(native.mSPropMaxCaptureRate, pThis->sPropMaxCaptureRate); + pThis->sPropStereo = native.mSPropStereo; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->maxPlaybackRate, result->mMaxPlaybackRate); + Helper::optionalSafeIntConvert(wrapper->maxAverageBitrate, result->mMaxAverageBitrate); + result->mStereo = wrapper->stereo; + result->mCBR = wrapper->cbr; + result->mUseInbandFEC = wrapper->useInbandFec; + result->mUseDTX = wrapper->useDtx; + Helper::optionalSafeIntConvert(wrapper->complexity, result->mComplexity); + if (wrapper->signal.hasValue()) { + result->mSignal = Helper::toNative(wrapper->signal.value()); + } + if (wrapper->application.hasValue()) { + result->mApplication = Helper::toNative(wrapper->application.value()); + } + Helper::optionalSafeIntConvert(wrapper->packetLossPerc, result->mPacketLossPerc); + result->mPacketLossPerc = wrapper->predictionDisabled; + Helper::optionalSafeIntConvert(wrapper->sPropMaxCaptureRate, result->mSPropMaxCaptureRate); + result->mSPropStereo = wrapper->sPropStereo; + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h index 35ac138d..e09707cc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpOpusCodecParameterSettings.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpOpusCodecParameterSettings : public wrapper::org::ortc::RTCRtpOpusCodecParameterSettings { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::OpusCodecParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpOpusCodecParameterSettings, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpOpusCodecParameterSettings, WrapperType); RTCRtpOpusCodecParameterSettingsWeakPtr thisWeak_; RTCRtpOpusCodecParameterSettings(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpOpusCodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp index 86552d3a..3bc8396a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp @@ -1,6 +1,11 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_RTCRtpCodecParameters.h" +#include "impl_org_ortc_RTCRtpHeaderExtensionParameters.h" +#include "impl_org_ortc_RTCRtpEncodingParameters.h" +#include "impl_org_ortc_RTCRtcpParameters.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +25,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpParameters::RTCRtpParameters() { @@ -46,25 +55,104 @@ void wrapper::impl::org::ortc::RTCRtpParameters::wrapper_init_org_ortc_RTCRtpPar //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpParameters::wrapper_init_org_ortc_RTCRtpParameters(wrapper::org::ortc::RTCRtpParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpParameters::wrapper_init_org_ortc_RTCRtpParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCRtpParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->codecs = make_shared< list< wrapper::org::ortc::RTCRtpCodecParametersPtr > >(); + for (auto iter = native.mCodecs.begin(); iter != native.mCodecs.end(); ++iter) { + auto wrapper = RTCRtpCodecParameters::toWrapper(*iter); + if (!wrapper) continue; + pThis->codecs->push_back(wrapper); + } + pThis->headerExtensions = make_shared< list< wrapper::org::ortc::RTCRtpHeaderExtensionParametersPtr > >(); + for (auto iter = native.mHeaderExtensions.begin(); iter != native.mHeaderExtensions.end(); ++iter) { + auto wrapper = RTCRtpHeaderExtensionParameters::toWrapper(*iter); + if (!wrapper) continue; + pThis->headerExtensions->push_back(wrapper); + } + pThis->encodings = make_shared< list< wrapper::org::ortc::RTCRtpEncodingParametersPtr > >(); + for (auto iter = native.mEncodings.begin(); iter != native.mEncodings.end(); ++iter) { + auto wrapper = RTCRtpEncodingParameters::toWrapper(*iter); + if (!wrapper) continue; + pThis->encodings->push_back(wrapper); + } + pThis->rtcp = RTCRtcpParameters::toWrapper(native.mRTCP); + pThis->degredationPreference = Helper::toWrapper(native.mDegredationPreference); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + if (wrapper->codecs) { + for (auto iter = wrapper->codecs->begin(); iter != wrapper->codecs->end(); ++iter) { + auto native = RTCRtpCodecParameters::toNative(*iter); + if (!native) continue; + result->mCodecs.push_back(*native); + } + } + if (wrapper->headerExtensions) { + for (auto iter = wrapper->headerExtensions->begin(); iter != wrapper->headerExtensions->end(); ++iter) { + auto native = RTCRtpHeaderExtensionParameters::toNative(*iter); + if (!native) continue; + result->mHeaderExtensions.push_back(*native); + } + } + if (wrapper->encodings) { + for (auto iter = wrapper->encodings->begin(); iter != wrapper->encodings->end(); ++iter) { + auto native = RTCRtpEncodingParameters::toNative(*iter); + if (!native) continue; + result->mEncodings.push_back(*native); + } + } + if (wrapper->rtcp) { + auto native = RTCRtcpParameters::toNative(wrapper->rtcp); + if (native) { + result->mRTCP = *native; + } + } + result->mDegredationPreference = Helper::toNative(wrapper->degredationPreference); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h index ea06b7b6..d66129b4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpParameters : public wrapper::org::ortc::RTCRtpParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::Parameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpParameters, WrapperType); RTCRtpParametersWeakPtr thisWeak_; RTCRtpParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp index 48e4e18b..8aab1d91 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp @@ -1,6 +1,13 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpReceiver.h" +#include "impl_org_ortc_RTCRtpTransport.h" +#include "impl_org_ortc_RTCRtcpTransport.h" +#include "impl_org_ortc_MediaStreamTrack.h" +#include "impl_org_ortc_RTCRtpContributingSource.h" +#include "impl_org_ortc_RTCRtpCapabilities.h" +#include "impl_org_ortc_RTCRtpParameters.h" + +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +27,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpReceiver::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpReceiver::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpReceiver::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpReceiver::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpReceiver::RTCRtpReceiver() { @@ -41,8 +55,7 @@ wrapper::impl::org::ortc::RTCRtpReceiver::~RTCRtpReceiver() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpReceiver::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ @@ -51,6 +64,7 @@ void wrapper::impl::org::ortc::RTCRtpReceiver::wrapper_init_org_ortc_RTCRtpRecei wrapper::org::ortc::RTCRtpTransportPtr transport ) { + native_ = IRTPReceiver::create(thisWeak_.lock(), Helper::toNative(kind), RTCRtpTransport::toNative(transport)); } //------------------------------------------------------------------------------ @@ -60,11 +74,13 @@ void wrapper::impl::org::ortc::RTCRtpReceiver::wrapper_init_org_ortc_RTCRtpRecei wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport ) { + native_ = IRTPReceiver::create(thisWeak_.lock(), Helper::toNative(kind), RTCRtpTransport::toNative(transport), RTCRtcpTransport::toNative(rtcpTransport)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpReceiver::setTransport(wrapper::org::ortc::RTCRtpTransportPtr transport) { + native_->setTransport(RTCRtpTransport::toNative(transport)); } //------------------------------------------------------------------------------ @@ -73,65 +89,107 @@ void wrapper::impl::org::ortc::RTCRtpReceiver::setTransport( wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport ) { + native_->setTransport(RTCRtpTransport::toNative(transport), RTCRtcpTransport::toNative(rtcpTransport)); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::org::ortc::RTCRtpReceiver::getCapabilities(Optional< wrapper::org::ortc::MediaStreamTrackKind > kind) { - wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; - return result; + return wrapper::impl::org::ortc::RTCRtpCapabilities::toWrapper(NativeType::getCapabilities(kind.hasValue() ? Optional<::ortc::IMediaStreamTrackTypes::Kinds>(wrapper::impl::org::ortc::Helper::toNative(kind.value())) : Optional<::ortc::IMediaStreamTrackTypes::Kinds>())); } //------------------------------------------------------------------------------ PromisePtr wrapper::impl::org::ortc::RTCRtpReceiver::receive(wrapper::org::ortc::RTCRtpParametersPtr parameters) { - PromisePtr result {}; - return result; + auto native = RTCRtpParameters::toNative(parameters); + if (!native) return Promise::createRejected(Helper::getGuiQueue()); + return Helper::toWrapper(native_->receive(*native)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpReceiver::stop() { + native_->stop(); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCRtpContributingSourcePtr > > wrapper::impl::org::ortc::RTCRtpReceiver::getContributingSources() { - shared_ptr< list< wrapper::org::ortc::RTCRtpContributingSourcePtr > > result {}; + auto result = make_shared< list< wrapper::org::ortc::RTCRtpContributingSourcePtr > >(); + auto sources = native_->getContributingSources(); + for (auto iter = sources.begin(); iter != sources.end(); ++iter) { + auto wrapper = RTCRtpContributingSource::toWrapper(*iter); + if (!wrapper) continue; + result->push_back(wrapper); + } return result; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpReceiver::requestSendCsrc(uint32_t csrc) { + native_->requestSendCSRC(csrc); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCRtpReceiver::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::RTCRtpReceiver::get_track() { - wrapper::org::ortc::MediaStreamTrackPtr result {}; - return result; + return MediaStreamTrack::toWrapper(native_->track()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpReceiver::get_transport() { - wrapper::org::ortc::RTCRtpTransportPtr result {}; - return result; + return RTCRtpTransport::toWrapper(native_->transport()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtcpTransportPtr wrapper::impl::org::ortc::RTCRtpReceiver::get_rtcpTransport() { - wrapper::org::ortc::RTCRtcpTransportPtr result {}; + return RTCRtcpTransport::toWrapper(native_->rtcpTransport()); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); return result; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h index 71387a42..5d85b305 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h @@ -1,19 +1,30 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpReceiver.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCRtpReceiver : public wrapper::org::ortc::RTCRtpReceiver + struct RTCRtpReceiver : public wrapper::org::ortc::RTCRtpReceiver, + public ::ortc::IRTPReceiverDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPReceiver, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPReceiver, IRTPReceiver); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPReceiverSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpReceiver, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpReceiver, WrapperType); RTCRtpReceiverWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCRtpReceiver(); virtual ~RTCRtpReceiver(); @@ -46,6 +57,11 @@ namespace wrapper { virtual wrapper::org::ortc::MediaStreamTrackPtr get_track() override; virtual wrapper::org::ortc::RTCRtpTransportPtr get_transport() override; virtual wrapper::org::ortc::RTCRtcpTransportPtr get_rtcpTransport() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp index 96dc9985..60facc36 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpRedCodecParameterSettings.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::RTCRtpRedCodecParameterSettings() { @@ -46,25 +51,74 @@ void wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::wrapper_init_org //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings(wrapper::org::ortc::RTCRtpRedCodecParameterSettingsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpRedCodecParameterSettings::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->payloadTypes = make_shared< list< uint8_t > >(); + for (auto iter = native.mPayloadTypes.begin(); iter != native.mPayloadTypes.end(); ++iter) { + pThis->payloadTypes->push_back(SafeInt(*iter)); + } + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + if (wrapper->payloadTypes) { + for (auto iter = wrapper->payloadTypes->begin(); iter != wrapper->payloadTypes->end(); ++iter) { + result->mPayloadTypes.push_back(SafeInt< decltype(result->mPayloadTypes)::value_type >(*iter)); + } + } + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h index bf743db5..918a3550 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpRedCodecParameterSettings.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpRedCodecParameterSettings : public wrapper::org::ortc::RTCRtpRedCodecParameterSettings { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::REDCodecParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpRedCodecParameterSettings, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpRedCodecParameterSettings, WrapperType); RTCRtpRedCodecParameterSettingsWeakPtr thisWeak_; RTCRtpRedCodecParameterSettings(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpRedCodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp index 6a7b3d54..c6c6282e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::RTCRtpRtxCodecCapabilityParameters() { @@ -46,25 +51,67 @@ void wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::wrapper_init_ //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters(wrapper::org::ortc::RTCRtpRtxCodecCapabilityParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpRtxCodecCapabilityParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->apt = SafeIntapt)>(native.mApt); + pThis->rtxTime = native.mRTXTime; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mApt = SafeIntmApt)>(wrapper->apt); + result->mRTXTime = wrapper->rtxTime; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h index 087c33b6..c23851c1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpRtxCodecCapabilityParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpRtxCodecCapabilityParameters : public wrapper::org::ortc::RTCRtpRtxCodecCapabilityParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::RTXCodecCapabilityParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpRtxCodecCapabilityParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpRtxCodecCapabilityParameters, WrapperType); RTCRtpRtxCodecCapabilityParametersWeakPtr thisWeak_; RTCRtpRtxCodecCapabilityParameters(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpRtxCodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp index e0ca5a9f..f202ce22 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpRtxCodecParameterSettings.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::RTCRtpRtxCodecParameterSettings() { @@ -41,15 +46,13 @@ wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::~RTCRtpRtxCodecParame //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ @@ -60,11 +63,55 @@ void wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::wrapper_init_org //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings(wrapper::org::ortc::RTCRtpRtxCodecParameterSettingsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpRtxCodecParameterSettings::wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->apt = SafeIntapt)>(native.mApt); + pThis->rtxTime = native.mRTXTime; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mApt = SafeIntmApt)>(wrapper->apt); + result->mRTXTime = wrapper->rtxTime; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h index 6b88e9a9..b740f5ab 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpRtxCodecParameterSettings.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpRtxCodecParameterSettings : public wrapper::org::ortc::RTCRtpRtxCodecParameterSettings { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::RTXCodecParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpRtxCodecParameterSettings, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpRtxCodecParameterSettings, WrapperType); RTCRtpRtxCodecParameterSettingsWeakPtr thisWeak_; RTCRtpRtxCodecParameterSettings(); @@ -26,6 +29,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings() override; virtual void wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings(wrapper::org::ortc::RTCRtpRtxCodecParameterSettingsPtr source) override; virtual void wrapper_init_org_ortc_RTCRtpRtxCodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp index fa3500c3..b485191a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpRtxParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpRtxParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpRtxParameters::RTCRtpRtxParameters() { @@ -46,25 +51,59 @@ void wrapper::impl::org::ortc::RTCRtpRtxParameters::wrapper_init_org_ortc_RTCRtp //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpRtxParameters::wrapper_init_org_ortc_RTCRtpRtxParameters(wrapper::org::ortc::RTCRtpRtxParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpRtxParameters::wrapper_init_org_ortc_RTCRtpRtxParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpRtxParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpRtxParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mSSRC, pThis->ssrc); + return pThis; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->ssrc, result->mSSRC); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h index b87d471c..dfb95710 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpRtxParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpRtxParameters : public wrapper::org::ortc::RTCRtpRtxParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::RTXParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpRtxParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpRtxParameters, WrapperType); RTCRtpRtxParametersWeakPtr thisWeak_; RTCRtpRtxParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpRtxParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp index 3a06de22..317fe0fa 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp @@ -1,6 +1,12 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpSender.h" +#include "impl_org_ortc_RTCRtpTransport.h" +#include "impl_org_ortc_RTCRtcpTransport.h" +#include "impl_org_ortc_MediaStreamTrack.h" +#include "impl_org_ortc_RTCRtpParameters.h" +#include "impl_org_ortc_RTCRtpCapabilities.h" +#include "impl_org_ortc_RTCSsrcConflictEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +26,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpSender::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpSender::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpSender::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpSender::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpSender::RTCRtpSender() { @@ -41,8 +54,7 @@ wrapper::impl::org::ortc::RTCRtpSender::~RTCRtpSender() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCRtpSender::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ @@ -51,6 +63,7 @@ void wrapper::impl::org::ortc::RTCRtpSender::wrapper_init_org_ortc_RTCRtpSender( wrapper::org::ortc::RTCRtpTransportPtr transport ) { + native_ = NativeType::create(thisWeak_.lock(), wrapper::impl::org::ortc::MediaStreamTrack::toNative(track), wrapper::impl::org::ortc::RTCRtpTransport::toNative(transport)); } //------------------------------------------------------------------------------ @@ -60,11 +73,13 @@ void wrapper::impl::org::ortc::RTCRtpSender::wrapper_init_org_ortc_RTCRtpSender( wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport ) { + native_ = NativeType::create(thisWeak_.lock(), wrapper::impl::org::ortc::MediaStreamTrack::toNative(track), wrapper::impl::org::ortc::RTCRtpTransport::toNative(transport), wrapper::impl::org::ortc::RTCRtcpTransport::toNative(rtcpTransport)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpSender::setTransport(wrapper::org::ortc::RTCRtpTransportPtr transport) { + native_->setTransport(RTCRtpTransport::toNative(transport)); } //------------------------------------------------------------------------------ @@ -73,65 +88,113 @@ void wrapper::impl::org::ortc::RTCRtpSender::setTransport( wrapper::org::ortc::RTCRtcpTransportPtr rtcpTransport ) { + native_->setTransport(RTCRtpTransport::toNative(transport), RTCRtcpTransport::toNative(rtcpTransport)); } //------------------------------------------------------------------------------ PromisePtr wrapper::impl::org::ortc::RTCRtpSender::setTrack(wrapper::org::ortc::MediaStreamTrackPtr track) { - PromisePtr result {}; - return result; + return Helper::toWrapper(native_->setTrack(MediaStreamTrack::toNative(track))); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::org::ortc::RTCRtpSender::getCapabilities(Optional< wrapper::org::ortc::MediaStreamTrackKind > kind) { - wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; - return result; + Optional<::ortc::IMediaStreamTrackTypes::Kinds> native; + if (kind.hasValue()) { + native = wrapper::impl::org::ortc::Helper::toNative(kind.value()); + } + return wrapper::impl::org::ortc::RTCRtpCapabilities::toWrapper(NativeType::getCapabilities(native)); } //------------------------------------------------------------------------------ PromisePtr wrapper::impl::org::ortc::RTCRtpSender::send(wrapper::org::ortc::RTCRtpParametersPtr parameters) { - PromisePtr result {}; - return result; + auto native = RTCRtpParameters::toNative(parameters); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + return Helper::toWrapper(native_->send(*native)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpSender::stop() { + native_->stop(); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCRtpSender::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::RTCRtpSender::get_track() { - wrapper::org::ortc::MediaStreamTrackPtr result {}; - return result; + return MediaStreamTrack::toWrapper(native_->track()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpTransportPtr wrapper::impl::org::ortc::RTCRtpSender::get_transport() { - wrapper::org::ortc::RTCRtpTransportPtr result {}; - return result; + return RTCRtpTransport::toWrapper(native_->transport()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtcpTransportPtr wrapper::impl::org::ortc::RTCRtpSender::get_rtcpTransport() { - wrapper::org::ortc::RTCRtcpTransportPtr result {}; - return result; + return RTCRtcpTransport::toWrapper(native_->rtcpTransport()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpSender::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); } +//------------------------------------------------------------------------------ +void WrapperImplType::onRTPSenderSSRCConflict( + IRTPSenderPtr sender, + SSRCType ssrc +) +{ + onSsrcConflict(RTCSsrcConflictEvent::toWrapper(ssrc)); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h index dbe255cb..6412dc1d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h @@ -1,19 +1,31 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpSender.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCRtpSender : public wrapper::org::ortc::RTCRtpSender + struct RTCRtpSender : public wrapper::org::ortc::RTCRtpSender, + public ::ortc::IRTPSenderDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPSender, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPSender, IRTPSender); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPSenderSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpSender, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpSender, WrapperType); + RTCRtpSenderWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCRtpSender(); virtual ~RTCRtpSender(); @@ -47,6 +59,16 @@ namespace wrapper { virtual wrapper::org::ortc::RTCRtcpTransportPtr get_rtcpTransport() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onRTPSenderSSRCConflict( + IRTPSenderPtr sender, + SSRCType ssrc + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp index 96350391..f5757133 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpStreamStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,135 +42,142 @@ wrapper::impl::org::ortc::RTCRtpStreamStats::~RTCRtpStreamStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpStreamStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCRtpStreamStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpStreamStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCRtpStreamStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCRtpStreamStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpStreamStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpStreamStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpStreamStats::wrapper_init_org_ortc_RTCRtpStreamStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpStreamStats::wrapper_init_org_ortc_RTCRtpStreamStats(wrapper::org::ortc::RTCRtpStreamStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCRtpStreamStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpStreamStats::wrapper_init_org_ortc_RTCRtpStreamStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ Optional< uint32_t > wrapper::impl::org::ortc::RTCRtpStreamStats::get_ssrc() { - Optional< uint32_t > result {}; - return result; + return native_->mSSRC; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpStreamStats::get_associatedStatId() { - String result {}; - return result; + return native_->mAssociatedStatID; } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCRtpStreamStats::get_isRemote() { - bool result {}; - return result; + return native_->mIsRemote; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpStreamStats::get_mediaType() { - String result {}; - return result; + return native_->mMediaType; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpStreamStats::get_mediaTrackId() { - String result {}; - return result; + return native_->mMediaTrackID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpStreamStats::get_transportId() { - String result {}; - return result; + return native_->mTransportID; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpStreamStats::get_codecId() { - String result {}; - return result; + return native_->mCodecID; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCRtpStreamStats::get_firCount() { - unsigned long result {}; - return result; + return native_->mFIRCount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCRtpStreamStats::get_pliCount() { - unsigned long result {}; - return result; + return native_->mPLICount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCRtpStreamStats::get_nackCount() { - unsigned long result {}; - return result; + return native_->mNACKCount; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCRtpStreamStats::get_sliCount() { - unsigned long result {}; - return result; + return native_->mSLICount; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpStreamStatsPtr wrapper::impl::org::ortc::RTCRtpStreamStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCRtpStreamStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCRtpStreamStats::NativeStatsPtr wrapper::impl::org::ortc::RTCRtpStreamStats::toNative(wrapper::org::ortc::RTCRtpStreamStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h index cbe87cf5..8bded01a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpStreamStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCRtpStreamStats : public wrapper::org::ortc::RTCRtpStreamStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::RTPStreamStats, NativeStats); RTCRtpStreamStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCRtpStreamStats(); virtual ~RTCRtpStreamStats(); @@ -45,6 +47,9 @@ namespace wrapper { virtual unsigned long get_pliCount() override; virtual unsigned long get_nackCount() override; virtual unsigned long get_sliCount() override; + + static RTCRtpStreamStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCRtpStreamStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp index 54ac98f8..f3b0b9e7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpTransport.h" +#include "impl_org_ortc_RTCDtlsTransport.h" +#include "impl_org_ortc_RTCIceTransport.h" +#include "impl_org_ortc_RTCSrtpSdesTransport.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpTransport::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpTransport::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpTransport::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpTransport::RTCRtpTransport() { @@ -38,4 +44,34 @@ wrapper::impl::org::ortc::RTCRtpTransport::~RTCRtpTransport() { } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCDtlsTransport::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCSrtpSdesTransport::toNative(impl); + } + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return impl->native_; + } + return NativeTypePtr(); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h index 0a8121ce..cfa05169 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpTransport.h" +#include namespace wrapper { namespace impl { @@ -13,10 +13,17 @@ namespace wrapper { struct RTCRtpTransport : public wrapper::org::ortc::RTCRtpTransport { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTransport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpTransport, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpTransport, WrapperType); RTCRtpTransportWeakPtr thisWeak_; + NativeTypePtr native_; RTCRtpTransport(); virtual ~RTCRtpTransport(); + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp index 98d23c76..86bf12d0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpUnhandledEvent.h" @@ -20,6 +19,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpUnhandledEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpUnhandledEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpUnhandledEvent::RTCRtpUnhandledEvent() { @@ -46,29 +48,40 @@ void wrapper::impl::org::ortc::RTCRtpUnhandledEvent::wrapper_init_org_ortc_RTCRt //------------------------------------------------------------------------------ uint32_t wrapper::impl::org::ortc::RTCRtpUnhandledEvent::get_ssrc() { - uint32_t result {}; - return result; + return ssrc_; } //------------------------------------------------------------------------------ uint8_t wrapper::impl::org::ortc::RTCRtpUnhandledEvent::get_payloadType() { - uint8_t result {}; - return result; + return payloadType_; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpUnhandledEvent::get_muxId() { - String result {}; - return result; + return mid_; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpUnhandledEvent::get_rid() { - String result {}; - return result; + return rid_; } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper( + SSRCType ssrc, + PayloadType payloadType, + const String &mid, + const String &rid +) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->ssrc_ = ssrc; + pThis->payloadType_ = payloadType; + pThis->mid_ = mid; + pThis->rid_ = rid; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h index 9ab2dd88..d7d834ec 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpUnhandledEvent.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,15 @@ namespace wrapper { struct RTCRtpUnhandledEvent : public wrapper::org::ortc::RTCRtpUnhandledEvent { + typedef ::ortc::IRTPTypes::SSRCType SSRCType; + typedef ::ortc::IRTPTypes::PayloadType PayloadType; + ZS_DECLARE_TYPEDEF_PTR(RTCRtpUnhandledEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpUnhandledEvent, WrapperType); RTCRtpUnhandledEventWeakPtr thisWeak_; + SSRCType ssrc_; + PayloadType payloadType_; + String mid_; + String rid_; RTCRtpUnhandledEvent(); virtual ~RTCRtpUnhandledEvent(); @@ -24,6 +32,13 @@ namespace wrapper { virtual uint8_t get_payloadType() override; virtual String get_muxId() override; virtual String get_rid() override; + + static WrapperImplTypePtr toWrapper( + SSRCType ssrc, + PayloadType payloadType, + const String &mid, + const String &rid + ); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp index 464c2ae0..2726048f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::RTCRtpVp8CodecCapabilityParameters() { @@ -46,25 +51,70 @@ void wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::wrapper_init_ //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters(wrapper::org::ortc::RTCRtpVp8CodecCapabilityParametersPtr source) { + if (!source) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpVp8CodecCapabilityParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + Helper::optionalSafeIntConvert(native.mMaxFR, pThis->maxFr); + Helper::optionalSafeIntConvert(native.mMaxFS, pThis->maxFs); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->maxFr, result->mMaxFR); + Helper::optionalSafeIntConvert(wrapper->maxFs, result->mMaxFS); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h index 39e0e80e..3c31e01d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpVp8CodecCapabilityParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpVp8CodecCapabilityParameters : public wrapper::org::ortc::RTCRtpVp8CodecCapabilityParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::VP8CodecCapabilityParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpVp8CodecCapabilityParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpVp8CodecCapabilityParameters, WrapperType); RTCRtpVp8CodecCapabilityParametersWeakPtr thisWeak_; RTCRtpVp8CodecCapabilityParameters(); @@ -24,6 +27,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpVp8CodecCapabilityParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp index 5d4a5f68..e9d8bb9b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCRtpVp8CodecParameterSettings.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::RTCRtpVp8CodecParameterSettings() { @@ -41,15 +46,13 @@ wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::~RTCRtpVp8CodecParame //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ @@ -60,11 +63,58 @@ void wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::wrapper_init_org //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings(wrapper::org::ortc::RTCRtpVp8CodecParameterSettingsPtr source) { + if (!source) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCRtpVp8CodecParameterSettings::wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(AnyPtr native) +{ + return toWrapper(std::dynamic_pointer_cast(native)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + Helper::optionalSafeIntConvert(native.mMaxFR, pThis->maxFr); + Helper::optionalSafeIntConvert(native.mMaxFS, pThis->maxFs); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->maxFr, result->mMaxFR); + Helper::optionalSafeIntConvert(wrapper->maxFs, result->mMaxFS); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h index 851e9682..a68daad3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCRtpVp8CodecParameterSettings.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCRtpVp8CodecParameterSettings : public wrapper::org::ortc::RTCRtpVp8CodecParameterSettings { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::VP8CodecParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCRtpVp8CodecParameterSettings, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCRtpVp8CodecParameterSettings, WrapperType); RTCRtpVp8CodecParameterSettingsWeakPtr thisWeak_; RTCRtpVp8CodecParameterSettings(); @@ -26,6 +29,11 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings() override; virtual void wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings(wrapper::org::ortc::RTCRtpVp8CodecParameterSettingsPtr source) override; virtual void wrapper_init_org_ortc_RTCRtpVp8CodecParameterSettings(wrapper::org::ortc::JsonPtr json) override; + + static WrapperImplTypePtr toWrapper(AnyPtr native); + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp index 2c1a7324..e135e1a0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSctpCapabilities.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpCapabilities::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpCapabilities::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpCapabilities::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSctpCapabilities::RTCSctpCapabilities() { @@ -46,25 +51,66 @@ void wrapper::impl::org::ortc::RTCSctpCapabilities::wrapper_init_org_ortc_RTCSct //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpCapabilities::wrapper_init_org_ortc_RTCSctpCapabilities(wrapper::org::ortc::RTCSctpCapabilitiesPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpCapabilities::wrapper_init_org_ortc_RTCSctpCapabilities(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSctpCapabilities::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCSctpCapabilities")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSctpCapabilities::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->maxMessageSize = SafeIntmaxMessageSize)>(native.mMaxMessageSize); + pThis->minPort = SafeIntminPort)>(native.mMinPort); + pThis->maxPort = SafeIntmaxPort)>(native.mMaxPort); + pThis->maxUsablePorts = SafeIntmaxUsablePorts)>(native.mMaxUsablePorts); + pThis->maxSessionsPerPort = SafeIntmaxSessionsPerPort)>(native.mMaxSessionsPerPort); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mMaxMessageSize = SafeIntmMaxMessageSize)>(wrapper->maxMessageSize); + result->mMinPort = SafeIntmMinPort)>(wrapper->minPort); + result->mMaxPort = SafeIntmMaxPort)>(wrapper->maxPort); + result->mMaxUsablePorts = SafeIntmMaxUsablePorts)>(wrapper->maxUsablePorts); + result->mMaxSessionsPerPort = SafeIntmMaxSessionsPerPort)>(wrapper->maxSessionsPerPort); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h index f290eb28..8dfa70c5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSctpCapabilities.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCSctpCapabilities : public wrapper::org::ortc::RTCSctpCapabilities { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransportTypes::Capabilities, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSctpCapabilities, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSctpCapabilities, WrapperType); RTCSctpCapabilitiesWeakPtr thisWeak_; RTCSctpCapabilities(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCSctpCapabilities(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp index 10e9b63e..8cc3adb7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp @@ -1,6 +1,11 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSctpTransport.h" +#include "impl_org_ortc_RTCDtlsTransport.h" +#include "impl_org_ortc_RTCSctpCapabilities.h" +#include "impl_org_ortc_RTCSctpTransportListener.h" +#include "impl_org_ortc_RTCSctpTransportStateChangeEvent.h" +#include "impl_org_ortc_RTCDataChannelEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +25,15 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +using namespace wrapper::impl::org::ortc; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransport::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransport::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransport::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransport::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSctpTransport::RTCSctpTransport() { @@ -41,13 +55,13 @@ wrapper::impl::org::ortc::RTCSctpTransport::~RTCSctpTransport() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSctpTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpTransport::wrapper_init_org_ortc_RTCSctpTransport(wrapper::org::ortc::RTCDtlsTransportPtr transport) { + native_ = NativeType::create(thisWeak_.lock(), RTCDtlsTransport::toNative(transport)); } //------------------------------------------------------------------------------ @@ -56,6 +70,7 @@ void wrapper::impl::org::ortc::RTCSctpTransport::wrapper_init_org_ortc_RTCSctpTr uint16_t localPort ) { + native_ = NativeType::create(thisWeak_.lock(), RTCDtlsTransport::toNative(transport), localPort); } //------------------------------------------------------------------------------ @@ -64,20 +79,23 @@ wrapper::org::ortc::RTCSctpTransportListenerPtr wrapper::org::ortc::RTCSctpTrans wrapper::org::ortc::RTCSctpCapabilitiesPtr remoteCapabilities ) { - wrapper::org::ortc::RTCSctpTransportListenerPtr result {}; - return result; + auto native = wrapper::impl::org::ortc::RTCSctpCapabilities::toNative(remoteCapabilities); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + return wrapper::impl::org::ortc::RTCSctpTransportListener::toWrapper(NativeType::listen(::ortc::ISCTPTransportListenerDelegatePtr(), wrapper::impl::org::ortc::RTCDtlsTransport::toNative(transport), *native)); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCSctpCapabilitiesPtr wrapper::org::ortc::RTCSctpTransport::getCapabilities() { - wrapper::org::ortc::RTCSctpCapabilitiesPtr result {}; - return result; + return wrapper::impl::org::ortc::RTCSctpCapabilities::toWrapper(NativeType::getCapabilities()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpTransport::start(wrapper::org::ortc::RTCSctpCapabilitiesPtr remoteCapabilities) { + auto native = RTCSctpCapabilities::toNative(remoteCapabilities); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + native_->start(*native); } //------------------------------------------------------------------------------ @@ -86,58 +104,115 @@ void wrapper::impl::org::ortc::RTCSctpTransport::start( uint16_t remotePort ) { + auto native = RTCSctpCapabilities::toNative(remoteCapabilities); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + native_->start(*native, remotePort); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpTransport::stop() { + native_->stop(); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCSctpTransport::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCDtlsTransportPtr wrapper::impl::org::ortc::RTCSctpTransport::get_transport() { - wrapper::org::ortc::RTCDtlsTransportPtr result {}; - return result; + return RTCDtlsTransport::toWrapper(native_->transport()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCSctpTransportState wrapper::impl::org::ortc::RTCSctpTransport::get_state() { - wrapper::org::ortc::RTCSctpTransportState result {}; - return result; + return Helper::toWrapper(native_->state()); } //------------------------------------------------------------------------------ uint16_t wrapper::impl::org::ortc::RTCSctpTransport::get_port() { - uint16_t result {}; - return result; + return SafeInt(native_->port()); } //------------------------------------------------------------------------------ uint16_t wrapper::impl::org::ortc::RTCSctpTransport::get_localPort() { - uint16_t result {}; - return result; + return SafeInt(native_->localPort()); } //------------------------------------------------------------------------------ Optional< uint16_t > wrapper::impl::org::ortc::RTCSctpTransport::get_remotePort() { Optional< uint16_t > result {}; + auto native = native_->remotePort(); + Helper::optionalSafeIntConvert(native, result); return result; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpTransport::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onSCTPTransportStateChange( + ISCTPTransportPtr transport, + States state +) +{ + onStateChange(RTCSctpTransportStateChangeEvent::toWrapper(state)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onSCTPTransportDataChannel( + ISCTPTransportPtr transport, + ::ortc::IDataChannelPtr channel +) +{ + onDataChannel(RTCDataChannelEvent::toWrapper(channel)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; } +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h index 649095ae..bbc369d3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h @@ -1,19 +1,31 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSctpTransport.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCSctpTransport : public wrapper::org::ortc::RTCSctpTransport + struct RTCSctpTransport : public wrapper::org::ortc::RTCSctpTransport, + public ::ortc::ISCTPTransportDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransport, ISCTPTransport); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransportSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCSctpTransport, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSctpTransport, WrapperType); + RTCSctpTransportWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCSctpTransport(); virtual ~RTCSctpTransport(); @@ -43,6 +55,20 @@ namespace wrapper { virtual Optional< uint16_t > get_remotePort() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onSCTPTransportStateChange( + ISCTPTransportPtr transport, + States state + ) override; + virtual void onSCTPTransportDataChannel( + ISCTPTransportPtr transport, + ::ortc::IDataChannelPtr channel + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp index 9b0dfd91..47203474 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSctpTransportListener.h" +#include "impl_org_ortc_RTCSctpTransport.h" +#include "impl_org_ortc_RTCSctpTransportListenerEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListener::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListener::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListener::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListener::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSctpTransportListener::RTCSctpTransportListener() { @@ -41,6 +50,53 @@ wrapper::impl::org::ortc::RTCSctpTransportListener::~RTCSctpTransportListener() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpTransportListener::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onSCTPTransport(::ortc::ISCTPTransportPtr transport) +{ + onTransport(RTCSctpTransportListenerEvent::toWrapper(transport)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + // result->defaultSubscription_ = false; // always have a default subscription + result->subscribe(); + return result; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + // always have a default subscription - thus noop +#if 0 + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +#endif // +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h index 92b6e136..e45dea9d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h @@ -1,24 +1,43 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSctpTransportListener.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCSctpTransportListener : public wrapper::org::ortc::RTCSctpTransportListener + struct RTCSctpTransportListener : public wrapper::org::ortc::RTCSctpTransportListener, + public ::ortc::ISCTPTransportListenerDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransportListenerSubscription, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransportListenerSubscription, ISCTPTransportListenerSubscription); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransportListenerSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCSctpTransportListener, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSctpTransportListener, WrapperType); + RTCSctpTransportListenerWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + //bool defaultSubscription_{ true }; // always last a default subscription + //NativeTypeSubscriptionPtr subscription_; // native type is a subscription RTCSctpTransportListener(); virtual ~RTCSctpTransportListener(); virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onSCTPTransport(::ortc::ISCTPTransportPtr transport) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp index acac077f..6937b6e8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSctpTransportListenerEvent.h" +#include "impl_org_ortc_RTCSctpTransport.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::RTCSctpTransportListenerEvent() { @@ -41,8 +45,16 @@ wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::~RTCSctpTransportListen //------------------------------------------------------------------------------ wrapper::org::ortc::RTCSctpTransportPtr wrapper::impl::org::ortc::RTCSctpTransportListenerEvent::get_transport() { - wrapper::org::ortc::RTCSctpTransportPtr result {}; - return result; + return RTCSctpTransport::toWrapper(native_); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h index 55be5bc1..cac910f7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSctpTransportListenerEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,19 @@ namespace wrapper { struct RTCSctpTransportListenerEvent : public wrapper::org::ortc::RTCSctpTransportListenerEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSctpTransportListenerEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSctpTransportListenerEvent, WrapperType); RTCSctpTransportListenerEventWeakPtr thisWeak_; + NativeTypePtr native_; RTCSctpTransportListenerEvent(); virtual ~RTCSctpTransportListenerEvent(); // properties RTCSctpTransportListenerEvent virtual wrapper::org::ortc::RTCSctpTransportPtr get_transport() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp index c8266a52..9ac5895f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSctpTransportStateChangeEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +20,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::RTCSctpTransportStateChangeEvent() { @@ -41,8 +45,15 @@ wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::~RTCSctpTransportSta //------------------------------------------------------------------------------ wrapper::org::ortc::RTCSctpTransportState wrapper::impl::org::ortc::RTCSctpTransportStateChangeEvent::get_state() { - wrapper::org::ortc::RTCSctpTransportState result {}; - return result; + return Helper::toWrapper(native_); } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeType native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h index c8c55674..cb564f18 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSctpTransportStateChangeEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,19 @@ namespace wrapper { struct RTCSctpTransportStateChangeEvent : public wrapper::org::ortc::RTCSctpTransportStateChangeEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISCTPTransportTypes::States, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSctpTransportStateChangeEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSctpTransportStateChangeEvent, WrapperType); RTCSctpTransportStateChangeEventWeakPtr thisWeak_; + NativeType native_; RTCSctpTransportStateChangeEvent(); virtual ~RTCSctpTransportStateChangeEvent(); // properties RTCSctpTransportStateChangeEvent virtual wrapper::org::ortc::RTCSctpTransportState get_state() override; + + static WrapperImplTypePtr toWrapper(NativeType native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp index 539ab5bb..4c0505f8 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSctpTransportStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,72 +42,89 @@ wrapper::impl::org::ortc::RTCSctpTransportStats::~RTCSctpTransportStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSctpTransportStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCSctpTransportStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSctpTransportStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCSctpTransportStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCSctpTransportStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSctpTransportStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSctpTransportStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpTransportStats::wrapper_init_org_ortc_RTCSctpTransportStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpTransportStats::wrapper_init_org_ortc_RTCSctpTransportStats(wrapper::org::ortc::RTCSctpTransportStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCSctpTransportStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSctpTransportStats::wrapper_init_org_ortc_RTCSctpTransportStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCSctpTransportStats::get_dataChannelsOpened() { - unsigned long result {}; - return result; + return native_->mDataChannelsOpened; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCSctpTransportStats::get_dataChannelsClosed() { - unsigned long result {}; - return result; + return native_->mDataChannelsClosed; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportStatsPtr wrapper::impl::org::ortc::RTCSctpTransportStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCSctpTransportStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSctpTransportStats::NativeStatsPtr wrapper::impl::org::ortc::RTCSctpTransportStats::toNative(wrapper::org::ortc::RTCSctpTransportStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h index 56de0a36..df646dab 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSctpTransportStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCSctpTransportStats : public wrapper::org::ortc::RTCSctpTransportStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::SCTPTransportStats, NativeStats); RTCSctpTransportStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCSctpTransportStats(); virtual ~RTCSctpTransportStats(); @@ -36,6 +38,9 @@ namespace wrapper { // properties RTCSctpTransportStats virtual unsigned long get_dataChannelsOpened() override; virtual unsigned long get_dataChannelsClosed() override; + + static RTCSctpTransportStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCSctpTransportStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp index 61522a86..eb9530fa 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSrtpSdesCryptoParameters.h" +#include "impl_org_ortc_RTCSrtpSdesKeyParameters.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::RTCSrtpSdesCryptoParameters() { @@ -46,25 +52,76 @@ void wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::wrapper_init_org_ort //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters(wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCSrtpSdesCryptoParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSrtpSdesCryptoParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->tag = SafeInttag)>(native.mTag); + pThis->cryptoSuite = native.mCryptoSuite; + pThis->keyParams = make_shared< list< wrapper::org::ortc::RTCSrtpSdesKeyParametersPtr > >(); + for (auto iter = native.mKeyParams.begin(); iter != native.mKeyParams.end(); ++iter) { + auto wrapper = RTCSrtpSdesKeyParameters::toWrapper(*iter); + if (!wrapper) continue; + pThis->keyParams->push_back(wrapper); + } + pThis->sessionParams = make_shared< list< String > >(native.mSessionParams); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mTag = SafeIntmTag)>(wrapper->tag); + if (wrapper->keyParams) { + for (auto iter = wrapper->keyParams->begin(); iter != wrapper->keyParams->end(); ++iter) { + auto native = RTCSrtpSdesKeyParameters::toNative(*iter); + if (!native) continue; + result->mKeyParams.push_back(*native); + } + } + if (wrapper->sessionParams) { + result->mSessionParams = *(wrapper->sessionParams); + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h index 0bf72f94..3965f757 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSrtpSdesCryptoParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCSrtpSdesCryptoParameters : public wrapper::org::ortc::RTCSrtpSdesCryptoParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransport::CryptoParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSrtpSdesCryptoParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSrtpSdesCryptoParameters, WrapperType); RTCSrtpSdesCryptoParametersWeakPtr thisWeak_; RTCSrtpSdesCryptoParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCSrtpSdesCryptoParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp index 1d36f55b..24bfe8a2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSrtpSdesKeyParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::RTCSrtpSdesKeyParameters() { @@ -46,25 +51,66 @@ void wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::wrapper_init_org_ortc_R //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::wrapper_init_org_ortc_RTCSrtpSdesKeyParameters(wrapper::org::ortc::RTCSrtpSdesKeyParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::wrapper_init_org_ortc_RTCSrtpSdesKeyParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCSrtpSdesKeyParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSrtpSdesKeyParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->keyMethod = native.mKeyMethod; + pThis->keySalt = native.mKeySalt; + pThis->lifetime = native.mLifetime; + pThis->mkiValue = native.mMKIValue; + pThis->mkiLength = SafeIntmkiLength)>(native.mMKILength); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mKeyMethod = wrapper->keyMethod; + result->mKeySalt = wrapper->keySalt; + result->mLifetime = wrapper->lifetime; + result->mMKIValue = wrapper->mkiValue; + result->mMKILength = SafeIntmMKILength)>(wrapper->mkiLength); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h index c5e56e2a..77607933 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSrtpSdesKeyParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCSrtpSdesKeyParameters : public wrapper::org::ortc::RTCSrtpSdesKeyParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransportTypes::KeyParameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSrtpSdesKeyParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSrtpSdesKeyParameters, WrapperType); RTCSrtpSdesKeyParametersWeakPtr thisWeak_; RTCSrtpSdesKeyParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCSrtpSdesKeyParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp index 4f8b5e46..34f405ef 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSrtpSdesParameters.h" +#include "impl_org_ortc_RTCSrtpSdesCryptoParameters.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSrtpSdesParameters::RTCSrtpSdesParameters() { @@ -46,25 +51,69 @@ void wrapper::impl::org::ortc::RTCSrtpSdesParameters::wrapper_init_org_ortc_RTCS //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpSdesParameters::wrapper_init_org_ortc_RTCSrtpSdesParameters(wrapper::org::ortc::RTCSrtpSdesParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpSdesParameters::wrapper_init_org_ortc_RTCSrtpSdesParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSrtpSdesParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCSrtpSdesParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSrtpSdesParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->cryptoParams = make_shared< list< wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr > >(); + for (auto iter = native.mCryptoParams.begin(); iter != native.mCryptoParams.end(); ++iter) { + auto wrapper = RTCSrtpSdesCryptoParameters::toWrapper(*iter); + if (!wrapper) continue; + pThis->cryptoParams->push_back(wrapper); + } + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + if (wrapper->cryptoParams) { + for (auto iter = wrapper->cryptoParams->begin(); iter != wrapper->cryptoParams->end(); ++iter) { + auto native = RTCSrtpSdesCryptoParameters::toNative(*iter); + if (!native) continue; + result->mCryptoParams.push_back(*native); + } + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h index 52b9d420..c61dc001 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSrtpSdesParameters.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,9 @@ namespace wrapper { struct RTCSrtpSdesParameters : public wrapper::org::ortc::RTCSrtpSdesParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransport::Parameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSrtpSdesParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSrtpSdesParameters, WrapperType); RTCSrtpSdesParametersWeakPtr thisWeak_; RTCSrtpSdesParameters(); @@ -24,6 +27,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCSrtpSdesParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp index de50bd1e..1b4cb859 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp @@ -1,6 +1,11 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSrtpSdesTransport.h" +#include "impl_org_ortc_RTCIceTransport.h" +#include "impl_org_ortc_RTCSrtpSdesParameters.h" +#include "impl_org_ortc_RTCSrtpSdesCryptoParameters.h" +#include "impl_org_ortc_ErrorEvent.h" +#include "impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +25,14 @@ using ::std::list; using ::std::set; using ::std::map; + +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesTransport::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesTransport::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesTransport::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesTransport::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSrtpSdesTransport::RTCSrtpSdesTransport() { @@ -41,8 +54,7 @@ wrapper::impl::org::ortc::RTCSrtpSdesTransport::~RTCSrtpSdesTransport() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCSrtpSdesTransport::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ @@ -52,44 +64,104 @@ void wrapper::impl::org::ortc::RTCSrtpSdesTransport::wrapper_init_org_ortc_RTCSr wrapper::org::ortc::RTCSrtpSdesCryptoParametersPtr decryptParameters ) { + auto nativeEnc = RTCSrtpSdesCryptoParameters::toNative(encryptParameters); + auto nativeDec = RTCSrtpSdesCryptoParameters::toNative(decryptParameters); + ZS_THROW_INVALID_ARGUMENT_IF(!nativeEnc); + ZS_THROW_INVALID_ARGUMENT_IF(!nativeDec); + + native_ = ISRTPSDESTransport::create(thisWeak_.lock(), RTCIceTransport::toNative(iceTransport), *nativeEnc, *nativeDec); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCSrtpSdesParametersPtr wrapper::org::ortc::RTCSrtpSdesTransport::getLocalParameters() { - wrapper::org::ortc::RTCSrtpSdesParametersPtr result {}; - return result; + return wrapper::impl::org::ortc::RTCSrtpSdesParameters::toWrapper(NativeType::getLocalParameters()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpSdesTransport::stop() { + native_->stop(); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCSrtpSdesTransport::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceTransportPtr wrapper::impl::org::ortc::RTCSrtpSdesTransport::get_transport() { - wrapper::org::ortc::RTCIceTransportPtr result {}; - return result; + return RTCIceTransport::toWrapper(native_->transport()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceTransportPtr wrapper::impl::org::ortc::RTCSrtpSdesTransport::get_rtcpTransport() { - wrapper::org::ortc::RTCIceTransportPtr result {}; - return result; + return RTCIceTransport::toWrapper(native_->rtcpTransport()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpSdesTransport::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onSRTPSDESTransportLifetimeRemaining( + ISRTPSDESTransportPtr transport, + ULONG leastLifetimeRemainingPercentageForAllKeys, + ULONG overallLifetimeRemainingPercentage +) +{ + onLifetimeRemaining(RTCSrtpSdesTransportLifetimeRemainingEvent::toWrapper(leastLifetimeRemainingPercentageForAllKeys, overallLifetimeRemainingPercentage)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onSRTPSDESTransportError( + ISRTPSDESTransportPtr transport, + ::ortc::ErrorAnyPtr error +) +{ + onError(ErrorEvent::toWrapper(error)); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h index b323bf73..a11db099 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h @@ -1,19 +1,30 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSrtpSdesTransport.h" +#include namespace wrapper { namespace impl { namespace org { namespace ortc { - struct RTCSrtpSdesTransport : public wrapper::org::ortc::RTCSrtpSdesTransport + struct RTCSrtpSdesTransport : public wrapper::org::ortc::RTCSrtpSdesTransport, + public ::ortc::ISRTPSDESTransportDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransport, ISRTPSDESTransport); + ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransportSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCSrtpSdesTransport, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSrtpSdesTransport, WrapperType); RTCSrtpSdesTransportWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCSrtpSdesTransport(); virtual ~RTCSrtpSdesTransport(); @@ -35,6 +46,22 @@ namespace wrapper { virtual wrapper::org::ortc::RTCIceTransportPtr get_rtcpTransport() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onSRTPSDESTransportLifetimeRemaining( + ISRTPSDESTransportPtr transport, + ULONG leastLifetimeRemainingPercentageForAllKeys, + ULONG overallLifetimeRemainingPercentage + ) override; + + virtual void onSRTPSDESTransportError( + ISRTPSDESTransportPtr transport, + ::ortc::ErrorAnyPtr error + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp index 4d782429..9baefd5f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h" @@ -20,6 +19,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::RTCSrtpSdesTransportLifetimeRemainingEvent() { @@ -41,15 +43,24 @@ wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::~RTCSrtpSd //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::get_leastLifetimeRemainingPercentageForAllKeys() { - unsigned long result {}; - return result; + return leastLifetimeRemainingPercentageForAllKeys_; } //------------------------------------------------------------------------------ unsigned long wrapper::impl::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent::get_overallLifetimeRemainingPercentage() { - unsigned long result {}; - return result; + return overallLifetimeRemainingPercentage_; } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper( + ULONG leastLifetimeRemainingPercentageForAllKeys, + ULONG overallLifetimeRemainingPercentage +) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->leastLifetimeRemainingPercentageForAllKeys_ = leastLifetimeRemainingPercentageForAllKeys; + pThis->overallLifetimeRemainingPercentage_ = overallLifetimeRemainingPercentage; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h index 7da98673..40ded841 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h @@ -1,11 +1,9 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h" - namespace wrapper { namespace impl { namespace org { @@ -13,7 +11,11 @@ namespace wrapper { struct RTCSrtpSdesTransportLifetimeRemainingEvent : public wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent { + ZS_DECLARE_TYPEDEF_PTR(RTCSrtpSdesTransportLifetimeRemainingEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent, WrapperType); RTCSrtpSdesTransportLifetimeRemainingEventWeakPtr thisWeak_; + unsigned long leastLifetimeRemainingPercentageForAllKeys_{}; + unsigned long overallLifetimeRemainingPercentage_{}; RTCSrtpSdesTransportLifetimeRemainingEvent(); virtual ~RTCSrtpSdesTransportLifetimeRemainingEvent(); @@ -21,6 +23,11 @@ namespace wrapper { // properties RTCSrtpSdesTransportLifetimeRemainingEvent virtual unsigned long get_leastLifetimeRemainingPercentageForAllKeys() override; virtual unsigned long get_overallLifetimeRemainingPercentage() override; + + static WrapperImplTypePtr toWrapper( + ULONG leastLifetimeRemainingPercentageForAllKeys, + ULONG overallLifetimeRemainingPercentage + ); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp index dd3a2efc..f8e4f9a2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSrtpTransportStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,58 +42,78 @@ wrapper::impl::org::ortc::RTCSrtpTransportStats::~RTCSrtpTransportStats() //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCSrtpTransportStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCSrtpTransportStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSrtpTransportStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCSrtpTransportStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCSrtpTransportStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSrtpTransportStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCSrtpTransportStats::get_id() { - String result {}; - return result; + return native_->mID; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCSrtpTransportStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::RTCSrtpTransportStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCSrtpTransportStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCSrtpTransportStats::wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpTransportStatsPtr wrapper::impl::org::ortc::RTCSrtpTransportStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCSrtpTransportStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCSrtpTransportStats::NativeStatsPtr wrapper::impl::org::ortc::RTCSrtpTransportStats::toNative(wrapper::org::ortc::RTCSrtpTransportStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} + diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h index 63496b34..f01ccb77 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSrtpTransportStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCSrtpTransportStats : public wrapper::org::ortc::RTCSrtpTransportStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::SRTPTransportStats, NativeStats); RTCSrtpTransportStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCSrtpTransportStats(); virtual ~RTCSrtpTransportStats(); @@ -32,6 +34,9 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCSrtpTransportStats() override; virtual void wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::RTCSrtpTransportStatsPtr source) override; virtual void wrapper_init_org_ortc_RTCSrtpTransportStats(wrapper::org::ortc::JsonPtr json) override; + + static RTCSrtpTransportStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCSrtpTransportStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp index 4831d06b..d92d6ae0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCSsrcConflictEvent.h" @@ -20,6 +19,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSsrcConflictEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSsrcConflictEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSsrcConflictEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::RTCSsrcConflictEvent::RTCSsrcConflictEvent() { @@ -41,8 +44,15 @@ wrapper::impl::org::ortc::RTCSsrcConflictEvent::~RTCSsrcConflictEvent() //------------------------------------------------------------------------------ uint32_t wrapper::impl::org::ortc::RTCSsrcConflictEvent::get_ssrc() { - uint32_t result {}; - return result; + return native_; } - +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeType native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h index fe17d918..6e2f4735 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCSsrcConflictEvent.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,19 @@ namespace wrapper { struct RTCSsrcConflictEvent : public wrapper::org::ortc::RTCSsrcConflictEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IRTPTypes::SSRCType, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSsrcConflictEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSsrcConflictEvent, WrapperType); RTCSsrcConflictEventWeakPtr thisWeak_; + NativeType native_; RTCSsrcConflictEvent(); virtual ~RTCSsrcConflictEvent(); // properties RTCSsrcConflictEvent virtual uint32_t get_ssrc() override; + + static WrapperImplTypePtr toWrapper(NativeType native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp index da8ea060..49c95168 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCStats.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,58 +42,76 @@ wrapper::impl::org::ortc::RTCStats::~RTCStats() //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCStats::wrapper_init_org_ortc_RTCStats() { + native_ = make_shared(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCStats::wrapper_init_org_ortc_RTCStats(wrapper::org::ortc::RTCStatsPtr source) { + if (!source) { + wrapper_init_org_ortc_RTCStats(); + return; + } + native_ = NativeStats::create(*toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCStats::wrapper_init_org_ortc_RTCStats(wrapper::org::ortc::JsonPtr json) { + native_ = NativeStats::create(Json::toNative(json)); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::RTCStats::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(native_->createElement("RTCStats")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCStats::hash() { - String result {}; - return result; + return native_->hash(); } //------------------------------------------------------------------------------ ::zsLib::Time wrapper::impl::org::ortc::RTCStats::get_timestamp() { - ::zsLib::Time result {}; - return result; + return native_->mTimestamp; } //------------------------------------------------------------------------------ Optional< wrapper::org::ortc::RTCStatsType > wrapper::impl::org::ortc::RTCStats::get_statsType() { - Optional< wrapper::org::ortc::RTCStatsType > result {}; - return result; + if (!native_->mStatsType.hasValue()) return Optional< wrapper::org::ortc::RTCStatsType >(); + return Helper::toWrapper(native_->mStatsType.value()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCStats::get_statsTypeOther() { - String result {}; - return result; + return native_->mStatsTypeOther; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::RTCStats::get_id() { - String result {}; - return result; + return native_->mID; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsPtr wrapper::impl::org::ortc::RTCStats::toWrapper(NativeStatsPtr native) +{ + if (!native) return RTCStatsPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStats::NativeStatsPtr wrapper::impl::org::ortc::RTCStats::toNative(wrapper::org::ortc::RTCStatsPtr wrapper) +{ + if (!wrapper) return NativeStatsPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStats.h b/ortc/idl/wrapper/impl_org_ortc_RTCStats.h index 42dc7655..df33bd94 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStats.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStats.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCStats.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,10 @@ namespace wrapper { struct RTCStats : public wrapper::org::ortc::RTCStats { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::Stats, NativeStats); + RTCStatsWeakPtr thisWeak_; + NativeStatsPtr native_; RTCStats(); virtual ~RTCStats(); @@ -30,6 +33,9 @@ namespace wrapper { virtual Optional< wrapper::org::ortc::RTCStatsType > get_statsType() override; virtual String get_statsTypeOther() override; virtual String get_id() override; + + static RTCStatsPtr toWrapper(NativeStatsPtr native); + static NativeStatsPtr toNative(wrapper::org::ortc::RTCStatsPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp index 893ac142..6ecfc33e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCStatsProvider.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,8 +41,23 @@ wrapper::impl::org::ortc::RTCStatsProvider::~RTCStatsProvider() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::RTCStatsProvider::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsProviderPtr wrapper::impl::org::ortc::RTCStatsProvider::toWrapper(NativeTypePtr native) +{ + if (!native) return RTCStatsProviderPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsProvider::NativeTypePtr wrapper::impl::org::ortc::RTCStatsProvider::toNative(wrapper::org::ortc::RTCStatsProviderPtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h index c0dfbddb..040e4da3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCStatsProvider.h" +#include namespace wrapper { namespace impl { @@ -13,13 +13,18 @@ namespace wrapper { struct RTCStatsProvider : public wrapper::org::ortc::RTCStatsProvider { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsProvider, NativeType); RTCStatsProviderWeakPtr thisWeak_; + NativeTypePtr native_; RTCStatsProvider(); virtual ~RTCStatsProvider(); // methods RTCStatsProvider virtual shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) override; + + static RTCStatsProviderPtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(wrapper::org::ortc::RTCStatsProviderPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp index 55b9dd0b..050ac7db 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCStatsReport.h" @@ -48,15 +47,21 @@ wrapper::org::ortc::RTCStatsPtr wrapper::impl::org::ortc::RTCStatsReport::getSta //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::RTCStatsReport::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ shared_ptr< list< String > > wrapper::impl::org::ortc::RTCStatsReport::get_statsIds() { - shared_ptr< list< String > > result {}; - return result; + return native_->getStatesIDs(); } +wrapper::impl::org::ortc::RTCStatsReportPtr wrapper::impl::org::ortc::RTCStatsReport::toWrapper(::ortc::IStatsReportPtr native) +{ + if (!native) return RTCStatsReportPtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h index 304b6822..833a9227 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCStatsReport.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,10 @@ namespace wrapper { struct RTCStatsReport : public wrapper::org::ortc::RTCStatsReport { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReport, NativeStatsReport); + RTCStatsReportWeakPtr thisWeak_; + NativeStatsReportPtr native_; RTCStatsReport(); virtual ~RTCStatsReport(); @@ -24,6 +27,8 @@ namespace wrapper { // properties RTCStatsReport virtual uint64_t get_objectId() override; virtual shared_ptr< list< String > > get_statsIds() override; + + static RTCStatsReportPtr toWrapper(NativeStatsReportPtr native); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp index 831e6026..707de154 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_RTCStatsTypeSet.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -30,6 +30,7 @@ wrapper::org::ortc::RTCStatsTypeSetPtr wrapper::org::ortc::RTCStatsTypeSet::wrap { auto pThis = make_shared(); pThis->thisWeak_ = pThis; + pThis->native_ = make_shared(); return pThis; } @@ -46,13 +47,34 @@ void wrapper::impl::org::ortc::RTCStatsTypeSet::wrapper_init_org_ortc_RTCStatsTy //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::RTCStatsTypeSet::wrapper_init_org_ortc_RTCStatsTypeSet(shared_ptr< set< wrapper::org::ortc::RTCStatsType > > values) { + if (!values) return; + for (auto iter = values->begin(); iter != values->end(); ++iter) + { + auto native = Helper::toNative(*iter); + native_->insert(native); + } } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::RTCStatsTypeSet::hasStatType(wrapper::org::ortc::RTCStatsType type) { - bool result {}; - return result; + return native_->hasStatType(Helper::toNative(type)); } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsTypeSetPtr wrapper::impl::org::ortc::RTCStatsTypeSet::toWrapper(NativeStatsTypeSetPtr native) +{ + if (!native) return RTCStatsTypeSetPtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::RTCStatsTypeSet::NativeStatsTypeSetPtr wrapper::impl::org::ortc::RTCStatsTypeSet::toNative(wrapper::org::ortc::RTCStatsTypeSetPtr wrapper) +{ + if (!wrapper) return NativeStatsTypeSetPtr(); + return std::dynamic_pointer_cast(wrapper)->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h index 5b1efb1c..4e3c1390 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_RTCStatsTypeSet.h" +#include namespace wrapper { namespace impl { @@ -13,7 +13,9 @@ namespace wrapper { struct RTCStatsTypeSet : public wrapper::org::ortc::RTCStatsTypeSet { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IStatsReportTypes::StatsTypeSet, NativeStatsTypeSet); RTCStatsTypeSetWeakPtr thisWeak_; + NativeStatsTypeSetPtr native_; RTCStatsTypeSet(); virtual ~RTCStatsTypeSet(); @@ -22,6 +24,9 @@ namespace wrapper { virtual void wrapper_init_org_ortc_RTCStatsTypeSet() override; virtual void wrapper_init_org_ortc_RTCStatsTypeSet(shared_ptr< set< wrapper::org::ortc::RTCStatsType > > values) override; virtual bool hasStatType(wrapper::org::ortc::RTCStatsType type) override; + + static RTCStatsTypeSetPtr toWrapper(NativeStatsTypeSetPtr native); + static NativeStatsTypeSetPtr toNative(wrapper::org::ortc::RTCStatsTypeSetPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp index d32fd978..f25e955b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_Settings.h" +#include "impl_org_ortc_Json.h" + +#include +#include using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +23,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::Settings::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::Settings::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::Settings::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::Settings::~Settings() { @@ -28,13 +35,13 @@ wrapper::impl::org::ortc::Settings::~Settings() //------------------------------------------------------------------------------ void wrapper::org::ortc::Settings::applyDefaults() { + NativeType::applyDefaults(); } //------------------------------------------------------------------------------ bool wrapper::org::ortc::Settings::apply(wrapper::org::ortc::JsonPtr jsonSettings) { - bool result {}; - return result; + return NativeType::apply(zsLib::IHelper::toString(wrapper::impl::org::ortc::Json::toNative(jsonSettings))); } //------------------------------------------------------------------------------ @@ -43,6 +50,7 @@ void wrapper::org::ortc::Settings::setString( String value ) { + NativeType::setString(key, value); } //------------------------------------------------------------------------------ @@ -51,6 +59,7 @@ void wrapper::org::ortc::Settings::setInt( int64_t value ) { + NativeType::setInt(key, SafeInt(value)); } //------------------------------------------------------------------------------ @@ -59,6 +68,7 @@ void wrapper::org::ortc::Settings::setUInt( uint64_t value ) { + NativeType::setUInt(key, SafeInt(value)); } //------------------------------------------------------------------------------ @@ -67,6 +77,7 @@ void wrapper::org::ortc::Settings::setBool( bool value ) { + NativeType::setBool(key, value); } //------------------------------------------------------------------------------ @@ -75,6 +86,7 @@ void wrapper::org::ortc::Settings::setFloat( float value ) { + NativeType::setFloat(key, value); } //------------------------------------------------------------------------------ @@ -83,16 +95,19 @@ void wrapper::org::ortc::Settings::setDouble( double value ) { + NativeType::setDouble(key, value); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Settings::clear(String key) { + NativeType::clear(key); } //------------------------------------------------------------------------------ void wrapper::org::ortc::Settings::clearAll() { + NativeType::clearAll(); } diff --git a/ortc/idl/wrapper/impl_org_ortc_Settings.h b/ortc/idl/wrapper/impl_org_ortc_Settings.h index bea228e0..9e8054b7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Settings.h +++ b/ortc/idl/wrapper/impl_org_ortc_Settings.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_Settings.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,10 @@ namespace wrapper { struct Settings : public wrapper::org::ortc::Settings { + ZS_DECLARE_TYPEDEF_PTR(::zsLib::ISettings, NativeType); + ZS_DECLARE_TYPEDEF_PTR(OrtcLib, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::OrtcLib, WrapperType); + virtual ~Settings(); }; diff --git a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp index 0e43ed6a..39a9a1b1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_StringOrStringList.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -46,25 +46,70 @@ void wrapper::impl::org::ortc::StringOrStringList::wrapper_init_org_ortc_StringO //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::StringOrStringList::wrapper_init_org_ortc_StringOrStringList(wrapper::org::ortc::StringOrStringListPtr source) { + if (!source) return; + wrapper::org::ortc::StringOrStringListPtr pThis = thisWeak_.lock(); + (*pThis) = (*source); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::StringOrStringList::wrapper_init_org_ortc_StringOrStringList(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + auto native = make_shared(Json::toNative(json)); + + wrapper::org::ortc::StringOrStringListPtr pThis = thisWeak_.lock(); + wrapper::org::ortc::StringOrStringListPtr wrapper = toWrapper(native); + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::StringOrStringList::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("StringOrStringList")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::StringOrStringList::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::StringOrStringListPtr wrapper::impl::org::ortc::StringOrStringList::toWrapper(NativeStringOrStringListPtr native) +{ + if (!native) return StringOrStringListPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::StringOrStringListPtr wrapper::impl::org::ortc::StringOrStringList::toWrapper(const NativeStringOrStringList &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + + pThis->value = native.mValue; + if (native.mValues.hasValue()) { + pThis->values = make_shared< list >(native.mValues.value()); + } + + return pThis; } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::StringOrStringList::NativeStringOrStringListPtr wrapper::impl::org::ortc::StringOrStringList::toNative(wrapper::org::ortc::StringOrStringListPtr wrapper) +{ + if (!wrapper) return NativeStringOrStringListPtr(); + + auto result = make_shared(); + result->mValue = wrapper->value; + if (wrapper->values.hasValue()) { + if (wrapper->values.value()) { + result->mValues = *(wrapper->values.value()); + } + } + + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h index 6c838d4f..1fb3cdfe 100644 --- a/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h +++ b/ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_StringOrStringList.h" +#include namespace wrapper { namespace impl { @@ -13,6 +13,8 @@ namespace wrapper { struct StringOrStringList : public wrapper::org::ortc::StringOrStringList { + ZS_DECLARE_TYPEDEF_PTR(::ortc::IConstraints::StringOrStringList, NativeStringOrStringList); + StringOrStringListWeakPtr thisWeak_; StringOrStringList(); @@ -24,6 +26,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_StringOrStringList(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static StringOrStringListPtr toWrapper(NativeStringOrStringListPtr native); + static StringOrStringListPtr toWrapper(const NativeStringOrStringList &native); + static NativeStringOrStringListPtr toNative(wrapper::org::ortc::StringOrStringListPtr wrapper); }; } // ortc diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp index 48d3d84f..6f7c8a5f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp @@ -1,6 +1,12 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_MediaStream.h" +#include "impl_org_ortc_MediaStreamTrack.h" +#include "impl_org_ortc_RTCStatsTypeSet.h" +#include "impl_org_ortc_RTCStatsReport.h" + +#include "impl_org_ortc_Helper.h" + +#include using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +26,8 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::MediaStream::MediaStream() { @@ -41,101 +49,168 @@ wrapper::impl::org::ortc::adapter::MediaStream::~MediaStream() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::MediaStream::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::MediaStream::wrapper_init_org_ortc_adapter_MediaStream() { + native_ = IMediaStream::create(thisWeak_.lock()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::MediaStream::wrapper_init_org_ortc_adapter_MediaStream(wrapper::org::ortc::adapter::MediaStreamPtr source) { + if (!source) { + wrapper_init_org_ortc_adapter_MediaStream(); + return; + } + native_ = IMediaStream::create(thisWeak_.lock(), toNative(source)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::MediaStream::wrapper_init_org_ortc_adapter_MediaStream(shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > tracks) { + if (!tracks) { + wrapper_init_org_ortc_adapter_MediaStream(); + return; + } + + native_ = IMediaStream::create(thisWeak_.lock(), *Helper::toNative(tracks)); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::adapter::MediaStream::getTrackById(String id) { - wrapper::org::ortc::MediaStreamTrackPtr result {}; - return result; + if (!native_) return MediaStreamTrackPtr(); + + auto result = native_->getTrackByID(id); + if (!result) return MediaStreamTrackPtr(); + + return wrapper::impl::org::ortc::MediaStreamTrack::toWrapper(result); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::MediaStream::addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) { + if (!track) return; + native_->addTrack(wrapper::impl::org::ortc::MediaStreamTrack::toNative(track)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::MediaStream::removeTrack(wrapper::org::ortc::MediaStreamTrackPtr track) { + if (!track) return; + native_->removeTrack(wrapper::impl::org::ortc::MediaStreamTrack::toNative(track)); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::MediaStreamPtr wrapper::impl::org::ortc::adapter::MediaStream::clone() { - wrapper::org::ortc::adapter::MediaStreamPtr result {}; - return result; + return toWrapper(native_->clone()); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::adapter::MediaStream::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::MediaStream::get_id() { - String result {}; - return result; + return native_->id(); } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::adapter::MediaStream::get_active() { - bool result {}; - return result; + return native_->active(); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > wrapper::impl::org::ortc::adapter::MediaStream::get_tracks() { - shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > result {}; - return result; + return Helper::toWrapper(native_->getTracks()); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > wrapper::impl::org::ortc::adapter::MediaStream::get_audioTracks() { - shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > result {}; - return result; + return Helper::toWrapper(native_->getAudioTracks()); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > wrapper::impl::org::ortc::adapter::MediaStream::get_videoTracks() { - shared_ptr< list< wrapper::org::ortc::MediaStreamTrackPtr > > result {}; - return result; + return Helper::toWrapper(native_->getVideoTracks()); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::adapter::MediaStream::get_count() { - uint64_t result {}; - return result; + return native_->size(); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::MediaStream::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); } +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::onMediaStreamAddTrack( + IMediaStreamPtr stream, + IMediaStreamTrackPtr track + ) +{ + onAddTrack(wrapper::impl::org::ortc::MediaStreamTrack::toWrapper(track)); +} +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::onMediaStreamRemoveTrack( + IMediaStreamPtr stream, + IMediaStreamTrackPtr track + ) +{ + onRemoveTrack(wrapper::impl::org::ortc::MediaStreamTrack::toWrapper(track)); +} + +//------------------------------------------------------------------------------ +::wrapper::impl::org::ortc::adapter::MediaStreamPtr wrapper::impl::org::ortc::adapter::MediaStream::toWrapper(IMediaStreamPtr native) +{ + if (!native) return MediaStreamPtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->defaultSubscription_ = false; + result->native_ = native; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +::ortc::adapter::IMediaStreamPtr wrapper::impl::org::ortc::adapter::MediaStream::toNative(::wrapper::org::ortc::adapter::MediaStreamPtr wrapper) +{ + if (!wrapper) return IMediaStreamPtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return IMediaStreamPtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void wrapper::impl::org::ortc::adapter::MediaStream::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h index f535e827..983a4f85 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_MediaStream.h" +#include namespace wrapper { namespace impl { @@ -12,10 +12,22 @@ namespace wrapper { namespace ortc { namespace adapter { - struct MediaStream : public wrapper::org::ortc::adapter::MediaStream + struct MediaStream : public wrapper::org::ortc::adapter::MediaStream, + public ::ortc::adapter::IMediaStreamDelegate { MediaStreamWeakPtr thisWeak_; + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IMediaStream, IMediaStream); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IMediaStreamTrack, IMediaStreamTrack); + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IMediaStreamDelegate, IMediaStreamDelegate); + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IMediaStreamSubscription, IMediaStreamSubscription); + + IMediaStreamPtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_ {}; + bool defaultSubscription_ {true}; + IMediaStreamSubscriptionPtr subscription_; + MediaStream(); virtual ~MediaStream(); @@ -41,6 +53,21 @@ namespace wrapper { virtual uint64_t get_count() override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onMediaStreamAddTrack( + IMediaStreamPtr stream, + IMediaStreamTrackPtr track + ) override; + virtual void onMediaStreamRemoveTrack( + IMediaStreamPtr stream, + IMediaStreamTrackPtr track + ) override; + + + static ::wrapper::impl::org::ortc::adapter::MediaStreamPtr toWrapper(IMediaStreamPtr native); + static IMediaStreamPtr toNative(::wrapper::org::ortc::adapter::MediaStreamPtr wrapper); + + void subscribe(); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp index e39bcd99..1aaaec48 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCAnswerOptions.h" @@ -43,4 +42,27 @@ void wrapper::impl::org::ortc::adapter::RTCAnswerOptions::wrapper_init_org_ortc_ { } +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCAnswerOptions::WrapperImplTypePtr wrapper::impl::org::ortc::adapter::RTCAnswerOptions::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCAnswerOptions::WrapperImplTypePtr wrapper::impl::org::ortc::adapter::RTCAnswerOptions::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->voiceActivityDetection = native.mVoiceActivityDetection; + return pThis; +} +//------------------------------------------------------------------------------ +wrapper::impl::org::ortc::adapter::RTCAnswerOptions::NativeTypePtr wrapper::impl::org::ortc::adapter::RTCAnswerOptions::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared < NativeType >(); + result->mVoiceActivityDetection = wrapper->voiceActivityDetection; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h index af5ef81c..a6a74f44 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCAnswerOptions.h" +#include namespace wrapper { namespace impl { @@ -14,11 +14,18 @@ namespace wrapper { struct RTCAnswerOptions : public wrapper::org::ortc::adapter::RTCAnswerOptions { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnectionTypes::AnswerOptions, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCAnswerOptions, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCAnswerOptions, WrapperType); RTCAnswerOptionsWeakPtr thisWeak_; RTCAnswerOptions(); virtual ~RTCAnswerOptions(); virtual void wrapper_init_org_ortc_adapter_RTCAnswerOptions() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp index 490743a9..b1853629 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCCapabilityOptions.h" @@ -20,6 +19,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCCapabilityOptions::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCCapabilityOptions::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCCapabilityOptions::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCCapabilityOptions::RTCCapabilityOptions() { @@ -43,4 +47,28 @@ void wrapper::impl::org::ortc::adapter::RTCCapabilityOptions::wrapper_init_org_o { } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->voiceActivityDetection = native.mVoiceActivityDetection; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared < NativeType >(); + result->mVoiceActivityDetection = wrapper->voiceActivityDetection; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h index ff78c20a..36c5a1f0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCCapabilityOptions.h" +#include namespace wrapper { namespace impl { @@ -14,11 +14,18 @@ namespace wrapper { struct RTCCapabilityOptions : public wrapper::org::ortc::adapter::RTCCapabilityOptions { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnectionTypes::CapabilityOptions, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCCapabilityOptions, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCCapabilityOptions, WrapperType); RTCCapabilityOptionsWeakPtr thisWeak_; RTCCapabilityOptions(); virtual ~RTCCapabilityOptions(); virtual void wrapper_init_org_ortc_adapter_RTCCapabilityOptions() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp index b3c4037a..de1137fb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp @@ -1,6 +1,10 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCConfiguration.h" +#include "impl_org_ortc_RTCIceGatherOptions.h" +#include "impl_org_ortc_RTCCertificate.h" +#include "impl_org_ortc_Helper.h" + +#include using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +24,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCConfiguration::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCConfiguration::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCConfiguration::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCConfiguration::RTCConfiguration() { @@ -46,6 +54,52 @@ void wrapper::impl::org::ortc::adapter::RTCConfiguration::wrapper_init_org_ortc_ //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCConfiguration::wrapper_init_org_ortc_adapter_RTCConfiguration(wrapper::org::ortc::adapter::RTCConfigurationPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return RTCConfigurationPtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->gatherOptions = RTCIceGatherOptions::toWrapper(native.mGatherOptions); + pThis->signalingMode = Helper::toWrapper(native.mSignalingMode); + pThis->negotiateSrtpSdes = native.mNegotiateSRTPSDES; + pThis->bundlePolicy = Helper::toWrapper(native.mBundlePolicy); + pThis->rtcpMuxPolicy = Helper::toWrapper(native.mRTCPMuxPolicy); + pThis->certificates = make_shared< list< wrapper::org::ortc::RTCCertificatePtr> >(); + for (auto iter = native.mCertificates.begin(); iter != native.mCertificates.end(); ++iter) { + pThis->certificates->push_back(RTCCertificate::toWrapper(*iter)); + } + pThis->iceCandidatePoolSize = native.mICECandidatePoolSize; + return pThis; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared < NativeType >(); + result->mGatherOptions = RTCIceGatherOptions::toNative(wrapper->gatherOptions); + result->mSignalingMode = Helper::toNative(wrapper->signalingMode); + result->mNegotiateSRTPSDES = wrapper->negotiateSrtpSdes; + result->mBundlePolicy = Helper::toNative(wrapper->bundlePolicy); + result->mRTCPMuxPolicy = Helper::toNative(wrapper->rtcpMuxPolicy); + if (wrapper->certificates) { + for (auto iter = wrapper->certificates->begin(); iter != wrapper->certificates->end(); ++iter) { + result->mCertificates.push_back(RTCCertificate::toNative(*iter)); + } + } + result->mICECandidatePoolSize = SafeIntmICECandidatePoolSize)>(wrapper->iceCandidatePoolSize); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h index ede66d50..c2376b16 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCConfiguration.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCConfiguration : public wrapper::org::ortc::adapter::RTCConfiguration { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnectionTypes::Configuration, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCConfiguration, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCConfiguration, WrapperType); RTCConfigurationWeakPtr thisWeak_; RTCConfiguration(); @@ -22,6 +25,10 @@ namespace wrapper { // methods RTCConfiguration virtual void wrapper_init_org_ortc_adapter_RTCConfiguration() override; virtual void wrapper_init_org_ortc_adapter_RTCConfiguration(wrapper::org::ortc::adapter::RTCConfigurationPtr source) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp index 2c0d787e..a1b122fd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp @@ -1,6 +1,11 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCIceCandidate.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" +#include "impl_org_ortc_RTCIceCandidate.h" +#include "impl_org_ortc_RTCIceCandidateComplete.h" + +#include using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +25,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCIceCandidate::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCIceCandidate::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCIceCandidate::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCIceCandidate::RTCIceCandidate() { @@ -46,11 +56,21 @@ void wrapper::impl::org::ortc::adapter::RTCIceCandidate::wrapper_init_org_ortc_a //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCIceCandidate::wrapper_init_org_ortc_adapter_RTCIceCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCIceCandidate::wrapper_init_org_ortc_adapter_RTCIceCandidate(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr wrapper = toWrapper(NativeType::createFromJSON(Json::toNative(json))); + WrapperTypePtr pThis = thisWeak_.lock(); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ @@ -59,8 +79,10 @@ wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::org::ortc::adapter::RTC uint64_t mlineIndex ) { - wrapper::org::ortc::adapter::RTCIceCandidatePtr result {}; - return result; + auto native = NativeType::createFromSDP(sdp); + native->mMLineIndex = SafeIntmMLineIndex)::UseType>(mlineIndex); + + return WrapperImplType::toWrapper(native); } //------------------------------------------------------------------------------ @@ -69,41 +91,94 @@ wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::org::ortc::adapter::RTC String mid ) { - wrapper::org::ortc::adapter::RTCIceCandidatePtr result {}; - return result; + auto native = NativeType::createFromSDP(sdp); + native->mMid = mid; + + return WrapperImplType::toWrapper(native); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCIceCandidate::toSdp() { - String result {}; - return result; + return toNative(thisWeak_.lock())->toSDP(); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCIceCandidate::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->toJSON()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCIceCandidate::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCIceCandidate::get_sdpMid() { - String result {}; - return result; + return mid; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCIceCandidate::set_sdpMid(String value) { + mid = value; } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->mid = native.mMid; + Helper::optionalSafeIntConvert(native.mMLineIndex, pThis->sdpMLineIndex); + if (native.mCandidate) { + { + auto nativeCandidate = std::dynamic_pointer_cast<::ortc::IICETypes::Candidate>(native.mCandidate); + if (nativeCandidate) { + pThis->candidate = impl::org::ortc::RTCIceCandidate::toWrapper(nativeCandidate); + } + } + { + auto nativeCandidate = std::dynamic_pointer_cast<::ortc::IICETypes::CandidateComplete>(native.mCandidate); + if (nativeCandidate) { + pThis->candidate = impl::org::ortc::RTCIceCandidateComplete::toWrapper(nativeCandidate); + } + } + } + return pThis; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mMid = wrapper->mid; + Helper::optionalSafeIntConvert(wrapper->sdpMLineIndex, result->mMLineIndex); + if (wrapper->candidate) { + { + auto nativeCandidate = impl::org::ortc::RTCIceCandidate::toNative(wrapper->candidate); + if (nativeCandidate) { + result->mCandidate = nativeCandidate; + } + } + { + auto nativeCandidate = impl::org::ortc::RTCIceCandidateComplete::toNative(wrapper->candidate); + if (nativeCandidate) { + result->mCandidate = nativeCandidate; + } + } + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h index 83cb5061..a4dddddb 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCIceCandidate.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCIceCandidate : public wrapper::org::ortc::adapter::RTCIceCandidate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::ICECandidate, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCIceCandidate, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCIceCandidate, WrapperType); RTCIceCandidateWeakPtr thisWeak_; RTCIceCandidate(); @@ -30,6 +33,10 @@ namespace wrapper { // properties RTCIceCandidate virtual String get_sdpMid() override; virtual void set_sdpMid(String value) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp index 58383973..77f17548 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h" +#include "impl_org_ortc_RTCRtpCapabilities.h" +#include "impl_org_ortc_RTCRtpParameters.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::RTCMediaStreamTrackConfiguration() { @@ -46,6 +52,37 @@ void wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::wrappe //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCMediaStreamTrackConfiguration::wrapper_init_org_ortc_adapter_RTCMediaStreamTrackConfiguration(wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); +} + + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->capabilities = RTCRtpCapabilities::toWrapper(native.mCapabilities); + pThis->parameters = RTCRtpParameters::toWrapper(native.mParameters); + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + result->mCapabilities = RTCRtpCapabilities::toNative(wrapper->capabilities); + result->mParameters = RTCRtpParameters::toNative(wrapper->parameters); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h index dbdac5e0..2e644e0f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCMediaStreamTrackConfiguration.h" +#include namespace wrapper { namespace impl { @@ -14,7 +14,11 @@ namespace wrapper { struct RTCMediaStreamTrackConfiguration : public wrapper::org::ortc::adapter::RTCMediaStreamTrackConfiguration { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnectionTypes::MediaStreamTrackConfiguration, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCMediaStreamTrackConfiguration, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCMediaStreamTrackConfiguration, WrapperType); RTCMediaStreamTrackConfigurationWeakPtr thisWeak_; + NativeTypePtr native_; RTCMediaStreamTrackConfiguration(); virtual ~RTCMediaStreamTrackConfiguration(); @@ -22,6 +26,10 @@ namespace wrapper { // methods RTCMediaStreamTrackConfiguration virtual void wrapper_init_org_ortc_adapter_RTCMediaStreamTrackConfiguration() override; virtual void wrapper_init_org_ortc_adapter_RTCMediaStreamTrackConfiguration(wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr source) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp index d66478d0..ed651c71 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCOfferAnswerOptions.h" @@ -20,6 +19,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::RTCOfferAnswerOptions() { @@ -38,4 +42,27 @@ wrapper::impl::org::ortc::adapter::RTCOfferAnswerOptions::~RTCOfferAnswerOptions { } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return RTCOfferAnswerOptionsPtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->voiceActivityDetection = native.mVoiceActivityDetection; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared < NativeType >(); + result->mVoiceActivityDetection = wrapper->voiceActivityDetection; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h index f665b3a2..e011f0e4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCOfferAnswerOptions.h" +#include namespace wrapper { namespace impl { @@ -14,10 +14,17 @@ namespace wrapper { struct RTCOfferAnswerOptions : public wrapper::org::ortc::adapter::RTCOfferAnswerOptions { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnectionTypes::OfferAnswerOptions, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCOfferAnswerOptions, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCOfferAnswerOptions, WrapperType); RTCOfferAnswerOptionsWeakPtr thisWeak_; RTCOfferAnswerOptions(); virtual ~RTCOfferAnswerOptions(); + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp index 817c7273..5d9ccf97 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCOfferOptions.h" @@ -20,6 +19,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCOfferOptions::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCOfferOptions::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCOfferOptions::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCOfferOptions::RTCOfferOptions() { @@ -43,4 +47,29 @@ void wrapper::impl::org::ortc::adapter::RTCOfferOptions::wrapper_init_org_ortc_a { } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return RTCOfferOptionsPtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->voiceActivityDetection = native.mVoiceActivityDetection; + pThis->iceRestart = native.mICERestart; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(wrapper::org::ortc::adapter::RTCOfferOptionsPtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared < NativeType >(); + result->mVoiceActivityDetection = wrapper->voiceActivityDetection; + result->mICERestart = wrapper->iceRestart; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h index a8d2b7a2..e5665e8f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCOfferOptions.h" +#include namespace wrapper { namespace impl { @@ -14,11 +14,18 @@ namespace wrapper { struct RTCOfferOptions : public wrapper::org::ortc::adapter::RTCOfferOptions { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnectionTypes::OfferOptions, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCOfferOptions, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCOfferOptions, WrapperType); RTCOfferOptionsWeakPtr thisWeak_; RTCOfferOptions(); virtual ~RTCOfferOptions(); virtual void wrapper_init_org_ortc_adapter_RTCOfferOptions() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp index 635799d7..5398277b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h" +#include "impl_org_ortc_adapter_RTCIceCandidate.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::RTCPeerConnectionIceErrorEvent() { @@ -41,29 +46,48 @@ wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::~RTCPeerConne //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_hostCandidate() { - wrapper::org::ortc::adapter::RTCIceCandidatePtr result {}; - return result; + return RTCIceCandidate::toWrapper(native_->mHostCandidate); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_url() { - String result {}; - return result; + return native_->mURL; } //------------------------------------------------------------------------------ Optional< uint16_t > wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_errorCode() { Optional< uint16_t > result {}; + Helper::optionalSafeIntConvert(native_->mErrorCode, result); return result; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceErrorEvent::get_errorText() { - String result {}; - return result; + return native_->mErrorText; +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto impl = std::dynamic_pointer_cast(wrapper); + if (!impl) return NativeTypePtr(); + + return impl->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h index a819b03c..b0cbb94c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h" +#include namespace wrapper { namespace impl { @@ -14,7 +14,11 @@ namespace wrapper { struct RTCPeerConnectionIceErrorEvent : public wrapper::org::ortc::adapter::RTCPeerConnectionIceErrorEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnectionTypes::ICECandidateErrorEvent, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCPeerConnectionIceErrorEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCPeerConnectionIceErrorEvent, WrapperType); RTCPeerConnectionIceErrorEventWeakPtr thisWeak_; + NativeTypePtr native_; RTCPeerConnectionIceErrorEvent(); virtual ~RTCPeerConnectionIceErrorEvent(); @@ -24,6 +28,9 @@ namespace wrapper { virtual String get_url() override; virtual Optional< uint16_t > get_errorCode() override; virtual String get_errorText() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp index cc454517..b6760d6f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h" +#include "impl_org_ortc_adapter_RTCIceCandidate.h" using ::zsLib::String; using ::zsLib::Optional; @@ -41,15 +41,13 @@ wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::~RTCPeerConnection //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCIceCandidatePtr wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::get_candidate() { - wrapper::org::ortc::adapter::RTCIceCandidatePtr result {}; - return result; + return candidate_; } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::get_uri() { - String result {}; - return result; + return uri_; } diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h index cba4974a..339df82e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h @@ -1,11 +1,9 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCPeerConnectionIceEvent.h" - namespace wrapper { namespace impl { namespace org { @@ -15,6 +13,8 @@ namespace wrapper { struct RTCPeerConnectionIceEvent : public wrapper::org::ortc::adapter::RTCPeerConnectionIceEvent { RTCPeerConnectionIceEventWeakPtr thisWeak_; + wrapper::org::ortc::adapter::RTCIceCandidatePtr candidate_; + String uri_; RTCPeerConnectionIceEvent(); virtual ~RTCPeerConnectionIceEvent(); diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp index 111c5597..7bf3cd98 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp @@ -1,6 +1,12 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescription.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionDescription.h" +#include "impl_org_ortc_RTCRtpCapabilities.h" +#include "impl_org_ortc_RTCRtpParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" + +#include using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +26,12 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescription::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescription::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescription::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescription::RTCSessionDescription() { @@ -44,6 +56,7 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescription::wrapper_init_org_ String description ) { + native_ = NativeType::create(Helper::toNative(type), description); } //------------------------------------------------------------------------------ @@ -52,39 +65,58 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescription::wrapper_init_org_ wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr description ) { + auto wrapperDescription = RTCSessionDescriptionDescription::toNative(description); + ZS_THROW_INVALID_ARGUMENT_IF(!wrapperDescription); + native_ = NativeType::create(Helper::toNative(type), *wrapperDescription); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpParametersPtr wrapper::org::ortc::adapter::RTCSessionDescription::convertCapabilitiesToParameters(wrapper::org::ortc::RTCRtpCapabilitiesPtr capabilitites) { - wrapper::org::ortc::RTCRtpParametersPtr result {}; - return result; + auto native = wrapper::impl::org::ortc::RTCRtpCapabilities::toNative(capabilitites); + if (!native) return RTCRtpParametersPtr(); + + auto result = ::ortc::adapter::IHelper::capabilitiesToParameters(*native); + return wrapper::impl::org::ortc::RTCRtpParameters::toWrapper(result); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpCapabilitiesPtr wrapper::org::ortc::adapter::RTCSessionDescription::ConvertParametersToCapabilitites(wrapper::org::ortc::RTCRtpParametersPtr parameters) { - wrapper::org::ortc::RTCRtpCapabilitiesPtr result {}; - return result; + auto native = wrapper::impl::org::ortc::RTCRtpParameters::toNative(parameters); + if (!native) return RTCRtpCapabilitiesPtr(); + + auto result = ::ortc::adapter::IHelper::parametersToCapabilities(*native); + return wrapper::impl::org::ortc::RTCRtpCapabilities::toWrapper(result); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_type() { - wrapper::org::ortc::adapter::RTCSessionDescriptionSignalingType result {}; - return result; + return Helper::toWrapper(native_->type()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSdpType wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_sdpType() { + auto type = native_->type(); + ZS_THROW_NOT_IMPLEMENTED_IF(NativeType::SignalingType_JSON == type); + + switch (type) + { + case NativeType::SignalingType_JSON: break; + case NativeType::SignalingType_SDPOffer: return wrapper::org::ortc::adapter::RTCSdpType_offer; + case NativeType::SignalingType_SDPPranswer: return wrapper::org::ortc::adapter::RTCSdpType_pranswer; + case NativeType::SignalingType_SDPAnswer: return wrapper::org::ortc::adapter::RTCSdpType_answer; + case NativeType::SignalingType_SDPRollback: return wrapper::org::ortc::adapter::RTCSdpType_rollback; + } + wrapper::org::ortc::adapter::RTCSdpType result {}; return result; } @@ -92,36 +124,51 @@ wrapper::org::ortc::adapter::RTCSdpType wrapper::impl::org::ortc::adapter::RTCSe //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_isJsonSignalling() { - bool result {}; - return result; + return NativeType::SignalingType_JSON == native_->type(); } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_isSdpSignaling() { - bool result {}; - return result; + return NativeType::SignalingType_JSON != native_->type(); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_description() { - wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr result {}; - return result; + return RTCSessionDescriptionDescription::toWrapper(native_->description()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_formattedDescription() { - String result {}; - return result; + return native_->formattedDescription(); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescription::get_sdp() { - String result {}; - return result; + return native_->formattedDescription(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto impl = std::dynamic_pointer_cast(wrapper); + if (!impl) return NativeTypePtr(); + + return impl->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h index a1199208..d102e501 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescription.h" +#include namespace wrapper { namespace impl { @@ -14,7 +14,11 @@ namespace wrapper { struct RTCSessionDescription : public wrapper::org::ortc::adapter::RTCSessionDescription { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescription, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescription, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescription, WrapperType); RTCSessionDescriptionWeakPtr thisWeak_; + NativeTypePtr native_; RTCSessionDescription(); virtual ~RTCSessionDescription(); @@ -38,6 +42,9 @@ namespace wrapper { virtual wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr get_description() override; virtual String get_formattedDescription() override; virtual String get_sdp() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp index 00c098eb..e8dd3a34 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::RTCSessionDescriptionConnectionData() { @@ -46,25 +52,60 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::wra //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData(wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionData::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->rtp = RTCSessionDescriptionConnectionDataDetails::toWrapper(native.mRTP); + pThis->rtcp = RTCSessionDescriptionConnectionDataDetails::toWrapper(native.mRTCP); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mRTP = RTCSessionDescriptionConnectionDataDetails::toNative(wrapper->rtp); + result->mRTCP = RTCSessionDescriptionConnectionDataDetails::toNative(wrapper->rtcp); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h index ed2ce31e..8ae50261 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionConnectionData.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionConnectionData : public wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionData { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::ConnectionData, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionConnectionData, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionData, WrapperType); RTCSessionDescriptionConnectionDataWeakPtr thisWeak_; RTCSessionDescriptionConnectionData(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionData(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp index 7dddf462..c9eb5fb4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::RTCSessionDescriptionConnectionDataDetails() { @@ -46,25 +51,64 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetai //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetailsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mPort, pThis->port); + pThis->netType = native.mNetType; + pThis->addrType = native.mAddrType; + pThis->connectionAddress = native.mConnectionAddress; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->port, result->mPort); + result->mNetType = wrapper->netType; + result->mAddrType = wrapper->addrType; + result->mConnectionAddress = wrapper->connectionAddress; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h index 2166a587..2c07a01a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionConnectionDataDetails : public wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::ConnectionData::Details, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionConnectionDataDetails, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionConnectionDataDetails, WrapperType); RTCSessionDescriptionConnectionDataDetailsWeakPtr thisWeak_; RTCSessionDescriptionConnectionDataDetails(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp index 13a61738..4a9490ff 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp @@ -1,6 +1,12 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionDescription.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionTransport.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +26,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::RTCSessionDescriptionDescription() { @@ -46,25 +56,111 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::wrappe //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescription::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->details = RTCSessionDescriptionDescriptionDetails::toWrapper(native.mDetails); + pThis->transports = make_shared< list< wrapper::org::ortc::adapter::RTCSessionDescriptionTransportPtr > >(); + for (auto iter = native.mTransports.begin(); iter != native.mTransports.end(); ++iter) { + auto wrapper = RTCSessionDescriptionTransport::toWrapper(*iter); + if (!wrapper) continue; + pThis->transports->push_back(wrapper); + } + pThis->rtpMediaLines = make_shared< list< wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLinePtr > >(); + for (auto iter = native.mRTPMediaLines.begin(); iter != native.mRTPMediaLines.end(); ++iter) { + auto wrapper = RTCSessionDescriptionRtpMediaLine::toWrapper(*iter); + if (!wrapper) continue; + pThis->rtpMediaLines->push_back(wrapper); + } + pThis->sctpMediaLines = make_shared< list< wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLinePtr > >(); + for (auto iter = native.mSCTPMediaLines.begin(); iter != native.mSCTPMediaLines.end(); ++iter) { + auto wrapper = RTCSessionDescriptionSctpMediaLine::toWrapper(*iter); + if (!wrapper) continue; + pThis->sctpMediaLines->push_back(wrapper); + } + pThis->rtpSenders = make_shared< list< wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderPtr > >(); + for (auto iter = native.mRTPSenders.begin(); iter != native.mRTPSenders.end(); ++iter) { + auto wrapper = RTCSessionDescriptionRtpSender::toWrapper(*iter); + if (!wrapper) continue; + pThis->rtpSenders->push_back(wrapper); + } + + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = make_shared(); + result->mDetails = RTCSessionDescriptionDescriptionDetails::toNative(wrapper->details); + if (wrapper->transports) { + for (auto iter = wrapper->transports->begin(); iter != wrapper->transports->end(); ++iter) { + auto native = RTCSessionDescriptionTransport::toNative(*iter); + if (!native) continue; + result->mTransports.push_back(native); + } + } + if (wrapper->rtpMediaLines) { + for (auto iter = wrapper->rtpMediaLines->begin(); iter != wrapper->rtpMediaLines->end(); ++iter) { + auto native = RTCSessionDescriptionRtpMediaLine::toNative(*iter); + if (!native) continue; + result->mRTPMediaLines.push_back(native); + } + } + if (wrapper->sctpMediaLines) { + for (auto iter = wrapper->sctpMediaLines->begin(); iter != wrapper->sctpMediaLines->end(); ++iter) { + auto native = RTCSessionDescriptionSctpMediaLine::toNative(*iter); + if (!native) continue; + result->mSCTPMediaLines.push_back(native); + } + } + if (wrapper->rtpSenders) { + for (auto iter = wrapper->rtpSenders->begin(); iter != wrapper->rtpSenders->end(); ++iter) { + auto native = RTCSessionDescriptionRtpSender::toNative(*iter); + if (!native) continue; + result->mRTPSenders.push_back(native); + } + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h index a7bd1e59..4b7e53c0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionDescription.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionDescription : public wrapper::org::ortc::adapter::RTCSessionDescriptionDescription { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::Description, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionDescription, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionDescription, WrapperType); RTCSessionDescriptionDescriptionWeakPtr thisWeak_; RTCSessionDescriptionDescription(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescription(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp index 73ffed6f..e409d6f7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +23,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::RTCSessionDescriptionDescriptionDetails() { @@ -46,25 +53,72 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails: //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionDetailsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->username = native.mUsername; + pThis->sessionId = SafeIntsessionId)>(native.mSessionID); + pThis->sessionVersion = SafeIntsessionVersion)>(native.mSessionVersion); + pThis->unicaseAddress = RTCSessionDescriptionConnectionDataDetails::toWrapper(native.mUnicaseAddress); + pThis->sessionName = native.mSessionName; + pThis->startTime = SafeIntstartTime)>(native.mStartTime); + pThis->endTime = SafeIntendTime)>(native.mEndTime); + pThis->connectionData = RTCSessionDescriptionConnectionData::toWrapper(native.mConnectionData); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mUsername = wrapper->username; + result->mSessionID = SafeIntmSessionID)>(wrapper->sessionId); + result->mSessionVersion = SafeIntmSessionVersion)>(wrapper->sessionVersion); + result->mUnicaseAddress = RTCSessionDescriptionConnectionDataDetails::toNative(wrapper->unicaseAddress); + result->mSessionName = wrapper->sessionName; + result->mStartTime = SafeIntmStartTime)>(wrapper->startTime); + result->mEndTime = SafeIntmEndTime)>(wrapper->endTime); + result->mConnectionData = RTCSessionDescriptionConnectionData::toNative(wrapper->connectionData); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h index 06ea9e5e..305913cc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionDescriptionDetails : public wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::Description::Details, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionDescriptionDetails, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionDescriptionDetails, WrapperType); RTCSessionDescriptionDescriptionDetailsWeakPtr thisWeak_; RTCSessionDescriptionDescriptionDetails(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp index be6e9d89..380bb563 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp @@ -1,6 +1,9 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +23,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::RTCSessionDescriptionMediaLine() { @@ -41,15 +48,59 @@ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::~RTCSessionDe //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + { + auto obj = std::dynamic_pointer_cast<::ortc::adapter::ISessionDescriptionTypes::RTPMediaLine>(native_); + if (obj) return Json::toWrapper(obj->createElement()); + } + { + auto obj = std::dynamic_pointer_cast<::ortc::adapter::ISessionDescriptionTypes::SCTPMediaLine>(native_); + if (obj) return Json::toWrapper(obj->createElement()); + } + + return JsonPtr(); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLine::hash() { - String result {}; - return result; + { + auto obj = std::dynamic_pointer_cast<::ortc::adapter::ISessionDescriptionTypes::RTPMediaLine>(native_); + if (obj) return obj->hash(); + } + { + auto obj = std::dynamic_pointer_cast<::ortc::adapter::ISessionDescriptionTypes::SCTPMediaLine>(native_); + if (obj) return obj->hash(); + } + + return String(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; } +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + { + auto obj = std::dynamic_pointer_cast(wrapper); + if (obj) return RTCSessionDescriptionRtpMediaLine::toNative(obj); + } + { + auto obj = std::dynamic_pointer_cast(wrapper); + if (obj) return RTCSessionDescriptionSctpMediaLine::toNative(obj); + } + + auto impl = std::dynamic_pointer_cast(wrapper); + if (!impl) return NativeTypePtr(); + + return impl->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h index 0ad91c1d..cee6af5d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionMediaLine.h" +#include namespace wrapper { namespace impl { @@ -14,7 +14,11 @@ namespace wrapper { struct RTCSessionDescriptionMediaLine : public wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLine { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::MediaLine, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionMediaLine, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLine, WrapperType); RTCSessionDescriptionMediaLineWeakPtr thisWeak_; + NativeTypePtr native_; RTCSessionDescriptionMediaLine(); virtual ~RTCSessionDescriptionMediaLine(); @@ -22,6 +26,9 @@ namespace wrapper { // methods RTCSessionDescriptionMediaLine virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp index 78d6dd68..bbb1ed96 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::RTCSessionDescriptionMediaLineDetails() { @@ -46,25 +52,66 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::w //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLineDetailsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mInternalIndex, pThis->internalIndex); + pThis->privateTransportID = native.mPrivateTransportID; + pThis->protocol = native.mProtocol; + pThis->connectionData = RTCSessionDescriptionConnectionData::toWrapper(native.mConnectionData); + pThis->mediaDirection = Helper::toWrapper(native.mMediaDirection); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->internalIndex, result->mInternalIndex); + result->mPrivateTransportID = wrapper->privateTransportID; + result->mProtocol = wrapper->protocol; + result->mConnectionData = RTCSessionDescriptionConnectionData::toNative(wrapper->connectionData); + result->mMediaDirection = Helper::toNative(wrapper->mediaDirection); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h index 9530d92e..d7244337 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionMediaLineDetails : public wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::MediaLine::Details, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionMediaLineDetails, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionMediaLineDetails, WrapperType); RTCSessionDescriptionMediaLineDetailsWeakPtr thisWeak_; RTCSessionDescriptionMediaLineDetails(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp index 1252631d..8a8a3839 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h" +#include "impl_org_ortc_RTCRtpCapabilities.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::RTCSessionDescriptionRtpMediaLine() { @@ -41,15 +47,13 @@ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::~RTCSessio //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ @@ -60,11 +64,56 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::wrapp //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLinePtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->id = native.mID; + pThis->transportId = native.mTransportID; + pThis->mediaType = native.mMediaType; + pThis->details = RTCSessionDescriptionMediaLineDetails::toWrapper(native.mDetails); + pThis->senderCapabilities = RTCRtpCapabilities::toWrapper(native.mSenderCapabilities); + pThis->receiverCapabilities = RTCRtpCapabilities::toWrapper(native.mReceiverCapabilities); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mID = wrapper->id; + result->mTransportID = wrapper->transportId; + result->mMediaType = wrapper->mediaType; + result->mDetails = RTCSessionDescriptionMediaLineDetails::toNative(wrapper->details); + result->mSenderCapabilities = RTCRtpCapabilities::toNative(wrapper->senderCapabilities); + result->mReceiverCapabilities = RTCRtpCapabilities::toNative(wrapper->receiverCapabilities); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h index 7d9f1d92..9989d7ee 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionRtpMediaLine : public wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::RTPMediaLine, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionRtpMediaLine, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLine, WrapperType); RTCSessionDescriptionRtpMediaLineWeakPtr thisWeak_; RTCSessionDescriptionRtpMediaLine(); @@ -27,6 +30,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine() override; virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpMediaLinePtr source) override; virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine(wrapper::org::ortc::JsonPtr json) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp index dc01177f..9ce75b6d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h" +#include "impl_org_ortc_RTCRtpParameters.h" +#include "impl_org_ortc_Json.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::RTCSessionDescriptionRtpSender() { @@ -46,25 +52,70 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::wrapper_ //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSender::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->id = native.mID; + pThis->details = RTCSessionDescriptionRtpSenderDetails::toWrapper(native.mDetails); + pThis->rtpMediaLineId = native.mRTPMediaLineID; + pThis->parameters = RTCRtpParameters::toWrapper(native.mParameters); + pThis->mediaStreamTrackId = native.mMediaStreamTrackID; + pThis->mediaStreamIds = make_shared< set< String > >(native.mMediaStreamIDs); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mID = wrapper->id; + result->mDetails = RTCSessionDescriptionRtpSenderDetails::toNative(wrapper->details); + result->mRTPMediaLineID = wrapper->rtpMediaLineId; + result->mParameters = RTCRtpParameters::toNative(wrapper->parameters); + result->mMediaStreamTrackID = wrapper->mediaStreamTrackId; + if (wrapper->mediaStreamIds) { + result->mMediaStreamIDs = *(wrapper->mediaStreamIds); + } + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h index 113f2b20..a825859f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionRtpSender.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionRtpSender : public wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSender { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::RTPSender, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionRtpSender, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSender, WrapperType); RTCSessionDescriptionRtpSenderWeakPtr thisWeak_; RTCSessionDescriptionRtpSender(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSender(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp index e2ca073b..c8231219 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp @@ -1,6 +1,7 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +21,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::RTCSessionDescriptionRtpSenderDetails() { @@ -46,25 +51,58 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::w //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetailsPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + Helper::optionalSafeIntConvert(native.mInternalRTPMediaLineIndex, pThis->internalRtpMediaLineIndex); + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + Helper::optionalSafeIntConvert(wrapper->internalRtpMediaLineIndex, result->mInternalRTPMediaLineIndex); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h index 17a91037..d8fcf619 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionRtpSenderDetails : public wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::RTPSender::Details, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionRtpSenderDetails, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionRtpSenderDetails, WrapperType); RTCSessionDescriptionRtpSenderDetailsWeakPtr thisWeak_; RTCSessionDescriptionRtpSenderDetails(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp index fa60c24e..2768e255 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp @@ -1,6 +1,10 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h" +#include "impl_org_ortc_RTCSctpCapabilities.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" + using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +24,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::RTCSessionDescriptionSctpMediaLine() { @@ -41,15 +49,13 @@ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::~RTCSessi //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ @@ -60,11 +66,56 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::wrap //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLinePtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine::wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->id = native.mID; + pThis->transportId = native.mTransportID; + pThis->mediaType = native.mMediaType; + pThis->details = RTCSessionDescriptionMediaLineDetails::toWrapper(native.mDetails); + pThis->capabilities = RTCSctpCapabilities::toWrapper(native.mCapabilities); + Helper::optionalSafeIntConvert(native.mPort, pThis->port); + return pThis; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mID = wrapper->id; + result->mTransportID = wrapper->transportId; + result->mMediaType = wrapper->mediaType; + result->mDetails = RTCSessionDescriptionMediaLineDetails::toNative(wrapper->details); + result->mCapabilities = RTCSctpCapabilities::toNative(wrapper->capabilities); + Helper::optionalSafeIntConvert(wrapper->port, result->mPort); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h index fabff59a..52207108 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionSctpMediaLine : public wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::SCTPMediaLine, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionSctpMediaLine, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLine, WrapperType); RTCSessionDescriptionSctpMediaLineWeakPtr thisWeak_; RTCSessionDescriptionSctpMediaLine(); @@ -27,6 +30,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine() override; virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::adapter::RTCSessionDescriptionSctpMediaLinePtr source) override; virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine(wrapper::org::ortc::JsonPtr json) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp index 580beba0..97996491 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionTransport.h" +#include "impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::RTCSessionDescriptionTransport() { @@ -46,25 +52,64 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::wrapper_ //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport(wrapper::org::ortc::adapter::RTCSessionDescriptionTransportPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement()); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransport::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); +} +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->transportId = native.mID; + pThis->rtp = RTCSessionDescriptionTransportParameters::toWrapper(native.mRTP); + pThis->rtcp = RTCSessionDescriptionTransportParameters::toWrapper(native.mRTCP); + pThis->useMux = native.mUseMux; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mID = wrapper->transportId; + result->mRTP = RTCSessionDescriptionTransportParameters::toNative(wrapper->rtp); + result->mRTCP = RTCSessionDescriptionTransportParameters::toNative(wrapper->rtcp); + result->mUseMux = wrapper->useMux; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h index c7b0d80e..08641db7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionTransport.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionTransport : public wrapper::org::ortc::adapter::RTCSessionDescriptionTransport { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::Transport, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionTransport, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionTransport, WrapperType); RTCSessionDescriptionTransportWeakPtr thisWeak_; RTCSessionDescriptionTransport(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransport(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp index a5fefe79..1b5e08b9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp @@ -1,6 +1,11 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h" +#include "impl_org_ortc_RTCIceParameters.h" +#include "impl_org_ortc_RTCDtlsParameters.h" +#include "impl_org_ortc_RTCSrtpSdesParameters.h" +#include "impl_org_ortc_RTCIceCandidate.h" +#include "impl_org_ortc_Json.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +25,11 @@ using ::std::list; using ::std::set; using ::std::map; + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::RTCSessionDescriptionTransportParameters() { @@ -46,25 +56,77 @@ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters(wrapper::org::ortc::adapter::RTCSessionDescriptionTransportParametersPtr source) { + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(toNative(source)); + if (!wrapper) return; + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters(wrapper::org::ortc::JsonPtr json) { + if (!json) return; + + WrapperTypePtr pThis = thisWeak_.lock(); + WrapperTypePtr wrapper = toWrapper(make_shared(Json::toNative(json))); + if (!wrapper) return; + + (*pThis) = (*wrapper); } //------------------------------------------------------------------------------ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::toJson() { - wrapper::org::ortc::JsonPtr result {}; - return result; + return Json::toWrapper(toNative(thisWeak_.lock())->createElement("RTCSessionDescriptionTransportParameters")); } //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::adapter::RTCSessionDescriptionTransportParameters::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + return toWrapper(*native); } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(const NativeType &native) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->iceParameters = RTCIceParameters::toWrapper(native.mICEParameters); + pThis->dtlsParameters = RTCDtlsParameters::toWrapper(native.mDTLSParameters); + pThis->srtpSdesParameters = RTCSrtpSdesParameters::toWrapper(native.mSRTPSDESParameters); + pThis->iceCandidates = make_shared< list< wrapper::org::ortc::RTCIceCandidatePtr > >(); + for (auto iter = native.mICECandidates.begin(); iter != native.mICECandidates.end(); ++iter) { + auto wrapper = wrapper::impl::org::ortc::RTCIceCandidate::toWrapper(*iter); + if (!wrapper) continue; + pThis->iceCandidates->push_back(wrapper); + } + pThis->endOfCandidates = native.mEndOfCandidates; + return pThis; +} +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto result = make_shared(); + result->mICEParameters = RTCIceParameters::toNative(wrapper->iceParameters); + result->mDTLSParameters = RTCDtlsParameters::toNative(wrapper->dtlsParameters); + result->mSRTPSDESParameters = RTCSrtpSdesParameters::toNative(wrapper->srtpSdesParameters); + if (wrapper->iceCandidates) { + for (auto iter = wrapper->iceCandidates->begin(); iter != wrapper->iceCandidates->end(); ++iter) { + auto native = wrapper::impl::org::ortc::RTCIceCandidate::toNative(*iter); + if (!native) continue; + result->mICECandidates.push_back(native); + } + } + result->mEndOfCandidates = wrapper->endOfCandidates; + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h index 5008b0ef..f187e62b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCSessionDescriptionTransportParameters.h" +#include namespace wrapper { namespace impl { @@ -14,6 +14,9 @@ namespace wrapper { struct RTCSessionDescriptionTransportParameters : public wrapper::org::ortc::adapter::RTCSessionDescriptionTransportParameters { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::ISessionDescriptionTypes::Transport::Parameters, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCSessionDescriptionTransportParameters, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCSessionDescriptionTransportParameters, WrapperType); RTCSessionDescriptionTransportParametersWeakPtr thisWeak_; RTCSessionDescriptionTransportParameters(); @@ -25,6 +28,10 @@ namespace wrapper { virtual void wrapper_init_org_ortc_adapter_RTCSessionDescriptionTransportParameters(wrapper::org::ortc::JsonPtr json) override; virtual wrapper::org::ortc::JsonPtr toJson() override; virtual String hash() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static WrapperImplTypePtr toWrapper(const NativeType &native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp index d611a782..f1cb35db 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp @@ -1,6 +1,8 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCTrackEvent.h" +#include "impl_org_ortc_adapter_MediaStream.h" +#include "impl_org_ortc_MediaStreamTrack.h" +#include "impl_org_ortc_RTCRtpReceiver.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +22,10 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCTrackEvent::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCTrackEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCTrackEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCTrackEvent::RTCTrackEvent() { @@ -41,22 +47,45 @@ wrapper::impl::org::ortc::adapter::RTCTrackEvent::~RTCTrackEvent() //------------------------------------------------------------------------------ wrapper::org::ortc::RTCRtpReceiverPtr wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_receiver() { - wrapper::org::ortc::RTCRtpReceiverPtr result {}; - return result; + return wrapper::impl::org::ortc::RTCRtpReceiver::toWrapper(native_->mReceiver); } //------------------------------------------------------------------------------ wrapper::org::ortc::MediaStreamTrackPtr wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_track() { - wrapper::org::ortc::MediaStreamTrackPtr result {}; - return result; + return wrapper::impl::org::ortc::MediaStreamTrack::toWrapper(native_->mTrack); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > wrapper::impl::org::ortc::adapter::RTCTrackEvent::get_mediaStreams() { - shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > result {}; + auto result = make_shared< list< wrapper::org::ortc::adapter::MediaStreamPtr > >(); + for (auto iter = native_->mMediaStreams.begin(); iter != native_->mMediaStreams.end(); ++iter) { + auto wrapper = MediaStream::toWrapper(*iter); + if (!wrapper) continue; + result->push_back(wrapper); + } return result; } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr native) +{ + if (!native) return WrapperImplTypePtr(); + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->native_ = native; + return pThis; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + + auto impl = std::dynamic_pointer_cast(wrapper); + if (!impl) return NativeTypePtr(); + + return impl->native_; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h index 74cfc1b4..263f2ba5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h @@ -1,10 +1,10 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCTrackEvent.h" +#include namespace wrapper { namespace impl { @@ -14,7 +14,11 @@ namespace wrapper { struct RTCTrackEvent : public wrapper::org::ortc::adapter::RTCTrackEvent { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnection::MediaStreamTrackEvent, NativeType); + ZS_DECLARE_TYPEDEF_PTR(RTCTrackEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCTrackEvent, WrapperType); RTCTrackEventWeakPtr thisWeak_; + NativeTypePtr native_; RTCTrackEvent(); virtual ~RTCTrackEvent(); @@ -23,6 +27,9 @@ namespace wrapper { virtual wrapper::org::ortc::RTCRtpReceiverPtr get_receiver() override; virtual wrapper::org::ortc::MediaStreamTrackPtr get_track() override; virtual shared_ptr< list< wrapper::org::ortc::adapter::MediaStreamPtr > > get_mediaStreams() override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr native); + static NativeTypePtr toNative(WrapperTypePtr wrapper); }; } // adapter From 462812af96bfaf0ae99236701a814b008be5c706 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Feb 2017 20:03:25 -0500 Subject: [PATCH 087/187] - added missing exceptions that can be thrown from routines --- ortc/idl/IceGatherer.idl | 2 +- ortc/idl/MediaStreamTrack.idl | 2 +- ortc/idl/SctpTransport.idl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index cb6cad12..17056381 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -302,7 +302,7 @@ namespace org /// Constructs an instance of an RTCIceGatherer. /// [constructor] - void RTCIceGatherer(RTCIceGatherOptions options); + void RTCIceGatherer(RTCIceGatherOptions options) throws(InvalidParameters); /// /// Gets a unique object instance identifier for this object. diff --git a/ortc/idl/MediaStreamTrack.idl b/ortc/idl/MediaStreamTrack.idl index 1bdced1b..72623d12 100644 --- a/ortc/idl/MediaStreamTrack.idl +++ b/ortc/idl/MediaStreamTrack.idl @@ -734,7 +734,7 @@ namespace org /// properties of the object at any time. When it does so it must /// attempt to satisfy the current Constraints /// - zs::Promise applyConstraints(MediaTrackConstraints constraints); + zs::Promise applyConstraints(MediaTrackConstraints constraints) throws(InvalidParameters); /// /// The MediaStreamTrack object's source is temporarily unable to diff --git a/ortc/idl/SctpTransport.idl b/ortc/idl/SctpTransport.idl index 98fd5e82..b9d75223 100644 --- a/ortc/idl/SctpTransport.idl +++ b/ortc/idl/SctpTransport.idl @@ -183,7 +183,7 @@ namespace org RTCSctpTransportListener listen( RTCDtlsTransport transport, RTCSctpCapabilities remoteCapabilities - ); + ) throws(InvalidParameters); /// /// Gets a unique object instance identifier for this object. From 024635251dabe6cb0b58f2d69bed9cf63567a63b Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 08:12:53 -0500 Subject: [PATCH 088/187] - peer connection adapter was missing wrapper code (fixed) - native promises need to be backgrounded since they have no owner --- ortc/adapter/IPeerConnection.h | 2 + .../internal/ortc_adapter_PeerConnection.h | 2 + ortc/idl/wrapper/impl_org_ortc_Helper.cpp | 52 ++- ortc/idl/wrapper/impl_org_ortc_Helper.h | 4 + .../wrapper/impl_org_ortc_MediaDevices.cpp | 4 +- .../wrapper/impl_org_ortc_RTCCertificate.cpp | 2 +- .../idl/wrapper/impl_org_ortc_RTCIdentity.cpp | 3 +- ...mpl_org_ortc_adapter_RTCPeerConnection.cpp | 363 +++++++++++++++--- .../impl_org_ortc_adapter_RTCPeerConnection.h | 76 +++- ...ortc_adapter_RTCPeerConnectionIceEvent.cpp | 15 + ...g_ortc_adapter_RTCPeerConnectionIceEvent.h | 9 + 11 files changed, 466 insertions(+), 66 deletions(-) diff --git a/ortc/adapter/IPeerConnection.h b/ortc/adapter/IPeerConnection.h index aa213946..7f3145bf 100644 --- a/ortc/adapter/IPeerConnection.h +++ b/ortc/adapter/IPeerConnection.h @@ -252,6 +252,8 @@ namespace ortc const Optional &configuration = Optional() ); + virtual PUID getID() const = 0; + virtual IPeerConnectionSubscriptionPtr subscribe(IPeerConnectionDelegatePtr delegate) = 0; virtual PromiseWithDescriptionPtr createOffer(const Optional &configuration = Optional()) = 0; diff --git a/ortc/adapter/internal/ortc_adapter_PeerConnection.h b/ortc/adapter/internal/ortc_adapter_PeerConnection.h index 75e28e36..6b5c0df0 100644 --- a/ortc/adapter/internal/ortc_adapter_PeerConnection.h +++ b/ortc/adapter/internal/ortc_adapter_PeerConnection.h @@ -375,6 +375,8 @@ namespace ortc const Optional &configuration = Optional() ); + virtual PUID getID() const override { return mID; } + virtual IPeerConnectionSubscriptionPtr subscribe(IPeerConnectionDelegatePtr delegate) override; virtual PromiseWithDescriptionPtr createOffer(const Optional &configuration = Optional()) override; diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp index 90ad8efb..cff1492e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp @@ -330,6 +330,55 @@ namespace wrapper { return ::ortc::adapter::IPeerConnectionTypes::BundlePolicy_First; } + //--------------------------------------------------------------------- + wrapper::org::ortc::adapter::RTCSignalingState Helper::toWrapper(::ortc::adapter::IPeerConnectionTypes::SignalingStates state) + { + switch (state) + { + case ::ortc::adapter::IPeerConnectionTypes::SignalingState_Stable: return wrapper::org::ortc::adapter::RTCSignalingState_stable; + case ::ortc::adapter::IPeerConnectionTypes::SignalingState_HaveLocalOffer: return wrapper::org::ortc::adapter::RTCSignalingState_haveLocalOffer; + case ::ortc::adapter::IPeerConnectionTypes::SignalingState_HaveRemoteOffer: return wrapper::org::ortc::adapter::RTCSignalingState_haveRemoteOffer; + case ::ortc::adapter::IPeerConnectionTypes::SignalingState_HaveLocalPranswer: return wrapper::org::ortc::adapter::RTCSignalingState_haveLocalPranswer; + case ::ortc::adapter::IPeerConnectionTypes::SignalingState_HaveRemotePranswer: return wrapper::org::ortc::adapter::RTCSignalingState_haveRemotePranswer; + case ::ortc::adapter::IPeerConnectionTypes::SignalingState_Closed: return wrapper::org::ortc::adapter::RTCSignalingState_closed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return toWrapper(::ortc::adapter::IPeerConnectionTypes::SignalingState_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::adapter::RTCIceConnectionState Helper::toPeerConnectionWrapper(::ortc::IICETransportTypes::States state) + { + switch (state) + { + case ::ortc::IICETransportTypes::State_New: return wrapper::org::ortc::adapter::RTCIceConnectionState_new; + case ::ortc::IICETransportTypes::State_Checking: return wrapper::org::ortc::adapter::RTCIceConnectionState_checking; + case ::ortc::IICETransportTypes::State_Connected: return wrapper::org::ortc::adapter::RTCIceConnectionState_connected; + case ::ortc::IICETransportTypes::State_Completed: return wrapper::org::ortc::adapter::RTCIceConnectionState_completed; + case ::ortc::IICETransportTypes::State_Disconnected: return wrapper::org::ortc::adapter::RTCIceConnectionState_disconnected; + case ::ortc::IICETransportTypes::State_Failed: return wrapper::org::ortc::adapter::RTCIceConnectionState_failed; + case ::ortc::IICETransportTypes::State_Closed: return wrapper::org::ortc::adapter::RTCIceConnectionState_closed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return toPeerConnectionWrapper(::ortc::IICETransportTypes::State_First); + } + + //--------------------------------------------------------------------- + wrapper::org::ortc::adapter::RTCPeerConnectionState Helper::toWrapper(::ortc::adapter::IPeerConnectionTypes::PeerConnectionStates state) + { + switch (state) + { + case ::ortc::adapter::IPeerConnectionTypes::PeerConnectionState_New: return wrapper::org::ortc::adapter::RTCPeerConnectionState_new; + case ::ortc::adapter::IPeerConnectionTypes::PeerConnectionState_Connecting: return wrapper::org::ortc::adapter::RTCPeerConnectionState_connecting; + case ::ortc::adapter::IPeerConnectionTypes::PeerConnectionState_Connected: return wrapper::org::ortc::adapter::RTCPeerConnectionState_connected; + case ::ortc::adapter::IPeerConnectionTypes::PeerConnectionState_Disconnected: return wrapper::org::ortc::adapter::RTCPeerConnectionState_disconnected; + case ::ortc::adapter::IPeerConnectionTypes::PeerConnectionState_Failed: return wrapper::org::ortc::adapter::RTCPeerConnectionState_failed; + case ::ortc::adapter::IPeerConnectionTypes::PeerConnectionState_Closed: return wrapper::org::ortc::adapter::RTCPeerConnectionState_closed; + } + ZS_THROW_INVALID_ARGUMENT("state is unknown"); + return toWrapper(::ortc::adapter::IPeerConnectionTypes::PeerConnectionState_First); + } + //--------------------------------------------------------------------- wrapper::org::ortc::RTCIceGatherFilterPolicy Helper::toWrapper(::ortc::IICEGathererTypes::FilterPolicies policy) { @@ -342,7 +391,6 @@ namespace wrapper { return static_cast<::ortc::IICEGathererTypes::FilterPolicies>(static_cast::type>(policy)); } - //--------------------------------------------------------------------- wrapper::org::ortc::RTCIceCredentialType Helper::toWrapper(::ortc::IICEGathererTypes::CredentialTypes type) { @@ -795,6 +843,7 @@ namespace wrapper { result->resolve(); }); + promise->background(); return result; } @@ -851,6 +900,7 @@ namespace wrapper { } result->resolve(wrapper::impl::org::ortc::RTCStatsReport::toWrapper(promise->value())); }); + promise->background(); return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.h b/ortc/idl/wrapper/impl_org_ortc_Helper.h index fc07f6e7..9082a3dd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.h +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.h @@ -67,6 +67,10 @@ namespace wrapper { static wrapper::org::ortc::adapter::RTCBundlePolicy toWrapper(::ortc::adapter::IPeerConnectionTypes::BundlePolicies policy); static ::ortc::adapter::IPeerConnectionTypes::BundlePolicies toNative(wrapper::org::ortc::adapter::RTCBundlePolicy policy); + static wrapper::org::ortc::adapter::RTCSignalingState toWrapper(::ortc::adapter::IPeerConnectionTypes::SignalingStates state); + static wrapper::org::ortc::adapter::RTCIceConnectionState toPeerConnectionWrapper(::ortc::IICETransportTypes::States state); + static wrapper::org::ortc::adapter::RTCPeerConnectionState toWrapper(::ortc::adapter::IPeerConnectionTypes::PeerConnectionStates state); + static wrapper::org::ortc::RTCIceGatherFilterPolicy toWrapper(::ortc::IICEGathererTypes::FilterPolicies policy); static ::ortc::IICEGathererTypes::FilterPolicies toNative(wrapper::org::ortc::RTCIceGatherFilterPolicy policy); diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp index 5cf7416d..f8170f24 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp @@ -80,7 +80,7 @@ shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaDev result->resolve(wrapperList); }); - + promise->background(); return result; } @@ -110,7 +110,7 @@ shared_ptr< PromiseWithHolderPtr< shared_ptr< list< wrapper::org::ortc::MediaStr result->resolve(wrapperList); }); - + promise->background(); return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp index 347ad1fd..1dfa658c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp @@ -96,7 +96,7 @@ wrapper::impl::org::ortc::RTCCertificate::PromiseWithTypePtr wrapper::impl::org: result->resolve(toWrapper(promise->value())); }); - + promise->background(); return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp index d420253a..ae8d181e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp @@ -94,7 +94,7 @@ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityResultPtr > > w } result->resolve(RTCIdentityResult::toWrapper(promise->value())); }); - + promise->background(); return result; } @@ -115,6 +115,7 @@ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCIdentityAssertionPtr > } result->resolve(RTCIdentityAssertion::toWrapper(promise->value())); }); + promise->background(); return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp index 2f73666a..a763cc39 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp @@ -1,6 +1,24 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_adapter_RTCPeerConnection.h" +#include "impl_org_ortc_adapter_RTCConfiguration.h" +#include "impl_org_ortc_adapter_RTCSessionDescription.h" +#include "impl_org_ortc_adapter_RTCIceCandidate.h" +#include "impl_org_ortc_adapter_RTCCapabilityOptions.h" +#include "impl_org_ortc_adapter_RTCOfferOptions.h" +#include "impl_org_ortc_adapter_RTCAnswerOptions.h" +#include "impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h" +#include "impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h" +#include "impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h" +#include "impl_org_ortc_adapter_MediaStream.h" +#include "impl_org_ortc_adapter_RTCTrackEvent.h" +#include "impl_org_ortc_RTCDataChannelEvent.h" +#include "impl_org_ortc_RTCRtpSender.h" +#include "impl_org_ortc_RTCRtpReceiver.h" +#include "impl_org_ortc_RTCIceServer.h" +#include "impl_org_ortc_MediaStreamTrack.h" +#include "impl_org_ortc_RTCDataChannel.h" +#include "impl_org_ortc_RTCDataChannelParameters.h" +#include "impl_org_ortc_Helper.h" using ::zsLib::String; using ::zsLib::Optional; @@ -20,6 +38,13 @@ using ::std::list; using ::std::set; using ::std::map; +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } + +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnection::NativeType, NativeType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnection::NativeTypeSubscription, NativeTypeSubscription); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnection::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnection::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCPeerConnection::RTCPeerConnection() { @@ -41,112 +66,152 @@ wrapper::impl::org::ortc::adapter::RTCPeerConnection::~RTCPeerConnection() //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getStats(wrapper::org::ortc::RTCStatsTypeSetPtr statTypes) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCStatsReportPtr > > result {}; - return result; + return Helper::getStats(native_, statTypes); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::wrapper_init_org_ortc_adapter_RTCPeerConnection() { + native_ = NativeType::create(thisWeak_.lock()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::wrapper_init_org_ortc_adapter_RTCPeerConnection(wrapper::org::ortc::adapter::RTCConfigurationPtr configuration) { + auto native = RTCConfiguration::toNative(configuration); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + native_ = NativeType::create(thisWeak_.lock(), *native); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer() { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; - return result; + return toWrapper(native_->createOffer()); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createOffer(wrapper::org::ortc::adapter::RTCOfferOptionsPtr options) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; - return result; + Optional< ::ortc::adapter::IPeerConnectionTypes::OfferOptions > native; + auto convert = RTCOfferOptions::toNative(options); + if (convert) { + native = *convert; + } + + return toWrapper(native_->createOffer(native)); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer() { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; - return result; + return toWrapper(native_->createAnswer()); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createAnswer(wrapper::org::ortc::adapter::RTCAnswerOptionsPtr options) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; - return result; + Optional< ::ortc::adapter::IPeerConnectionTypes::AnswerOptions > native; + auto convert = RTCAnswerOptions::toNative(options); + if (convert) { + native = *convert; + } + + return toWrapper(native_->createAnswer(native)); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities() { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; - return result; + return toWrapper(native_->createCapabilities()); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createCapabilities(wrapper::org::ortc::adapter::RTCCapabilityOptionsPtr options) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr > > result {}; - return result; + Optional< ::ortc::adapter::IPeerConnectionTypes::CapabilityOptions > native; + auto convert = RTCCapabilityOptions::toNative(options); + if (convert) { + native = *convert; + } + + return toWrapper(native_->createCapabilities(native)); } //------------------------------------------------------------------------------ PromisePtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::setLocalDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) { - PromisePtr result {}; - return result; + return Helper::toWrapper(native_->setLocalDescription(RTCSessionDescription::toNative(description))); } //------------------------------------------------------------------------------ PromisePtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::setRemoteDescription(wrapper::org::ortc::adapter::RTCSessionDescriptionPtr description) { - PromisePtr result {}; - return result; + return Helper::toWrapper(native_->setRemoteDescription(RTCSessionDescription::toNative(description))); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::addIceCandidate(wrapper::org::ortc::adapter::RTCIceCandidatePtr candidate) { + auto native = RTCIceCandidate::toNative(candidate); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + native_->addICECandidate(*native); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCIceServerPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getDefaultIceServers() { - shared_ptr< list< wrapper::org::ortc::RTCIceServerPtr > > result {}; - return result; + auto resultList = make_shared< list< wrapper::org::ortc::RTCIceServerPtr > >(); + auto nativeList = native_->getDefaultIceServers(); + if (nativeList) { + for (auto iter = nativeList->begin(); iter != nativeList->end(); ++iter) { + auto wrapper = RTCIceServer::toWrapper(*iter); + if (!wrapper) continue; + resultList->push_back(wrapper); + } + } + return resultList; } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::close() { + native_->close(); } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getSenders() { - shared_ptr< list< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; - return result; + auto resultList = make_shared< list< wrapper::org::ortc::RTCRtpSenderPtr > >(); + auto nativeList = native_->getSenders(); + if (nativeList) { + for (auto iter = nativeList->begin(); iter != nativeList->end(); ++iter) { + auto wrapper = RTCRtpSender::toWrapper(*iter); + if (!wrapper) continue; + resultList->push_back(wrapper); + } + } + return resultList; } //------------------------------------------------------------------------------ shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::getReceivers() { - shared_ptr< list< wrapper::org::ortc::RTCRtpReceiverPtr > > result {}; - return result; + auto resultList = make_shared< list< wrapper::org::ortc::RTCRtpReceiverPtr > >(); + auto nativeList = native_->getReceivers(); + if (nativeList) { + for (auto iter = nativeList->begin(); iter != nativeList->end(); ++iter) { + auto wrapper = RTCRtpReceiver::toWrapper(*iter); + if (!wrapper) continue; + resultList->push_back(wrapper); + } + } + return resultList; } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::addTrack(wrapper::org::ortc::MediaStreamTrackPtr track) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; - return result; + return toWrapper(native_->addTrack(MediaStreamTrack::toNative(track))); } //------------------------------------------------------------------------------ @@ -155,8 +220,11 @@ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > wrappe wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; - return result; + auto nativeTrack = MediaStreamTrack::toNative(track); + auto nativeConfig = RTCMediaStreamTrackConfiguration::toNative(config); + ZS_THROW_INVALID_ARGUMENT_IF(!nativeConfig); + + return toWrapper(native_->addTrack(nativeTrack, *nativeConfig)); } //------------------------------------------------------------------------------ @@ -166,121 +234,298 @@ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > wrappe wrapper::org::ortc::adapter::RTCMediaStreamTrackConfigurationPtr config ) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr > > result {}; - return result; + auto nativeTrack = MediaStreamTrack::toNative(track); + list<::ortc::adapter::IMediaStreamPtr> nativeList; + if (mediaStreams) { + for (auto iter = mediaStreams->begin(); iter != mediaStreams->end(); ++iter) { + auto native = MediaStream::toNative(*iter); + if (!native) continue; + nativeList.push_back(native); + } + } + auto nativeConfig = RTCMediaStreamTrackConfiguration::toNative(config); + ZS_THROW_INVALID_ARGUMENT_IF(!nativeConfig); + + return toWrapper(native_->addTrack(nativeTrack, nativeList, *nativeConfig)); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::removeTrack(wrapper::org::ortc::RTCRtpSenderPtr sender) { + native_->removeTrack(RTCRtpSender::toNative(sender)); } //------------------------------------------------------------------------------ shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCDataChannelPtr > > wrapper::impl::org::ortc::adapter::RTCPeerConnection::createDataChannel(wrapper::org::ortc::RTCDataChannelParametersPtr parameters) { - shared_ptr< PromiseWithHolderPtr< wrapper::org::ortc::RTCDataChannelPtr > > result {}; - return result; + auto native = RTCDataChannelParameters::toNative(parameters); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + return toWrapper(native_->createDataChannel(*native)); } //------------------------------------------------------------------------------ uint64_t wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_objectId() { - uint64_t result {}; - return result; + return native_->getID(); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_localDescription() { - wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; - return result; + return RTCSessionDescription::toWrapper(native_->localDescription()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_currentDescription() { - wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; - return result; + return RTCSessionDescription::toWrapper(native_->currentDescription()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_pendingDescription() { - wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; - return result; + return RTCSessionDescription::toWrapper(native_->pendingDescription()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_remoteDescription() { - wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; - return result; + return RTCSessionDescription::toWrapper(native_->remoteDescription()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_currentRemoteDescription() { - wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; - return result; + return RTCSessionDescription::toWrapper(native_->currentRemoteDescription()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSessionDescriptionPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_pendingRemoteDescription() { - wrapper::org::ortc::adapter::RTCSessionDescriptionPtr result {}; - return result; + return RTCSessionDescription::toWrapper(native_->pendingRemoteDescription()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCSignalingState wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_signalingState() { - wrapper::org::ortc::adapter::RTCSignalingState result {}; - return result; + return Helper::toWrapper(native_->signalingState()); } //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceGathererState wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_iceGatheringState() { - wrapper::org::ortc::RTCIceGathererState result {}; - return result; + return Helper::toWrapper(native_->iceGatheringState()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCIceConnectionState wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_iceConnectionState() { - wrapper::org::ortc::adapter::RTCIceConnectionState result {}; - return result; + return Helper::toPeerConnectionWrapper(native_->iceConnectionState()); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCPeerConnectionState wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_connectionState() { - wrapper::org::ortc::adapter::RTCPeerConnectionState result {}; - return result; + return Helper::toWrapper(native_->connectionState()); } //------------------------------------------------------------------------------ bool wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_canTrickleCandidates() { - bool result {}; - return result; + return native_->canTrickleCandidates(); } //------------------------------------------------------------------------------ wrapper::org::ortc::adapter::RTCConfigurationPtr wrapper::impl::org::ortc::adapter::RTCPeerConnection::get_getConfiguration() { - wrapper::org::ortc::adapter::RTCConfigurationPtr result {}; - return result; + return RTCConfiguration::toWrapper(native_->getConfiguration()); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::set_getConfiguration(wrapper::org::ortc::adapter::RTCConfigurationPtr value) { + auto native = RTCConfiguration::toNative(value); + ZS_THROW_INVALID_ARGUMENT_IF(!native); + native_->setConfiguration(*native); } //------------------------------------------------------------------------------ void wrapper::impl::org::ortc::adapter::RTCPeerConnection::wrapper_onObserverCountChanged(size_t count) { + subscriptionCount_ = count; + subscribe(); } +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionNegotiationNeeded(IPeerConnectionPtr connection) +{ + onNegotiationNeeded(); +} +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionIceCandidate( + IPeerConnectionPtr connection, + ICECandidatePtr candidate, + const char *url +) +{ + onIceCandidate(RTCPeerConnectionIceEvent::toWrapper(candidate, String(url))); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionIceCandidateError( + IPeerConnectionPtr connection, + ICECandidateErrorEventPtr error +) +{ + onIceCandidateError(RTCPeerConnectionIceErrorEvent::toWrapper(error)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionSignalingStateChange( + IPeerConnectionPtr connection, + SignalingStates state +) +{ + onSignalingStateChange(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionICEGatheringStateChange( + IPeerConnectionPtr connection, + ICEGatheringStates state +) +{ + onIceGatheringStateChange(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionICEConnectionStateChange( + IPeerConnectionPtr connection, + ICEConnectionStates state +) +{ + onIceConnectionStateChange(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionConnectionStateChange( + IPeerConnectionPtr connection, + PeerConnectionStates state +) +{ + onConnectionStateChange(); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionTrack( + IPeerConnectionPtr connection, + MediaStreamTrackEventPtr event +) +{ + onTrack(RTCTrackEvent::toWrapper(event)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionTrackGone( + IPeerConnectionPtr connection, + MediaStreamTrackEventPtr event +) +{ + onTrackGone(RTCTrackEvent::toWrapper(event)); +} + +//------------------------------------------------------------------------------ +void WrapperImplType::onPeerConnectionDataChannel( + IPeerConnectionPtr connection, + IDataChannelPtr dataChannel +) +{ + onDataChannel(RTCDataChannelEvent::toWrapper(dataChannel)); +} + +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper(NativeTypePtr track) +{ + if (!track) return WrapperImplTypePtr(); + + auto result = make_shared(); + result->thisWeak_ = result; + result->native_ = track; + result->defaultSubscription_ = false; + result->subscribe(); + return result; +} + +//------------------------------------------------------------------------------ +NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) +{ + if (!wrapper) return NativeTypePtr(); + auto result = std::dynamic_pointer_cast(wrapper); + if (!result) return NativeTypePtr(); + return result->native_; +} + +//------------------------------------------------------------------------------ +void WrapperImplType::subscribe() +{ + if (defaultSubscription_) return; + if (!native_) return; + + zsLib::AutoLock lock(lock_); + if (subscriptionCount_ < 1) { + if (!subscription_) return; + subscription_->cancel(); + return; + } + if (subscription_) return; + subscription_ = native_->subscribe(thisWeak_.lock()); +} + +//------------------------------------------------------------------------------ +WrapperImplType::WrapperPromiseWithSessionDescriptionPtr WrapperImplType::toWrapper(NativePromiseWithSessionDescriptionPtr promise) +{ + if (!promise) return WrapperPromiseWithSessionDescriptionPtr(); + + auto result = WrapperPromiseWithSessionDescription::create(Helper::getGuiQueue()); + promise->thenClosure([result, promise] { + if (promise->isRejected()) { + Helper::reject(promise, result); + return; + } + result->resolve(RTCSessionDescription::toWrapper(promise->value())); + }); + return result; +} + +//------------------------------------------------------------------------------ +WrapperImplType::WrapperPromiseWithSenderPtr WrapperImplType::toWrapper(NativePromiseWithSenderPtr promise) +{ + if (!promise) return WrapperPromiseWithSenderPtr(); + + auto result = WrapperPromiseWithSender::create(Helper::getGuiQueue()); + promise->thenClosure([result, promise] { + if (promise->isRejected()) { + Helper::reject(promise, result); + return; + } + result->resolve(RTCRtpSender::toWrapper(promise->value())); + }); + return result; +} + +//------------------------------------------------------------------------------ +WrapperImplType::WrapperPromiseWithDataChannelPtr WrapperImplType::toWrapper(NativePromiseWithDataChannelPtr promise) +{ + if (!promise) return WrapperPromiseWithDataChannelPtr(); + + auto result = WrapperPromiseWithDataChannel::create(Helper::getGuiQueue()); + promise->thenClosure([result, promise] { + if (promise->isRejected()) { + Helper::reject(promise, result); + return; + } + result->resolve(RTCDataChannel::toWrapper(promise->value())); + }); + return result; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h index aa2c7ffd..8ac46ea6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h @@ -1,10 +1,12 @@ -// Generated by zsLibEventingTool #pragma once #include "types.h" #include "generated/org_ortc_adapter_RTCPeerConnection.h" +#include +#include +#include namespace wrapper { namespace impl { @@ -12,9 +14,29 @@ namespace wrapper { namespace ortc { namespace adapter { - struct RTCPeerConnection : public wrapper::org::ortc::adapter::RTCPeerConnection + struct RTCPeerConnection : public wrapper::org::ortc::adapter::RTCPeerConnection, + public ::ortc::adapter::IPeerConnectionDelegate { + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnection, NativeType); + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnection, IPeerConnection); + ZS_DECLARE_TYPEDEF_PTR(::ortc::IDataChannel, IDataChannel); + ZS_DECLARE_TYPEDEF_PTR(::ortc::adapter::IPeerConnectionSubscription, NativeTypeSubscription); + ZS_DECLARE_TYPEDEF_PTR(RTCPeerConnection, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCPeerConnection, WrapperType); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith< ::ortc::adapter::ISessionDescription >, NativePromiseWithSessionDescription); + ZS_DECLARE_TYPEDEF_PTR(PromiseWithHolderPtr< wrapper::org::ortc::adapter::RTCSessionDescriptionPtr >, WrapperPromiseWithSessionDescription); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith< ::ortc::IRTPSender >, NativePromiseWithSender); + ZS_DECLARE_TYPEDEF_PTR(PromiseWithHolderPtr< wrapper::org::ortc::RTCRtpSenderPtr >, WrapperPromiseWithSender); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith< ::ortc::IDataChannel >, NativePromiseWithDataChannel); + ZS_DECLARE_TYPEDEF_PTR(PromiseWithHolderPtr< wrapper::org::ortc::RTCDataChannelPtr >, WrapperPromiseWithDataChannel); + RTCPeerConnectionWeakPtr thisWeak_; + NativeTypePtr native_; + zsLib::Lock lock_; + std::atomic subscriptionCount_{}; + bool defaultSubscription_{ true }; + NativeTypeSubscriptionPtr subscription_; RTCPeerConnection(); virtual ~RTCPeerConnection(); @@ -68,6 +90,56 @@ namespace wrapper { virtual void set_getConfiguration(wrapper::org::ortc::adapter::RTCConfigurationPtr value) override; virtual void wrapper_onObserverCountChanged(size_t count) override; + + virtual void onPeerConnectionNegotiationNeeded(IPeerConnectionPtr connection) override; + virtual void onPeerConnectionIceCandidate( + IPeerConnectionPtr connection, + ICECandidatePtr candidate, + const char *url + ) override; + virtual void onPeerConnectionIceCandidateError( + IPeerConnectionPtr connection, + ICECandidateErrorEventPtr error + ) override; + virtual void onPeerConnectionSignalingStateChange( + IPeerConnectionPtr connection, + SignalingStates state + ) override; + virtual void onPeerConnectionICEGatheringStateChange( + IPeerConnectionPtr connection, + ICEGatheringStates state + ) override; + virtual void onPeerConnectionICEConnectionStateChange( + IPeerConnectionPtr connection, + ICEConnectionStates state + ) override; + virtual void onPeerConnectionConnectionStateChange( + IPeerConnectionPtr connection, + PeerConnectionStates state + ) override; + virtual void onPeerConnectionTrack( + IPeerConnectionPtr connection, + MediaStreamTrackEventPtr event + ) override; + + virtual void onPeerConnectionTrackGone( + IPeerConnectionPtr connection, + MediaStreamTrackEventPtr event + ) override; + + virtual void onPeerConnectionDataChannel( + IPeerConnectionPtr connection, + IDataChannelPtr dataChannel + ) override; + + static WrapperImplTypePtr toWrapper(NativeTypePtr track); + static NativeTypePtr toNative(WrapperTypePtr wrapper); + + void subscribe(); + + static WrapperPromiseWithSessionDescriptionPtr toWrapper(NativePromiseWithSessionDescriptionPtr promise); + static WrapperPromiseWithSenderPtr toWrapper(NativePromiseWithSenderPtr promise); + static WrapperPromiseWithDataChannelPtr toWrapper(NativePromiseWithDataChannelPtr promise); }; } // adapter diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp index b6760d6f..90d45288 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp @@ -20,6 +20,9 @@ using ::std::list; using ::std::set; using ::std::map; +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::WrapperImplType, WrapperImplType); +ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::WrapperType, WrapperType); + //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent() { @@ -51,3 +54,15 @@ String wrapper::impl::org::ortc::adapter::RTCPeerConnectionIceEvent::get_uri() } +//------------------------------------------------------------------------------ +WrapperImplTypePtr WrapperImplType::toWrapper( + ::ortc::adapter::IPeerConnectionTypes::ICECandidatePtr candidate, + const String &uri +) +{ + auto pThis = make_shared(); + pThis->thisWeak_ = pThis; + pThis->candidate_ = RTCIceCandidate::toWrapper(candidate); + pThis->uri_ = uri; + return pThis; +} diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h index 339df82e..e727b317 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h @@ -4,6 +4,8 @@ #include "types.h" #include "generated/org_ortc_adapter_RTCPeerConnectionIceEvent.h" +#include + namespace wrapper { namespace impl { namespace org { @@ -12,6 +14,8 @@ namespace wrapper { struct RTCPeerConnectionIceEvent : public wrapper::org::ortc::adapter::RTCPeerConnectionIceEvent { + ZS_DECLARE_TYPEDEF_PTR(RTCPeerConnectionIceEvent, WrapperImplType); + ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::adapter::RTCPeerConnectionIceEvent, WrapperType); RTCPeerConnectionIceEventWeakPtr thisWeak_; wrapper::org::ortc::adapter::RTCIceCandidatePtr candidate_; String uri_; @@ -22,6 +26,11 @@ namespace wrapper { // properties RTCPeerConnectionIceEvent virtual wrapper::org::ortc::adapter::RTCIceCandidatePtr get_candidate() override; virtual String get_uri() override; + + static WrapperImplTypePtr toWrapper( + ::ortc::adapter::IPeerConnectionTypes::ICECandidatePtr candidate, + const String &uri + ); }; } // adapter From 73d5ae16e0ce9055bbe1abc373bb6697808e347a Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 08:48:34 -0500 Subject: [PATCH 089/187] - native promises need to be backgrounded since they have no owner --- ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp | 3 +++ .../msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj | 1 - .../ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp index a763cc39..02d5a733 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp @@ -495,6 +495,7 @@ WrapperImplType::WrapperPromiseWithSessionDescriptionPtr WrapperImplType::toWrap } result->resolve(RTCSessionDescription::toWrapper(promise->value())); }); + promise->background(); return result; } @@ -511,6 +512,7 @@ WrapperImplType::WrapperPromiseWithSenderPtr WrapperImplType::toWrapper(NativePr } result->resolve(RTCRtpSender::toWrapper(promise->value())); }); + promise->background(); return result; } @@ -527,5 +529,6 @@ WrapperImplType::WrapperPromiseWithDataChannelPtr WrapperImplType::toWrapper(Nat } result->resolve(RTCDataChannel::toWrapper(promise->value())); }); + promise->background(); return result; } diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index ec97adf1..e24e5631 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -290,7 +290,6 @@ - diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index 936cc31b..f548b29b 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -1187,9 +1187,6 @@ ortc\idl\wrapper\generated - - ortc\idl\wrapper\generated - ortc\idl\wrapper\generated From 22d4c303c0964c1f30718429251265f57e1be42d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 08:53:23 -0500 Subject: [PATCH 090/187] - removed file that is no longer present --- .../msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj | 1 - .../ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters | 3 --- 2 files changed, 4 deletions(-) diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index e24e5631..6374fac5 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -333,7 +333,6 @@ - diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters index f548b29b..147aeeb3 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj.filters @@ -1298,9 +1298,6 @@ ortc\idl\wrapper\generated - - ortc\idl\wrapper\generated - ortc\idl\wrapper\generated From 672df06ccbaf8598123e5bac1cabd79cc0145f1f Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 09:32:54 -0500 Subject: [PATCH 091/187] track list conversion needs null protection --- ortc/idl/wrapper/impl_org_ortc_Helper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp index cff1492e..d2501071 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp @@ -804,6 +804,7 @@ namespace wrapper { Helper::WrapperMediaStreamTrackListPtr Helper::toWrapper(MediaStreamTrackListPtr tracks) { auto result = make_shared(); + if (!tracks) return result; for (auto iter = tracks->begin(); iter != tracks->end(); ++iter) { auto native = wrapper::impl::org::ortc::MediaStreamTrack::toWrapper(*iter); From e333287d375050edeb8f719c2ccd4695e1c2a450 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 11:29:50 -0500 Subject: [PATCH 092/187] - media devices needs subscription in wrapper --- ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp | 2 -- ortc/idl/wrapper/impl_org_ortc_MediaDevices.h | 1 - 2 files changed, 3 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp index f8170f24..81e79c9e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp @@ -139,8 +139,6 @@ void WrapperImplType::onMediaDevicesChanged() //------------------------------------------------------------------------------ void WrapperImplType::subscribe() { - if (defaultSubscription_) return; - zsLib::AutoLock lock(lock_); if (subscriptionCount_ < 1) { if (!subscription_) return; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h index d1792fbd..d29e085c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h @@ -23,7 +23,6 @@ namespace wrapper { //NativeTypePtr native_; zsLib::Lock lock_; std::atomic subscriptionCount_{}; - bool defaultSubscription_{ true }; NativeTypeSubscriptionPtr subscription_; MediaDevices(); From 37d78a2a49a031c9fbb61c0a2cc8733ef245756b Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 11:39:55 -0500 Subject: [PATCH 093/187] - added missing has routine from media stream constraints --- ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp index d2c4a1fc..98addb19 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp @@ -78,8 +78,7 @@ wrapper::org::ortc::JsonPtr wrapper::impl::org::ortc::MediaStreamConstraints::to //------------------------------------------------------------------------------ String wrapper::impl::org::ortc::MediaStreamConstraints::hash() { - String result {}; - return result; + return toNative(thisWeak_.lock())->hash(); } //------------------------------------------------------------------------------ From 788f784777b99bce7a37549e69746f8a7ab9298c Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 11:43:24 -0500 Subject: [PATCH 094/187] - missed ! in wrapper that caused null return --- ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp index ca4ba6dc..323654a7 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp @@ -128,7 +128,7 @@ wrapper::impl::org::ortc::MediaTrackConstraintsPtr wrapper::impl::org::ortc::Med //------------------------------------------------------------------------------ wrapper::impl::org::ortc::MediaTrackConstraints::NativeTrackConstraintsPtr wrapper::impl::org::ortc::MediaTrackConstraints::toNative(wrapper::org::ortc::MediaTrackConstraintsPtr wrapper) { - if (wrapper) return NativeTrackConstraintsPtr(); + if (!wrapper) return NativeTrackConstraintsPtr(); auto result = make_shared(); From b3f53822ff4b41870a35e439e62c66e08dfbb0d9 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 12:36:05 -0500 Subject: [PATCH 095/187] - fixed crash in wrapper in media constraints for option constraints --- .../impl_org_ortc_MediaTrackConstraintSet.cpp | 52 ++++++++++++++----- .../impl_org_ortc_MediaTrackConstraints.cpp | 52 ++++++++++++++----- 2 files changed, 78 insertions(+), 26 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp index 696c3ad4..662d7859 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp @@ -125,19 +125,45 @@ wrapper::impl::org::ortc::MediaTrackConstraintSet::NativeConstraintSetPtr wrappe auto result = make_shared(); - result->mWidth = *ConstrainLong::toNative(wrapper->width); - result->mHeight = *ConstrainLong::toNative(wrapper->height); - result->mAspectRatio = *ConstrainDouble::toNative(wrapper->aspectRatio); - result->mFrameRate = *ConstrainDouble::toNative(wrapper->frameRate); - result->mFacingMode = *ConstrainString::toNative(wrapper->facingMode); - result->mVolume = *ConstrainDouble::toNative(wrapper->volume); - result->mSampleRate = *ConstrainLong::toNative(wrapper->sampleRate); - result->mSampleSize = *ConstrainLong::toNative(wrapper->sampleSize); - result->mEchoCancellation = *ConstrainBoolean::toNative(wrapper->echoCancellation); - result->mLatency = *ConstrainDouble::toNative(wrapper->latency); - result->mChannelCount = *ConstrainLong::toNative(wrapper->channelCount); - result->mDeviceID = *ConstrainString::toNative(wrapper->deviceId); - result->mGroupID = *ConstrainString::toNative(wrapper->groupId); + if (wrapper->width) { + result->mWidth = *ConstrainLong::toNative(wrapper->width); + } + if (wrapper->height) { + result->mHeight = *ConstrainLong::toNative(wrapper->height); + } + if (wrapper->aspectRatio) { + result->mAspectRatio = *ConstrainDouble::toNative(wrapper->aspectRatio); + } + if (wrapper->frameRate) { + result->mFrameRate = *ConstrainDouble::toNative(wrapper->frameRate); + } + if (wrapper->facingMode) { + result->mFacingMode = *ConstrainString::toNative(wrapper->facingMode); + } + if (wrapper->volume) { + result->mVolume = *ConstrainDouble::toNative(wrapper->volume); + } + if (wrapper->sampleRate) { + result->mSampleRate = *ConstrainLong::toNative(wrapper->sampleRate); + } + if (wrapper->sampleSize) { + result->mSampleSize = *ConstrainLong::toNative(wrapper->sampleSize); + } + if (wrapper->echoCancellation) { + result->mEchoCancellation = *ConstrainBoolean::toNative(wrapper->echoCancellation); + } + if (wrapper->latency) { + result->mLatency = *ConstrainDouble::toNative(wrapper->latency); + } + if (wrapper->channelCount) { + result->mChannelCount = *ConstrainLong::toNative(wrapper->channelCount); + } + if (wrapper->deviceId) { + result->mDeviceID = *ConstrainString::toNative(wrapper->deviceId); + } + if (wrapper->groupId) { + result->mGroupID = *ConstrainString::toNative(wrapper->groupId); + } return result; } diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp index 323654a7..ad54bca5 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp @@ -132,19 +132,45 @@ wrapper::impl::org::ortc::MediaTrackConstraints::NativeTrackConstraintsPtr wrapp auto result = make_shared(); - result->mWidth = *ConstrainLong::toNative(wrapper->width); - result->mHeight = *ConstrainLong::toNative(wrapper->height); - result->mAspectRatio = *ConstrainDouble::toNative(wrapper->aspectRatio); - result->mFrameRate = *ConstrainDouble::toNative(wrapper->frameRate); - result->mFacingMode = *ConstrainString::toNative(wrapper->facingMode); - result->mVolume = *ConstrainDouble::toNative(wrapper->volume); - result->mSampleRate = *ConstrainLong::toNative(wrapper->sampleRate); - result->mSampleSize = *ConstrainLong::toNative(wrapper->sampleSize); - result->mEchoCancellation = *ConstrainBoolean::toNative(wrapper->echoCancellation); - result->mLatency = *ConstrainDouble::toNative(wrapper->latency); - result->mChannelCount = *ConstrainLong::toNative(wrapper->channelCount); - result->mDeviceID = *ConstrainString::toNative(wrapper->deviceId); - result->mGroupID = *ConstrainString::toNative(wrapper->groupId); + if (wrapper->width) { + result->mWidth = *ConstrainLong::toNative(wrapper->width); + } + if (wrapper->height) { + result->mHeight = *ConstrainLong::toNative(wrapper->height); + } + if (wrapper->aspectRatio) { + result->mAspectRatio = *ConstrainDouble::toNative(wrapper->aspectRatio); + } + if (wrapper->frameRate) { + result->mFrameRate = *ConstrainDouble::toNative(wrapper->frameRate); + } + if (wrapper->facingMode) { + result->mFacingMode = *ConstrainString::toNative(wrapper->facingMode); + } + if (wrapper->volume) { + result->mVolume = *ConstrainDouble::toNative(wrapper->volume); + } + if (wrapper->sampleRate) { + result->mSampleRate = *ConstrainLong::toNative(wrapper->sampleRate); + } + if (wrapper->sampleSize) { + result->mSampleSize = *ConstrainLong::toNative(wrapper->sampleSize); + } + if (wrapper->echoCancellation) { + result->mEchoCancellation = *ConstrainBoolean::toNative(wrapper->echoCancellation); + } + if (wrapper->latency) { + result->mLatency = *ConstrainDouble::toNative(wrapper->latency); + } + if (wrapper->channelCount) { + result->mChannelCount = *ConstrainLong::toNative(wrapper->channelCount); + } + if (wrapper->deviceId) { + result->mDeviceID = *ConstrainString::toNative(wrapper->deviceId); + } + if (wrapper->groupId) { + result->mGroupID = *ConstrainString::toNative(wrapper->groupId); + } if (wrapper->advanced) { for (auto iter = wrapper->advanced->begin(); iter != wrapper->advanced->end(); ++iter) From a24dd56e1a5b1772c8b1a8165c6a0e44cf4f581b Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 12:51:10 -0500 Subject: [PATCH 096/187] - convertion routines for capability paramters was missing cast operations --- ..._org_ortc_RTCRtpCodecCapabilityOptions.cpp | 12 ++++++- ...g_ortc_RTCRtpCodecCapabilityParameters.cpp | 27 +++++++++++++++- ..._org_ortc_RTCRtpCodecParameterSettings.cpp | 32 ++++++++++++++++++- 3 files changed, 68 insertions(+), 3 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp index 97377636..88587756 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp @@ -62,6 +62,16 @@ WrapperTypePtr WrapperImplType::toWrapper(NativeTypePtr native) NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) { if (!wrapper) return NativeTypePtr(); + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpOpusCodecCapabilityOptions::toNative(impl); + } + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return impl->native_; + } - return std::dynamic_pointer_cast(wrapper)->native_; + return NativeTypePtr(); } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp index 0742ae04..391a574b 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp @@ -83,6 +83,31 @@ NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) { if (!wrapper) return NativeTypePtr(); - return std::dynamic_pointer_cast(wrapper)->native_; + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpOpusCodecCapabilityParameters::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpVp8CodecCapabilityParameters::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpH264CodecCapabilityParameters::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpRtxCodecCapabilityParameters::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpFlexFecCodecCapabilityParameters::toNative(impl); + } + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return impl->native_; + } + return NativeTypePtr(); } diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp index 928d8722..bfd83fa6 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp @@ -88,5 +88,35 @@ NativeTypePtr WrapperImplType::toNative(WrapperTypePtr wrapper) { if (!wrapper) return NativeTypePtr(); - return std::dynamic_pointer_cast(wrapper)->native_; + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpOpusCodecParameterSettings::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpVp8CodecParameterSettings::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpH264CodecParameterSettings::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpRtxCodecParameterSettings::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpFlexFecCodecParameterSettings::toNative(impl); + } + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return RTCRtpRedCodecParameterSettings::toNative(impl); + } + + { + auto impl = std::dynamic_pointer_cast(wrapper); + if (impl) return impl->native_; + } + + return NativeTypePtr(); } From 878e74388a7c34f7a3a22cee9e57d1ed93b1a873 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 14:31:01 -0500 Subject: [PATCH 097/187] - views and maps returned from lists need to be read-only for CX --- ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp index ad54bca5..d3bd3805 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp @@ -120,7 +120,9 @@ wrapper::impl::org::ortc::MediaTrackConstraintsPtr wrapper::impl::org::ortc::Med for (auto iter = native.mAdvanced.begin(); iter != native.mAdvanced.end(); ++iter) { - pThis->advanced->push_back(wrapper::impl::org::ortc::MediaTrackConstraintSet::toWrapper(*iter)); + auto wrapper = wrapper::impl::org::ortc::MediaTrackConstraintSet::toWrapper(*iter); + if (!wrapper) continue; + pThis->advanced->push_back(wrapper); } return pThis; @@ -175,7 +177,9 @@ wrapper::impl::org::ortc::MediaTrackConstraints::NativeTrackConstraintsPtr wrapp if (wrapper->advanced) { for (auto iter = wrapper->advanced->begin(); iter != wrapper->advanced->end(); ++iter) { - result->mAdvanced.push_back(wrapper::impl::org::ortc::MediaTrackConstraintSet::toNative(*iter)); + auto native = wrapper::impl::org::ortc::MediaTrackConstraintSet::toNative(*iter); + if (!native) continue; + result->mAdvanced.push_back(native); } } From 0c93206727aed09b371d1149206a087e03dbdcfb Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 16:49:06 -0500 Subject: [PATCH 098/187] - anyholder was holding incorrect type for media track holder --- ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp index 3b39982a..2751c6f0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp @@ -1,6 +1,6 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_MediaSource.h" +#include "impl_org_ortc_MediaStreamTrack.h" using ::zsLib::String; using ::zsLib::Optional; @@ -60,8 +60,8 @@ void wrapper::impl::org::ortc::MediaSource::set_source(AnyPtr value) //------------------------------------------------------------------------------ AnyPtr wrapper::impl::org::ortc::MediaSource::get_track() { - auto holder = make_shared< AnyHolder >(); - holder->value_ = track_; + auto holder = make_shared < AnyHolder< ::ortc::IMediaStreamTrackPtr > > (); + holder->value_ = MediaStreamTrack::toNative(track_); return holder; } From 31ae350e7b05979f5b6c66253d4323c4e3fa9475 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 17:25:27 -0500 Subject: [PATCH 099/187] - added missing getStats method in wrapper --- ortc/idl/wrapper/impl_org_ortc_Helper.cpp | 14 +++++++------- ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp index d2501071..fa5f7684 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp @@ -351,13 +351,13 @@ namespace wrapper { { switch (state) { - case ::ortc::IICETransportTypes::State_New: return wrapper::org::ortc::adapter::RTCIceConnectionState_new; - case ::ortc::IICETransportTypes::State_Checking: return wrapper::org::ortc::adapter::RTCIceConnectionState_checking; - case ::ortc::IICETransportTypes::State_Connected: return wrapper::org::ortc::adapter::RTCIceConnectionState_connected; - case ::ortc::IICETransportTypes::State_Completed: return wrapper::org::ortc::adapter::RTCIceConnectionState_completed; - case ::ortc::IICETransportTypes::State_Disconnected: return wrapper::org::ortc::adapter::RTCIceConnectionState_disconnected; - case ::ortc::IICETransportTypes::State_Failed: return wrapper::org::ortc::adapter::RTCIceConnectionState_failed; - case ::ortc::IICETransportTypes::State_Closed: return wrapper::org::ortc::adapter::RTCIceConnectionState_closed; + case ::ortc::IICETransportTypes::State_New: return wrapper::org::ortc::adapter::RTCIceConnectionState_new; + case ::ortc::IICETransportTypes::State_Checking: return wrapper::org::ortc::adapter::RTCIceConnectionState_checking; + case ::ortc::IICETransportTypes::State_Connected: return wrapper::org::ortc::adapter::RTCIceConnectionState_connected; + case ::ortc::IICETransportTypes::State_Completed: return wrapper::org::ortc::adapter::RTCIceConnectionState_completed; + case ::ortc::IICETransportTypes::State_Disconnected: return wrapper::org::ortc::adapter::RTCIceConnectionState_disconnected; + case ::ortc::IICETransportTypes::State_Failed: return wrapper::org::ortc::adapter::RTCIceConnectionState_failed; + case ::ortc::IICETransportTypes::State_Closed: return wrapper::org::ortc::adapter::RTCIceConnectionState_closed; } ZS_THROW_INVALID_ARGUMENT("state is unknown"); return toPeerConnectionWrapper(::ortc::IICETransportTypes::State_First); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp index 050ac7db..de200cf1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp @@ -1,5 +1,6 @@ #include "impl_org_ortc_RTCStatsReport.h" +#include "impl_org_ortc_RTCStats.h" using ::zsLib::String; using ::zsLib::Optional; @@ -40,8 +41,7 @@ wrapper::impl::org::ortc::RTCStatsReport::~RTCStatsReport() //------------------------------------------------------------------------------ wrapper::org::ortc::RTCStatsPtr wrapper::impl::org::ortc::RTCStatsReport::getStats(String id) { - wrapper::org::ortc::RTCStatsPtr result {}; - return result; + return RTCStats::toWrapper(native_->getStats(id)); } //------------------------------------------------------------------------------ From bcefaa5970a3d28e32d84876d12619729ec08a06 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 28 Feb 2017 18:19:17 -0500 Subject: [PATCH 100/187] - removed invalid usage of promise --- ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp index af4b78fd..f84ae8e2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp @@ -97,7 +97,6 @@ PromisePtr wrapper::org::ortc::OrtcLib::notifyGoingToBackground() observer->promise_ = Promise::create(wrapper::impl::org::ortc::Helper::getGuiQueue()); observer->promise_->setReferenceHolder(observer); observer->query_ = ::ortc::services::IBackgrounding::notifyGoingToBackground(); - observer->promise_->background(); return observer->promise_; } From 34e8741860aa25416e2600cf84c46e9fd30ce83d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Mar 2017 00:26:36 -0400 Subject: [PATCH 101/187] - fixed C wrapper generation helper routines to compile on windows --- ortc/idl/RtpReceiver.idl | 2 +- ortc/idl/RtpSender.idl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ortc/idl/RtpReceiver.idl b/ortc/idl/RtpReceiver.idl index 0cd39305..e48aea94 100644 --- a/ortc/idl/RtpReceiver.idl +++ b/ortc/idl/RtpReceiver.idl @@ -121,7 +121,7 @@ namespace org /// Track is set, and the value of track.Kind is determined based on /// the value of kind passed in the constructor. /// - [constructor] + [constructor, altname(RTCRtpReceiverWithRtcpTransport)] void RTCRtpReceiver( MediaStreamTrackKind kind, RTCRtpTransport transport, diff --git a/ortc/idl/RtpSender.idl b/ortc/idl/RtpSender.idl index ebe03207..2a0b5ec3 100644 --- a/ortc/idl/RtpSender.idl +++ b/ortc/idl/RtpSender.idl @@ -76,7 +76,7 @@ namespace org /// rtcpTransport.State "closed", or if track.readyState is "ended", /// throw an InvalidStateError exception. /// - [constructor] + [constructor, altname(RTCRtpSenderWithRtcpTransport)] void RTCRtpSender( MediaStreamTrack track, RTCRtpTransport transport, @@ -130,6 +130,7 @@ namespace org /// SetTransport() is called when transport.State or rtcpTransport.State /// is "closed", throw an InvalidStateError exception. /// + [altname(setTransportWithRtcpTransport)] void setTransport( RTCRtpTransport transport, RTCRtcpTransport rtcpTransport From 4e3d1f90f246c0629a7b7b1970ecd4984c509a48 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 22 Mar 2017 20:44:41 -0400 Subject: [PATCH 102/187] - fixed C wrapper generation helper routines to compile on windows --- ortc/idl/Constraints.idl | 2 +- ortc/idl/IceGatherer.idl | 1 + ortc/idl/IceTransportController.idl | 1 + ortc/idl/Ortc.idl | 2 +- ortc/idl/SctpTransport.idl | 2 +- ortc/idl/StatsReport.idl | 2 +- projects/msvs/ortclib-c.Universal/dllmain.cpp | 21 + .../ortclib-c.Universal/ortclib-c.vcxproj | 578 +++++++++++ .../ortclib-c.vcxproj.filters | 969 ++++++++++++++++++ projects/msvs/ortclib-c.Universal/targetver.h | 8 + 10 files changed, 1582 insertions(+), 4 deletions(-) create mode 100644 projects/msvs/ortclib-c.Universal/dllmain.cpp create mode 100644 projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj create mode 100644 projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj.filters create mode 100644 projects/msvs/ortclib-c.Universal/targetver.h diff --git a/ortc/idl/Constraints.idl b/ortc/idl/Constraints.idl index bcb5cf14..2a8e575d 100644 --- a/ortc/idl/Constraints.idl +++ b/ortc/idl/Constraints.idl @@ -197,7 +197,7 @@ namespace org /// /// Constructs a new constrainable long value by cloning existing constrainable value. /// - [constructor] + [constructor, altname(ConstrainLongClone)] void ConstrainLong(ConstrainLong source); /// /// Constructs a new constrainable long value from a JSON object. diff --git a/ortc/idl/IceGatherer.idl b/ortc/idl/IceGatherer.idl index 17056381..eb971151 100644 --- a/ortc/idl/IceGatherer.idl +++ b/ortc/idl/IceGatherer.idl @@ -358,6 +358,7 @@ namespace org /// /// Gather ICE candidates with the options specified. /// + [altname(gatherWithOptions)] void gather(RTCIceGatherOptions options); /// diff --git a/ortc/idl/IceTransportController.idl b/ortc/idl/IceTransportController.idl index 5291affd..914a227c 100644 --- a/ortc/idl/IceTransportController.idl +++ b/ortc/idl/IceTransportController.idl @@ -80,6 +80,7 @@ namespace org /// current number of RTCIceTransports with a component of "RTP", /// throw an InvalidParameters exception. /// + [altname(addTransportWithIndex)] void addTransport( RTCIceTransport transport, size_t index diff --git a/ortc/idl/Ortc.idl b/ortc/idl/Ortc.idl index aad70544..7f79dc21 100644 --- a/ortc/idl/Ortc.idl +++ b/ortc/idl/Ortc.idl @@ -148,7 +148,7 @@ namespace org /// /// Sends all traced data to TCP listener specified by host name and port. /// - [static] + [static, altname(saveMediaTraceWithHostPort)] bool saveMediaTrace(string host, int port); /// diff --git a/ortc/idl/SctpTransport.idl b/ortc/idl/SctpTransport.idl index b9d75223..639799b9 100644 --- a/ortc/idl/SctpTransport.idl +++ b/ortc/idl/SctpTransport.idl @@ -170,7 +170,7 @@ namespace org /// Constructs an instance of RTCSctpTransport from an RTCDtlsTransport /// object, and a port number. /// - [constructor] + [constructor, altname(RTCSctpTransportWithLocalPort)] void RTCSctpTransport( RTCDtlsTransport transport, uint16 localPort diff --git a/ortc/idl/StatsReport.idl b/ortc/idl/StatsReport.idl index acd3d922..e393f725 100644 --- a/ortc/idl/StatsReport.idl +++ b/ortc/idl/StatsReport.idl @@ -547,7 +547,7 @@ namespace org /// /// Constructs an instance of an RTCMediaStreamTrackStats object by cloning object data from an existing object. /// - [constructor, altname(RTCMediaStreamTrackStats)] + [constructor, altname(RTCMediaStreamTrackStatsClone)] void RTCMediaStreamTrackStats(RTCMediaStreamTrackStats source); /// /// Constructs an instance of an RTCMediaStreamTrackStats object by extracting object data from a JSON object. diff --git a/projects/msvs/ortclib-c.Universal/dllmain.cpp b/projects/msvs/ortclib-c.Universal/dllmain.cpp new file mode 100644 index 00000000..5ecb7122 --- /dev/null +++ b/projects/msvs/ortclib-c.Universal/dllmain.cpp @@ -0,0 +1,21 @@ + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include + +BOOL APIENTRY DllMain(HMODULE /* hModule */, DWORD ul_reason_for_call, LPVOID /* lpReserved */) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} diff --git a/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj b/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj new file mode 100644 index 00000000..d108cab1 --- /dev/null +++ b/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj @@ -0,0 +1,578 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + {ff79354e-6381-405e-a16c-659b02e617e5} + DynamicLibrary + ortclib_c + en-US + 14.0 + true + Windows Store + 10.0.14393.0 + 10.0.10586.0 + 10.0 + + + + DynamicLibrary + true + v140 + + + DynamicLibrary + true + v140 + + + DynamicLibrary + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + + + false + false + + + false + false + + + false + false + + + false + false + + + false + false + + + + NotUsing + false + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + 4068 + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;_WINDLL;%(PreprocessorDefinitions) + + + Console + false + false + $(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget);%(AdditionalLibraryDirectories) + webrtc.lib;WindowsApp.lib;%(AdditionalDependencies) + /defaultlib:vccorlibd.lib /defaultlib:msvcrtd.lib %(AdditionalOptions) + + + + + NotUsing + false + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + 4068 + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;_WINDLL;%(PreprocessorDefinitions) + + + Console + false + false + $(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget);%(AdditionalLibraryDirectories) + webrtc.lib;WindowsApp.lib;%(AdditionalDependencies) + /defaultlib:vccorlib.lib /defaultlib:msvcrt.lib %(AdditionalOptions) + + + + + NotUsing + false + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + 4068 + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;%(PreprocessorDefinitions) + + + Console + false + false + $(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget);%(AdditionalLibraryDirectories) + webrtc.lib;WindowsApp.lib;%(AdditionalDependencies) + /defaultlib:vccorlibd.lib /defaultlib:msvcrtd.lib %(AdditionalOptions) + + + + + NotUsing + false + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + 4068 + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;%(PreprocessorDefinitions) + + + Console + false + false + $(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget);%(AdditionalLibraryDirectories) + webrtc.lib;WindowsApp.lib;%(AdditionalDependencies) + /defaultlib:vccorlib.lib /defaultlib:msvcrt.lib %(AdditionalOptions) + + + + + NotUsing + false + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + 4068 + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;_WINDLL;%(PreprocessorDefinitions) + + + Console + false + false + $(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget);%(AdditionalLibraryDirectories) + webrtc.lib;WindowsApp.lib;%(AdditionalDependencies) + /defaultlib:vccorlibd.lib /defaultlib:msvcrtd.lib %(AdditionalOptions) + + + + + NotUsing + false + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + 4068 + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;_WINDLL;%(PreprocessorDefinitions) + + + Console + false + false + $(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget);%(AdditionalLibraryDirectories) + webrtc.lib;WindowsApp.lib;%(AdditionalDependencies) + /defaultlib:vccorlib.lib /defaultlib:msvcrt.lib %(AdditionalOptions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {cc14ffe5-0018-4d8d-bc2c-c93477ce081c} + + + {b236bf5a-561d-4720-babf-f6119adf5793} + + + {cc03fba3-9028-47ad-b931-13b12db368f8} + + + {6c13dfe2-3aa7-40b9-919c-5e95e47fc321} + + + {a19b7d13-a6ee-43bb-a913-aeb34f91bf98} + + + {55555c53-504f-4237-abc0-b2f59558a0e9} + + + {83e6cc72-ebc5-4c0c-b6a6-2d67a3c1e8a9} + + + {f370ffcf-6d70-40a3-853d-a272c4df2014} + + + + + + \ No newline at end of file diff --git a/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj.filters b/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj.filters new file mode 100644 index 00000000..5139fb72 --- /dev/null +++ b/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj.filters @@ -0,0 +1,969 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms + + + {6c756899-f026-418e-9288-8899d3d12eff} + + + + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + c + + + \ No newline at end of file diff --git a/projects/msvs/ortclib-c.Universal/targetver.h b/projects/msvs/ortclib-c.Universal/targetver.h new file mode 100644 index 00000000..a66ecb00 --- /dev/null +++ b/projects/msvs/ortclib-c.Universal/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include From fdea0ecc84c430dbab8ee977a60ea3196b7171a9 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Mar 2017 21:24:10 -0400 Subject: [PATCH 103/187] MediaControl idl should have been marked static --- ortc/idl/MediaDevices.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/idl/MediaDevices.idl b/ortc/idl/MediaDevices.idl index 1b81c6bc..a57db15e 100644 --- a/ortc/idl/MediaDevices.idl +++ b/ortc/idl/MediaDevices.idl @@ -263,7 +263,7 @@ namespace org /// /// Interface for controlling the behaviour of media. /// - [special] + [special, static] interface MediaControl { /// From 3d01505c205ddeca1bc23c8d01c6ff503f944ec5 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 27 Mar 2017 22:26:24 -0400 Subject: [PATCH 104/187] - media control is now static --- .../idl/wrapper/impl_org_ortc_MediaControl.cpp | 18 ------------------ ortc/idl/wrapper/impl_org_ortc_MediaControl.h | 2 -- 2 files changed, 20 deletions(-) diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp index b1e8edad..151a253c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp @@ -20,29 +20,11 @@ using ::std::list; using ::std::set; using ::std::map; -//------------------------------------------------------------------------------ -wrapper::impl::org::ortc::MediaControl::MediaControl() -{ -} - -//------------------------------------------------------------------------------ -wrapper::org::ortc::MediaControlPtr wrapper::org::ortc::MediaControl::wrapper_create() -{ - auto pThis = make_shared(); - pThis->thisWeak_ = pThis; - return pThis; -} - //------------------------------------------------------------------------------ wrapper::impl::org::ortc::MediaControl::~MediaControl() { } -//------------------------------------------------------------------------------ -void wrapper::impl::org::ortc::MediaControl::wrapper_init_org_ortc_MediaControl() -{ -} - //------------------------------------------------------------------------------ AnyPtr wrapper::org::ortc::MediaControl::get_displayOrientation() { diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaControl.h b/ortc/idl/wrapper/impl_org_ortc_MediaControl.h index c655205d..47171912 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaControl.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaControl.h @@ -15,9 +15,7 @@ namespace wrapper { { MediaControlWeakPtr thisWeak_; - MediaControl(); virtual ~MediaControl(); - virtual void wrapper_init_org_ortc_MediaControl() override; }; } // ortc From 5990810014dff6dcde2a2fbc3d4080180e6c4d5e Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 1 Apr 2017 09:54:03 -0400 Subject: [PATCH 105/187] - fixed type in eventing macro --- ortc/cpp/ortc_RTPListener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/cpp/ortc_RTPListener.cpp b/ortc/cpp/ortc_RTPListener.cpp index e4fd1e0d..6d5174f0 100644 --- a/ortc/cpp/ortc_RTPListener.cpp +++ b/ortc/cpp/ortc_RTPListener.cpp @@ -1102,7 +1102,7 @@ namespace ortc ) { ZS_EVENTING_2( - x, i, Debug, cRtpListenerRegisterSender, ol, RtpListener, Info, + x, i, Debug, RtpListenerRegisterSender, ol, RtpListener, Info, puid, id, mID, puid, senderId, inSender->getID() ); From 6b1c5ef1481e7af21786fede28bf1e39c3cd2481 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 6 Apr 2017 17:06:31 -0400 Subject: [PATCH 106/187] - fixed compilation issues and warnings on iOS/mac --- ortc/adapter/cpp/ortc_adapter_Helper.cpp | 6 ----- .../cpp/ortc_adapter_PeerConnection.cpp | 26 +++++++++---------- ortc/adapter/cpp/ortc_adapter_SDPParser.cpp | 13 +++++----- ...rtc_adapter_SDPParser_DescriptionToSDP.cpp | 5 ---- .../cpp/ortc_adapter_SDPParser_ParseSDP.cpp | 2 -- ...rtc_adapter_SDPParser_SDPToDescription.cpp | 1 - ortc/cpp/ortc_ICEGatherer.cpp | 16 ++++++------ ortc/cpp/ortc_ORTC.cpp | 1 - ortc/cpp/ortc_RTPListener.cpp | 8 +++--- ortc/cpp/ortc_RTPReceiver.cpp | 6 ++--- ortc/cpp/ortc_RTPSender.cpp | 1 - ortc/internal/ortc_ICETransportController.h | 16 ++++++------ ortc/internal/ortc_MediaStreamTrack.h | 2 +- ortc/internal/ortc_RTPSender.h | 2 -- .../ortclib-ios.xcodeproj/project.pbxproj | 8 +++++- .../ortclib-osx.xcodeproj/project.pbxproj | 8 +++++- .../project.pbxproj | 18 +++++++++++++ 17 files changed, 76 insertions(+), 63 deletions(-) diff --git a/ortc/adapter/cpp/ortc_adapter_Helper.cpp b/ortc/adapter/cpp/ortc_adapter_Helper.cpp index 694ee762..ce0edcc2 100644 --- a/ortc/adapter/cpp/ortc_adapter_Helper.cpp +++ b/ortc/adapter/cpp/ortc_adapter_Helper.cpp @@ -372,8 +372,6 @@ namespace ortc result->mRTCPFeedback = parameters.mRTCPFeedback; if (parameters.mParameters) { - auto supportedCodec = IRTPTypes::toSupportedCodec(parameters.mName); - switch (supportedCodec) { case IRTPTypes::SupportedCodec_Unknown: break; @@ -871,8 +869,6 @@ namespace ortc for (auto iterPrimary = primaryList.begin(); iterPrimary != primaryList.end(); ++iterPrimary) { auto &primaryCodec = (*iterPrimary); - auto supportedType = IRTPTypes::toSupportedCodec(primaryCodec.mName); - const RTPCodecCapability *foundSecondaryExact = nullptr; const RTPCodecCapability *foundSecondaryInexact = nullptr; @@ -1051,8 +1047,6 @@ namespace ortc for (auto iterCodecParams = codecParameters.begin(); iterCodecParams != codecParameters.end(); ++iterCodecParams) { auto &codecParam = (*iterCodecParams); - auto supportedType = IRTPTypes::toSupportedCodec(codecParam.mName); - const RTPCodecCapability *foundSecondaryExact = nullptr; const RTPCodecCapability *foundSecondaryInexact = nullptr; diff --git a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp index 4c4c06db..0627ce1f 100644 --- a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp +++ b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp @@ -1023,9 +1023,9 @@ namespace ortc auto &info = *((*iter).second); if (stats.hasStatType(IStatsReportTypes::StatsType_DataChannel)) { - for (auto iter = info.mDataChannels.begin(); iter != info.mDataChannels.end(); ++iter) + for (auto iterChannel = info.mDataChannels.begin(); iterChannel != info.mDataChannels.end(); ++iterChannel) { - auto dataChannelInfo = (*iter).second; + auto dataChannelInfo = (*iterChannel).second; promises.push_back(dataChannelInfo->mDataChannel->getStats(stats)); } } @@ -2438,8 +2438,8 @@ namespace ortc calculateDelta(*existingSet, sender.mMediaStreamIDs, added, removed); - for (auto iter = added.begin(); iter != added.end(); ++iter) { - auto &id = (*iter); + for (auto iterAdded = added.begin(); iterAdded != added.end(); ++iterAdded) { + auto &id = (*iterAdded); UseMediaStreamPtr stream; @@ -2456,8 +2456,8 @@ namespace ortc stream->notifyAddTrack(receiverInfo->mReceiver->track()); } - for (auto iter = removed.begin(); iter != removed.end(); ++iter) { - auto &id = (*iter); + for (auto iterRemoved = removed.begin(); iterRemoved != removed.end(); ++iterRemoved) { + auto &id = (*iterRemoved); UseMediaStreamPtr stream; @@ -4028,9 +4028,9 @@ namespace ortc (0 == iceTransportStateCount[IICETransportTypes::State_Failed]) && (0 == dtlsTranportStateCount[IDTLSTransportTypes::State_Failed]) && (0 == iceTransportStateCount[IICETransportTypes::State_Disconnected]) && - ((0 > iceTransportStateCount[IICETransportTypes::State_Closed]) || - (0 > dtlsTranportStateCount[IDTLSTransportTypes::State_Closed]))) { - peerConnectionState = IPeerConnectionTypes::PeerConnectionState_New; + ((iceTransportStateCount[IICETransportTypes::State_Closed] > 0) || + (dtlsTranportStateCount[IDTLSTransportTypes::State_Closed] > 0))) { + peerConnectionState = IPeerConnectionTypes::PeerConnectionState_Closed; } if (((iceTransportStateCount[IICETransportTypes::State_Checking] > 0) || @@ -4088,7 +4088,7 @@ namespace ortc //----------------------------------------------------------------------- void PeerConnection::setState(SignalingStates state) { - if (state == mState) return; + if (state == mLastSignalingState) return; ZS_LOG_DEBUG(log("signaling state changed") + ZS_PARAM("new state", IPeerConnectionTypes::toString(state)) + ZS_PARAM("old state", IPeerConnectionTypes::toString(mLastSignalingState))); @@ -4103,7 +4103,7 @@ namespace ortc //----------------------------------------------------------------------- void PeerConnection::setState(ICEGatheringStates state) { - if (state == mState) return; + if (state == mLastICEGatheringStates) return; ZS_LOG_DEBUG(log("ice gatherer state changed") + ZS_PARAM("new state", IICEGathererTypes::toString(state)) + ZS_PARAM("old state", IICEGathererTypes::toString(mLastICEGatheringStates))); @@ -4118,7 +4118,7 @@ namespace ortc //----------------------------------------------------------------------- void PeerConnection::setState(ICEConnectionStates state) { - if (state == mState) return; + if (state == mLastICEConnectionState) return; ZS_LOG_DEBUG(log("ice connection state changed") + ZS_PARAM("new state", IICETransportTypes::toString(state)) + ZS_PARAM("old state", IICETransportTypes::toString(mLastICEConnectionState))); @@ -4133,7 +4133,7 @@ namespace ortc //----------------------------------------------------------------------- void PeerConnection::setState(PeerConnectionStates state) { - if (state == mState) return; + if (state == mLastPeerConnectionState) return; ZS_LOG_DEBUG(log("peer connection state changed") + ZS_PARAM("new state", IPeerConnectionTypes::toString(state)) + ZS_PARAM("old state", IPeerConnectionTypes::toString(mLastPeerConnectionState))); diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp index 85575323..06877cce 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp @@ -896,7 +896,6 @@ namespace ortc ORTC_THROW_INVALID_PARAMETERS_IF(split.size() < 1); for (auto iter = split.begin(); iter != split.end(); ++iter) { - auto &value = (*iter).second; mTags.push_back(value); } } @@ -953,21 +952,21 @@ namespace ortc if (split.size() > 8) { for (size_t index = 10; index < split.size(); index += 2) { - ExtensionPair value(split[index], split[index + 1]); - if (0 == value.first.compareNoCase("raddr")) { - mRelAddr = value.second; + ExtensionPair valuePair(split[index], split[index + 1]); + if (0 == valuePair.first.compareNoCase("raddr")) { + mRelAddr = valuePair.second; continue; } - if (0 == value.first.compareNoCase("rport")) { + if (0 == valuePair.first.compareNoCase("rport")) { try { - mRelPort = Numeric(value.second); + mRelPort = Numeric(valuePair.second); } catch (const Numeric::ValueOutOfRange &) { ORTC_THROW_INVALID_PARAMETERS("rel port value out of range: " + split[9]); } continue; } - mExtensionPairs.push_back(value); + mExtensionPairs.push_back(valuePair); } } } diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp index 4f670ef6..f5c717d8 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp @@ -142,7 +142,6 @@ namespace ortc } for (auto iter = bundles.begin(); iter != bundles.end(); ++iter) { - auto &bundleID = (*iter).first; auto &bundleSet = (*iter).second; if (bundleSet.size() < 2) continue; @@ -167,7 +166,6 @@ namespace ortc ISDPTypes::MLine &ioMLine ) { - auto &result = ioSDP; auto &mline = ioMLine; ORTC_THROW_INVALID_PARAMETERS_IF(!mediaLine.mDetails); @@ -203,7 +201,6 @@ namespace ortc ISDPTypes::MLine &ioMLine ) { - auto &result = ioSDP; auto &mline = ioMLine; createSDPMediaLineBase(description, mediaLine, ioSDP, ioMLine); @@ -226,7 +223,6 @@ namespace ortc ISDPTypes::MLine &ioMLine ) { - auto &result = ioSDP; auto &mline = ioMLine; createSDPMediaLineBase(description, mediaLine, ioSDP, ioMLine); @@ -652,7 +648,6 @@ namespace ortc ISDPTypes::MLine &ioMLine ) { - auto &result = ioSDP; auto &mline = ioMLine; if (mediaLine.mReceiverCapabilities) { diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp index ddebeb68..a5ebd7b3 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp @@ -278,8 +278,6 @@ namespace ortc //----------------------------------------------------------------------- void SDPParser::parseLinesDetails(SDP &sdp) { - AttributeLevels currentLevel = AttributeLevel_Session; - MLinePtr currentMLine; ASSRCLinePtr currentSourceLine; diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp index c35445fe..24cae300 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp @@ -857,7 +857,6 @@ namespace ortc if (!rtpMap) { auto reservedType = IRTPTypes::toReservedCodec(pt); auto supportedType = IRTPTypes::toSupportedCodec(reservedType); - auto codecKind = IRTPTypes::getCodecKind(supportedType); if (IRTPTypes::SupportedCodec_Unknown == supportedType) { ZS_LOG_WARNING(Debug, internal::slog("codec payload type is not understood") + ZS_PARAM("payload type", pt)); diff --git a/ortc/cpp/ortc_ICEGatherer.cpp b/ortc/cpp/ortc_ICEGatherer.cpp index 5d38ff06..25b7f4df 100644 --- a/ortc/cpp/ortc_ICEGatherer.cpp +++ b/ortc/cpp/ortc_ICEGatherer.cpp @@ -5269,11 +5269,11 @@ namespace ortc setState(InternalState_Gathering); } - CandidatePtr sendCandidate(make_shared(*otherCandidate)); + CandidatePtr sendNotifyCandidate(make_shared(*otherCandidate)); ZS_LOG_DEBUG(log("notify replacement local candidate") + otherCandidate->toDebug()) if (pThis) { - mSubscriptions.delegate()->onICEGathererLocalCandidate(mThisWeak.lock(), sendCandidate); + mSubscriptions.delegate()->onICEGathererLocalCandidate(mThisWeak.lock(), sendNotifyCandidate); } return; } @@ -5839,10 +5839,10 @@ namespace ortc // scope: search for existing route { - auto route = installRoute(localCandidate, remoteIP, UseICETransportPtr()); - if (route) { - routerRoute = route->mRouterRoute; - transport = route->mTransport.lock(); + auto routeInstalled = installRoute(localCandidate, remoteIP, UseICETransportPtr()); + if (routeInstalled) { + routerRoute = routeInstalled->mRouterRoute; + transport = routeInstalled->mTransport.lock(); if (transport) goto found_transport; } @@ -6271,8 +6271,8 @@ namespace ortc if ((hostPort->mCandidateTCPPassive == sentFromLocalCandidate) || (hostPort->mCandidateTCPActive == sentFromLocalCandidate)) { // search for an incoming or outgoing TCP connection that satisfies the requirement - for (auto iter = hostPort->mTCPPorts.begin(); iter != hostPort->mTCPPorts.end(); ++iter) { - auto tcpPort = (*iter).second.second; + for (auto iterTcpPorts = hostPort->mTCPPorts.begin(); iterTcpPorts != hostPort->mTCPPorts.end(); ++iterTcpPorts) { + auto tcpPort = (*iterTcpPorts).second.second; auto tcpPortTransport = tcpPort->mTransport.lock(); if (tcpPort->mRemoteIP != remoteIP) continue; // must be connecting to/from same remote location diff --git a/ortc/cpp/ortc_ORTC.cpp b/ortc/cpp/ortc_ORTC.cpp index a41277c7..aa1d39eb 100644 --- a/ortc/cpp/ortc_ORTC.cpp +++ b/ortc/cpp/ortc_ORTC.cpp @@ -291,7 +291,6 @@ namespace ortc AutoRecursiveLock(*this); mNTPServerTime = value; } - auto totalMilliseconds = value.count(); IRTPMediaEngineForORTC::ntpServerTime(value); } diff --git a/ortc/cpp/ortc_RTPListener.cpp b/ortc/cpp/ortc_RTPListener.cpp index 6d5174f0..d92602b0 100644 --- a/ortc/cpp/ortc_RTPListener.cpp +++ b/ortc/cpp/ortc_RTPListener.cpp @@ -94,11 +94,13 @@ namespace ortc case IRTPTypes::HeaderExtensionURI_RID: return false; case IRTPTypes::HeaderExtensionURI_3gpp_VideoOrientation: return true; case IRTPTypes::HeaderExtensionURI_3gpp_VideoOrientation6: return true; + case IRTPTypes::HeaderExtensionURI_TransmissionTimeOffsets: return true; + case IRTPTypes::HeaderExtensionURI_AbsoluteSendTime: return true; + case IRTPTypes::HeaderExtensionURI_TransportSequenceNumber: return true; } return true; } - //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -781,12 +783,12 @@ namespace ortc { for (auto iter = receivers->begin(); iter != receivers->end(); ++iter) { ReceiverID receiverID = (*iter).first; - auto receiverInfo = (*iter).second; + auto currentReceiverInfo = (*iter).second; auto receiver = (*iter).second->mReceiver.lock(); if (!receiver) { - ZS_LOG_WARNING(Trace, log("receiver is gone") + ZS_PARAM("receiver ID", receiverID) + receiverInfo->toDebug()) + ZS_LOG_WARNING(Trace, log("receiver is gone") + ZS_PARAM("receiver ID", receiverID) + currentReceiverInfo->toDebug()) continue; } diff --git a/ortc/cpp/ortc_RTPReceiver.cpp b/ortc/cpp/ortc_RTPReceiver.cpp index 94dad051..2e618a0f 100644 --- a/ortc/cpp/ortc_RTPReceiver.cpp +++ b/ortc/cpp/ortc_RTPReceiver.cpp @@ -642,7 +642,6 @@ namespace ortc channels = mChannels; // obtain pointer to COW list while inside a lock } - bool result = false; for (auto iter = channels->begin(); iter != channels->end(); ++iter) { auto channel = (*iter).second.lock(); @@ -1402,9 +1401,9 @@ namespace ortc if (CodecType_RTX != info.mCodecType) continue; - for (auto iter = parameters->mCodecs.begin(); iter != parameters->mCodecs.end(); ++iter) + for (auto iterCodecs = parameters->mCodecs.begin(); iterCodecs != parameters->mCodecs.end(); ++iterCodecs) { - auto &codec = (*iter); + auto &codec = (*iterCodecs); if (codec.mPayloadType != info.mPayloadType) continue; RTXCodecParametersPtr rtxParam = RTXCodecParameters::convert(codec.mParameters); @@ -1436,6 +1435,7 @@ namespace ortc case SupportedCodec_H264: mTrack->setH264Rendering(true); goto end_codec_loop; + default: break; } continue; diff --git a/ortc/cpp/ortc_RTPSender.cpp b/ortc/cpp/ortc_RTPSender.cpp index 69fe6533..47069327 100644 --- a/ortc/cpp/ortc_RTPSender.cpp +++ b/ortc/cpp/ortc_RTPSender.cpp @@ -453,7 +453,6 @@ namespace ortc channels = mChannels; // obtain pointer to COW list while inside a lock } - bool result = false; for (auto iter = channels->begin(); iter != channels->end(); ++iter) { auto channel = (*iter).second; diff --git a/ortc/internal/ortc_ICETransportController.h b/ortc/internal/ortc_ICETransportController.h index e5de6bd1..7ff27af9 100644 --- a/ortc/internal/ortc_ICETransportController.h +++ b/ortc/internal/ortc_ICETransportController.h @@ -161,16 +161,16 @@ namespace ortc static ICETransportControllerPtr create(); - virtual PUID getID() const; + virtual PUID getID() const override; - virtual ICETransportList getTransports() const; + virtual ICETransportList getTransports() const override; virtual void addTransport( IICETransportPtr transport, Optional index = Optional() ) throw( InvalidParameters, InvalidStateError - ); + ) override; //----------------------------------------------------------------------- #pragma mark @@ -190,9 +190,9 @@ namespace ortc ICETransportPtr transport, const String &localFoundation, const String &remoteFoundation - ); + ) override; - virtual void notifyDetached(ICETransportPtr transport); + virtual void notifyDetached(ICETransportPtr transport) override; //----------------------------------------------------------------------- #pragma mark @@ -204,19 +204,19 @@ namespace ortc UseICETransportPtr transport, const char *localFoundation, const char *remoteFoundation - ); + ) override; virtual void onTransportControllerNotifyDetached( UseICETransportPtr transport, AttachedOrderID detachedOrder - ); + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICETransportController => IWakeDelegate #pragma mark - virtual void onWake(); + virtual void onWake() override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_MediaStreamTrack.h b/ortc/internal/ortc_MediaStreamTrack.h index 43483bb9..f8c14ab2 100644 --- a/ortc/internal/ortc_MediaStreamTrack.h +++ b/ortc/internal/ortc_MediaStreamTrack.h @@ -647,7 +647,7 @@ namespace ortc Log::Params log(const char *message) const; static Log::Params slog(const char *message); Log::Params debug(const char *message) const; - virtual ElementPtr toDebug() const; + virtual ElementPtr toDebug() const override; bool isShuttingDown() const; bool isShutdown() const; diff --git a/ortc/internal/ortc_RTPSender.h b/ortc/internal/ortc_RTPSender.h index 8b44bc4d..de822802 100644 --- a/ortc/internal/ortc_RTPSender.h +++ b/ortc/internal/ortc_RTPSender.h @@ -145,8 +145,6 @@ namespace ortc static ElementPtr toDebug(ForDTMFSenderPtr transport); - virtual PUID getID() const = 0; - virtual IDTMFSenderSubscriptionPtr subscribe(IDTMFSenderDelegatePtr delegate) override { return subscribeDTMF(delegate); } virtual IDTMFSenderSubscriptionPtr subscribeDTMF(IDTMFSenderDelegatePtr delegate) = 0; diff --git a/projects/xcode/ortclib-ios/ortclib-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-ios/ortclib-ios.xcodeproj/project.pbxproj index 4b566eb9..16a02134 100644 --- a/projects/xcode/ortclib-ios/ortclib-ios.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib-ios/ortclib-ios.xcodeproj/project.pbxproj @@ -55,7 +55,7 @@ 009D16611DE5210300D139FF /* ortc_SCTPTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D15C11DE5210200D139FF /* ortc_SCTPTransport.cpp */; }; 009D16621DE5210300D139FF /* ortc_SCTPTransportListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D15C21DE5210200D139FF /* ortc_SCTPTransportListener.cpp */; }; 009D16641DE5210300D139FF /* ortc_SRTPSDESTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D15C41DE5210200D139FF /* ortc_SRTPSDESTransport.cpp */; }; - 009D16651DE5210300D139FF /* ortc_SRTPTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D15C51DE5210200D139FF /* ortc_SRTPTransport.cpp */; }; + 009D16651DE5210300D139FF /* ortc_SRTPTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D15C51DE5210200D139FF /* ortc_SRTPTransport.cpp */; settings = {COMPILER_FLAGS = "-Wno-documentation"; }; }; 009D16661DE5210300D139FF /* ortc_StatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D15C61DE5210200D139FF /* ortc_StatsReport.cpp */; }; 009D16671DE5210300D139FF /* ortc_webrtc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D15C71DE5210200D139FF /* ortc_webrtc.cpp */; }; /* End PBXBuildFile section */ @@ -585,14 +585,17 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; @@ -644,13 +647,16 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "NDEBUG=1", "$(inherited)", ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; diff --git a/projects/xcode/ortclib-osx/ortclib-osx.xcodeproj/project.pbxproj b/projects/xcode/ortclib-osx/ortclib-osx.xcodeproj/project.pbxproj index 25a26a40..fc3e0b8c 100644 --- a/projects/xcode/ortclib-osx/ortclib-osx.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib-osx/ortclib-osx.xcodeproj/project.pbxproj @@ -55,7 +55,7 @@ 009D180D1DE5285800D139FF /* ortc_SCTPTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D17601DE5285700D139FF /* ortc_SCTPTransport.cpp */; }; 009D180E1DE5285800D139FF /* ortc_SCTPTransportListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D17611DE5285700D139FF /* ortc_SCTPTransportListener.cpp */; }; 009D18101DE5285800D139FF /* ortc_SRTPSDESTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D17631DE5285700D139FF /* ortc_SRTPSDESTransport.cpp */; }; - 009D18111DE5285800D139FF /* ortc_SRTPTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D17641DE5285700D139FF /* ortc_SRTPTransport.cpp */; }; + 009D18111DE5285800D139FF /* ortc_SRTPTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D17641DE5285700D139FF /* ortc_SRTPTransport.cpp */; settings = {COMPILER_FLAGS = "-Wno-documentation"; }; }; 009D18121DE5285800D139FF /* ortc_StatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D17651DE5285700D139FF /* ortc_StatsReport.cpp */; }; 009D18131DE5285800D139FF /* ortc_webrtc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009D17661DE5285700D139FF /* ortc_webrtc.cpp */; }; /* End PBXBuildFile section */ @@ -577,14 +577,17 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; @@ -636,9 +639,12 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; diff --git a/projects/xcode/ortclib.Test-osx/ortclib.Test-osx.xcodeproj/project.pbxproj b/projects/xcode/ortclib.Test-osx/ortclib.Test-osx.xcodeproj/project.pbxproj index 6625858a..9c013e3c 100644 --- a/projects/xcode/ortclib.Test-osx/ortclib.Test-osx.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib.Test-osx/ortclib.Test-osx.xcodeproj/project.pbxproj @@ -563,6 +563,15 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../.., + ../../../../zsLib, + "../../../../ortclib-services-cpp", + "../../../../zsLib-eventing", + ../../../.., + ../../../../../../webrtc/xplatform/webrtc, + ../../../../../../webrtc/xplatform/boringssl/include, + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -604,6 +613,15 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../.., + ../../../../zsLib, + "../../../../ortclib-services-cpp", + "../../../../zsLib-eventing", + ../../../.., + ../../../../../../webrtc/xplatform/webrtc, + ../../../../../../webrtc/xplatform/boringssl/include, + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; From 1d0f4f5df90b33009482fb4f20c72cffedc3fc1b Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 6 Apr 2017 19:36:58 -0400 Subject: [PATCH 107/187] - codec compilation of wrappers on ios/osx --- ortc/idl/wrapper/impl_org_ortc_Helper.h | 2 +- ortc/idl/wrapper/impl_org_ortc_MediaDevices.h | 2 +- .../wrapper/impl_org_ortc_RTCIceServer.cpp | 6 - .../impl_org_ortc_RTCSrtpSdesTransport.h | 1 + ...CSrtpSdesTransportLifetimeRemainingEvent.h | 1 + ortc/idl/wrapper/impl_org_ortc_Settings.cpp | 2 + .../ortclib-c-ios.xcodeproj/project.pbxproj | 1211 +++++++++++++ .../ortclib-c-osx.xcodeproj/project.pbxproj | 1524 +++++++++++++++++ .../project.pbxproj | 1229 +++++++++++++ .../project.pbxproj | 1228 +++++++++++++ 10 files changed, 5198 insertions(+), 8 deletions(-) create mode 100644 projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj create mode 100644 projects/xcode/ortclib-c-osx/ortclib-c-osx.xcodeproj/project.pbxproj create mode 100644 projects/xcode/ortclib-wrapper-ios/ortclib-wrapper-ios.xcodeproj/project.pbxproj create mode 100644 projects/xcode/ortclib-wrapper-osx/ortclib-wrapper-osx.xcodeproj/project.pbxproj diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.h b/ortc/idl/wrapper/impl_org_ortc_Helper.h index 9082a3dd..7db22f23 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.h +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.h @@ -132,7 +132,7 @@ namespace wrapper { template static void optionalSafeIntConvert(const optionalType1 &inputType, optionalType2 &outputType) { - outputType = inputType.hasValue() ? optionalType2(SafeInt(inputType.value())) : optionalType2(); + outputType = inputType.hasValue() ? optionalType2(SafeInt(inputType.value())) : optionalType2(); } }; diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h index d29e085c..6e1e69a9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h +++ b/ortc/idl/wrapper/impl_org_ortc_MediaDevices.h @@ -30,7 +30,7 @@ namespace wrapper { virtual void wrapper_onObserverCountChanged(size_t count) override; - virtual void onMediaDevicesChanged(); + virtual void onMediaDevicesChanged() override; void subscribe(); }; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp index bec0e722..d4a21b17 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp @@ -94,12 +94,6 @@ wrapper::impl::org::ortc::RTCIceServer::WrapperImplTypePtr wrapper::impl::org::o pThis->credential = native.mCredential; pThis->credentialType = Helper::toWrapper(native.mCredentialType); return pThis; - - - shared_ptr< list< String > > urls{}; - String username{}; - String credential{}; - wrapper::org::ortc::RTCIceCredentialType credentialType{ wrapper::org::ortc::RTCIceCredentialType_password }; } //------------------------------------------------------------------------------ diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h index a11db099..05e1e9c0 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h @@ -14,6 +14,7 @@ namespace wrapper { struct RTCSrtpSdesTransport : public wrapper::org::ortc::RTCSrtpSdesTransport, public ::ortc::ISRTPSDESTransportDelegate { + typedef unsigned long ULONG; ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransport, NativeType); ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransport, ISRTPSDESTransport); ZS_DECLARE_TYPEDEF_PTR(::ortc::ISRTPSDESTransportSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h index 40ded841..f30f162e 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h @@ -11,6 +11,7 @@ namespace wrapper { struct RTCSrtpSdesTransportLifetimeRemainingEvent : public wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent { + typedef unsigned long ULONG; ZS_DECLARE_TYPEDEF_PTR(RTCSrtpSdesTransportLifetimeRemainingEvent, WrapperImplType); ZS_DECLARE_TYPEDEF_PTR(wrapper::org::ortc::RTCSrtpSdesTransportLifetimeRemainingEvent, WrapperType); RTCSrtpSdesTransportLifetimeRemainingEventWeakPtr thisWeak_; diff --git a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp index f25e955b..c06ab07d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Settings.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Settings.cpp @@ -59,6 +59,7 @@ void wrapper::org::ortc::Settings::setInt( int64_t value ) { + typedef unsigned long LONG; NativeType::setInt(key, SafeInt(value)); } @@ -68,6 +69,7 @@ void wrapper::org::ortc::Settings::setUInt( uint64_t value ) { + typedef unsigned long ULONG; NativeType::setUInt(key, SafeInt(value)); } diff --git a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj new file mode 100644 index 00000000..5e992e63 --- /dev/null +++ b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj @@ -0,0 +1,1211 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 00216E151E96E97F008204EA /* c_helpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CDC1E96E97F008204EA /* c_helpers.cpp */; }; + 00216E161E96E97F008204EA /* c_org_ortc_adapter_MediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CDE1E96E97F008204EA /* c_org_ortc_adapter_MediaStream.cpp */; }; + 00216E171E96E97F008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE01E96E97F008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp */; }; + 00216E181E96E97F008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE21E96E97F008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp */; }; + 00216E191E96E97F008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE41E96E97F008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp */; }; + 00216E1A1E96E97F008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE61E96E97F008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp */; }; + 00216E1B1E96E97F008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE81E96E97F008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */; }; + 00216E1C1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CEA1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp */; }; + 00216E1D1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CEC1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp */; }; + 00216E1E1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CEE1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp */; }; + 00216E1F1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF01E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */; }; + 00216E201E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF21E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */; }; + 00216E211E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF41E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp */; }; + 00216E221E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF61E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */; }; + 00216E231E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF81E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */; }; + 00216E241E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CFA1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */; }; + 00216E251E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CFC1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */; }; + 00216E261E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CFE1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */; }; + 00216E271E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D001E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */; }; + 00216E281E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D021E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */; }; + 00216E291E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D041E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */; }; + 00216E2A1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D061E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */; }; + 00216E2B1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D081E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */; }; + 00216E2C1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D0A1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */; }; + 00216E2D1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D0C1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */; }; + 00216E2E1E96E97F008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D0E1E96E97F008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp */; }; + 00216E2F1E96E97F008204EA /* c_org_ortc_ConstrainBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D101E96E97F008204EA /* c_org_ortc_ConstrainBoolean.cpp */; }; + 00216E301E96E97F008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D121E96E97F008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp */; }; + 00216E311E96E97F008204EA /* c_org_ortc_ConstrainDouble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D141E96E97F008204EA /* c_org_ortc_ConstrainDouble.cpp */; }; + 00216E321E96E97F008204EA /* c_org_ortc_ConstrainDoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D161E96E97F008204EA /* c_org_ortc_ConstrainDoubleRange.cpp */; }; + 00216E331E96E97F008204EA /* c_org_ortc_ConstrainLong.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D181E96E97F008204EA /* c_org_ortc_ConstrainLong.cpp */; }; + 00216E341E96E97F008204EA /* c_org_ortc_ConstrainLongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D1A1E96E97F008204EA /* c_org_ortc_ConstrainLongRange.cpp */; }; + 00216E351E96E97F008204EA /* c_org_ortc_ConstrainString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D1C1E96E97F008204EA /* c_org_ortc_ConstrainString.cpp */; }; + 00216E361E96E97F008204EA /* c_org_ortc_ConstrainStringParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D1E1E96E97F008204EA /* c_org_ortc_ConstrainStringParameters.cpp */; }; + 00216E371E96E97F008204EA /* c_org_ortc_DoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D201E96E97F008204EA /* c_org_ortc_DoubleRange.cpp */; }; + 00216E381E96E97F008204EA /* c_org_ortc_Error.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D221E96E97F008204EA /* c_org_ortc_Error.cpp */; }; + 00216E391E96E97F008204EA /* c_org_ortc_ErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D241E96E97F008204EA /* c_org_ortc_ErrorEvent.cpp */; }; + 00216E3A1E96E97F008204EA /* c_org_ortc_Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D261E96E97F008204EA /* c_org_ortc_Json.cpp */; }; + 00216E3B1E96E97F008204EA /* c_org_ortc_Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D281E96E97F008204EA /* c_org_ortc_Logger.cpp */; }; + 00216E3C1E96E97F008204EA /* c_org_ortc_LongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D2A1E96E97F008204EA /* c_org_ortc_LongRange.cpp */; }; + 00216E3D1E96E97F008204EA /* c_org_ortc_MediaControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D2C1E96E97F008204EA /* c_org_ortc_MediaControl.cpp */; }; + 00216E3E1E96E980008204EA /* c_org_ortc_MediaDeviceInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D2E1E96E97F008204EA /* c_org_ortc_MediaDeviceInfo.cpp */; }; + 00216E3F1E96E980008204EA /* c_org_ortc_MediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D301E96E97F008204EA /* c_org_ortc_MediaDevices.cpp */; }; + 00216E401E96E980008204EA /* c_org_ortc_MediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D321E96E97F008204EA /* c_org_ortc_MediaSource.cpp */; }; + 00216E411E96E980008204EA /* c_org_ortc_MediaStreamConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D341E96E97F008204EA /* c_org_ortc_MediaStreamConstraints.cpp */; }; + 00216E421E96E980008204EA /* c_org_ortc_MediaStreamTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D361E96E97F008204EA /* c_org_ortc_MediaStreamTrack.cpp */; }; + 00216E431E96E980008204EA /* c_org_ortc_MediaTrackCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D381E96E97F008204EA /* c_org_ortc_MediaTrackCapabilities.cpp */; }; + 00216E441E96E980008204EA /* c_org_ortc_MediaTrackConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D3A1E96E97F008204EA /* c_org_ortc_MediaTrackConstraints.cpp */; }; + 00216E451E96E980008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D3C1E96E97F008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp */; }; + 00216E461E96E980008204EA /* c_org_ortc_MediaTrackSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D3E1E96E97F008204EA /* c_org_ortc_MediaTrackSettings.cpp */; }; + 00216E471E96E980008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D401E96E97F008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp */; }; + 00216E481E96E980008204EA /* c_org_ortc_MessageQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D421E96E97F008204EA /* c_org_ortc_MessageQueue.cpp */; }; + 00216E491E96E980008204EA /* c_org_ortc_OrtcLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D441E96E97F008204EA /* c_org_ortc_OrtcLib.cpp */; }; + 00216E4A1E96E980008204EA /* c_org_ortc_OverconstrainedError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D461E96E97F008204EA /* c_org_ortc_OverconstrainedError.cpp */; }; + 00216E4B1E96E980008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D481E96E97F008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp */; }; + 00216E4C1E96E980008204EA /* c_org_ortc_RTCCertificate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D4A1E96E97F008204EA /* c_org_ortc_RTCCertificate.cpp */; }; + 00216E4D1E96E980008204EA /* c_org_ortc_RTCCertificateStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D4C1E96E97F008204EA /* c_org_ortc_RTCCertificateStats.cpp */; }; + 00216E4E1E96E980008204EA /* c_org_ortc_RTCCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D4E1E96E97F008204EA /* c_org_ortc_RTCCodec.cpp */; }; + 00216E4F1E96E980008204EA /* c_org_ortc_RTCDataChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D501E96E97F008204EA /* c_org_ortc_RTCDataChannel.cpp */; }; + 00216E501E96E980008204EA /* c_org_ortc_RTCDataChannelEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D521E96E97F008204EA /* c_org_ortc_RTCDataChannelEvent.cpp */; }; + 00216E511E96E980008204EA /* c_org_ortc_RTCDataChannelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D541E96E97F008204EA /* c_org_ortc_RTCDataChannelParameters.cpp */; }; + 00216E521E96E980008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D561E96E97F008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp */; }; + 00216E531E96E980008204EA /* c_org_ortc_RTCDataChannelStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D581E96E97F008204EA /* c_org_ortc_RTCDataChannelStats.cpp */; }; + 00216E541E96E980008204EA /* c_org_ortc_RTCDataTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D5A1E96E97F008204EA /* c_org_ortc_RTCDataTransport.cpp */; }; + 00216E551E96E980008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D5C1E96E97F008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp */; }; + 00216E561E96E980008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D5E1E96E97F008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp */; }; + 00216E571E96E980008204EA /* c_org_ortc_RTCDtlsParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D601E96E97F008204EA /* c_org_ortc_RTCDtlsParameters.cpp */; }; + 00216E581E96E980008204EA /* c_org_ortc_RTCDtlsTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D621E96E97F008204EA /* c_org_ortc_RTCDtlsTransport.cpp */; }; + 00216E591E96E980008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D641E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */; }; + 00216E5A1E96E980008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D661E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp */; }; + 00216E5B1E96E980008204EA /* c_org_ortc_RTCDtmfSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D681E96E97F008204EA /* c_org_ortc_RTCDtmfSender.cpp */; }; + 00216E5C1E96E980008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D6A1E96E97F008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp */; }; + 00216E5D1E96E980008204EA /* c_org_ortc_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D6C1E96E97F008204EA /* c_org_ortc_RTCIceCandidate.cpp */; }; + 00216E5E1E96E980008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D6E1E96E97F008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp */; }; + 00216E5F1E96E980008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D701E96E97F008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp */; }; + 00216E601E96E980008204EA /* c_org_ortc_RTCIceCandidatePair.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D721E96E97F008204EA /* c_org_ortc_RTCIceCandidatePair.cpp */; }; + 00216E611E96E980008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D741E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp */; }; + 00216E621E96E980008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D761E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp */; }; + 00216E631E96E980008204EA /* c_org_ortc_RTCIceGatherer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D781E96E97F008204EA /* c_org_ortc_RTCIceGatherer.cpp */; }; + 00216E641E96E980008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D7A1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp */; }; + 00216E651E96E980008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D7C1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */; }; + 00216E661E96E980008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D7E1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp */; }; + 00216E671E96E980008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D801E96E97F008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp */; }; + 00216E681E96E980008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D821E96E97F008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp */; }; + 00216E691E96E980008204EA /* c_org_ortc_RTCIceGathererStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D841E96E97F008204EA /* c_org_ortc_RTCIceGathererStats.cpp */; }; + 00216E6A1E96E980008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D861E96E97F008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp */; }; + 00216E6B1E96E980008204EA /* c_org_ortc_RTCIceGatherOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D881E96E97F008204EA /* c_org_ortc_RTCIceGatherOptions.cpp */; }; + 00216E6C1E96E980008204EA /* c_org_ortc_RTCIceParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D8A1E96E97F008204EA /* c_org_ortc_RTCIceParameters.cpp */; }; + 00216E6D1E96E980008204EA /* c_org_ortc_RTCIceServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D8C1E96E97F008204EA /* c_org_ortc_RTCIceServer.cpp */; }; + 00216E6E1E96E980008204EA /* c_org_ortc_RTCIceTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D8E1E96E97F008204EA /* c_org_ortc_RTCIceTransport.cpp */; }; + 00216E6F1E96E980008204EA /* c_org_ortc_RTCIceTransportController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D901E96E97F008204EA /* c_org_ortc_RTCIceTransportController.cpp */; }; + 00216E701E96E980008204EA /* c_org_ortc_RTCIceTransportOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D921E96E97F008204EA /* c_org_ortc_RTCIceTransportOptions.cpp */; }; + 00216E711E96E980008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D941E96E97F008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp */; }; + 00216E721E96E980008204EA /* c_org_ortc_RTCIceTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D961E96E97F008204EA /* c_org_ortc_RTCIceTransportStats.cpp */; }; + 00216E731E96E980008204EA /* c_org_ortc_RTCIdentity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D981E96E97F008204EA /* c_org_ortc_RTCIdentity.cpp */; }; + 00216E741E96E980008204EA /* c_org_ortc_RTCIdentityAssertion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D9A1E96E97F008204EA /* c_org_ortc_RTCIdentityAssertion.cpp */; }; + 00216E751E96E980008204EA /* c_org_ortc_RTCIdentityError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D9C1E96E97F008204EA /* c_org_ortc_RTCIdentityError.cpp */; }; + 00216E761E96E980008204EA /* c_org_ortc_RTCIdentityResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D9E1E96E97F008204EA /* c_org_ortc_RTCIdentityResult.cpp */; }; + 00216E771E96E980008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA01E96E97F008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp */; }; + 00216E781E96E980008204EA /* c_org_ortc_RTCMediaStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA21E96E97F008204EA /* c_org_ortc_RTCMediaStreamStats.cpp */; }; + 00216E791E96E980008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA41E96E97F008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp */; }; + 00216E7A1E96E980008204EA /* c_org_ortc_RTCMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA61E96E97F008204EA /* c_org_ortc_RTCMessageEvent.cpp */; }; + 00216E7B1E96E980008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA81E96E97F008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp */; }; + 00216E7C1E96E980008204EA /* c_org_ortc_RTCRtcpFeedback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DAA1E96E97F008204EA /* c_org_ortc_RTCRtcpFeedback.cpp */; }; + 00216E7D1E96E980008204EA /* c_org_ortc_RTCRtcpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DAC1E96E97F008204EA /* c_org_ortc_RTCRtcpParameters.cpp */; }; + 00216E7E1E96E980008204EA /* c_org_ortc_RTCRtcpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DAE1E96E97F008204EA /* c_org_ortc_RTCRtcpTransport.cpp */; }; + 00216E7F1E96E980008204EA /* c_org_ortc_RTCRtpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB01E96E97F008204EA /* c_org_ortc_RTCRtpCapabilities.cpp */; }; + 00216E801E96E980008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB21E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp */; }; + 00216E811E96E980008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB41E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp */; }; + 00216E821E96E980008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB61E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp */; }; + 00216E831E96E980008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB81E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp */; }; + 00216E841E96E980008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DBA1E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp */; }; + 00216E851E96E980008204EA /* c_org_ortc_RTCRtpContributingSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DBC1E96E97F008204EA /* c_org_ortc_RTCRtpContributingSource.cpp */; }; + 00216E861E96E980008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DBE1E96E97F008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp */; }; + 00216E871E96E980008204EA /* c_org_ortc_RTCRtpFecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC01E96E97F008204EA /* c_org_ortc_RTCRtpFecParameters.cpp */; }; + 00216E881E96E980008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC21E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */; }; + 00216E891E96E980008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC41E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */; }; + 00216E8A1E96E980008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC61E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */; }; + 00216E8B1E96E980008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC81E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp */; }; + 00216E8C1E96E980008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DCA1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp */; }; + 00216E8D1E96E980008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DCC1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp */; }; + 00216E8E1E96E980008204EA /* c_org_ortc_RTCRtpListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DCE1E96E97F008204EA /* c_org_ortc_RTCRtpListener.cpp */; }; + 00216E8F1E96E980008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD01E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */; }; + 00216E901E96E980008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD21E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */; }; + 00216E911E96E980008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD41E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */; }; + 00216E921E96E980008204EA /* c_org_ortc_RTCRtpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD61E96E97F008204EA /* c_org_ortc_RTCRtpParameters.cpp */; }; + 00216E931E96E980008204EA /* c_org_ortc_RTCRtpReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD81E96E97F008204EA /* c_org_ortc_RTCRtpReceiver.cpp */; }; + 00216E941E96E980008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DDA1E96E97F008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp */; }; + 00216E951E96E980008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DDC1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */; }; + 00216E961E96E980008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DDE1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */; }; + 00216E971E96E980008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE01E96E97F008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp */; }; + 00216E981E96E980008204EA /* c_org_ortc_RTCRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE21E96E97F008204EA /* c_org_ortc_RTCRtpSender.cpp */; }; + 00216E991E96E980008204EA /* c_org_ortc_RTCRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE41E96E97F008204EA /* c_org_ortc_RTCRtpStreamStats.cpp */; }; + 00216E9A1E96E980008204EA /* c_org_ortc_RTCRtpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE61E96E97F008204EA /* c_org_ortc_RTCRtpTransport.cpp */; }; + 00216E9B1E96E980008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE81E96E97F008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp */; }; + 00216E9C1E96E980008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DEA1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */; }; + 00216E9D1E96E980008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DEC1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */; }; + 00216E9E1E96E980008204EA /* c_org_ortc_RTCSctpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DEE1E96E97F008204EA /* c_org_ortc_RTCSctpCapabilities.cpp */; }; + 00216E9F1E96E980008204EA /* c_org_ortc_RTCSctpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF01E96E97F008204EA /* c_org_ortc_RTCSctpTransport.cpp */; }; + 00216EA01E96E980008204EA /* c_org_ortc_RTCSctpTransportListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF21E96E97F008204EA /* c_org_ortc_RTCSctpTransportListener.cpp */; }; + 00216EA11E96E980008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF41E96E97F008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp */; }; + 00216EA21E96E980008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF61E96E97F008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp */; }; + 00216EA31E96E980008204EA /* c_org_ortc_RTCSctpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF81E96E97F008204EA /* c_org_ortc_RTCSctpTransportStats.cpp */; }; + 00216EA41E96E980008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DFA1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp */; }; + 00216EA51E96E980008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DFC1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp */; }; + 00216EA61E96E980008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DFE1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp */; }; + 00216EA71E96E980008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E001E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp */; }; + 00216EA81E96E980008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E021E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */; }; + 00216EA91E96E980008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E041E96E97F008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp */; }; + 00216EAA1E96E980008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E061E96E97F008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp */; }; + 00216EAB1E96E980008204EA /* c_org_ortc_RTCStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E081E96E97F008204EA /* c_org_ortc_RTCStats.cpp */; }; + 00216EAC1E96E980008204EA /* c_org_ortc_RTCStatsProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E0A1E96E97F008204EA /* c_org_ortc_RTCStatsProvider.cpp */; }; + 00216EAD1E96E980008204EA /* c_org_ortc_RTCStatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E0C1E96E97F008204EA /* c_org_ortc_RTCStatsReport.cpp */; }; + 00216EAE1E96E980008204EA /* c_org_ortc_RTCStatsTypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E0E1E96E97F008204EA /* c_org_ortc_RTCStatsTypeSet.cpp */; }; + 00216EAF1E96E980008204EA /* c_org_ortc_Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E101E96E97F008204EA /* c_org_ortc_Settings.cpp */; }; + 00216EB01E96E980008204EA /* c_org_ortc_StringOrStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E121E96E97F008204EA /* c_org_ortc_StringOrStringList.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 00216CCD1E96E939008204EA /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 00216CCF1E96E939008204EA /* libortclib-c-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libortclib-c-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 00216CDC1E96E97F008204EA /* c_helpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_helpers.cpp; sourceTree = ""; }; + 00216CDD1E96E97F008204EA /* c_helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_helpers.h; sourceTree = ""; }; + 00216CDE1E96E97F008204EA /* c_org_ortc_adapter_MediaStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_MediaStream.cpp; sourceTree = ""; }; + 00216CDF1E96E97F008204EA /* c_org_ortc_adapter_MediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_MediaStream.h; sourceTree = ""; }; + 00216CE01E96E97F008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCAnswerOptions.cpp; sourceTree = ""; }; + 00216CE11E96E97F008204EA /* c_org_ortc_adapter_RTCAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCAnswerOptions.h; sourceTree = ""; }; + 00216CE21E96E97F008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCCapabilityOptions.cpp; sourceTree = ""; }; + 00216CE31E96E97F008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCCapabilityOptions.h; sourceTree = ""; }; + 00216CE41E96E97F008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCConfiguration.cpp; sourceTree = ""; }; + 00216CE51E96E97F008204EA /* c_org_ortc_adapter_RTCConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCConfiguration.h; sourceTree = ""; }; + 00216CE61E96E97F008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCIceCandidate.cpp; sourceTree = ""; }; + 00216CE71E96E97F008204EA /* c_org_ortc_adapter_RTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCIceCandidate.h; sourceTree = ""; }; + 00216CE81E96E97F008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp; sourceTree = ""; }; + 00216CE91E96E97F008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h; sourceTree = ""; }; + 00216CEA1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCOfferAnswerOptions.cpp; sourceTree = ""; }; + 00216CEB1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCOfferAnswerOptions.h; sourceTree = ""; }; + 00216CEC1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCOfferOptions.cpp; sourceTree = ""; }; + 00216CED1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCOfferOptions.h; sourceTree = ""; }; + 00216CEE1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCPeerConnection.cpp; sourceTree = ""; }; + 00216CEF1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCPeerConnection.h; sourceTree = ""; }; + 00216CF01E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp; sourceTree = ""; }; + 00216CF11E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h; sourceTree = ""; }; + 00216CF21E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp; sourceTree = ""; }; + 00216CF31E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCPeerConnectionIceEvent.h; sourceTree = ""; }; + 00216CF41E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescription.cpp; sourceTree = ""; }; + 00216CF51E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescription.h; sourceTree = ""; }; + 00216CF61E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp; sourceTree = ""; }; + 00216CF71E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h; sourceTree = ""; }; + 00216CF81E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp; sourceTree = ""; }; + 00216CF91E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h; sourceTree = ""; }; + 00216CFA1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp; sourceTree = ""; }; + 00216CFB1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionDescription.h; sourceTree = ""; }; + 00216CFC1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp; sourceTree = ""; }; + 00216CFD1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h; sourceTree = ""; }; + 00216CFE1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp; sourceTree = ""; }; + 00216CFF1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h; sourceTree = ""; }; + 00216D001E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp; sourceTree = ""; }; + 00216D011E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h; sourceTree = ""; }; + 00216D021E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp; sourceTree = ""; }; + 00216D031E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h; sourceTree = ""; }; + 00216D041E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp; sourceTree = ""; }; + 00216D051E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h; sourceTree = ""; }; + 00216D061E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp; sourceTree = ""; }; + 00216D071E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h; sourceTree = ""; }; + 00216D081E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp; sourceTree = ""; }; + 00216D091E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h; sourceTree = ""; }; + 00216D0A1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp; sourceTree = ""; }; + 00216D0B1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionTransport.h; sourceTree = ""; }; + 00216D0C1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp; sourceTree = ""; }; + 00216D0D1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h; sourceTree = ""; }; + 00216D0E1E96E97F008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCTrackEvent.cpp; sourceTree = ""; }; + 00216D0F1E96E97F008204EA /* c_org_ortc_adapter_RTCTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCTrackEvent.h; sourceTree = ""; }; + 00216D101E96E97F008204EA /* c_org_ortc_ConstrainBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainBoolean.cpp; sourceTree = ""; }; + 00216D111E96E97F008204EA /* c_org_ortc_ConstrainBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainBoolean.h; sourceTree = ""; }; + 00216D121E96E97F008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainBooleanParameters.cpp; sourceTree = ""; }; + 00216D131E96E97F008204EA /* c_org_ortc_ConstrainBooleanParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainBooleanParameters.h; sourceTree = ""; }; + 00216D141E96E97F008204EA /* c_org_ortc_ConstrainDouble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainDouble.cpp; sourceTree = ""; }; + 00216D151E96E97F008204EA /* c_org_ortc_ConstrainDouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainDouble.h; sourceTree = ""; }; + 00216D161E96E97F008204EA /* c_org_ortc_ConstrainDoubleRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainDoubleRange.cpp; sourceTree = ""; }; + 00216D171E96E97F008204EA /* c_org_ortc_ConstrainDoubleRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainDoubleRange.h; sourceTree = ""; }; + 00216D181E96E97F008204EA /* c_org_ortc_ConstrainLong.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainLong.cpp; sourceTree = ""; }; + 00216D191E96E97F008204EA /* c_org_ortc_ConstrainLong.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainLong.h; sourceTree = ""; }; + 00216D1A1E96E97F008204EA /* c_org_ortc_ConstrainLongRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainLongRange.cpp; sourceTree = ""; }; + 00216D1B1E96E97F008204EA /* c_org_ortc_ConstrainLongRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainLongRange.h; sourceTree = ""; }; + 00216D1C1E96E97F008204EA /* c_org_ortc_ConstrainString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainString.cpp; sourceTree = ""; }; + 00216D1D1E96E97F008204EA /* c_org_ortc_ConstrainString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainString.h; sourceTree = ""; }; + 00216D1E1E96E97F008204EA /* c_org_ortc_ConstrainStringParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainStringParameters.cpp; sourceTree = ""; }; + 00216D1F1E96E97F008204EA /* c_org_ortc_ConstrainStringParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainStringParameters.h; sourceTree = ""; }; + 00216D201E96E97F008204EA /* c_org_ortc_DoubleRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_DoubleRange.cpp; sourceTree = ""; }; + 00216D211E96E97F008204EA /* c_org_ortc_DoubleRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_DoubleRange.h; sourceTree = ""; }; + 00216D221E96E97F008204EA /* c_org_ortc_Error.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_Error.cpp; sourceTree = ""; }; + 00216D231E96E97F008204EA /* c_org_ortc_Error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_Error.h; sourceTree = ""; }; + 00216D241E96E97F008204EA /* c_org_ortc_ErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ErrorEvent.cpp; sourceTree = ""; }; + 00216D251E96E97F008204EA /* c_org_ortc_ErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ErrorEvent.h; sourceTree = ""; }; + 00216D261E96E97F008204EA /* c_org_ortc_Json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_Json.cpp; sourceTree = ""; }; + 00216D271E96E97F008204EA /* c_org_ortc_Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_Json.h; sourceTree = ""; }; + 00216D281E96E97F008204EA /* c_org_ortc_Logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_Logger.cpp; sourceTree = ""; }; + 00216D291E96E97F008204EA /* c_org_ortc_Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_Logger.h; sourceTree = ""; }; + 00216D2A1E96E97F008204EA /* c_org_ortc_LongRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_LongRange.cpp; sourceTree = ""; }; + 00216D2B1E96E97F008204EA /* c_org_ortc_LongRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_LongRange.h; sourceTree = ""; }; + 00216D2C1E96E97F008204EA /* c_org_ortc_MediaControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaControl.cpp; sourceTree = ""; }; + 00216D2D1E96E97F008204EA /* c_org_ortc_MediaControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaControl.h; sourceTree = ""; }; + 00216D2E1E96E97F008204EA /* c_org_ortc_MediaDeviceInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaDeviceInfo.cpp; sourceTree = ""; }; + 00216D2F1E96E97F008204EA /* c_org_ortc_MediaDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaDeviceInfo.h; sourceTree = ""; }; + 00216D301E96E97F008204EA /* c_org_ortc_MediaDevices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaDevices.cpp; sourceTree = ""; }; + 00216D311E96E97F008204EA /* c_org_ortc_MediaDevices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaDevices.h; sourceTree = ""; }; + 00216D321E96E97F008204EA /* c_org_ortc_MediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaSource.cpp; sourceTree = ""; }; + 00216D331E96E97F008204EA /* c_org_ortc_MediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaSource.h; sourceTree = ""; }; + 00216D341E96E97F008204EA /* c_org_ortc_MediaStreamConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaStreamConstraints.cpp; sourceTree = ""; }; + 00216D351E96E97F008204EA /* c_org_ortc_MediaStreamConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaStreamConstraints.h; sourceTree = ""; }; + 00216D361E96E97F008204EA /* c_org_ortc_MediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaStreamTrack.cpp; sourceTree = ""; }; + 00216D371E96E97F008204EA /* c_org_ortc_MediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaStreamTrack.h; sourceTree = ""; }; + 00216D381E96E97F008204EA /* c_org_ortc_MediaTrackCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackCapabilities.cpp; sourceTree = ""; }; + 00216D391E96E97F008204EA /* c_org_ortc_MediaTrackCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackCapabilities.h; sourceTree = ""; }; + 00216D3A1E96E97F008204EA /* c_org_ortc_MediaTrackConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackConstraints.cpp; sourceTree = ""; }; + 00216D3B1E96E97F008204EA /* c_org_ortc_MediaTrackConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackConstraints.h; sourceTree = ""; }; + 00216D3C1E96E97F008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackConstraintSet.cpp; sourceTree = ""; }; + 00216D3D1E96E97F008204EA /* c_org_ortc_MediaTrackConstraintSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackConstraintSet.h; sourceTree = ""; }; + 00216D3E1E96E97F008204EA /* c_org_ortc_MediaTrackSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackSettings.cpp; sourceTree = ""; }; + 00216D3F1E96E97F008204EA /* c_org_ortc_MediaTrackSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackSettings.h; sourceTree = ""; }; + 00216D401E96E97F008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackSupportedConstraints.cpp; sourceTree = ""; }; + 00216D411E96E97F008204EA /* c_org_ortc_MediaTrackSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackSupportedConstraints.h; sourceTree = ""; }; + 00216D421E96E97F008204EA /* c_org_ortc_MessageQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MessageQueue.cpp; sourceTree = ""; }; + 00216D431E96E97F008204EA /* c_org_ortc_MessageQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MessageQueue.h; sourceTree = ""; }; + 00216D441E96E97F008204EA /* c_org_ortc_OrtcLib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_OrtcLib.cpp; sourceTree = ""; }; + 00216D451E96E97F008204EA /* c_org_ortc_OrtcLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_OrtcLib.h; sourceTree = ""; }; + 00216D461E96E97F008204EA /* c_org_ortc_OverconstrainedError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_OverconstrainedError.cpp; sourceTree = ""; }; + 00216D471E96E97F008204EA /* c_org_ortc_OverconstrainedError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_OverconstrainedError.h; sourceTree = ""; }; + 00216D481E96E97F008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_OverconstrainedErrorEvent.cpp; sourceTree = ""; }; + 00216D491E96E97F008204EA /* c_org_ortc_OverconstrainedErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_OverconstrainedErrorEvent.h; sourceTree = ""; }; + 00216D4A1E96E97F008204EA /* c_org_ortc_RTCCertificate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCCertificate.cpp; sourceTree = ""; }; + 00216D4B1E96E97F008204EA /* c_org_ortc_RTCCertificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCCertificate.h; sourceTree = ""; }; + 00216D4C1E96E97F008204EA /* c_org_ortc_RTCCertificateStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCCertificateStats.cpp; sourceTree = ""; }; + 00216D4D1E96E97F008204EA /* c_org_ortc_RTCCertificateStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCCertificateStats.h; sourceTree = ""; }; + 00216D4E1E96E97F008204EA /* c_org_ortc_RTCCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCCodec.cpp; sourceTree = ""; }; + 00216D4F1E96E97F008204EA /* c_org_ortc_RTCCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCCodec.h; sourceTree = ""; }; + 00216D501E96E97F008204EA /* c_org_ortc_RTCDataChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannel.cpp; sourceTree = ""; }; + 00216D511E96E97F008204EA /* c_org_ortc_RTCDataChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannel.h; sourceTree = ""; }; + 00216D521E96E97F008204EA /* c_org_ortc_RTCDataChannelEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannelEvent.cpp; sourceTree = ""; }; + 00216D531E96E97F008204EA /* c_org_ortc_RTCDataChannelEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannelEvent.h; sourceTree = ""; }; + 00216D541E96E97F008204EA /* c_org_ortc_RTCDataChannelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannelParameters.cpp; sourceTree = ""; }; + 00216D551E96E97F008204EA /* c_org_ortc_RTCDataChannelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannelParameters.h; sourceTree = ""; }; + 00216D561E96E97F008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannelStateChangeEvent.cpp; sourceTree = ""; }; + 00216D571E96E97F008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannelStateChangeEvent.h; sourceTree = ""; }; + 00216D581E96E97F008204EA /* c_org_ortc_RTCDataChannelStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannelStats.cpp; sourceTree = ""; }; + 00216D591E96E97F008204EA /* c_org_ortc_RTCDataChannelStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannelStats.h; sourceTree = ""; }; + 00216D5A1E96E97F008204EA /* c_org_ortc_RTCDataTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataTransport.cpp; sourceTree = ""; }; + 00216D5B1E96E97F008204EA /* c_org_ortc_RTCDataTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataTransport.h; sourceTree = ""; }; + 00216D5C1E96E97F008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsCertificateBinary.cpp; sourceTree = ""; }; + 00216D5D1E96E97F008204EA /* c_org_ortc_RTCDtlsCertificateBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsCertificateBinary.h; sourceTree = ""; }; + 00216D5E1E96E97F008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsFingerprint.cpp; sourceTree = ""; }; + 00216D5F1E96E97F008204EA /* c_org_ortc_RTCDtlsFingerprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsFingerprint.h; sourceTree = ""; }; + 00216D601E96E97F008204EA /* c_org_ortc_RTCDtlsParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsParameters.cpp; sourceTree = ""; }; + 00216D611E96E97F008204EA /* c_org_ortc_RTCDtlsParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsParameters.h; sourceTree = ""; }; + 00216D621E96E97F008204EA /* c_org_ortc_RTCDtlsTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsTransport.cpp; sourceTree = ""; }; + 00216D631E96E97F008204EA /* c_org_ortc_RTCDtlsTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsTransport.h; sourceTree = ""; }; + 00216D641E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00216D651E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsTransportStateChangeEvent.h; sourceTree = ""; }; + 00216D661E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsTransportStats.cpp; sourceTree = ""; }; + 00216D671E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsTransportStats.h; sourceTree = ""; }; + 00216D681E96E97F008204EA /* c_org_ortc_RTCDtmfSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtmfSender.cpp; sourceTree = ""; }; + 00216D691E96E97F008204EA /* c_org_ortc_RTCDtmfSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtmfSender.h; sourceTree = ""; }; + 00216D6A1E96E97F008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtmfToneChangeEvent.cpp; sourceTree = ""; }; + 00216D6B1E96E97F008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtmfToneChangeEvent.h; sourceTree = ""; }; + 00216D6C1E96E97F008204EA /* c_org_ortc_RTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidate.cpp; sourceTree = ""; }; + 00216D6D1E96E97F008204EA /* c_org_ortc_RTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidate.h; sourceTree = ""; }; + 00216D6E1E96E97F008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidateAttributes.cpp; sourceTree = ""; }; + 00216D6F1E96E97F008204EA /* c_org_ortc_RTCIceCandidateAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidateAttributes.h; sourceTree = ""; }; + 00216D701E96E97F008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidateComplete.cpp; sourceTree = ""; }; + 00216D711E96E97F008204EA /* c_org_ortc_RTCIceCandidateComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidateComplete.h; sourceTree = ""; }; + 00216D721E96E97F008204EA /* c_org_ortc_RTCIceCandidatePair.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidatePair.cpp; sourceTree = ""; }; + 00216D731E96E97F008204EA /* c_org_ortc_RTCIceCandidatePair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidatePair.h; sourceTree = ""; }; + 00216D741E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidatePairChangeEvent.cpp; sourceTree = ""; }; + 00216D751E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidatePairChangeEvent.h; sourceTree = ""; }; + 00216D761E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidatePairStats.cpp; sourceTree = ""; }; + 00216D771E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidatePairStats.h; sourceTree = ""; }; + 00216D781E96E97F008204EA /* c_org_ortc_RTCIceGatherer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGatherer.cpp; sourceTree = ""; }; + 00216D791E96E97F008204EA /* c_org_ortc_RTCIceGatherer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGatherer.h; sourceTree = ""; }; + 00216D7A1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererCandidate.cpp; sourceTree = ""; }; + 00216D7B1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererCandidate.h; sourceTree = ""; }; + 00216D7C1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp; sourceTree = ""; }; + 00216D7D1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererCandidateCompleteEvent.h; sourceTree = ""; }; + 00216D7E1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererCandidateEvent.cpp; sourceTree = ""; }; + 00216D7F1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererCandidateEvent.h; sourceTree = ""; }; + 00216D801E96E97F008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererIceErrorEvent.cpp; sourceTree = ""; }; + 00216D811E96E97F008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererIceErrorEvent.h; sourceTree = ""; }; + 00216D821E96E97F008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererStateChangeEvent.cpp; sourceTree = ""; }; + 00216D831E96E97F008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererStateChangeEvent.h; sourceTree = ""; }; + 00216D841E96E97F008204EA /* c_org_ortc_RTCIceGathererStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererStats.cpp; sourceTree = ""; }; + 00216D851E96E97F008204EA /* c_org_ortc_RTCIceGathererStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererStats.h; sourceTree = ""; }; + 00216D861E96E97F008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGatherInterfacePolicy.cpp; sourceTree = ""; }; + 00216D871E96E97F008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGatherInterfacePolicy.h; sourceTree = ""; }; + 00216D881E96E97F008204EA /* c_org_ortc_RTCIceGatherOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGatherOptions.cpp; sourceTree = ""; }; + 00216D891E96E97F008204EA /* c_org_ortc_RTCIceGatherOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGatherOptions.h; sourceTree = ""; }; + 00216D8A1E96E97F008204EA /* c_org_ortc_RTCIceParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceParameters.cpp; sourceTree = ""; }; + 00216D8B1E96E97F008204EA /* c_org_ortc_RTCIceParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceParameters.h; sourceTree = ""; }; + 00216D8C1E96E97F008204EA /* c_org_ortc_RTCIceServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceServer.cpp; sourceTree = ""; }; + 00216D8D1E96E97F008204EA /* c_org_ortc_RTCIceServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceServer.h; sourceTree = ""; }; + 00216D8E1E96E97F008204EA /* c_org_ortc_RTCIceTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransport.cpp; sourceTree = ""; }; + 00216D8F1E96E97F008204EA /* c_org_ortc_RTCIceTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransport.h; sourceTree = ""; }; + 00216D901E96E97F008204EA /* c_org_ortc_RTCIceTransportController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransportController.cpp; sourceTree = ""; }; + 00216D911E96E97F008204EA /* c_org_ortc_RTCIceTransportController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransportController.h; sourceTree = ""; }; + 00216D921E96E97F008204EA /* c_org_ortc_RTCIceTransportOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransportOptions.cpp; sourceTree = ""; }; + 00216D931E96E97F008204EA /* c_org_ortc_RTCIceTransportOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransportOptions.h; sourceTree = ""; }; + 00216D941E96E97F008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00216D951E96E97F008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransportStateChangeEvent.h; sourceTree = ""; }; + 00216D961E96E97F008204EA /* c_org_ortc_RTCIceTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransportStats.cpp; sourceTree = ""; }; + 00216D971E96E97F008204EA /* c_org_ortc_RTCIceTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransportStats.h; sourceTree = ""; }; + 00216D981E96E97F008204EA /* c_org_ortc_RTCIdentity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIdentity.cpp; sourceTree = ""; }; + 00216D991E96E97F008204EA /* c_org_ortc_RTCIdentity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIdentity.h; sourceTree = ""; }; + 00216D9A1E96E97F008204EA /* c_org_ortc_RTCIdentityAssertion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIdentityAssertion.cpp; sourceTree = ""; }; + 00216D9B1E96E97F008204EA /* c_org_ortc_RTCIdentityAssertion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIdentityAssertion.h; sourceTree = ""; }; + 00216D9C1E96E97F008204EA /* c_org_ortc_RTCIdentityError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIdentityError.cpp; sourceTree = ""; }; + 00216D9D1E96E97F008204EA /* c_org_ortc_RTCIdentityError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIdentityError.h; sourceTree = ""; }; + 00216D9E1E96E97F008204EA /* c_org_ortc_RTCIdentityResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIdentityResult.cpp; sourceTree = ""; }; + 00216D9F1E96E97F008204EA /* c_org_ortc_RTCIdentityResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIdentityResult.h; sourceTree = ""; }; + 00216DA01E96E97F008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCInboundRtpStreamStats.cpp; sourceTree = ""; }; + 00216DA11E96E97F008204EA /* c_org_ortc_RTCInboundRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCInboundRtpStreamStats.h; sourceTree = ""; }; + 00216DA21E96E97F008204EA /* c_org_ortc_RTCMediaStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCMediaStreamStats.cpp; sourceTree = ""; }; + 00216DA31E96E97F008204EA /* c_org_ortc_RTCMediaStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCMediaStreamStats.h; sourceTree = ""; }; + 00216DA41E96E97F008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCMediaStreamTrackStats.cpp; sourceTree = ""; }; + 00216DA51E96E97F008204EA /* c_org_ortc_RTCMediaStreamTrackStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCMediaStreamTrackStats.h; sourceTree = ""; }; + 00216DA61E96E97F008204EA /* c_org_ortc_RTCMessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCMessageEvent.cpp; sourceTree = ""; }; + 00216DA71E96E97F008204EA /* c_org_ortc_RTCMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCMessageEvent.h; sourceTree = ""; }; + 00216DA81E96E97F008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCOutboundRtpStreamStats.cpp; sourceTree = ""; }; + 00216DA91E96E97F008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCOutboundRtpStreamStats.h; sourceTree = ""; }; + 00216DAA1E96E97F008204EA /* c_org_ortc_RTCRtcpFeedback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtcpFeedback.cpp; sourceTree = ""; }; + 00216DAB1E96E97F008204EA /* c_org_ortc_RTCRtcpFeedback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtcpFeedback.h; sourceTree = ""; }; + 00216DAC1E96E97F008204EA /* c_org_ortc_RTCRtcpParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtcpParameters.cpp; sourceTree = ""; }; + 00216DAD1E96E97F008204EA /* c_org_ortc_RTCRtcpParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtcpParameters.h; sourceTree = ""; }; + 00216DAE1E96E97F008204EA /* c_org_ortc_RTCRtcpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtcpTransport.cpp; sourceTree = ""; }; + 00216DAF1E96E97F008204EA /* c_org_ortc_RTCRtcpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtcpTransport.h; sourceTree = ""; }; + 00216DB01E96E97F008204EA /* c_org_ortc_RTCRtpCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCapabilities.cpp; sourceTree = ""; }; + 00216DB11E96E97F008204EA /* c_org_ortc_RTCRtpCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCapabilities.h; sourceTree = ""; }; + 00216DB21E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecCapability.cpp; sourceTree = ""; }; + 00216DB31E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecCapability.h; sourceTree = ""; }; + 00216DB41E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecCapabilityOptions.cpp; sourceTree = ""; }; + 00216DB51E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecCapabilityOptions.h; sourceTree = ""; }; + 00216DB61E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216DB71E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecCapabilityParameters.h; sourceTree = ""; }; + 00216DB81E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecParameters.cpp; sourceTree = ""; }; + 00216DB91E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecParameters.h; sourceTree = ""; }; + 00216DBA1E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecParameterSettings.cpp; sourceTree = ""; }; + 00216DBB1E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecParameterSettings.h; sourceTree = ""; }; + 00216DBC1E96E97F008204EA /* c_org_ortc_RTCRtpContributingSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpContributingSource.cpp; sourceTree = ""; }; + 00216DBD1E96E97F008204EA /* c_org_ortc_RTCRtpContributingSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpContributingSource.h; sourceTree = ""; }; + 00216DBE1E96E97F008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpEncodingParameters.cpp; sourceTree = ""; }; + 00216DBF1E96E97F008204EA /* c_org_ortc_RTCRtpEncodingParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpEncodingParameters.h; sourceTree = ""; }; + 00216DC01E96E97F008204EA /* c_org_ortc_RTCRtpFecParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpFecParameters.cpp; sourceTree = ""; }; + 00216DC11E96E97F008204EA /* c_org_ortc_RTCRtpFecParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpFecParameters.h; sourceTree = ""; }; + 00216DC21E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216DC31E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h; sourceTree = ""; }; + 00216DC41E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp; sourceTree = ""; }; + 00216DC51E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h; sourceTree = ""; }; + 00216DC61E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216DC71E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpH264CodecCapabilityParameters.h; sourceTree = ""; }; + 00216DC81E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpH264CodecParameterSettings.cpp; sourceTree = ""; }; + 00216DC91E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpH264CodecParameterSettings.h; sourceTree = ""; }; + 00216DCA1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpHeaderExtension.cpp; sourceTree = ""; }; + 00216DCB1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpHeaderExtension.h; sourceTree = ""; }; + 00216DCC1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpHeaderExtensionParameters.cpp; sourceTree = ""; }; + 00216DCD1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpHeaderExtensionParameters.h; sourceTree = ""; }; + 00216DCE1E96E97F008204EA /* c_org_ortc_RTCRtpListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpListener.cpp; sourceTree = ""; }; + 00216DCF1E96E97F008204EA /* c_org_ortc_RTCRtpListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpListener.h; sourceTree = ""; }; + 00216DD01E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp; sourceTree = ""; }; + 00216DD11E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h; sourceTree = ""; }; + 00216DD21E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216DD31E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h; sourceTree = ""; }; + 00216DD41E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp; sourceTree = ""; }; + 00216DD51E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpOpusCodecParameterSettings.h; sourceTree = ""; }; + 00216DD61E96E97F008204EA /* c_org_ortc_RTCRtpParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpParameters.cpp; sourceTree = ""; }; + 00216DD71E96E97F008204EA /* c_org_ortc_RTCRtpParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpParameters.h; sourceTree = ""; }; + 00216DD81E96E97F008204EA /* c_org_ortc_RTCRtpReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpReceiver.cpp; sourceTree = ""; }; + 00216DD91E96E97F008204EA /* c_org_ortc_RTCRtpReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpReceiver.h; sourceTree = ""; }; + 00216DDA1E96E97F008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpRedCodecParameterSettings.cpp; sourceTree = ""; }; + 00216DDB1E96E97F008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpRedCodecParameterSettings.h; sourceTree = ""; }; + 00216DDC1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216DDD1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h; sourceTree = ""; }; + 00216DDE1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp; sourceTree = ""; }; + 00216DDF1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpRtxCodecParameterSettings.h; sourceTree = ""; }; + 00216DE01E96E97F008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpRtxParameters.cpp; sourceTree = ""; }; + 00216DE11E96E97F008204EA /* c_org_ortc_RTCRtpRtxParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpRtxParameters.h; sourceTree = ""; }; + 00216DE21E96E97F008204EA /* c_org_ortc_RTCRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpSender.cpp; sourceTree = ""; }; + 00216DE31E96E97F008204EA /* c_org_ortc_RTCRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpSender.h; sourceTree = ""; }; + 00216DE41E96E97F008204EA /* c_org_ortc_RTCRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpStreamStats.cpp; sourceTree = ""; }; + 00216DE51E96E97F008204EA /* c_org_ortc_RTCRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpStreamStats.h; sourceTree = ""; }; + 00216DE61E96E97F008204EA /* c_org_ortc_RTCRtpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpTransport.cpp; sourceTree = ""; }; + 00216DE71E96E97F008204EA /* c_org_ortc_RTCRtpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpTransport.h; sourceTree = ""; }; + 00216DE81E96E97F008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpUnhandledEvent.cpp; sourceTree = ""; }; + 00216DE91E96E97F008204EA /* c_org_ortc_RTCRtpUnhandledEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpUnhandledEvent.h; sourceTree = ""; }; + 00216DEA1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216DEB1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h; sourceTree = ""; }; + 00216DEC1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp; sourceTree = ""; }; + 00216DED1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpVp8CodecParameterSettings.h; sourceTree = ""; }; + 00216DEE1E96E97F008204EA /* c_org_ortc_RTCSctpCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpCapabilities.cpp; sourceTree = ""; }; + 00216DEF1E96E97F008204EA /* c_org_ortc_RTCSctpCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpCapabilities.h; sourceTree = ""; }; + 00216DF01E96E97F008204EA /* c_org_ortc_RTCSctpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransport.cpp; sourceTree = ""; }; + 00216DF11E96E97F008204EA /* c_org_ortc_RTCSctpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransport.h; sourceTree = ""; }; + 00216DF21E96E97F008204EA /* c_org_ortc_RTCSctpTransportListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransportListener.cpp; sourceTree = ""; }; + 00216DF31E96E97F008204EA /* c_org_ortc_RTCSctpTransportListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransportListener.h; sourceTree = ""; }; + 00216DF41E96E97F008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransportListenerEvent.cpp; sourceTree = ""; }; + 00216DF51E96E97F008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransportListenerEvent.h; sourceTree = ""; }; + 00216DF61E96E97F008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00216DF71E96E97F008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransportStateChangeEvent.h; sourceTree = ""; }; + 00216DF81E96E97F008204EA /* c_org_ortc_RTCSctpTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransportStats.cpp; sourceTree = ""; }; + 00216DF91E96E97F008204EA /* c_org_ortc_RTCSctpTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransportStats.h; sourceTree = ""; }; + 00216DFA1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesCryptoParameters.cpp; sourceTree = ""; }; + 00216DFB1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesCryptoParameters.h; sourceTree = ""; }; + 00216DFC1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesKeyParameters.cpp; sourceTree = ""; }; + 00216DFD1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesKeyParameters.h; sourceTree = ""; }; + 00216DFE1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesParameters.cpp; sourceTree = ""; }; + 00216DFF1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesParameters.h; sourceTree = ""; }; + 00216E001E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesTransport.cpp; sourceTree = ""; }; + 00216E011E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesTransport.h; sourceTree = ""; }; + 00216E021E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp; sourceTree = ""; }; + 00216E031E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h; sourceTree = ""; }; + 00216E041E96E97F008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpTransportStats.cpp; sourceTree = ""; }; + 00216E051E96E97F008204EA /* c_org_ortc_RTCSrtpTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpTransportStats.h; sourceTree = ""; }; + 00216E061E96E97F008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSsrcConflictEvent.cpp; sourceTree = ""; }; + 00216E071E96E97F008204EA /* c_org_ortc_RTCSsrcConflictEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSsrcConflictEvent.h; sourceTree = ""; }; + 00216E081E96E97F008204EA /* c_org_ortc_RTCStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCStats.cpp; sourceTree = ""; }; + 00216E091E96E97F008204EA /* c_org_ortc_RTCStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCStats.h; sourceTree = ""; }; + 00216E0A1E96E97F008204EA /* c_org_ortc_RTCStatsProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCStatsProvider.cpp; sourceTree = ""; }; + 00216E0B1E96E97F008204EA /* c_org_ortc_RTCStatsProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCStatsProvider.h; sourceTree = ""; }; + 00216E0C1E96E97F008204EA /* c_org_ortc_RTCStatsReport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCStatsReport.cpp; sourceTree = ""; }; + 00216E0D1E96E97F008204EA /* c_org_ortc_RTCStatsReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCStatsReport.h; sourceTree = ""; }; + 00216E0E1E96E97F008204EA /* c_org_ortc_RTCStatsTypeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCStatsTypeSet.cpp; sourceTree = ""; }; + 00216E0F1E96E97F008204EA /* c_org_ortc_RTCStatsTypeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCStatsTypeSet.h; sourceTree = ""; }; + 00216E101E96E97F008204EA /* c_org_ortc_Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_Settings.cpp; sourceTree = ""; }; + 00216E111E96E97F008204EA /* c_org_ortc_Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_Settings.h; sourceTree = ""; }; + 00216E121E96E97F008204EA /* c_org_ortc_StringOrStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_StringOrStringList.cpp; sourceTree = ""; }; + 00216E131E96E97F008204EA /* c_org_ortc_StringOrStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_StringOrStringList.h; sourceTree = ""; }; + 00216E141E96E97F008204EA /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00216CCC1E96E939008204EA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00216CC61E96E939008204EA = { + isa = PBXGroup; + children = ( + 00216CDB1E96E97F008204EA /* c */, + 00216CD01E96E939008204EA /* Products */, + ); + sourceTree = ""; + }; + 00216CD01E96E939008204EA /* Products */ = { + isa = PBXGroup; + children = ( + 00216CCF1E96E939008204EA /* libortclib-c-ios.a */, + ); + name = Products; + sourceTree = ""; + }; + 00216CDB1E96E97F008204EA /* c */ = { + isa = PBXGroup; + children = ( + 00216CDC1E96E97F008204EA /* c_helpers.cpp */, + 00216CDD1E96E97F008204EA /* c_helpers.h */, + 00216CDE1E96E97F008204EA /* c_org_ortc_adapter_MediaStream.cpp */, + 00216CDF1E96E97F008204EA /* c_org_ortc_adapter_MediaStream.h */, + 00216CE01E96E97F008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp */, + 00216CE11E96E97F008204EA /* c_org_ortc_adapter_RTCAnswerOptions.h */, + 00216CE21E96E97F008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp */, + 00216CE31E96E97F008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.h */, + 00216CE41E96E97F008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp */, + 00216CE51E96E97F008204EA /* c_org_ortc_adapter_RTCConfiguration.h */, + 00216CE61E96E97F008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp */, + 00216CE71E96E97F008204EA /* c_org_ortc_adapter_RTCIceCandidate.h */, + 00216CE81E96E97F008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */, + 00216CE91E96E97F008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */, + 00216CEA1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp */, + 00216CEB1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.h */, + 00216CEC1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp */, + 00216CED1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferOptions.h */, + 00216CEE1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp */, + 00216CEF1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnection.h */, + 00216CF01E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */, + 00216CF11E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */, + 00216CF21E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */, + 00216CF31E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.h */, + 00216CF41E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp */, + 00216CF51E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescription.h */, + 00216CF61E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */, + 00216CF71E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */, + 00216CF81E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */, + 00216CF91E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */, + 00216CFA1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */, + 00216CFB1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.h */, + 00216CFC1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */, + 00216CFD1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */, + 00216CFE1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */, + 00216CFF1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */, + 00216D001E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */, + 00216D011E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */, + 00216D021E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */, + 00216D031E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */, + 00216D041E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */, + 00216D051E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */, + 00216D061E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */, + 00216D071E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */, + 00216D081E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */, + 00216D091E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */, + 00216D0A1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */, + 00216D0B1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.h */, + 00216D0C1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */, + 00216D0D1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */, + 00216D0E1E96E97F008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp */, + 00216D0F1E96E97F008204EA /* c_org_ortc_adapter_RTCTrackEvent.h */, + 00216D101E96E97F008204EA /* c_org_ortc_ConstrainBoolean.cpp */, + 00216D111E96E97F008204EA /* c_org_ortc_ConstrainBoolean.h */, + 00216D121E96E97F008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp */, + 00216D131E96E97F008204EA /* c_org_ortc_ConstrainBooleanParameters.h */, + 00216D141E96E97F008204EA /* c_org_ortc_ConstrainDouble.cpp */, + 00216D151E96E97F008204EA /* c_org_ortc_ConstrainDouble.h */, + 00216D161E96E97F008204EA /* c_org_ortc_ConstrainDoubleRange.cpp */, + 00216D171E96E97F008204EA /* c_org_ortc_ConstrainDoubleRange.h */, + 00216D181E96E97F008204EA /* c_org_ortc_ConstrainLong.cpp */, + 00216D191E96E97F008204EA /* c_org_ortc_ConstrainLong.h */, + 00216D1A1E96E97F008204EA /* c_org_ortc_ConstrainLongRange.cpp */, + 00216D1B1E96E97F008204EA /* c_org_ortc_ConstrainLongRange.h */, + 00216D1C1E96E97F008204EA /* c_org_ortc_ConstrainString.cpp */, + 00216D1D1E96E97F008204EA /* c_org_ortc_ConstrainString.h */, + 00216D1E1E96E97F008204EA /* c_org_ortc_ConstrainStringParameters.cpp */, + 00216D1F1E96E97F008204EA /* c_org_ortc_ConstrainStringParameters.h */, + 00216D201E96E97F008204EA /* c_org_ortc_DoubleRange.cpp */, + 00216D211E96E97F008204EA /* c_org_ortc_DoubleRange.h */, + 00216D221E96E97F008204EA /* c_org_ortc_Error.cpp */, + 00216D231E96E97F008204EA /* c_org_ortc_Error.h */, + 00216D241E96E97F008204EA /* c_org_ortc_ErrorEvent.cpp */, + 00216D251E96E97F008204EA /* c_org_ortc_ErrorEvent.h */, + 00216D261E96E97F008204EA /* c_org_ortc_Json.cpp */, + 00216D271E96E97F008204EA /* c_org_ortc_Json.h */, + 00216D281E96E97F008204EA /* c_org_ortc_Logger.cpp */, + 00216D291E96E97F008204EA /* c_org_ortc_Logger.h */, + 00216D2A1E96E97F008204EA /* c_org_ortc_LongRange.cpp */, + 00216D2B1E96E97F008204EA /* c_org_ortc_LongRange.h */, + 00216D2C1E96E97F008204EA /* c_org_ortc_MediaControl.cpp */, + 00216D2D1E96E97F008204EA /* c_org_ortc_MediaControl.h */, + 00216D2E1E96E97F008204EA /* c_org_ortc_MediaDeviceInfo.cpp */, + 00216D2F1E96E97F008204EA /* c_org_ortc_MediaDeviceInfo.h */, + 00216D301E96E97F008204EA /* c_org_ortc_MediaDevices.cpp */, + 00216D311E96E97F008204EA /* c_org_ortc_MediaDevices.h */, + 00216D321E96E97F008204EA /* c_org_ortc_MediaSource.cpp */, + 00216D331E96E97F008204EA /* c_org_ortc_MediaSource.h */, + 00216D341E96E97F008204EA /* c_org_ortc_MediaStreamConstraints.cpp */, + 00216D351E96E97F008204EA /* c_org_ortc_MediaStreamConstraints.h */, + 00216D361E96E97F008204EA /* c_org_ortc_MediaStreamTrack.cpp */, + 00216D371E96E97F008204EA /* c_org_ortc_MediaStreamTrack.h */, + 00216D381E96E97F008204EA /* c_org_ortc_MediaTrackCapabilities.cpp */, + 00216D391E96E97F008204EA /* c_org_ortc_MediaTrackCapabilities.h */, + 00216D3A1E96E97F008204EA /* c_org_ortc_MediaTrackConstraints.cpp */, + 00216D3B1E96E97F008204EA /* c_org_ortc_MediaTrackConstraints.h */, + 00216D3C1E96E97F008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp */, + 00216D3D1E96E97F008204EA /* c_org_ortc_MediaTrackConstraintSet.h */, + 00216D3E1E96E97F008204EA /* c_org_ortc_MediaTrackSettings.cpp */, + 00216D3F1E96E97F008204EA /* c_org_ortc_MediaTrackSettings.h */, + 00216D401E96E97F008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp */, + 00216D411E96E97F008204EA /* c_org_ortc_MediaTrackSupportedConstraints.h */, + 00216D421E96E97F008204EA /* c_org_ortc_MessageQueue.cpp */, + 00216D431E96E97F008204EA /* c_org_ortc_MessageQueue.h */, + 00216D441E96E97F008204EA /* c_org_ortc_OrtcLib.cpp */, + 00216D451E96E97F008204EA /* c_org_ortc_OrtcLib.h */, + 00216D461E96E97F008204EA /* c_org_ortc_OverconstrainedError.cpp */, + 00216D471E96E97F008204EA /* c_org_ortc_OverconstrainedError.h */, + 00216D481E96E97F008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp */, + 00216D491E96E97F008204EA /* c_org_ortc_OverconstrainedErrorEvent.h */, + 00216D4A1E96E97F008204EA /* c_org_ortc_RTCCertificate.cpp */, + 00216D4B1E96E97F008204EA /* c_org_ortc_RTCCertificate.h */, + 00216D4C1E96E97F008204EA /* c_org_ortc_RTCCertificateStats.cpp */, + 00216D4D1E96E97F008204EA /* c_org_ortc_RTCCertificateStats.h */, + 00216D4E1E96E97F008204EA /* c_org_ortc_RTCCodec.cpp */, + 00216D4F1E96E97F008204EA /* c_org_ortc_RTCCodec.h */, + 00216D501E96E97F008204EA /* c_org_ortc_RTCDataChannel.cpp */, + 00216D511E96E97F008204EA /* c_org_ortc_RTCDataChannel.h */, + 00216D521E96E97F008204EA /* c_org_ortc_RTCDataChannelEvent.cpp */, + 00216D531E96E97F008204EA /* c_org_ortc_RTCDataChannelEvent.h */, + 00216D541E96E97F008204EA /* c_org_ortc_RTCDataChannelParameters.cpp */, + 00216D551E96E97F008204EA /* c_org_ortc_RTCDataChannelParameters.h */, + 00216D561E96E97F008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp */, + 00216D571E96E97F008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.h */, + 00216D581E96E97F008204EA /* c_org_ortc_RTCDataChannelStats.cpp */, + 00216D591E96E97F008204EA /* c_org_ortc_RTCDataChannelStats.h */, + 00216D5A1E96E97F008204EA /* c_org_ortc_RTCDataTransport.cpp */, + 00216D5B1E96E97F008204EA /* c_org_ortc_RTCDataTransport.h */, + 00216D5C1E96E97F008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp */, + 00216D5D1E96E97F008204EA /* c_org_ortc_RTCDtlsCertificateBinary.h */, + 00216D5E1E96E97F008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp */, + 00216D5F1E96E97F008204EA /* c_org_ortc_RTCDtlsFingerprint.h */, + 00216D601E96E97F008204EA /* c_org_ortc_RTCDtlsParameters.cpp */, + 00216D611E96E97F008204EA /* c_org_ortc_RTCDtlsParameters.h */, + 00216D621E96E97F008204EA /* c_org_ortc_RTCDtlsTransport.cpp */, + 00216D631E96E97F008204EA /* c_org_ortc_RTCDtlsTransport.h */, + 00216D641E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */, + 00216D651E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.h */, + 00216D661E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp */, + 00216D671E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStats.h */, + 00216D681E96E97F008204EA /* c_org_ortc_RTCDtmfSender.cpp */, + 00216D691E96E97F008204EA /* c_org_ortc_RTCDtmfSender.h */, + 00216D6A1E96E97F008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp */, + 00216D6B1E96E97F008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.h */, + 00216D6C1E96E97F008204EA /* c_org_ortc_RTCIceCandidate.cpp */, + 00216D6D1E96E97F008204EA /* c_org_ortc_RTCIceCandidate.h */, + 00216D6E1E96E97F008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp */, + 00216D6F1E96E97F008204EA /* c_org_ortc_RTCIceCandidateAttributes.h */, + 00216D701E96E97F008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp */, + 00216D711E96E97F008204EA /* c_org_ortc_RTCIceCandidateComplete.h */, + 00216D721E96E97F008204EA /* c_org_ortc_RTCIceCandidatePair.cpp */, + 00216D731E96E97F008204EA /* c_org_ortc_RTCIceCandidatePair.h */, + 00216D741E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp */, + 00216D751E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.h */, + 00216D761E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp */, + 00216D771E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairStats.h */, + 00216D781E96E97F008204EA /* c_org_ortc_RTCIceGatherer.cpp */, + 00216D791E96E97F008204EA /* c_org_ortc_RTCIceGatherer.h */, + 00216D7A1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp */, + 00216D7B1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidate.h */, + 00216D7C1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */, + 00216D7D1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.h */, + 00216D7E1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp */, + 00216D7F1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.h */, + 00216D801E96E97F008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp */, + 00216D811E96E97F008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.h */, + 00216D821E96E97F008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp */, + 00216D831E96E97F008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.h */, + 00216D841E96E97F008204EA /* c_org_ortc_RTCIceGathererStats.cpp */, + 00216D851E96E97F008204EA /* c_org_ortc_RTCIceGathererStats.h */, + 00216D861E96E97F008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp */, + 00216D871E96E97F008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.h */, + 00216D881E96E97F008204EA /* c_org_ortc_RTCIceGatherOptions.cpp */, + 00216D891E96E97F008204EA /* c_org_ortc_RTCIceGatherOptions.h */, + 00216D8A1E96E97F008204EA /* c_org_ortc_RTCIceParameters.cpp */, + 00216D8B1E96E97F008204EA /* c_org_ortc_RTCIceParameters.h */, + 00216D8C1E96E97F008204EA /* c_org_ortc_RTCIceServer.cpp */, + 00216D8D1E96E97F008204EA /* c_org_ortc_RTCIceServer.h */, + 00216D8E1E96E97F008204EA /* c_org_ortc_RTCIceTransport.cpp */, + 00216D8F1E96E97F008204EA /* c_org_ortc_RTCIceTransport.h */, + 00216D901E96E97F008204EA /* c_org_ortc_RTCIceTransportController.cpp */, + 00216D911E96E97F008204EA /* c_org_ortc_RTCIceTransportController.h */, + 00216D921E96E97F008204EA /* c_org_ortc_RTCIceTransportOptions.cpp */, + 00216D931E96E97F008204EA /* c_org_ortc_RTCIceTransportOptions.h */, + 00216D941E96E97F008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp */, + 00216D951E96E97F008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.h */, + 00216D961E96E97F008204EA /* c_org_ortc_RTCIceTransportStats.cpp */, + 00216D971E96E97F008204EA /* c_org_ortc_RTCIceTransportStats.h */, + 00216D981E96E97F008204EA /* c_org_ortc_RTCIdentity.cpp */, + 00216D991E96E97F008204EA /* c_org_ortc_RTCIdentity.h */, + 00216D9A1E96E97F008204EA /* c_org_ortc_RTCIdentityAssertion.cpp */, + 00216D9B1E96E97F008204EA /* c_org_ortc_RTCIdentityAssertion.h */, + 00216D9C1E96E97F008204EA /* c_org_ortc_RTCIdentityError.cpp */, + 00216D9D1E96E97F008204EA /* c_org_ortc_RTCIdentityError.h */, + 00216D9E1E96E97F008204EA /* c_org_ortc_RTCIdentityResult.cpp */, + 00216D9F1E96E97F008204EA /* c_org_ortc_RTCIdentityResult.h */, + 00216DA01E96E97F008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp */, + 00216DA11E96E97F008204EA /* c_org_ortc_RTCInboundRtpStreamStats.h */, + 00216DA21E96E97F008204EA /* c_org_ortc_RTCMediaStreamStats.cpp */, + 00216DA31E96E97F008204EA /* c_org_ortc_RTCMediaStreamStats.h */, + 00216DA41E96E97F008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp */, + 00216DA51E96E97F008204EA /* c_org_ortc_RTCMediaStreamTrackStats.h */, + 00216DA61E96E97F008204EA /* c_org_ortc_RTCMessageEvent.cpp */, + 00216DA71E96E97F008204EA /* c_org_ortc_RTCMessageEvent.h */, + 00216DA81E96E97F008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp */, + 00216DA91E96E97F008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.h */, + 00216DAA1E96E97F008204EA /* c_org_ortc_RTCRtcpFeedback.cpp */, + 00216DAB1E96E97F008204EA /* c_org_ortc_RTCRtcpFeedback.h */, + 00216DAC1E96E97F008204EA /* c_org_ortc_RTCRtcpParameters.cpp */, + 00216DAD1E96E97F008204EA /* c_org_ortc_RTCRtcpParameters.h */, + 00216DAE1E96E97F008204EA /* c_org_ortc_RTCRtcpTransport.cpp */, + 00216DAF1E96E97F008204EA /* c_org_ortc_RTCRtcpTransport.h */, + 00216DB01E96E97F008204EA /* c_org_ortc_RTCRtpCapabilities.cpp */, + 00216DB11E96E97F008204EA /* c_org_ortc_RTCRtpCapabilities.h */, + 00216DB21E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp */, + 00216DB31E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapability.h */, + 00216DB41E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp */, + 00216DB51E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.h */, + 00216DB61E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp */, + 00216DB71E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.h */, + 00216DB81E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp */, + 00216DB91E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameters.h */, + 00216DBA1E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp */, + 00216DBB1E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.h */, + 00216DBC1E96E97F008204EA /* c_org_ortc_RTCRtpContributingSource.cpp */, + 00216DBD1E96E97F008204EA /* c_org_ortc_RTCRtpContributingSource.h */, + 00216DBE1E96E97F008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp */, + 00216DBF1E96E97F008204EA /* c_org_ortc_RTCRtpEncodingParameters.h */, + 00216DC01E96E97F008204EA /* c_org_ortc_RTCRtpFecParameters.cpp */, + 00216DC11E96E97F008204EA /* c_org_ortc_RTCRtpFecParameters.h */, + 00216DC21E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */, + 00216DC31E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */, + 00216DC41E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */, + 00216DC51E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */, + 00216DC61E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */, + 00216DC71E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.h */, + 00216DC81E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp */, + 00216DC91E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.h */, + 00216DCA1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp */, + 00216DCB1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtension.h */, + 00216DCC1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp */, + 00216DCD1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.h */, + 00216DCE1E96E97F008204EA /* c_org_ortc_RTCRtpListener.cpp */, + 00216DCF1E96E97F008204EA /* c_org_ortc_RTCRtpListener.h */, + 00216DD01E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */, + 00216DD11E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */, + 00216DD21E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */, + 00216DD31E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */, + 00216DD41E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */, + 00216DD51E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.h */, + 00216DD61E96E97F008204EA /* c_org_ortc_RTCRtpParameters.cpp */, + 00216DD71E96E97F008204EA /* c_org_ortc_RTCRtpParameters.h */, + 00216DD81E96E97F008204EA /* c_org_ortc_RTCRtpReceiver.cpp */, + 00216DD91E96E97F008204EA /* c_org_ortc_RTCRtpReceiver.h */, + 00216DDA1E96E97F008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp */, + 00216DDB1E96E97F008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.h */, + 00216DDC1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */, + 00216DDD1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */, + 00216DDE1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */, + 00216DDF1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.h */, + 00216DE01E96E97F008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp */, + 00216DE11E96E97F008204EA /* c_org_ortc_RTCRtpRtxParameters.h */, + 00216DE21E96E97F008204EA /* c_org_ortc_RTCRtpSender.cpp */, + 00216DE31E96E97F008204EA /* c_org_ortc_RTCRtpSender.h */, + 00216DE41E96E97F008204EA /* c_org_ortc_RTCRtpStreamStats.cpp */, + 00216DE51E96E97F008204EA /* c_org_ortc_RTCRtpStreamStats.h */, + 00216DE61E96E97F008204EA /* c_org_ortc_RTCRtpTransport.cpp */, + 00216DE71E96E97F008204EA /* c_org_ortc_RTCRtpTransport.h */, + 00216DE81E96E97F008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp */, + 00216DE91E96E97F008204EA /* c_org_ortc_RTCRtpUnhandledEvent.h */, + 00216DEA1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */, + 00216DEB1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */, + 00216DEC1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */, + 00216DED1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.h */, + 00216DEE1E96E97F008204EA /* c_org_ortc_RTCSctpCapabilities.cpp */, + 00216DEF1E96E97F008204EA /* c_org_ortc_RTCSctpCapabilities.h */, + 00216DF01E96E97F008204EA /* c_org_ortc_RTCSctpTransport.cpp */, + 00216DF11E96E97F008204EA /* c_org_ortc_RTCSctpTransport.h */, + 00216DF21E96E97F008204EA /* c_org_ortc_RTCSctpTransportListener.cpp */, + 00216DF31E96E97F008204EA /* c_org_ortc_RTCSctpTransportListener.h */, + 00216DF41E96E97F008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp */, + 00216DF51E96E97F008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.h */, + 00216DF61E96E97F008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp */, + 00216DF71E96E97F008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.h */, + 00216DF81E96E97F008204EA /* c_org_ortc_RTCSctpTransportStats.cpp */, + 00216DF91E96E97F008204EA /* c_org_ortc_RTCSctpTransportStats.h */, + 00216DFA1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp */, + 00216DFB1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.h */, + 00216DFC1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp */, + 00216DFD1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.h */, + 00216DFE1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp */, + 00216DFF1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesParameters.h */, + 00216E001E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp */, + 00216E011E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransport.h */, + 00216E021E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */, + 00216E031E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */, + 00216E041E96E97F008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp */, + 00216E051E96E97F008204EA /* c_org_ortc_RTCSrtpTransportStats.h */, + 00216E061E96E97F008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp */, + 00216E071E96E97F008204EA /* c_org_ortc_RTCSsrcConflictEvent.h */, + 00216E081E96E97F008204EA /* c_org_ortc_RTCStats.cpp */, + 00216E091E96E97F008204EA /* c_org_ortc_RTCStats.h */, + 00216E0A1E96E97F008204EA /* c_org_ortc_RTCStatsProvider.cpp */, + 00216E0B1E96E97F008204EA /* c_org_ortc_RTCStatsProvider.h */, + 00216E0C1E96E97F008204EA /* c_org_ortc_RTCStatsReport.cpp */, + 00216E0D1E96E97F008204EA /* c_org_ortc_RTCStatsReport.h */, + 00216E0E1E96E97F008204EA /* c_org_ortc_RTCStatsTypeSet.cpp */, + 00216E0F1E96E97F008204EA /* c_org_ortc_RTCStatsTypeSet.h */, + 00216E101E96E97F008204EA /* c_org_ortc_Settings.cpp */, + 00216E111E96E97F008204EA /* c_org_ortc_Settings.h */, + 00216E121E96E97F008204EA /* c_org_ortc_StringOrStringList.cpp */, + 00216E131E96E97F008204EA /* c_org_ortc_StringOrStringList.h */, + 00216E141E96E97F008204EA /* types.h */, + ); + name = c; + path = ../../../ortc/idl/wrapper/generated/c; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00216CCE1E96E939008204EA /* ortclib-c-ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00216CD81E96E939008204EA /* Build configuration list for PBXNativeTarget "ortclib-c-ios" */; + buildPhases = ( + 00216CCB1E96E939008204EA /* Sources */, + 00216CCC1E96E939008204EA /* Frameworks */, + 00216CCD1E96E939008204EA /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ortclib-c-ios"; + productName = "ortclib-c-ios"; + productReference = 00216CCF1E96E939008204EA /* libortclib-c-ios.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 00216CC71E96E939008204EA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Open Peer Foundation"; + TargetAttributes = { + 00216CCE1E96E939008204EA = { + CreatedOnToolsVersion = 8.3; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 00216CCA1E96E939008204EA /* Build configuration list for PBXProject "ortclib-c-ios" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 00216CC61E96E939008204EA; + productRefGroup = 00216CD01E96E939008204EA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 00216CCE1E96E939008204EA /* ortclib-c-ios */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 00216CCB1E96E939008204EA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00216E741E96E980008204EA /* c_org_ortc_RTCIdentityAssertion.cpp in Sources */, + 00216E2E1E96E97F008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp in Sources */, + 00216E6D1E96E980008204EA /* c_org_ortc_RTCIceServer.cpp in Sources */, + 00216E481E96E980008204EA /* c_org_ortc_MessageQueue.cpp in Sources */, + 00216E7A1E96E980008204EA /* c_org_ortc_RTCMessageEvent.cpp in Sources */, + 00216E5B1E96E980008204EA /* c_org_ortc_RTCDtmfSender.cpp in Sources */, + 00216EB01E96E980008204EA /* c_org_ortc_StringOrStringList.cpp in Sources */, + 00216E3D1E96E97F008204EA /* c_org_ortc_MediaControl.cpp in Sources */, + 00216EA01E96E980008204EA /* c_org_ortc_RTCSctpTransportListener.cpp in Sources */, + 00216E581E96E980008204EA /* c_org_ortc_RTCDtlsTransport.cpp in Sources */, + 00216E641E96E980008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp in Sources */, + 00216E591E96E980008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */, + 00216E411E96E980008204EA /* c_org_ortc_MediaStreamConstraints.cpp in Sources */, + 00216E811E96E980008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */, + 00216E871E96E980008204EA /* c_org_ortc_RTCRtpFecParameters.cpp in Sources */, + 00216E7B1E96E980008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */, + 00216E9C1E96E980008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */, + 00216E5F1E96E980008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp in Sources */, + 00216E281E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */, + 00216E3F1E96E980008204EA /* c_org_ortc_MediaDevices.cpp in Sources */, + 00216EA11E96E980008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */, + 00216E221E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */, + 00216E4A1E96E980008204EA /* c_org_ortc_OverconstrainedError.cpp in Sources */, + 00216E511E96E980008204EA /* c_org_ortc_RTCDataChannelParameters.cpp in Sources */, + 00216E7C1E96E980008204EA /* c_org_ortc_RTCRtcpFeedback.cpp in Sources */, + 00216EAB1E96E980008204EA /* c_org_ortc_RTCStats.cpp in Sources */, + 00216E2D1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */, + 00216E771E96E980008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */, + 00216E401E96E980008204EA /* c_org_ortc_MediaSource.cpp in Sources */, + 00216E711E96E980008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */, + 00216E891E96E980008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */, + 00216E3E1E96E980008204EA /* c_org_ortc_MediaDeviceInfo.cpp in Sources */, + 00216E5E1E96E980008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp in Sources */, + 00216E541E96E980008204EA /* c_org_ortc_RTCDataTransport.cpp in Sources */, + 00216E8E1E96E980008204EA /* c_org_ortc_RTCRtpListener.cpp in Sources */, + 00216E421E96E980008204EA /* c_org_ortc_MediaStreamTrack.cpp in Sources */, + 00216EA71E96E980008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp in Sources */, + 00216E501E96E980008204EA /* c_org_ortc_RTCDataChannelEvent.cpp in Sources */, + 00216E661E96E980008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */, + 00216E951E96E980008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */, + 00216E521E96E980008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */, + 00216E9F1E96E980008204EA /* c_org_ortc_RTCSctpTransport.cpp in Sources */, + 00216E7D1E96E980008204EA /* c_org_ortc_RTCRtcpParameters.cpp in Sources */, + 00216EA61E96E980008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp in Sources */, + 00216E971E96E980008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp in Sources */, + 00216E391E96E97F008204EA /* c_org_ortc_ErrorEvent.cpp in Sources */, + 00216E1D1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp in Sources */, + 00216E251E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */, + 00216E621E96E980008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp in Sources */, + 00216E1A1E96E97F008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp in Sources */, + 00216E6B1E96E980008204EA /* c_org_ortc_RTCIceGatherOptions.cpp in Sources */, + 00216EA41E96E980008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */, + 00216EAE1E96E980008204EA /* c_org_ortc_RTCStatsTypeSet.cpp in Sources */, + 00216E631E96E980008204EA /* c_org_ortc_RTCIceGatherer.cpp in Sources */, + 00216E161E96E97F008204EA /* c_org_ortc_adapter_MediaStream.cpp in Sources */, + 00216E1B1E96E97F008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */, + 00216E311E96E97F008204EA /* c_org_ortc_ConstrainDouble.cpp in Sources */, + 00216E301E96E97F008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp in Sources */, + 00216E371E96E97F008204EA /* c_org_ortc_DoubleRange.cpp in Sources */, + 00216E2F1E96E97F008204EA /* c_org_ortc_ConstrainBoolean.cpp in Sources */, + 00216E961E96E980008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */, + 00216E441E96E980008204EA /* c_org_ortc_MediaTrackConstraints.cpp in Sources */, + 00216E471E96E980008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */, + 00216E3B1E96E97F008204EA /* c_org_ortc_Logger.cpp in Sources */, + 00216E861E96E980008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp in Sources */, + 00216E431E96E980008204EA /* c_org_ortc_MediaTrackCapabilities.cpp in Sources */, + 00216E8D1E96E980008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */, + 00216E4F1E96E980008204EA /* c_org_ortc_RTCDataChannel.cpp in Sources */, + 00216E881E96E980008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */, + 00216E461E96E980008204EA /* c_org_ortc_MediaTrackSettings.cpp in Sources */, + 00216E4B1E96E980008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp in Sources */, + 00216E6A1E96E980008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */, + 00216E921E96E980008204EA /* c_org_ortc_RTCRtpParameters.cpp in Sources */, + 00216E8C1E96E980008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp in Sources */, + 00216E9B1E96E980008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */, + 00216E491E96E980008204EA /* c_org_ortc_OrtcLib.cpp in Sources */, + 00216E181E96E97F008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */, + 00216E8B1E96E980008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */, + 00216E6E1E96E980008204EA /* c_org_ortc_RTCIceTransport.cpp in Sources */, + 00216E4D1E96E980008204EA /* c_org_ortc_RTCCertificateStats.cpp in Sources */, + 00216E291E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */, + 00216E8A1E96E980008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */, + 00216E691E96E980008204EA /* c_org_ortc_RTCIceGathererStats.cpp in Sources */, + 00216E9D1E96E980008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */, + 00216E331E96E97F008204EA /* c_org_ortc_ConstrainLong.cpp in Sources */, + 00216E651E96E980008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */, + 00216E381E96E97F008204EA /* c_org_ortc_Error.cpp in Sources */, + 00216E3A1E96E97F008204EA /* c_org_ortc_Json.cpp in Sources */, + 00216E681E96E980008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */, + 00216E171E96E97F008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */, + 00216E8F1E96E980008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */, + 00216E201E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */, + 00216E801E96E980008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp in Sources */, + 00216E7F1E96E980008204EA /* c_org_ortc_RTCRtpCapabilities.cpp in Sources */, + 00216E751E96E980008204EA /* c_org_ortc_RTCIdentityError.cpp in Sources */, + 00216E831E96E980008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp in Sources */, + 00216E231E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */, + 00216EA91E96E980008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp in Sources */, + 00216E851E96E980008204EA /* c_org_ortc_RTCRtpContributingSource.cpp in Sources */, + 00216E7E1E96E980008204EA /* c_org_ortc_RTCRtcpTransport.cpp in Sources */, + 00216E9A1E96E980008204EA /* c_org_ortc_RTCRtpTransport.cpp in Sources */, + 00216E341E96E97F008204EA /* c_org_ortc_ConstrainLongRange.cpp in Sources */, + 00216E781E96E980008204EA /* c_org_ortc_RTCMediaStreamStats.cpp in Sources */, + 00216E2B1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */, + 00216EAC1E96E980008204EA /* c_org_ortc_RTCStatsProvider.cpp in Sources */, + 00216EAF1E96E980008204EA /* c_org_ortc_Settings.cpp in Sources */, + 00216EAD1E96E980008204EA /* c_org_ortc_RTCStatsReport.cpp in Sources */, + 00216EAA1E96E980008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp in Sources */, + 00216E551E96E980008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */, + 00216E821E96E980008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */, + 00216E941E96E980008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */, + 00216E351E96E97F008204EA /* c_org_ortc_ConstrainString.cpp in Sources */, + 00216E561E96E980008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp in Sources */, + 00216E2A1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */, + 00216E1C1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */, + 00216E4E1E96E980008204EA /* c_org_ortc_RTCCodec.cpp in Sources */, + 00216E9E1E96E980008204EA /* c_org_ortc_RTCSctpCapabilities.cpp in Sources */, + 00216E4C1E96E980008204EA /* c_org_ortc_RTCCertificate.cpp in Sources */, + 00216E5A1E96E980008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp in Sources */, + 00216E911E96E980008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */, + 00216E931E96E980008204EA /* c_org_ortc_RTCRtpReceiver.cpp in Sources */, + 00216E701E96E980008204EA /* c_org_ortc_RTCIceTransportOptions.cpp in Sources */, + 00216E611E96E980008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */, + 00216EA51E96E980008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */, + 00216EA21E96E980008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */, + 00216E321E96E97F008204EA /* c_org_ortc_ConstrainDoubleRange.cpp in Sources */, + 00216E5D1E96E980008204EA /* c_org_ortc_RTCIceCandidate.cpp in Sources */, + 00216EA31E96E980008204EA /* c_org_ortc_RTCSctpTransportStats.cpp in Sources */, + 00216E791E96E980008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */, + 00216E1F1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */, + 00216E151E96E97F008204EA /* c_helpers.cpp in Sources */, + 00216E761E96E980008204EA /* c_org_ortc_RTCIdentityResult.cpp in Sources */, + 00216E841E96E980008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */, + 00216E191E96E97F008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp in Sources */, + 00216E531E96E980008204EA /* c_org_ortc_RTCDataChannelStats.cpp in Sources */, + 00216EA81E96E980008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */, + 00216E721E96E980008204EA /* c_org_ortc_RTCIceTransportStats.cpp in Sources */, + 00216E6C1E96E980008204EA /* c_org_ortc_RTCIceParameters.cpp in Sources */, + 00216E2C1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */, + 00216E241E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */, + 00216E451E96E980008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp in Sources */, + 00216E901E96E980008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */, + 00216E991E96E980008204EA /* c_org_ortc_RTCRtpStreamStats.cpp in Sources */, + 00216E981E96E980008204EA /* c_org_ortc_RTCRtpSender.cpp in Sources */, + 00216E271E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */, + 00216E571E96E980008204EA /* c_org_ortc_RTCDtlsParameters.cpp in Sources */, + 00216E671E96E980008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */, + 00216E261E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */, + 00216E5C1E96E980008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */, + 00216E3C1E96E97F008204EA /* c_org_ortc_LongRange.cpp in Sources */, + 00216E601E96E980008204EA /* c_org_ortc_RTCIceCandidatePair.cpp in Sources */, + 00216E6F1E96E980008204EA /* c_org_ortc_RTCIceTransportController.cpp in Sources */, + 00216E361E96E97F008204EA /* c_org_ortc_ConstrainStringParameters.cpp in Sources */, + 00216E211E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp in Sources */, + 00216E731E96E980008204EA /* c_org_ortc_RTCIdentity.cpp in Sources */, + 00216E1E1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 00216CD61E96E939008204EA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../../../zsLib, + "../../../../zsLib-eventing", + ../../../.., + ); + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 00216CD71E96E939008204EA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../../../zsLib, + "../../../../zsLib-eventing", + ../../../.., + ); + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 00216CD91E96E939008204EA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 00216CDA1E96E939008204EA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00216CCA1E96E939008204EA /* Build configuration list for PBXProject "ortclib-c-ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00216CD61E96E939008204EA /* Debug */, + 00216CD71E96E939008204EA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 00216CD81E96E939008204EA /* Build configuration list for PBXNativeTarget "ortclib-c-ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00216CD91E96E939008204EA /* Debug */, + 00216CDA1E96E939008204EA /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 00216CC71E96E939008204EA /* Project object */; +} diff --git a/projects/xcode/ortclib-c-osx/ortclib-c-osx.xcodeproj/project.pbxproj b/projects/xcode/ortclib-c-osx/ortclib-c-osx.xcodeproj/project.pbxproj new file mode 100644 index 00000000..1e7ba39a --- /dev/null +++ b/projects/xcode/ortclib-c-osx/ortclib-c-osx.xcodeproj/project.pbxproj @@ -0,0 +1,1524 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 00216FFB1E970056008204EA /* c_helpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EC21E970056008204EA /* c_helpers.cpp */; }; + 00216FFC1E970056008204EA /* c_helpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EC31E970056008204EA /* c_helpers.h */; }; + 00216FFD1E970056008204EA /* c_org_ortc_adapter_MediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EC41E970056008204EA /* c_org_ortc_adapter_MediaStream.cpp */; }; + 00216FFE1E970056008204EA /* c_org_ortc_adapter_MediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EC51E970056008204EA /* c_org_ortc_adapter_MediaStream.h */; }; + 00216FFF1E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EC61E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp */; }; + 002170001E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EC71E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.h */; }; + 002170011E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EC81E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp */; }; + 002170021E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EC91E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.h */; }; + 002170031E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216ECA1E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp */; }; + 002170041E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216ECB1E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.h */; }; + 002170051E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216ECC1E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp */; }; + 002170061E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216ECD1E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.h */; }; + 002170071E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216ECE1E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */; }; + 002170081E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216ECF1E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */; }; + 002170091E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216ED01E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp */; }; + 0021700A1E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216ED11E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.h */; }; + 0021700B1E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216ED21E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp */; }; + 0021700C1E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216ED31E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.h */; }; + 0021700D1E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216ED41E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp */; }; + 0021700E1E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216ED51E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.h */; }; + 0021700F1E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216ED61E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */; }; + 002170101E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216ED71E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */; }; + 002170111E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216ED81E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */; }; + 002170121E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216ED91E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.h */; }; + 002170131E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EDA1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp */; }; + 002170141E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EDB1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.h */; }; + 002170151E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EDC1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */; }; + 002170161E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EDD1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */; }; + 002170171E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EDE1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */; }; + 002170181E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EDF1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */; }; + 002170191E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EE01E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */; }; + 0021701A1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EE11E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.h */; }; + 0021701B1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EE21E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */; }; + 0021701C1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EE31E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */; }; + 0021701D1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EE41E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */; }; + 0021701E1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EE51E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */; }; + 0021701F1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EE61E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */; }; + 002170201E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EE71E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */; }; + 002170211E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EE81E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */; }; + 002170221E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EE91E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */; }; + 002170231E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EEA1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */; }; + 002170241E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EEB1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */; }; + 002170251E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EEC1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */; }; + 002170261E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EED1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */; }; + 002170271E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EEE1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */; }; + 002170281E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EEF1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */; }; + 002170291E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EF01E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */; }; + 0021702A1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EF11E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.h */; }; + 0021702B1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EF21E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */; }; + 0021702C1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EF31E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */; }; + 0021702D1E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EF41E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp */; }; + 0021702E1E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EF51E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.h */; }; + 0021702F1E970056008204EA /* c_org_ortc_ConstrainBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EF61E970056008204EA /* c_org_ortc_ConstrainBoolean.cpp */; }; + 002170301E970056008204EA /* c_org_ortc_ConstrainBoolean.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EF71E970056008204EA /* c_org_ortc_ConstrainBoolean.h */; }; + 002170311E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EF81E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp */; }; + 002170321E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EF91E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.h */; }; + 002170331E970056008204EA /* c_org_ortc_ConstrainDouble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EFA1E970056008204EA /* c_org_ortc_ConstrainDouble.cpp */; }; + 002170341E970056008204EA /* c_org_ortc_ConstrainDouble.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EFB1E970056008204EA /* c_org_ortc_ConstrainDouble.h */; }; + 002170351E970056008204EA /* c_org_ortc_ConstrainDoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EFC1E970056008204EA /* c_org_ortc_ConstrainDoubleRange.cpp */; }; + 002170361E970056008204EA /* c_org_ortc_ConstrainDoubleRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EFD1E970056008204EA /* c_org_ortc_ConstrainDoubleRange.h */; }; + 002170371E970056008204EA /* c_org_ortc_ConstrainLong.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216EFE1E970056008204EA /* c_org_ortc_ConstrainLong.cpp */; }; + 002170381E970056008204EA /* c_org_ortc_ConstrainLong.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216EFF1E970056008204EA /* c_org_ortc_ConstrainLong.h */; }; + 002170391E970056008204EA /* c_org_ortc_ConstrainLongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F001E970056008204EA /* c_org_ortc_ConstrainLongRange.cpp */; }; + 0021703A1E970056008204EA /* c_org_ortc_ConstrainLongRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F011E970056008204EA /* c_org_ortc_ConstrainLongRange.h */; }; + 0021703B1E970056008204EA /* c_org_ortc_ConstrainString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F021E970056008204EA /* c_org_ortc_ConstrainString.cpp */; }; + 0021703C1E970056008204EA /* c_org_ortc_ConstrainString.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F031E970056008204EA /* c_org_ortc_ConstrainString.h */; }; + 0021703D1E970056008204EA /* c_org_ortc_ConstrainStringParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F041E970056008204EA /* c_org_ortc_ConstrainStringParameters.cpp */; }; + 0021703E1E970056008204EA /* c_org_ortc_ConstrainStringParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F051E970056008204EA /* c_org_ortc_ConstrainStringParameters.h */; }; + 0021703F1E970056008204EA /* c_org_ortc_DoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F061E970056008204EA /* c_org_ortc_DoubleRange.cpp */; }; + 002170401E970056008204EA /* c_org_ortc_DoubleRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F071E970056008204EA /* c_org_ortc_DoubleRange.h */; }; + 002170411E970056008204EA /* c_org_ortc_Error.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F081E970056008204EA /* c_org_ortc_Error.cpp */; }; + 002170421E970056008204EA /* c_org_ortc_Error.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F091E970056008204EA /* c_org_ortc_Error.h */; }; + 002170431E970056008204EA /* c_org_ortc_ErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F0A1E970056008204EA /* c_org_ortc_ErrorEvent.cpp */; }; + 002170441E970056008204EA /* c_org_ortc_ErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F0B1E970056008204EA /* c_org_ortc_ErrorEvent.h */; }; + 002170451E970056008204EA /* c_org_ortc_Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F0C1E970056008204EA /* c_org_ortc_Json.cpp */; }; + 002170461E970056008204EA /* c_org_ortc_Json.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F0D1E970056008204EA /* c_org_ortc_Json.h */; }; + 002170471E970056008204EA /* c_org_ortc_Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F0E1E970056008204EA /* c_org_ortc_Logger.cpp */; }; + 002170481E970056008204EA /* c_org_ortc_Logger.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F0F1E970056008204EA /* c_org_ortc_Logger.h */; }; + 002170491E970056008204EA /* c_org_ortc_LongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F101E970056008204EA /* c_org_ortc_LongRange.cpp */; }; + 0021704A1E970056008204EA /* c_org_ortc_LongRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F111E970056008204EA /* c_org_ortc_LongRange.h */; }; + 0021704B1E970056008204EA /* c_org_ortc_MediaControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F121E970056008204EA /* c_org_ortc_MediaControl.cpp */; }; + 0021704C1E970056008204EA /* c_org_ortc_MediaControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F131E970056008204EA /* c_org_ortc_MediaControl.h */; }; + 0021704D1E970056008204EA /* c_org_ortc_MediaDeviceInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F141E970056008204EA /* c_org_ortc_MediaDeviceInfo.cpp */; }; + 0021704E1E970056008204EA /* c_org_ortc_MediaDeviceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F151E970056008204EA /* c_org_ortc_MediaDeviceInfo.h */; }; + 0021704F1E970056008204EA /* c_org_ortc_MediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F161E970056008204EA /* c_org_ortc_MediaDevices.cpp */; }; + 002170501E970056008204EA /* c_org_ortc_MediaDevices.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F171E970056008204EA /* c_org_ortc_MediaDevices.h */; }; + 002170511E970056008204EA /* c_org_ortc_MediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F181E970056008204EA /* c_org_ortc_MediaSource.cpp */; }; + 002170521E970056008204EA /* c_org_ortc_MediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F191E970056008204EA /* c_org_ortc_MediaSource.h */; }; + 002170531E970056008204EA /* c_org_ortc_MediaStreamConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F1A1E970056008204EA /* c_org_ortc_MediaStreamConstraints.cpp */; }; + 002170541E970056008204EA /* c_org_ortc_MediaStreamConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F1B1E970056008204EA /* c_org_ortc_MediaStreamConstraints.h */; }; + 002170551E970056008204EA /* c_org_ortc_MediaStreamTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F1C1E970056008204EA /* c_org_ortc_MediaStreamTrack.cpp */; }; + 002170561E970056008204EA /* c_org_ortc_MediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F1D1E970056008204EA /* c_org_ortc_MediaStreamTrack.h */; }; + 002170571E970056008204EA /* c_org_ortc_MediaTrackCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F1E1E970056008204EA /* c_org_ortc_MediaTrackCapabilities.cpp */; }; + 002170581E970056008204EA /* c_org_ortc_MediaTrackCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F1F1E970056008204EA /* c_org_ortc_MediaTrackCapabilities.h */; }; + 002170591E970056008204EA /* c_org_ortc_MediaTrackConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F201E970056008204EA /* c_org_ortc_MediaTrackConstraints.cpp */; }; + 0021705A1E970056008204EA /* c_org_ortc_MediaTrackConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F211E970056008204EA /* c_org_ortc_MediaTrackConstraints.h */; }; + 0021705B1E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F221E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp */; }; + 0021705C1E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F231E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.h */; }; + 0021705D1E970056008204EA /* c_org_ortc_MediaTrackSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F241E970056008204EA /* c_org_ortc_MediaTrackSettings.cpp */; }; + 0021705E1E970056008204EA /* c_org_ortc_MediaTrackSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F251E970056008204EA /* c_org_ortc_MediaTrackSettings.h */; }; + 0021705F1E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F261E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp */; }; + 002170601E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F271E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.h */; }; + 002170611E970056008204EA /* c_org_ortc_MessageQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F281E970056008204EA /* c_org_ortc_MessageQueue.cpp */; }; + 002170621E970056008204EA /* c_org_ortc_MessageQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F291E970056008204EA /* c_org_ortc_MessageQueue.h */; }; + 002170631E970056008204EA /* c_org_ortc_OrtcLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F2A1E970056008204EA /* c_org_ortc_OrtcLib.cpp */; }; + 002170641E970056008204EA /* c_org_ortc_OrtcLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F2B1E970056008204EA /* c_org_ortc_OrtcLib.h */; }; + 002170651E970056008204EA /* c_org_ortc_OverconstrainedError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F2C1E970056008204EA /* c_org_ortc_OverconstrainedError.cpp */; }; + 002170661E970056008204EA /* c_org_ortc_OverconstrainedError.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F2D1E970056008204EA /* c_org_ortc_OverconstrainedError.h */; }; + 002170671E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F2E1E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp */; }; + 002170681E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F2F1E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.h */; }; + 002170691E970056008204EA /* c_org_ortc_RTCCertificate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F301E970056008204EA /* c_org_ortc_RTCCertificate.cpp */; }; + 0021706A1E970056008204EA /* c_org_ortc_RTCCertificate.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F311E970056008204EA /* c_org_ortc_RTCCertificate.h */; }; + 0021706B1E970056008204EA /* c_org_ortc_RTCCertificateStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F321E970056008204EA /* c_org_ortc_RTCCertificateStats.cpp */; }; + 0021706C1E970056008204EA /* c_org_ortc_RTCCertificateStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F331E970056008204EA /* c_org_ortc_RTCCertificateStats.h */; }; + 0021706D1E970056008204EA /* c_org_ortc_RTCCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F341E970056008204EA /* c_org_ortc_RTCCodec.cpp */; }; + 0021706E1E970056008204EA /* c_org_ortc_RTCCodec.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F351E970056008204EA /* c_org_ortc_RTCCodec.h */; }; + 0021706F1E970056008204EA /* c_org_ortc_RTCDataChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F361E970056008204EA /* c_org_ortc_RTCDataChannel.cpp */; }; + 002170701E970056008204EA /* c_org_ortc_RTCDataChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F371E970056008204EA /* c_org_ortc_RTCDataChannel.h */; }; + 002170711E970056008204EA /* c_org_ortc_RTCDataChannelEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F381E970056008204EA /* c_org_ortc_RTCDataChannelEvent.cpp */; }; + 002170721E970056008204EA /* c_org_ortc_RTCDataChannelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F391E970056008204EA /* c_org_ortc_RTCDataChannelEvent.h */; }; + 002170731E970056008204EA /* c_org_ortc_RTCDataChannelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F3A1E970056008204EA /* c_org_ortc_RTCDataChannelParameters.cpp */; }; + 002170741E970056008204EA /* c_org_ortc_RTCDataChannelParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F3B1E970056008204EA /* c_org_ortc_RTCDataChannelParameters.h */; }; + 002170751E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F3C1E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp */; }; + 002170761E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F3D1E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.h */; }; + 002170771E970056008204EA /* c_org_ortc_RTCDataChannelStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F3E1E970056008204EA /* c_org_ortc_RTCDataChannelStats.cpp */; }; + 002170781E970056008204EA /* c_org_ortc_RTCDataChannelStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F3F1E970056008204EA /* c_org_ortc_RTCDataChannelStats.h */; }; + 002170791E970056008204EA /* c_org_ortc_RTCDataTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F401E970056008204EA /* c_org_ortc_RTCDataTransport.cpp */; }; + 0021707A1E970056008204EA /* c_org_ortc_RTCDataTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F411E970056008204EA /* c_org_ortc_RTCDataTransport.h */; }; + 0021707B1E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F421E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp */; }; + 0021707C1E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F431E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.h */; }; + 0021707D1E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F441E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp */; }; + 0021707E1E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F451E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.h */; }; + 0021707F1E970056008204EA /* c_org_ortc_RTCDtlsParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F461E970056008204EA /* c_org_ortc_RTCDtlsParameters.cpp */; }; + 002170801E970056008204EA /* c_org_ortc_RTCDtlsParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F471E970056008204EA /* c_org_ortc_RTCDtlsParameters.h */; }; + 002170811E970056008204EA /* c_org_ortc_RTCDtlsTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F481E970056008204EA /* c_org_ortc_RTCDtlsTransport.cpp */; }; + 002170821E970056008204EA /* c_org_ortc_RTCDtlsTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F491E970056008204EA /* c_org_ortc_RTCDtlsTransport.h */; }; + 002170831E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F4A1E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */; }; + 002170841E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F4B1E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.h */; }; + 002170851E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F4C1E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp */; }; + 002170861E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F4D1E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.h */; }; + 002170871E970056008204EA /* c_org_ortc_RTCDtmfSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F4E1E970056008204EA /* c_org_ortc_RTCDtmfSender.cpp */; }; + 002170881E970056008204EA /* c_org_ortc_RTCDtmfSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F4F1E970056008204EA /* c_org_ortc_RTCDtmfSender.h */; }; + 002170891E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F501E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp */; }; + 0021708A1E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F511E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.h */; }; + 0021708B1E970056008204EA /* c_org_ortc_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F521E970056008204EA /* c_org_ortc_RTCIceCandidate.cpp */; }; + 0021708C1E970056008204EA /* c_org_ortc_RTCIceCandidate.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F531E970056008204EA /* c_org_ortc_RTCIceCandidate.h */; }; + 0021708D1E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F541E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp */; }; + 0021708E1E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F551E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.h */; }; + 0021708F1E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F561E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp */; }; + 002170901E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F571E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.h */; }; + 002170911E970056008204EA /* c_org_ortc_RTCIceCandidatePair.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F581E970056008204EA /* c_org_ortc_RTCIceCandidatePair.cpp */; }; + 002170921E970056008204EA /* c_org_ortc_RTCIceCandidatePair.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F591E970056008204EA /* c_org_ortc_RTCIceCandidatePair.h */; }; + 002170931E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F5A1E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp */; }; + 002170941E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F5B1E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.h */; }; + 002170951E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F5C1E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp */; }; + 002170961E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F5D1E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.h */; }; + 002170971E970056008204EA /* c_org_ortc_RTCIceGatherer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F5E1E970056008204EA /* c_org_ortc_RTCIceGatherer.cpp */; }; + 002170981E970056008204EA /* c_org_ortc_RTCIceGatherer.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F5F1E970056008204EA /* c_org_ortc_RTCIceGatherer.h */; }; + 002170991E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F601E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp */; }; + 0021709A1E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F611E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.h */; }; + 0021709B1E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F621E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */; }; + 0021709C1E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F631E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.h */; }; + 0021709D1E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F641E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp */; }; + 0021709E1E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F651E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.h */; }; + 0021709F1E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F661E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp */; }; + 002170A01E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F671E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.h */; }; + 002170A11E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F681E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp */; }; + 002170A21E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F691E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.h */; }; + 002170A31E970056008204EA /* c_org_ortc_RTCIceGathererStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F6A1E970056008204EA /* c_org_ortc_RTCIceGathererStats.cpp */; }; + 002170A41E970056008204EA /* c_org_ortc_RTCIceGathererStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F6B1E970056008204EA /* c_org_ortc_RTCIceGathererStats.h */; }; + 002170A51E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F6C1E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp */; }; + 002170A61E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F6D1E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.h */; }; + 002170A71E970056008204EA /* c_org_ortc_RTCIceGatherOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F6E1E970056008204EA /* c_org_ortc_RTCIceGatherOptions.cpp */; }; + 002170A81E970056008204EA /* c_org_ortc_RTCIceGatherOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F6F1E970056008204EA /* c_org_ortc_RTCIceGatherOptions.h */; }; + 002170A91E970056008204EA /* c_org_ortc_RTCIceParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F701E970056008204EA /* c_org_ortc_RTCIceParameters.cpp */; }; + 002170AA1E970056008204EA /* c_org_ortc_RTCIceParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F711E970056008204EA /* c_org_ortc_RTCIceParameters.h */; }; + 002170AB1E970056008204EA /* c_org_ortc_RTCIceServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F721E970056008204EA /* c_org_ortc_RTCIceServer.cpp */; }; + 002170AC1E970056008204EA /* c_org_ortc_RTCIceServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F731E970056008204EA /* c_org_ortc_RTCIceServer.h */; }; + 002170AD1E970056008204EA /* c_org_ortc_RTCIceTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F741E970056008204EA /* c_org_ortc_RTCIceTransport.cpp */; }; + 002170AE1E970056008204EA /* c_org_ortc_RTCIceTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F751E970056008204EA /* c_org_ortc_RTCIceTransport.h */; }; + 002170AF1E970056008204EA /* c_org_ortc_RTCIceTransportController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F761E970056008204EA /* c_org_ortc_RTCIceTransportController.cpp */; }; + 002170B01E970056008204EA /* c_org_ortc_RTCIceTransportController.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F771E970056008204EA /* c_org_ortc_RTCIceTransportController.h */; }; + 002170B11E970056008204EA /* c_org_ortc_RTCIceTransportOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F781E970056008204EA /* c_org_ortc_RTCIceTransportOptions.cpp */; }; + 002170B21E970056008204EA /* c_org_ortc_RTCIceTransportOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F791E970056008204EA /* c_org_ortc_RTCIceTransportOptions.h */; }; + 002170B31E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F7A1E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp */; }; + 002170B41E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F7B1E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.h */; }; + 002170B51E970056008204EA /* c_org_ortc_RTCIceTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F7C1E970056008204EA /* c_org_ortc_RTCIceTransportStats.cpp */; }; + 002170B61E970056008204EA /* c_org_ortc_RTCIceTransportStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F7D1E970056008204EA /* c_org_ortc_RTCIceTransportStats.h */; }; + 002170B71E970056008204EA /* c_org_ortc_RTCIdentity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F7E1E970056008204EA /* c_org_ortc_RTCIdentity.cpp */; }; + 002170B81E970056008204EA /* c_org_ortc_RTCIdentity.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F7F1E970056008204EA /* c_org_ortc_RTCIdentity.h */; }; + 002170B91E970056008204EA /* c_org_ortc_RTCIdentityAssertion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F801E970056008204EA /* c_org_ortc_RTCIdentityAssertion.cpp */; }; + 002170BA1E970056008204EA /* c_org_ortc_RTCIdentityAssertion.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F811E970056008204EA /* c_org_ortc_RTCIdentityAssertion.h */; }; + 002170BB1E970056008204EA /* c_org_ortc_RTCIdentityError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F821E970056008204EA /* c_org_ortc_RTCIdentityError.cpp */; }; + 002170BC1E970056008204EA /* c_org_ortc_RTCIdentityError.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F831E970056008204EA /* c_org_ortc_RTCIdentityError.h */; }; + 002170BD1E970056008204EA /* c_org_ortc_RTCIdentityResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F841E970056008204EA /* c_org_ortc_RTCIdentityResult.cpp */; }; + 002170BE1E970056008204EA /* c_org_ortc_RTCIdentityResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F851E970056008204EA /* c_org_ortc_RTCIdentityResult.h */; }; + 002170BF1E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F861E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp */; }; + 002170C01E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F871E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.h */; }; + 002170C11E970056008204EA /* c_org_ortc_RTCMediaStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F881E970056008204EA /* c_org_ortc_RTCMediaStreamStats.cpp */; }; + 002170C21E970056008204EA /* c_org_ortc_RTCMediaStreamStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F891E970056008204EA /* c_org_ortc_RTCMediaStreamStats.h */; }; + 002170C31E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F8A1E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp */; }; + 002170C41E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F8B1E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.h */; }; + 002170C51E970056008204EA /* c_org_ortc_RTCMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F8C1E970056008204EA /* c_org_ortc_RTCMessageEvent.cpp */; }; + 002170C61E970056008204EA /* c_org_ortc_RTCMessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F8D1E970056008204EA /* c_org_ortc_RTCMessageEvent.h */; }; + 002170C71E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F8E1E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp */; }; + 002170C81E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F8F1E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.h */; }; + 002170C91E970056008204EA /* c_org_ortc_RTCRtcpFeedback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F901E970056008204EA /* c_org_ortc_RTCRtcpFeedback.cpp */; }; + 002170CA1E970056008204EA /* c_org_ortc_RTCRtcpFeedback.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F911E970056008204EA /* c_org_ortc_RTCRtcpFeedback.h */; }; + 002170CB1E970056008204EA /* c_org_ortc_RTCRtcpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F921E970056008204EA /* c_org_ortc_RTCRtcpParameters.cpp */; }; + 002170CC1E970056008204EA /* c_org_ortc_RTCRtcpParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F931E970056008204EA /* c_org_ortc_RTCRtcpParameters.h */; }; + 002170CD1E970056008204EA /* c_org_ortc_RTCRtcpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F941E970056008204EA /* c_org_ortc_RTCRtcpTransport.cpp */; }; + 002170CE1E970056008204EA /* c_org_ortc_RTCRtcpTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F951E970056008204EA /* c_org_ortc_RTCRtcpTransport.h */; }; + 002170CF1E970056008204EA /* c_org_ortc_RTCRtpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F961E970056008204EA /* c_org_ortc_RTCRtpCapabilities.cpp */; }; + 002170D01E970056008204EA /* c_org_ortc_RTCRtpCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F971E970056008204EA /* c_org_ortc_RTCRtpCapabilities.h */; }; + 002170D11E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F981E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp */; }; + 002170D21E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F991E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.h */; }; + 002170D31E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F9A1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp */; }; + 002170D41E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F9B1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.h */; }; + 002170D51E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F9C1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp */; }; + 002170D61E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F9D1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.h */; }; + 002170D71E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216F9E1E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp */; }; + 002170D81E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216F9F1E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.h */; }; + 002170D91E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FA01E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp */; }; + 002170DA1E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FA11E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.h */; }; + 002170DB1E970056008204EA /* c_org_ortc_RTCRtpContributingSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FA21E970056008204EA /* c_org_ortc_RTCRtpContributingSource.cpp */; }; + 002170DC1E970056008204EA /* c_org_ortc_RTCRtpContributingSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FA31E970056008204EA /* c_org_ortc_RTCRtpContributingSource.h */; }; + 002170DD1E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FA41E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp */; }; + 002170DE1E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FA51E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.h */; }; + 002170DF1E970056008204EA /* c_org_ortc_RTCRtpFecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FA61E970056008204EA /* c_org_ortc_RTCRtpFecParameters.cpp */; }; + 002170E01E970056008204EA /* c_org_ortc_RTCRtpFecParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FA71E970056008204EA /* c_org_ortc_RTCRtpFecParameters.h */; }; + 002170E11E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FA81E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */; }; + 002170E21E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FA91E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */; }; + 002170E31E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FAA1E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */; }; + 002170E41E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FAB1E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */; }; + 002170E51E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FAC1E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */; }; + 002170E61E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FAD1E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.h */; }; + 002170E71E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FAE1E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp */; }; + 002170E81E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FAF1E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.h */; }; + 002170E91E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FB01E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp */; }; + 002170EA1E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FB11E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.h */; }; + 002170EB1E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FB21E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp */; }; + 002170EC1E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FB31E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.h */; }; + 002170ED1E970056008204EA /* c_org_ortc_RTCRtpListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FB41E970056008204EA /* c_org_ortc_RTCRtpListener.cpp */; }; + 002170EE1E970056008204EA /* c_org_ortc_RTCRtpListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FB51E970056008204EA /* c_org_ortc_RTCRtpListener.h */; }; + 002170EF1E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FB61E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */; }; + 002170F01E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FB71E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */; }; + 002170F11E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FB81E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */; }; + 002170F21E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FB91E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */; }; + 002170F31E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FBA1E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */; }; + 002170F41E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FBB1E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.h */; }; + 002170F51E970056008204EA /* c_org_ortc_RTCRtpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FBC1E970056008204EA /* c_org_ortc_RTCRtpParameters.cpp */; }; + 002170F61E970056008204EA /* c_org_ortc_RTCRtpParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FBD1E970056008204EA /* c_org_ortc_RTCRtpParameters.h */; }; + 002170F71E970056008204EA /* c_org_ortc_RTCRtpReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FBE1E970056008204EA /* c_org_ortc_RTCRtpReceiver.cpp */; }; + 002170F81E970056008204EA /* c_org_ortc_RTCRtpReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FBF1E970056008204EA /* c_org_ortc_RTCRtpReceiver.h */; }; + 002170F91E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FC01E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp */; }; + 002170FA1E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FC11E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.h */; }; + 002170FB1E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FC21E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */; }; + 002170FC1E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FC31E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */; }; + 002170FD1E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FC41E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */; }; + 002170FE1E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FC51E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.h */; }; + 002170FF1E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FC61E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp */; }; + 002171001E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FC71E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.h */; }; + 002171011E970056008204EA /* c_org_ortc_RTCRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FC81E970056008204EA /* c_org_ortc_RTCRtpSender.cpp */; }; + 002171021E970056008204EA /* c_org_ortc_RTCRtpSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FC91E970056008204EA /* c_org_ortc_RTCRtpSender.h */; }; + 002171031E970056008204EA /* c_org_ortc_RTCRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FCA1E970056008204EA /* c_org_ortc_RTCRtpStreamStats.cpp */; }; + 002171041E970056008204EA /* c_org_ortc_RTCRtpStreamStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FCB1E970056008204EA /* c_org_ortc_RTCRtpStreamStats.h */; }; + 002171051E970056008204EA /* c_org_ortc_RTCRtpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FCC1E970056008204EA /* c_org_ortc_RTCRtpTransport.cpp */; }; + 002171061E970056008204EA /* c_org_ortc_RTCRtpTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FCD1E970056008204EA /* c_org_ortc_RTCRtpTransport.h */; }; + 002171071E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FCE1E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp */; }; + 002171081E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FCF1E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.h */; }; + 002171091E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FD01E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */; }; + 0021710A1E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FD11E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */; }; + 0021710B1E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FD21E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */; }; + 0021710C1E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FD31E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.h */; }; + 0021710D1E970056008204EA /* c_org_ortc_RTCSctpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FD41E970056008204EA /* c_org_ortc_RTCSctpCapabilities.cpp */; }; + 0021710E1E970056008204EA /* c_org_ortc_RTCSctpCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FD51E970056008204EA /* c_org_ortc_RTCSctpCapabilities.h */; }; + 0021710F1E970056008204EA /* c_org_ortc_RTCSctpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FD61E970056008204EA /* c_org_ortc_RTCSctpTransport.cpp */; }; + 002171101E970056008204EA /* c_org_ortc_RTCSctpTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FD71E970056008204EA /* c_org_ortc_RTCSctpTransport.h */; }; + 002171111E970056008204EA /* c_org_ortc_RTCSctpTransportListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FD81E970056008204EA /* c_org_ortc_RTCSctpTransportListener.cpp */; }; + 002171121E970056008204EA /* c_org_ortc_RTCSctpTransportListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FD91E970056008204EA /* c_org_ortc_RTCSctpTransportListener.h */; }; + 002171131E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FDA1E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp */; }; + 002171141E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FDB1E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.h */; }; + 002171151E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FDC1E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp */; }; + 002171161E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FDD1E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.h */; }; + 002171171E970056008204EA /* c_org_ortc_RTCSctpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FDE1E970056008204EA /* c_org_ortc_RTCSctpTransportStats.cpp */; }; + 002171181E970056008204EA /* c_org_ortc_RTCSctpTransportStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FDF1E970056008204EA /* c_org_ortc_RTCSctpTransportStats.h */; }; + 002171191E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FE01E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp */; }; + 0021711A1E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FE11E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.h */; }; + 0021711B1E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FE21E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp */; }; + 0021711C1E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FE31E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.h */; }; + 0021711D1E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FE41E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp */; }; + 0021711E1E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FE51E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.h */; }; + 0021711F1E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FE61E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp */; }; + 002171201E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FE71E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.h */; }; + 002171211E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FE81E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */; }; + 002171221E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FE91E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */; }; + 002171231E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FEA1E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp */; }; + 002171241E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FEB1E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.h */; }; + 002171251E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FEC1E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp */; }; + 002171261E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FED1E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.h */; }; + 002171271E970056008204EA /* c_org_ortc_RTCStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FEE1E970056008204EA /* c_org_ortc_RTCStats.cpp */; }; + 002171281E970056008204EA /* c_org_ortc_RTCStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FEF1E970056008204EA /* c_org_ortc_RTCStats.h */; }; + 002171291E970056008204EA /* c_org_ortc_RTCStatsProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FF01E970056008204EA /* c_org_ortc_RTCStatsProvider.cpp */; }; + 0021712A1E970056008204EA /* c_org_ortc_RTCStatsProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FF11E970056008204EA /* c_org_ortc_RTCStatsProvider.h */; }; + 0021712B1E970056008204EA /* c_org_ortc_RTCStatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FF21E970056008204EA /* c_org_ortc_RTCStatsReport.cpp */; }; + 0021712C1E970056008204EA /* c_org_ortc_RTCStatsReport.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FF31E970056008204EA /* c_org_ortc_RTCStatsReport.h */; }; + 0021712D1E970056008204EA /* c_org_ortc_RTCStatsTypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FF41E970056008204EA /* c_org_ortc_RTCStatsTypeSet.cpp */; }; + 0021712E1E970056008204EA /* c_org_ortc_RTCStatsTypeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FF51E970056008204EA /* c_org_ortc_RTCStatsTypeSet.h */; }; + 0021712F1E970056008204EA /* c_org_ortc_Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FF61E970056008204EA /* c_org_ortc_Settings.cpp */; }; + 002171301E970056008204EA /* c_org_ortc_Settings.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FF71E970056008204EA /* c_org_ortc_Settings.h */; }; + 002171311E970056008204EA /* c_org_ortc_StringOrStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216FF81E970056008204EA /* c_org_ortc_StringOrStringList.cpp */; }; + 002171321E970056008204EA /* c_org_ortc_StringOrStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FF91E970056008204EA /* c_org_ortc_StringOrStringList.h */; }; + 002171331E970056008204EA /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = 00216FFA1E970056008204EA /* types.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 00216EBA1E970020008204EA /* libortclib-c-osx.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libortclib-c-osx.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + 00216EC21E970056008204EA /* c_helpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_helpers.cpp; sourceTree = ""; }; + 00216EC31E970056008204EA /* c_helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_helpers.h; sourceTree = ""; }; + 00216EC41E970056008204EA /* c_org_ortc_adapter_MediaStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_MediaStream.cpp; sourceTree = ""; }; + 00216EC51E970056008204EA /* c_org_ortc_adapter_MediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_MediaStream.h; sourceTree = ""; }; + 00216EC61E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCAnswerOptions.cpp; sourceTree = ""; }; + 00216EC71E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCAnswerOptions.h; sourceTree = ""; }; + 00216EC81E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCCapabilityOptions.cpp; sourceTree = ""; }; + 00216EC91E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCCapabilityOptions.h; sourceTree = ""; }; + 00216ECA1E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCConfiguration.cpp; sourceTree = ""; }; + 00216ECB1E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCConfiguration.h; sourceTree = ""; }; + 00216ECC1E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCIceCandidate.cpp; sourceTree = ""; }; + 00216ECD1E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCIceCandidate.h; sourceTree = ""; }; + 00216ECE1E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp; sourceTree = ""; }; + 00216ECF1E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h; sourceTree = ""; }; + 00216ED01E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCOfferAnswerOptions.cpp; sourceTree = ""; }; + 00216ED11E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCOfferAnswerOptions.h; sourceTree = ""; }; + 00216ED21E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCOfferOptions.cpp; sourceTree = ""; }; + 00216ED31E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCOfferOptions.h; sourceTree = ""; }; + 00216ED41E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCPeerConnection.cpp; sourceTree = ""; }; + 00216ED51E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCPeerConnection.h; sourceTree = ""; }; + 00216ED61E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp; sourceTree = ""; }; + 00216ED71E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h; sourceTree = ""; }; + 00216ED81E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp; sourceTree = ""; }; + 00216ED91E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCPeerConnectionIceEvent.h; sourceTree = ""; }; + 00216EDA1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescription.cpp; sourceTree = ""; }; + 00216EDB1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescription.h; sourceTree = ""; }; + 00216EDC1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp; sourceTree = ""; }; + 00216EDD1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h; sourceTree = ""; }; + 00216EDE1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp; sourceTree = ""; }; + 00216EDF1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h; sourceTree = ""; }; + 00216EE01E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp; sourceTree = ""; }; + 00216EE11E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionDescription.h; sourceTree = ""; }; + 00216EE21E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp; sourceTree = ""; }; + 00216EE31E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h; sourceTree = ""; }; + 00216EE41E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp; sourceTree = ""; }; + 00216EE51E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h; sourceTree = ""; }; + 00216EE61E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp; sourceTree = ""; }; + 00216EE71E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h; sourceTree = ""; }; + 00216EE81E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp; sourceTree = ""; }; + 00216EE91E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h; sourceTree = ""; }; + 00216EEA1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp; sourceTree = ""; }; + 00216EEB1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h; sourceTree = ""; }; + 00216EEC1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp; sourceTree = ""; }; + 00216EED1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h; sourceTree = ""; }; + 00216EEE1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp; sourceTree = ""; }; + 00216EEF1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h; sourceTree = ""; }; + 00216EF01E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp; sourceTree = ""; }; + 00216EF11E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionTransport.h; sourceTree = ""; }; + 00216EF21E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp; sourceTree = ""; }; + 00216EF31E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h; sourceTree = ""; }; + 00216EF41E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_adapter_RTCTrackEvent.cpp; sourceTree = ""; }; + 00216EF51E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_adapter_RTCTrackEvent.h; sourceTree = ""; }; + 00216EF61E970056008204EA /* c_org_ortc_ConstrainBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainBoolean.cpp; sourceTree = ""; }; + 00216EF71E970056008204EA /* c_org_ortc_ConstrainBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainBoolean.h; sourceTree = ""; }; + 00216EF81E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainBooleanParameters.cpp; sourceTree = ""; }; + 00216EF91E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainBooleanParameters.h; sourceTree = ""; }; + 00216EFA1E970056008204EA /* c_org_ortc_ConstrainDouble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainDouble.cpp; sourceTree = ""; }; + 00216EFB1E970056008204EA /* c_org_ortc_ConstrainDouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainDouble.h; sourceTree = ""; }; + 00216EFC1E970056008204EA /* c_org_ortc_ConstrainDoubleRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainDoubleRange.cpp; sourceTree = ""; }; + 00216EFD1E970056008204EA /* c_org_ortc_ConstrainDoubleRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainDoubleRange.h; sourceTree = ""; }; + 00216EFE1E970056008204EA /* c_org_ortc_ConstrainLong.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainLong.cpp; sourceTree = ""; }; + 00216EFF1E970056008204EA /* c_org_ortc_ConstrainLong.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainLong.h; sourceTree = ""; }; + 00216F001E970056008204EA /* c_org_ortc_ConstrainLongRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainLongRange.cpp; sourceTree = ""; }; + 00216F011E970056008204EA /* c_org_ortc_ConstrainLongRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainLongRange.h; sourceTree = ""; }; + 00216F021E970056008204EA /* c_org_ortc_ConstrainString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainString.cpp; sourceTree = ""; }; + 00216F031E970056008204EA /* c_org_ortc_ConstrainString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainString.h; sourceTree = ""; }; + 00216F041E970056008204EA /* c_org_ortc_ConstrainStringParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ConstrainStringParameters.cpp; sourceTree = ""; }; + 00216F051E970056008204EA /* c_org_ortc_ConstrainStringParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ConstrainStringParameters.h; sourceTree = ""; }; + 00216F061E970056008204EA /* c_org_ortc_DoubleRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_DoubleRange.cpp; sourceTree = ""; }; + 00216F071E970056008204EA /* c_org_ortc_DoubleRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_DoubleRange.h; sourceTree = ""; }; + 00216F081E970056008204EA /* c_org_ortc_Error.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_Error.cpp; sourceTree = ""; }; + 00216F091E970056008204EA /* c_org_ortc_Error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_Error.h; sourceTree = ""; }; + 00216F0A1E970056008204EA /* c_org_ortc_ErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_ErrorEvent.cpp; sourceTree = ""; }; + 00216F0B1E970056008204EA /* c_org_ortc_ErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_ErrorEvent.h; sourceTree = ""; }; + 00216F0C1E970056008204EA /* c_org_ortc_Json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_Json.cpp; sourceTree = ""; }; + 00216F0D1E970056008204EA /* c_org_ortc_Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_Json.h; sourceTree = ""; }; + 00216F0E1E970056008204EA /* c_org_ortc_Logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_Logger.cpp; sourceTree = ""; }; + 00216F0F1E970056008204EA /* c_org_ortc_Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_Logger.h; sourceTree = ""; }; + 00216F101E970056008204EA /* c_org_ortc_LongRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_LongRange.cpp; sourceTree = ""; }; + 00216F111E970056008204EA /* c_org_ortc_LongRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_LongRange.h; sourceTree = ""; }; + 00216F121E970056008204EA /* c_org_ortc_MediaControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaControl.cpp; sourceTree = ""; }; + 00216F131E970056008204EA /* c_org_ortc_MediaControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaControl.h; sourceTree = ""; }; + 00216F141E970056008204EA /* c_org_ortc_MediaDeviceInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaDeviceInfo.cpp; sourceTree = ""; }; + 00216F151E970056008204EA /* c_org_ortc_MediaDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaDeviceInfo.h; sourceTree = ""; }; + 00216F161E970056008204EA /* c_org_ortc_MediaDevices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaDevices.cpp; sourceTree = ""; }; + 00216F171E970056008204EA /* c_org_ortc_MediaDevices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaDevices.h; sourceTree = ""; }; + 00216F181E970056008204EA /* c_org_ortc_MediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaSource.cpp; sourceTree = ""; }; + 00216F191E970056008204EA /* c_org_ortc_MediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaSource.h; sourceTree = ""; }; + 00216F1A1E970056008204EA /* c_org_ortc_MediaStreamConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaStreamConstraints.cpp; sourceTree = ""; }; + 00216F1B1E970056008204EA /* c_org_ortc_MediaStreamConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaStreamConstraints.h; sourceTree = ""; }; + 00216F1C1E970056008204EA /* c_org_ortc_MediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaStreamTrack.cpp; sourceTree = ""; }; + 00216F1D1E970056008204EA /* c_org_ortc_MediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaStreamTrack.h; sourceTree = ""; }; + 00216F1E1E970056008204EA /* c_org_ortc_MediaTrackCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackCapabilities.cpp; sourceTree = ""; }; + 00216F1F1E970056008204EA /* c_org_ortc_MediaTrackCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackCapabilities.h; sourceTree = ""; }; + 00216F201E970056008204EA /* c_org_ortc_MediaTrackConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackConstraints.cpp; sourceTree = ""; }; + 00216F211E970056008204EA /* c_org_ortc_MediaTrackConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackConstraints.h; sourceTree = ""; }; + 00216F221E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackConstraintSet.cpp; sourceTree = ""; }; + 00216F231E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackConstraintSet.h; sourceTree = ""; }; + 00216F241E970056008204EA /* c_org_ortc_MediaTrackSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackSettings.cpp; sourceTree = ""; }; + 00216F251E970056008204EA /* c_org_ortc_MediaTrackSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackSettings.h; sourceTree = ""; }; + 00216F261E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MediaTrackSupportedConstraints.cpp; sourceTree = ""; }; + 00216F271E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MediaTrackSupportedConstraints.h; sourceTree = ""; }; + 00216F281E970056008204EA /* c_org_ortc_MessageQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_MessageQueue.cpp; sourceTree = ""; }; + 00216F291E970056008204EA /* c_org_ortc_MessageQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_MessageQueue.h; sourceTree = ""; }; + 00216F2A1E970056008204EA /* c_org_ortc_OrtcLib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_OrtcLib.cpp; sourceTree = ""; }; + 00216F2B1E970056008204EA /* c_org_ortc_OrtcLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_OrtcLib.h; sourceTree = ""; }; + 00216F2C1E970056008204EA /* c_org_ortc_OverconstrainedError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_OverconstrainedError.cpp; sourceTree = ""; }; + 00216F2D1E970056008204EA /* c_org_ortc_OverconstrainedError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_OverconstrainedError.h; sourceTree = ""; }; + 00216F2E1E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_OverconstrainedErrorEvent.cpp; sourceTree = ""; }; + 00216F2F1E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_OverconstrainedErrorEvent.h; sourceTree = ""; }; + 00216F301E970056008204EA /* c_org_ortc_RTCCertificate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCCertificate.cpp; sourceTree = ""; }; + 00216F311E970056008204EA /* c_org_ortc_RTCCertificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCCertificate.h; sourceTree = ""; }; + 00216F321E970056008204EA /* c_org_ortc_RTCCertificateStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCCertificateStats.cpp; sourceTree = ""; }; + 00216F331E970056008204EA /* c_org_ortc_RTCCertificateStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCCertificateStats.h; sourceTree = ""; }; + 00216F341E970056008204EA /* c_org_ortc_RTCCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCCodec.cpp; sourceTree = ""; }; + 00216F351E970056008204EA /* c_org_ortc_RTCCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCCodec.h; sourceTree = ""; }; + 00216F361E970056008204EA /* c_org_ortc_RTCDataChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannel.cpp; sourceTree = ""; }; + 00216F371E970056008204EA /* c_org_ortc_RTCDataChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannel.h; sourceTree = ""; }; + 00216F381E970056008204EA /* c_org_ortc_RTCDataChannelEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannelEvent.cpp; sourceTree = ""; }; + 00216F391E970056008204EA /* c_org_ortc_RTCDataChannelEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannelEvent.h; sourceTree = ""; }; + 00216F3A1E970056008204EA /* c_org_ortc_RTCDataChannelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannelParameters.cpp; sourceTree = ""; }; + 00216F3B1E970056008204EA /* c_org_ortc_RTCDataChannelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannelParameters.h; sourceTree = ""; }; + 00216F3C1E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannelStateChangeEvent.cpp; sourceTree = ""; }; + 00216F3D1E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannelStateChangeEvent.h; sourceTree = ""; }; + 00216F3E1E970056008204EA /* c_org_ortc_RTCDataChannelStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataChannelStats.cpp; sourceTree = ""; }; + 00216F3F1E970056008204EA /* c_org_ortc_RTCDataChannelStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataChannelStats.h; sourceTree = ""; }; + 00216F401E970056008204EA /* c_org_ortc_RTCDataTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDataTransport.cpp; sourceTree = ""; }; + 00216F411E970056008204EA /* c_org_ortc_RTCDataTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDataTransport.h; sourceTree = ""; }; + 00216F421E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsCertificateBinary.cpp; sourceTree = ""; }; + 00216F431E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsCertificateBinary.h; sourceTree = ""; }; + 00216F441E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsFingerprint.cpp; sourceTree = ""; }; + 00216F451E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsFingerprint.h; sourceTree = ""; }; + 00216F461E970056008204EA /* c_org_ortc_RTCDtlsParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsParameters.cpp; sourceTree = ""; }; + 00216F471E970056008204EA /* c_org_ortc_RTCDtlsParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsParameters.h; sourceTree = ""; }; + 00216F481E970056008204EA /* c_org_ortc_RTCDtlsTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsTransport.cpp; sourceTree = ""; }; + 00216F491E970056008204EA /* c_org_ortc_RTCDtlsTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsTransport.h; sourceTree = ""; }; + 00216F4A1E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00216F4B1E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsTransportStateChangeEvent.h; sourceTree = ""; }; + 00216F4C1E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtlsTransportStats.cpp; sourceTree = ""; }; + 00216F4D1E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtlsTransportStats.h; sourceTree = ""; }; + 00216F4E1E970056008204EA /* c_org_ortc_RTCDtmfSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtmfSender.cpp; sourceTree = ""; }; + 00216F4F1E970056008204EA /* c_org_ortc_RTCDtmfSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtmfSender.h; sourceTree = ""; }; + 00216F501E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCDtmfToneChangeEvent.cpp; sourceTree = ""; }; + 00216F511E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCDtmfToneChangeEvent.h; sourceTree = ""; }; + 00216F521E970056008204EA /* c_org_ortc_RTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidate.cpp; sourceTree = ""; }; + 00216F531E970056008204EA /* c_org_ortc_RTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidate.h; sourceTree = ""; }; + 00216F541E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidateAttributes.cpp; sourceTree = ""; }; + 00216F551E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidateAttributes.h; sourceTree = ""; }; + 00216F561E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidateComplete.cpp; sourceTree = ""; }; + 00216F571E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidateComplete.h; sourceTree = ""; }; + 00216F581E970056008204EA /* c_org_ortc_RTCIceCandidatePair.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidatePair.cpp; sourceTree = ""; }; + 00216F591E970056008204EA /* c_org_ortc_RTCIceCandidatePair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidatePair.h; sourceTree = ""; }; + 00216F5A1E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidatePairChangeEvent.cpp; sourceTree = ""; }; + 00216F5B1E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidatePairChangeEvent.h; sourceTree = ""; }; + 00216F5C1E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceCandidatePairStats.cpp; sourceTree = ""; }; + 00216F5D1E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceCandidatePairStats.h; sourceTree = ""; }; + 00216F5E1E970056008204EA /* c_org_ortc_RTCIceGatherer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGatherer.cpp; sourceTree = ""; }; + 00216F5F1E970056008204EA /* c_org_ortc_RTCIceGatherer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGatherer.h; sourceTree = ""; }; + 00216F601E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererCandidate.cpp; sourceTree = ""; }; + 00216F611E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererCandidate.h; sourceTree = ""; }; + 00216F621E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp; sourceTree = ""; }; + 00216F631E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererCandidateCompleteEvent.h; sourceTree = ""; }; + 00216F641E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererCandidateEvent.cpp; sourceTree = ""; }; + 00216F651E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererCandidateEvent.h; sourceTree = ""; }; + 00216F661E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererIceErrorEvent.cpp; sourceTree = ""; }; + 00216F671E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererIceErrorEvent.h; sourceTree = ""; }; + 00216F681E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererStateChangeEvent.cpp; sourceTree = ""; }; + 00216F691E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererStateChangeEvent.h; sourceTree = ""; }; + 00216F6A1E970056008204EA /* c_org_ortc_RTCIceGathererStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGathererStats.cpp; sourceTree = ""; }; + 00216F6B1E970056008204EA /* c_org_ortc_RTCIceGathererStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGathererStats.h; sourceTree = ""; }; + 00216F6C1E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGatherInterfacePolicy.cpp; sourceTree = ""; }; + 00216F6D1E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGatherInterfacePolicy.h; sourceTree = ""; }; + 00216F6E1E970056008204EA /* c_org_ortc_RTCIceGatherOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceGatherOptions.cpp; sourceTree = ""; }; + 00216F6F1E970056008204EA /* c_org_ortc_RTCIceGatherOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceGatherOptions.h; sourceTree = ""; }; + 00216F701E970056008204EA /* c_org_ortc_RTCIceParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceParameters.cpp; sourceTree = ""; }; + 00216F711E970056008204EA /* c_org_ortc_RTCIceParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceParameters.h; sourceTree = ""; }; + 00216F721E970056008204EA /* c_org_ortc_RTCIceServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceServer.cpp; sourceTree = ""; }; + 00216F731E970056008204EA /* c_org_ortc_RTCIceServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceServer.h; sourceTree = ""; }; + 00216F741E970056008204EA /* c_org_ortc_RTCIceTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransport.cpp; sourceTree = ""; }; + 00216F751E970056008204EA /* c_org_ortc_RTCIceTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransport.h; sourceTree = ""; }; + 00216F761E970056008204EA /* c_org_ortc_RTCIceTransportController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransportController.cpp; sourceTree = ""; }; + 00216F771E970056008204EA /* c_org_ortc_RTCIceTransportController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransportController.h; sourceTree = ""; }; + 00216F781E970056008204EA /* c_org_ortc_RTCIceTransportOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransportOptions.cpp; sourceTree = ""; }; + 00216F791E970056008204EA /* c_org_ortc_RTCIceTransportOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransportOptions.h; sourceTree = ""; }; + 00216F7A1E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00216F7B1E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransportStateChangeEvent.h; sourceTree = ""; }; + 00216F7C1E970056008204EA /* c_org_ortc_RTCIceTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIceTransportStats.cpp; sourceTree = ""; }; + 00216F7D1E970056008204EA /* c_org_ortc_RTCIceTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIceTransportStats.h; sourceTree = ""; }; + 00216F7E1E970056008204EA /* c_org_ortc_RTCIdentity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIdentity.cpp; sourceTree = ""; }; + 00216F7F1E970056008204EA /* c_org_ortc_RTCIdentity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIdentity.h; sourceTree = ""; }; + 00216F801E970056008204EA /* c_org_ortc_RTCIdentityAssertion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIdentityAssertion.cpp; sourceTree = ""; }; + 00216F811E970056008204EA /* c_org_ortc_RTCIdentityAssertion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIdentityAssertion.h; sourceTree = ""; }; + 00216F821E970056008204EA /* c_org_ortc_RTCIdentityError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIdentityError.cpp; sourceTree = ""; }; + 00216F831E970056008204EA /* c_org_ortc_RTCIdentityError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIdentityError.h; sourceTree = ""; }; + 00216F841E970056008204EA /* c_org_ortc_RTCIdentityResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCIdentityResult.cpp; sourceTree = ""; }; + 00216F851E970056008204EA /* c_org_ortc_RTCIdentityResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCIdentityResult.h; sourceTree = ""; }; + 00216F861E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCInboundRtpStreamStats.cpp; sourceTree = ""; }; + 00216F871E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCInboundRtpStreamStats.h; sourceTree = ""; }; + 00216F881E970056008204EA /* c_org_ortc_RTCMediaStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCMediaStreamStats.cpp; sourceTree = ""; }; + 00216F891E970056008204EA /* c_org_ortc_RTCMediaStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCMediaStreamStats.h; sourceTree = ""; }; + 00216F8A1E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCMediaStreamTrackStats.cpp; sourceTree = ""; }; + 00216F8B1E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCMediaStreamTrackStats.h; sourceTree = ""; }; + 00216F8C1E970056008204EA /* c_org_ortc_RTCMessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCMessageEvent.cpp; sourceTree = ""; }; + 00216F8D1E970056008204EA /* c_org_ortc_RTCMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCMessageEvent.h; sourceTree = ""; }; + 00216F8E1E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCOutboundRtpStreamStats.cpp; sourceTree = ""; }; + 00216F8F1E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCOutboundRtpStreamStats.h; sourceTree = ""; }; + 00216F901E970056008204EA /* c_org_ortc_RTCRtcpFeedback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtcpFeedback.cpp; sourceTree = ""; }; + 00216F911E970056008204EA /* c_org_ortc_RTCRtcpFeedback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtcpFeedback.h; sourceTree = ""; }; + 00216F921E970056008204EA /* c_org_ortc_RTCRtcpParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtcpParameters.cpp; sourceTree = ""; }; + 00216F931E970056008204EA /* c_org_ortc_RTCRtcpParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtcpParameters.h; sourceTree = ""; }; + 00216F941E970056008204EA /* c_org_ortc_RTCRtcpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtcpTransport.cpp; sourceTree = ""; }; + 00216F951E970056008204EA /* c_org_ortc_RTCRtcpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtcpTransport.h; sourceTree = ""; }; + 00216F961E970056008204EA /* c_org_ortc_RTCRtpCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCapabilities.cpp; sourceTree = ""; }; + 00216F971E970056008204EA /* c_org_ortc_RTCRtpCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCapabilities.h; sourceTree = ""; }; + 00216F981E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecCapability.cpp; sourceTree = ""; }; + 00216F991E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecCapability.h; sourceTree = ""; }; + 00216F9A1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecCapabilityOptions.cpp; sourceTree = ""; }; + 00216F9B1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecCapabilityOptions.h; sourceTree = ""; }; + 00216F9C1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216F9D1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecCapabilityParameters.h; sourceTree = ""; }; + 00216F9E1E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecParameters.cpp; sourceTree = ""; }; + 00216F9F1E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecParameters.h; sourceTree = ""; }; + 00216FA01E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpCodecParameterSettings.cpp; sourceTree = ""; }; + 00216FA11E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpCodecParameterSettings.h; sourceTree = ""; }; + 00216FA21E970056008204EA /* c_org_ortc_RTCRtpContributingSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpContributingSource.cpp; sourceTree = ""; }; + 00216FA31E970056008204EA /* c_org_ortc_RTCRtpContributingSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpContributingSource.h; sourceTree = ""; }; + 00216FA41E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpEncodingParameters.cpp; sourceTree = ""; }; + 00216FA51E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpEncodingParameters.h; sourceTree = ""; }; + 00216FA61E970056008204EA /* c_org_ortc_RTCRtpFecParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpFecParameters.cpp; sourceTree = ""; }; + 00216FA71E970056008204EA /* c_org_ortc_RTCRtpFecParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpFecParameters.h; sourceTree = ""; }; + 00216FA81E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216FA91E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h; sourceTree = ""; }; + 00216FAA1E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp; sourceTree = ""; }; + 00216FAB1E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h; sourceTree = ""; }; + 00216FAC1E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216FAD1E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpH264CodecCapabilityParameters.h; sourceTree = ""; }; + 00216FAE1E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpH264CodecParameterSettings.cpp; sourceTree = ""; }; + 00216FAF1E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpH264CodecParameterSettings.h; sourceTree = ""; }; + 00216FB01E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpHeaderExtension.cpp; sourceTree = ""; }; + 00216FB11E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpHeaderExtension.h; sourceTree = ""; }; + 00216FB21E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpHeaderExtensionParameters.cpp; sourceTree = ""; }; + 00216FB31E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpHeaderExtensionParameters.h; sourceTree = ""; }; + 00216FB41E970056008204EA /* c_org_ortc_RTCRtpListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpListener.cpp; sourceTree = ""; }; + 00216FB51E970056008204EA /* c_org_ortc_RTCRtpListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpListener.h; sourceTree = ""; }; + 00216FB61E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp; sourceTree = ""; }; + 00216FB71E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h; sourceTree = ""; }; + 00216FB81E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216FB91E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h; sourceTree = ""; }; + 00216FBA1E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp; sourceTree = ""; }; + 00216FBB1E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpOpusCodecParameterSettings.h; sourceTree = ""; }; + 00216FBC1E970056008204EA /* c_org_ortc_RTCRtpParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpParameters.cpp; sourceTree = ""; }; + 00216FBD1E970056008204EA /* c_org_ortc_RTCRtpParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpParameters.h; sourceTree = ""; }; + 00216FBE1E970056008204EA /* c_org_ortc_RTCRtpReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpReceiver.cpp; sourceTree = ""; }; + 00216FBF1E970056008204EA /* c_org_ortc_RTCRtpReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpReceiver.h; sourceTree = ""; }; + 00216FC01E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpRedCodecParameterSettings.cpp; sourceTree = ""; }; + 00216FC11E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpRedCodecParameterSettings.h; sourceTree = ""; }; + 00216FC21E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216FC31E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h; sourceTree = ""; }; + 00216FC41E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp; sourceTree = ""; }; + 00216FC51E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpRtxCodecParameterSettings.h; sourceTree = ""; }; + 00216FC61E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpRtxParameters.cpp; sourceTree = ""; }; + 00216FC71E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpRtxParameters.h; sourceTree = ""; }; + 00216FC81E970056008204EA /* c_org_ortc_RTCRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpSender.cpp; sourceTree = ""; }; + 00216FC91E970056008204EA /* c_org_ortc_RTCRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpSender.h; sourceTree = ""; }; + 00216FCA1E970056008204EA /* c_org_ortc_RTCRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpStreamStats.cpp; sourceTree = ""; }; + 00216FCB1E970056008204EA /* c_org_ortc_RTCRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpStreamStats.h; sourceTree = ""; }; + 00216FCC1E970056008204EA /* c_org_ortc_RTCRtpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpTransport.cpp; sourceTree = ""; }; + 00216FCD1E970056008204EA /* c_org_ortc_RTCRtpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpTransport.h; sourceTree = ""; }; + 00216FCE1E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpUnhandledEvent.cpp; sourceTree = ""; }; + 00216FCF1E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpUnhandledEvent.h; sourceTree = ""; }; + 00216FD01E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp; sourceTree = ""; }; + 00216FD11E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h; sourceTree = ""; }; + 00216FD21E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp; sourceTree = ""; }; + 00216FD31E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCRtpVp8CodecParameterSettings.h; sourceTree = ""; }; + 00216FD41E970056008204EA /* c_org_ortc_RTCSctpCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpCapabilities.cpp; sourceTree = ""; }; + 00216FD51E970056008204EA /* c_org_ortc_RTCSctpCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpCapabilities.h; sourceTree = ""; }; + 00216FD61E970056008204EA /* c_org_ortc_RTCSctpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransport.cpp; sourceTree = ""; }; + 00216FD71E970056008204EA /* c_org_ortc_RTCSctpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransport.h; sourceTree = ""; }; + 00216FD81E970056008204EA /* c_org_ortc_RTCSctpTransportListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransportListener.cpp; sourceTree = ""; }; + 00216FD91E970056008204EA /* c_org_ortc_RTCSctpTransportListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransportListener.h; sourceTree = ""; }; + 00216FDA1E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransportListenerEvent.cpp; sourceTree = ""; }; + 00216FDB1E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransportListenerEvent.h; sourceTree = ""; }; + 00216FDC1E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00216FDD1E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransportStateChangeEvent.h; sourceTree = ""; }; + 00216FDE1E970056008204EA /* c_org_ortc_RTCSctpTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSctpTransportStats.cpp; sourceTree = ""; }; + 00216FDF1E970056008204EA /* c_org_ortc_RTCSctpTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSctpTransportStats.h; sourceTree = ""; }; + 00216FE01E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesCryptoParameters.cpp; sourceTree = ""; }; + 00216FE11E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesCryptoParameters.h; sourceTree = ""; }; + 00216FE21E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesKeyParameters.cpp; sourceTree = ""; }; + 00216FE31E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesKeyParameters.h; sourceTree = ""; }; + 00216FE41E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesParameters.cpp; sourceTree = ""; }; + 00216FE51E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesParameters.h; sourceTree = ""; }; + 00216FE61E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesTransport.cpp; sourceTree = ""; }; + 00216FE71E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesTransport.h; sourceTree = ""; }; + 00216FE81E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp; sourceTree = ""; }; + 00216FE91E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h; sourceTree = ""; }; + 00216FEA1E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSrtpTransportStats.cpp; sourceTree = ""; }; + 00216FEB1E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSrtpTransportStats.h; sourceTree = ""; }; + 00216FEC1E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCSsrcConflictEvent.cpp; sourceTree = ""; }; + 00216FED1E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCSsrcConflictEvent.h; sourceTree = ""; }; + 00216FEE1E970056008204EA /* c_org_ortc_RTCStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCStats.cpp; sourceTree = ""; }; + 00216FEF1E970056008204EA /* c_org_ortc_RTCStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCStats.h; sourceTree = ""; }; + 00216FF01E970056008204EA /* c_org_ortc_RTCStatsProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCStatsProvider.cpp; sourceTree = ""; }; + 00216FF11E970056008204EA /* c_org_ortc_RTCStatsProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCStatsProvider.h; sourceTree = ""; }; + 00216FF21E970056008204EA /* c_org_ortc_RTCStatsReport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCStatsReport.cpp; sourceTree = ""; }; + 00216FF31E970056008204EA /* c_org_ortc_RTCStatsReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCStatsReport.h; sourceTree = ""; }; + 00216FF41E970056008204EA /* c_org_ortc_RTCStatsTypeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_RTCStatsTypeSet.cpp; sourceTree = ""; }; + 00216FF51E970056008204EA /* c_org_ortc_RTCStatsTypeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_RTCStatsTypeSet.h; sourceTree = ""; }; + 00216FF61E970056008204EA /* c_org_ortc_Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_Settings.cpp; sourceTree = ""; }; + 00216FF71E970056008204EA /* c_org_ortc_Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_Settings.h; sourceTree = ""; }; + 00216FF81E970056008204EA /* c_org_ortc_StringOrStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_StringOrStringList.cpp; sourceTree = ""; }; + 00216FF91E970056008204EA /* c_org_ortc_StringOrStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_StringOrStringList.h; sourceTree = ""; }; + 00216FFA1E970056008204EA /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00216EB71E970020008204EA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00216EB11E970020008204EA = { + isa = PBXGroup; + children = ( + 00216EC11E970056008204EA /* c */, + 00216EBB1E970020008204EA /* Products */, + ); + sourceTree = ""; + }; + 00216EBB1E970020008204EA /* Products */ = { + isa = PBXGroup; + children = ( + 00216EBA1E970020008204EA /* libortclib-c-osx.dylib */, + ); + name = Products; + sourceTree = ""; + }; + 00216EC11E970056008204EA /* c */ = { + isa = PBXGroup; + children = ( + 00216EC21E970056008204EA /* c_helpers.cpp */, + 00216EC31E970056008204EA /* c_helpers.h */, + 00216EC41E970056008204EA /* c_org_ortc_adapter_MediaStream.cpp */, + 00216EC51E970056008204EA /* c_org_ortc_adapter_MediaStream.h */, + 00216EC61E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp */, + 00216EC71E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.h */, + 00216EC81E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp */, + 00216EC91E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.h */, + 00216ECA1E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp */, + 00216ECB1E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.h */, + 00216ECC1E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp */, + 00216ECD1E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.h */, + 00216ECE1E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */, + 00216ECF1E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */, + 00216ED01E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp */, + 00216ED11E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.h */, + 00216ED21E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp */, + 00216ED31E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.h */, + 00216ED41E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp */, + 00216ED51E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.h */, + 00216ED61E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */, + 00216ED71E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */, + 00216ED81E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */, + 00216ED91E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.h */, + 00216EDA1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp */, + 00216EDB1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.h */, + 00216EDC1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */, + 00216EDD1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */, + 00216EDE1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */, + 00216EDF1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */, + 00216EE01E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */, + 00216EE11E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.h */, + 00216EE21E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */, + 00216EE31E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */, + 00216EE41E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */, + 00216EE51E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */, + 00216EE61E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */, + 00216EE71E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */, + 00216EE81E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */, + 00216EE91E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */, + 00216EEA1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */, + 00216EEB1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */, + 00216EEC1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */, + 00216EED1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */, + 00216EEE1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */, + 00216EEF1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */, + 00216EF01E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */, + 00216EF11E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.h */, + 00216EF21E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */, + 00216EF31E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */, + 00216EF41E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp */, + 00216EF51E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.h */, + 00216EF61E970056008204EA /* c_org_ortc_ConstrainBoolean.cpp */, + 00216EF71E970056008204EA /* c_org_ortc_ConstrainBoolean.h */, + 00216EF81E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp */, + 00216EF91E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.h */, + 00216EFA1E970056008204EA /* c_org_ortc_ConstrainDouble.cpp */, + 00216EFB1E970056008204EA /* c_org_ortc_ConstrainDouble.h */, + 00216EFC1E970056008204EA /* c_org_ortc_ConstrainDoubleRange.cpp */, + 00216EFD1E970056008204EA /* c_org_ortc_ConstrainDoubleRange.h */, + 00216EFE1E970056008204EA /* c_org_ortc_ConstrainLong.cpp */, + 00216EFF1E970056008204EA /* c_org_ortc_ConstrainLong.h */, + 00216F001E970056008204EA /* c_org_ortc_ConstrainLongRange.cpp */, + 00216F011E970056008204EA /* c_org_ortc_ConstrainLongRange.h */, + 00216F021E970056008204EA /* c_org_ortc_ConstrainString.cpp */, + 00216F031E970056008204EA /* c_org_ortc_ConstrainString.h */, + 00216F041E970056008204EA /* c_org_ortc_ConstrainStringParameters.cpp */, + 00216F051E970056008204EA /* c_org_ortc_ConstrainStringParameters.h */, + 00216F061E970056008204EA /* c_org_ortc_DoubleRange.cpp */, + 00216F071E970056008204EA /* c_org_ortc_DoubleRange.h */, + 00216F081E970056008204EA /* c_org_ortc_Error.cpp */, + 00216F091E970056008204EA /* c_org_ortc_Error.h */, + 00216F0A1E970056008204EA /* c_org_ortc_ErrorEvent.cpp */, + 00216F0B1E970056008204EA /* c_org_ortc_ErrorEvent.h */, + 00216F0C1E970056008204EA /* c_org_ortc_Json.cpp */, + 00216F0D1E970056008204EA /* c_org_ortc_Json.h */, + 00216F0E1E970056008204EA /* c_org_ortc_Logger.cpp */, + 00216F0F1E970056008204EA /* c_org_ortc_Logger.h */, + 00216F101E970056008204EA /* c_org_ortc_LongRange.cpp */, + 00216F111E970056008204EA /* c_org_ortc_LongRange.h */, + 00216F121E970056008204EA /* c_org_ortc_MediaControl.cpp */, + 00216F131E970056008204EA /* c_org_ortc_MediaControl.h */, + 00216F141E970056008204EA /* c_org_ortc_MediaDeviceInfo.cpp */, + 00216F151E970056008204EA /* c_org_ortc_MediaDeviceInfo.h */, + 00216F161E970056008204EA /* c_org_ortc_MediaDevices.cpp */, + 00216F171E970056008204EA /* c_org_ortc_MediaDevices.h */, + 00216F181E970056008204EA /* c_org_ortc_MediaSource.cpp */, + 00216F191E970056008204EA /* c_org_ortc_MediaSource.h */, + 00216F1A1E970056008204EA /* c_org_ortc_MediaStreamConstraints.cpp */, + 00216F1B1E970056008204EA /* c_org_ortc_MediaStreamConstraints.h */, + 00216F1C1E970056008204EA /* c_org_ortc_MediaStreamTrack.cpp */, + 00216F1D1E970056008204EA /* c_org_ortc_MediaStreamTrack.h */, + 00216F1E1E970056008204EA /* c_org_ortc_MediaTrackCapabilities.cpp */, + 00216F1F1E970056008204EA /* c_org_ortc_MediaTrackCapabilities.h */, + 00216F201E970056008204EA /* c_org_ortc_MediaTrackConstraints.cpp */, + 00216F211E970056008204EA /* c_org_ortc_MediaTrackConstraints.h */, + 00216F221E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp */, + 00216F231E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.h */, + 00216F241E970056008204EA /* c_org_ortc_MediaTrackSettings.cpp */, + 00216F251E970056008204EA /* c_org_ortc_MediaTrackSettings.h */, + 00216F261E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp */, + 00216F271E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.h */, + 00216F281E970056008204EA /* c_org_ortc_MessageQueue.cpp */, + 00216F291E970056008204EA /* c_org_ortc_MessageQueue.h */, + 00216F2A1E970056008204EA /* c_org_ortc_OrtcLib.cpp */, + 00216F2B1E970056008204EA /* c_org_ortc_OrtcLib.h */, + 00216F2C1E970056008204EA /* c_org_ortc_OverconstrainedError.cpp */, + 00216F2D1E970056008204EA /* c_org_ortc_OverconstrainedError.h */, + 00216F2E1E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp */, + 00216F2F1E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.h */, + 00216F301E970056008204EA /* c_org_ortc_RTCCertificate.cpp */, + 00216F311E970056008204EA /* c_org_ortc_RTCCertificate.h */, + 00216F321E970056008204EA /* c_org_ortc_RTCCertificateStats.cpp */, + 00216F331E970056008204EA /* c_org_ortc_RTCCertificateStats.h */, + 00216F341E970056008204EA /* c_org_ortc_RTCCodec.cpp */, + 00216F351E970056008204EA /* c_org_ortc_RTCCodec.h */, + 00216F361E970056008204EA /* c_org_ortc_RTCDataChannel.cpp */, + 00216F371E970056008204EA /* c_org_ortc_RTCDataChannel.h */, + 00216F381E970056008204EA /* c_org_ortc_RTCDataChannelEvent.cpp */, + 00216F391E970056008204EA /* c_org_ortc_RTCDataChannelEvent.h */, + 00216F3A1E970056008204EA /* c_org_ortc_RTCDataChannelParameters.cpp */, + 00216F3B1E970056008204EA /* c_org_ortc_RTCDataChannelParameters.h */, + 00216F3C1E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp */, + 00216F3D1E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.h */, + 00216F3E1E970056008204EA /* c_org_ortc_RTCDataChannelStats.cpp */, + 00216F3F1E970056008204EA /* c_org_ortc_RTCDataChannelStats.h */, + 00216F401E970056008204EA /* c_org_ortc_RTCDataTransport.cpp */, + 00216F411E970056008204EA /* c_org_ortc_RTCDataTransport.h */, + 00216F421E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp */, + 00216F431E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.h */, + 00216F441E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp */, + 00216F451E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.h */, + 00216F461E970056008204EA /* c_org_ortc_RTCDtlsParameters.cpp */, + 00216F471E970056008204EA /* c_org_ortc_RTCDtlsParameters.h */, + 00216F481E970056008204EA /* c_org_ortc_RTCDtlsTransport.cpp */, + 00216F491E970056008204EA /* c_org_ortc_RTCDtlsTransport.h */, + 00216F4A1E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */, + 00216F4B1E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.h */, + 00216F4C1E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp */, + 00216F4D1E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.h */, + 00216F4E1E970056008204EA /* c_org_ortc_RTCDtmfSender.cpp */, + 00216F4F1E970056008204EA /* c_org_ortc_RTCDtmfSender.h */, + 00216F501E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp */, + 00216F511E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.h */, + 00216F521E970056008204EA /* c_org_ortc_RTCIceCandidate.cpp */, + 00216F531E970056008204EA /* c_org_ortc_RTCIceCandidate.h */, + 00216F541E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp */, + 00216F551E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.h */, + 00216F561E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp */, + 00216F571E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.h */, + 00216F581E970056008204EA /* c_org_ortc_RTCIceCandidatePair.cpp */, + 00216F591E970056008204EA /* c_org_ortc_RTCIceCandidatePair.h */, + 00216F5A1E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp */, + 00216F5B1E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.h */, + 00216F5C1E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp */, + 00216F5D1E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.h */, + 00216F5E1E970056008204EA /* c_org_ortc_RTCIceGatherer.cpp */, + 00216F5F1E970056008204EA /* c_org_ortc_RTCIceGatherer.h */, + 00216F601E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp */, + 00216F611E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.h */, + 00216F621E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */, + 00216F631E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.h */, + 00216F641E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp */, + 00216F651E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.h */, + 00216F661E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp */, + 00216F671E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.h */, + 00216F681E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp */, + 00216F691E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.h */, + 00216F6A1E970056008204EA /* c_org_ortc_RTCIceGathererStats.cpp */, + 00216F6B1E970056008204EA /* c_org_ortc_RTCIceGathererStats.h */, + 00216F6C1E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp */, + 00216F6D1E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.h */, + 00216F6E1E970056008204EA /* c_org_ortc_RTCIceGatherOptions.cpp */, + 00216F6F1E970056008204EA /* c_org_ortc_RTCIceGatherOptions.h */, + 00216F701E970056008204EA /* c_org_ortc_RTCIceParameters.cpp */, + 00216F711E970056008204EA /* c_org_ortc_RTCIceParameters.h */, + 00216F721E970056008204EA /* c_org_ortc_RTCIceServer.cpp */, + 00216F731E970056008204EA /* c_org_ortc_RTCIceServer.h */, + 00216F741E970056008204EA /* c_org_ortc_RTCIceTransport.cpp */, + 00216F751E970056008204EA /* c_org_ortc_RTCIceTransport.h */, + 00216F761E970056008204EA /* c_org_ortc_RTCIceTransportController.cpp */, + 00216F771E970056008204EA /* c_org_ortc_RTCIceTransportController.h */, + 00216F781E970056008204EA /* c_org_ortc_RTCIceTransportOptions.cpp */, + 00216F791E970056008204EA /* c_org_ortc_RTCIceTransportOptions.h */, + 00216F7A1E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp */, + 00216F7B1E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.h */, + 00216F7C1E970056008204EA /* c_org_ortc_RTCIceTransportStats.cpp */, + 00216F7D1E970056008204EA /* c_org_ortc_RTCIceTransportStats.h */, + 00216F7E1E970056008204EA /* c_org_ortc_RTCIdentity.cpp */, + 00216F7F1E970056008204EA /* c_org_ortc_RTCIdentity.h */, + 00216F801E970056008204EA /* c_org_ortc_RTCIdentityAssertion.cpp */, + 00216F811E970056008204EA /* c_org_ortc_RTCIdentityAssertion.h */, + 00216F821E970056008204EA /* c_org_ortc_RTCIdentityError.cpp */, + 00216F831E970056008204EA /* c_org_ortc_RTCIdentityError.h */, + 00216F841E970056008204EA /* c_org_ortc_RTCIdentityResult.cpp */, + 00216F851E970056008204EA /* c_org_ortc_RTCIdentityResult.h */, + 00216F861E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp */, + 00216F871E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.h */, + 00216F881E970056008204EA /* c_org_ortc_RTCMediaStreamStats.cpp */, + 00216F891E970056008204EA /* c_org_ortc_RTCMediaStreamStats.h */, + 00216F8A1E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp */, + 00216F8B1E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.h */, + 00216F8C1E970056008204EA /* c_org_ortc_RTCMessageEvent.cpp */, + 00216F8D1E970056008204EA /* c_org_ortc_RTCMessageEvent.h */, + 00216F8E1E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp */, + 00216F8F1E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.h */, + 00216F901E970056008204EA /* c_org_ortc_RTCRtcpFeedback.cpp */, + 00216F911E970056008204EA /* c_org_ortc_RTCRtcpFeedback.h */, + 00216F921E970056008204EA /* c_org_ortc_RTCRtcpParameters.cpp */, + 00216F931E970056008204EA /* c_org_ortc_RTCRtcpParameters.h */, + 00216F941E970056008204EA /* c_org_ortc_RTCRtcpTransport.cpp */, + 00216F951E970056008204EA /* c_org_ortc_RTCRtcpTransport.h */, + 00216F961E970056008204EA /* c_org_ortc_RTCRtpCapabilities.cpp */, + 00216F971E970056008204EA /* c_org_ortc_RTCRtpCapabilities.h */, + 00216F981E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp */, + 00216F991E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.h */, + 00216F9A1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp */, + 00216F9B1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.h */, + 00216F9C1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp */, + 00216F9D1E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.h */, + 00216F9E1E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp */, + 00216F9F1E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.h */, + 00216FA01E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp */, + 00216FA11E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.h */, + 00216FA21E970056008204EA /* c_org_ortc_RTCRtpContributingSource.cpp */, + 00216FA31E970056008204EA /* c_org_ortc_RTCRtpContributingSource.h */, + 00216FA41E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp */, + 00216FA51E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.h */, + 00216FA61E970056008204EA /* c_org_ortc_RTCRtpFecParameters.cpp */, + 00216FA71E970056008204EA /* c_org_ortc_RTCRtpFecParameters.h */, + 00216FA81E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */, + 00216FA91E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */, + 00216FAA1E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */, + 00216FAB1E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */, + 00216FAC1E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */, + 00216FAD1E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.h */, + 00216FAE1E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp */, + 00216FAF1E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.h */, + 00216FB01E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp */, + 00216FB11E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.h */, + 00216FB21E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp */, + 00216FB31E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.h */, + 00216FB41E970056008204EA /* c_org_ortc_RTCRtpListener.cpp */, + 00216FB51E970056008204EA /* c_org_ortc_RTCRtpListener.h */, + 00216FB61E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */, + 00216FB71E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */, + 00216FB81E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */, + 00216FB91E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */, + 00216FBA1E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */, + 00216FBB1E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.h */, + 00216FBC1E970056008204EA /* c_org_ortc_RTCRtpParameters.cpp */, + 00216FBD1E970056008204EA /* c_org_ortc_RTCRtpParameters.h */, + 00216FBE1E970056008204EA /* c_org_ortc_RTCRtpReceiver.cpp */, + 00216FBF1E970056008204EA /* c_org_ortc_RTCRtpReceiver.h */, + 00216FC01E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp */, + 00216FC11E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.h */, + 00216FC21E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */, + 00216FC31E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */, + 00216FC41E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */, + 00216FC51E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.h */, + 00216FC61E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp */, + 00216FC71E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.h */, + 00216FC81E970056008204EA /* c_org_ortc_RTCRtpSender.cpp */, + 00216FC91E970056008204EA /* c_org_ortc_RTCRtpSender.h */, + 00216FCA1E970056008204EA /* c_org_ortc_RTCRtpStreamStats.cpp */, + 00216FCB1E970056008204EA /* c_org_ortc_RTCRtpStreamStats.h */, + 00216FCC1E970056008204EA /* c_org_ortc_RTCRtpTransport.cpp */, + 00216FCD1E970056008204EA /* c_org_ortc_RTCRtpTransport.h */, + 00216FCE1E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp */, + 00216FCF1E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.h */, + 00216FD01E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */, + 00216FD11E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */, + 00216FD21E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */, + 00216FD31E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.h */, + 00216FD41E970056008204EA /* c_org_ortc_RTCSctpCapabilities.cpp */, + 00216FD51E970056008204EA /* c_org_ortc_RTCSctpCapabilities.h */, + 00216FD61E970056008204EA /* c_org_ortc_RTCSctpTransport.cpp */, + 00216FD71E970056008204EA /* c_org_ortc_RTCSctpTransport.h */, + 00216FD81E970056008204EA /* c_org_ortc_RTCSctpTransportListener.cpp */, + 00216FD91E970056008204EA /* c_org_ortc_RTCSctpTransportListener.h */, + 00216FDA1E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp */, + 00216FDB1E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.h */, + 00216FDC1E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp */, + 00216FDD1E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.h */, + 00216FDE1E970056008204EA /* c_org_ortc_RTCSctpTransportStats.cpp */, + 00216FDF1E970056008204EA /* c_org_ortc_RTCSctpTransportStats.h */, + 00216FE01E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp */, + 00216FE11E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.h */, + 00216FE21E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp */, + 00216FE31E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.h */, + 00216FE41E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp */, + 00216FE51E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.h */, + 00216FE61E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp */, + 00216FE71E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.h */, + 00216FE81E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */, + 00216FE91E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */, + 00216FEA1E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp */, + 00216FEB1E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.h */, + 00216FEC1E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp */, + 00216FED1E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.h */, + 00216FEE1E970056008204EA /* c_org_ortc_RTCStats.cpp */, + 00216FEF1E970056008204EA /* c_org_ortc_RTCStats.h */, + 00216FF01E970056008204EA /* c_org_ortc_RTCStatsProvider.cpp */, + 00216FF11E970056008204EA /* c_org_ortc_RTCStatsProvider.h */, + 00216FF21E970056008204EA /* c_org_ortc_RTCStatsReport.cpp */, + 00216FF31E970056008204EA /* c_org_ortc_RTCStatsReport.h */, + 00216FF41E970056008204EA /* c_org_ortc_RTCStatsTypeSet.cpp */, + 00216FF51E970056008204EA /* c_org_ortc_RTCStatsTypeSet.h */, + 00216FF61E970056008204EA /* c_org_ortc_Settings.cpp */, + 00216FF71E970056008204EA /* c_org_ortc_Settings.h */, + 00216FF81E970056008204EA /* c_org_ortc_StringOrStringList.cpp */, + 00216FF91E970056008204EA /* c_org_ortc_StringOrStringList.h */, + 00216FFA1E970056008204EA /* types.h */, + ); + name = c; + path = ../../../ortc/idl/wrapper/generated/c; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 00216EB81E970020008204EA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 002170F21E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h in Headers */, + 002170BE1E970056008204EA /* c_org_ortc_RTCIdentityResult.h in Headers */, + 002171141E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.h in Headers */, + 002170E61E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.h in Headers */, + 002170821E970056008204EA /* c_org_ortc_RTCDtlsTransport.h in Headers */, + 002170261E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h in Headers */, + 0021701A1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.h in Headers */, + 0021709A1E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.h in Headers */, + 002170181E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h in Headers */, + 002170E41E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h in Headers */, + 0021704C1E970056008204EA /* c_org_ortc_MediaControl.h in Headers */, + 002171081E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.h in Headers */, + 0021703A1E970056008204EA /* c_org_ortc_ConstrainLongRange.h in Headers */, + 002171021E970056008204EA /* c_org_ortc_RTCRtpSender.h in Headers */, + 002171331E970056008204EA /* types.h in Headers */, + 002170861E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.h in Headers */, + 0021710A1E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h in Headers */, + 002170A81E970056008204EA /* c_org_ortc_RTCIceGatherOptions.h in Headers */, + 002170E01E970056008204EA /* c_org_ortc_RTCRtpFecParameters.h in Headers */, + 002170641E970056008204EA /* c_org_ortc_OrtcLib.h in Headers */, + 002170581E970056008204EA /* c_org_ortc_MediaTrackCapabilities.h in Headers */, + 002171041E970056008204EA /* c_org_ortc_RTCRtpStreamStats.h in Headers */, + 002170661E970056008204EA /* c_org_ortc_OverconstrainedError.h in Headers */, + 002170B21E970056008204EA /* c_org_ortc_RTCIceTransportOptions.h in Headers */, + 00216FFE1E970056008204EA /* c_org_ortc_adapter_MediaStream.h in Headers */, + 002170061E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.h in Headers */, + 0021703E1E970056008204EA /* c_org_ortc_ConstrainStringParameters.h in Headers */, + 002170881E970056008204EA /* c_org_ortc_RTCDtmfSender.h in Headers */, + 002171101E970056008204EA /* c_org_ortc_RTCSctpTransport.h in Headers */, + 0021710E1E970056008204EA /* c_org_ortc_RTCSctpCapabilities.h in Headers */, + 002171001E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.h in Headers */, + 0021705A1E970056008204EA /* c_org_ortc_MediaTrackConstraints.h in Headers */, + 0021709E1E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.h in Headers */, + 002170C21E970056008204EA /* c_org_ortc_RTCMediaStreamStats.h in Headers */, + 002170141E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.h in Headers */, + 00216FFC1E970056008204EA /* c_helpers.h in Headers */, + 002170301E970056008204EA /* c_org_ortc_ConstrainBoolean.h in Headers */, + 0021712E1E970056008204EA /* c_org_ortc_RTCStatsTypeSet.h in Headers */, + 002170741E970056008204EA /* c_org_ortc_RTCDataChannelParameters.h in Headers */, + 002170CA1E970056008204EA /* c_org_ortc_RTCRtcpFeedback.h in Headers */, + 002170761E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.h in Headers */, + 002170701E970056008204EA /* c_org_ortc_RTCDataChannel.h in Headers */, + 002170E21E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h in Headers */, + 0021700C1E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.h in Headers */, + 002170AA1E970056008204EA /* c_org_ortc_RTCIceParameters.h in Headers */, + 0021705C1E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.h in Headers */, + 002170F81E970056008204EA /* c_org_ortc_RTCRtpReceiver.h in Headers */, + 002170961E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.h in Headers */, + 002171121E970056008204EA /* c_org_ortc_RTCSctpTransportListener.h in Headers */, + 002170441E970056008204EA /* c_org_ortc_ErrorEvent.h in Headers */, + 002170021E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.h in Headers */, + 002170EE1E970056008204EA /* c_org_ortc_RTCRtpListener.h in Headers */, + 002170D81E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.h in Headers */, + 002170101E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h in Headers */, + 002170521E970056008204EA /* c_org_ortc_MediaSource.h in Headers */, + 0021700E1E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.h in Headers */, + 002170FE1E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.h in Headers */, + 002170F61E970056008204EA /* c_org_ortc_RTCRtpParameters.h in Headers */, + 0021704E1E970056008204EA /* c_org_ortc_MediaDeviceInfo.h in Headers */, + 0021701C1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h in Headers */, + 0021708E1E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.h in Headers */, + 002171301E970056008204EA /* c_org_ortc_Settings.h in Headers */, + 002170DE1E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.h in Headers */, + 002170CC1E970056008204EA /* c_org_ortc_RTCRtcpParameters.h in Headers */, + 002171241E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.h in Headers */, + 002170041E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.h in Headers */, + 002171281E970056008204EA /* c_org_ortc_RTCStats.h in Headers */, + 0021702C1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h in Headers */, + 0021701E1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h in Headers */, + 002171161E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.h in Headers */, + 002170561E970056008204EA /* c_org_ortc_MediaStreamTrack.h in Headers */, + 002170DA1E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.h in Headers */, + 002170461E970056008204EA /* c_org_ortc_Json.h in Headers */, + 002170EC1E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.h in Headers */, + 002170421E970056008204EA /* c_org_ortc_Error.h in Headers */, + 002171221E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h in Headers */, + 0021707C1E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.h in Headers */, + 0021708C1E970056008204EA /* c_org_ortc_RTCIceCandidate.h in Headers */, + 002170901E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.h in Headers */, + 002170BC1E970056008204EA /* c_org_ortc_RTCIdentityError.h in Headers */, + 002170201E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h in Headers */, + 002170481E970056008204EA /* c_org_ortc_Logger.h in Headers */, + 0021707A1E970056008204EA /* c_org_ortc_RTCDataTransport.h in Headers */, + 002171061E970056008204EA /* c_org_ortc_RTCRtpTransport.h in Headers */, + 002170F01E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h in Headers */, + 002170681E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.h in Headers */, + 002170781E970056008204EA /* c_org_ortc_RTCDataChannelStats.h in Headers */, + 002170DC1E970056008204EA /* c_org_ortc_RTCRtpContributingSource.h in Headers */, + 0021706C1E970056008204EA /* c_org_ortc_RTCCertificateStats.h in Headers */, + 002171201E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.h in Headers */, + 002170E81E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.h in Headers */, + 002170121E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.h in Headers */, + 002170B61E970056008204EA /* c_org_ortc_RTCIceTransportStats.h in Headers */, + 002170321E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.h in Headers */, + 0021704A1E970056008204EA /* c_org_ortc_LongRange.h in Headers */, + 002170FA1E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.h in Headers */, + 002170C01E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.h in Headers */, + 002170981E970056008204EA /* c_org_ortc_RTCIceGatherer.h in Headers */, + 002170841E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.h in Headers */, + 0021712C1E970056008204EA /* c_org_ortc_RTCStatsReport.h in Headers */, + 002170B01E970056008204EA /* c_org_ortc_RTCIceTransportController.h in Headers */, + 002170A41E970056008204EA /* c_org_ortc_RTCIceGathererStats.h in Headers */, + 002170081E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h in Headers */, + 002170381E970056008204EA /* c_org_ortc_ConstrainLong.h in Headers */, + 002171181E970056008204EA /* c_org_ortc_RTCSctpTransportStats.h in Headers */, + 0021702E1E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.h in Headers */, + 0021712A1E970056008204EA /* c_org_ortc_RTCStatsProvider.h in Headers */, + 002171261E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.h in Headers */, + 002170F41E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.h in Headers */, + 002171321E970056008204EA /* c_org_ortc_StringOrStringList.h in Headers */, + 002170241E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h in Headers */, + 002170D41E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.h in Headers */, + 002170921E970056008204EA /* c_org_ortc_RTCIceCandidatePair.h in Headers */, + 002170341E970056008204EA /* c_org_ortc_ConstrainDouble.h in Headers */, + 002170001E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.h in Headers */, + 0021700A1E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.h in Headers */, + 0021710C1E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.h in Headers */, + 0021706E1E970056008204EA /* c_org_ortc_RTCCodec.h in Headers */, + 002170401E970056008204EA /* c_org_ortc_DoubleRange.h in Headers */, + 002170BA1E970056008204EA /* c_org_ortc_RTCIdentityAssertion.h in Headers */, + 002170FC1E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h in Headers */, + 002170621E970056008204EA /* c_org_ortc_MessageQueue.h in Headers */, + 002170541E970056008204EA /* c_org_ortc_MediaStreamConstraints.h in Headers */, + 002170D21E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.h in Headers */, + 0021711C1E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.h in Headers */, + 002170A21E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.h in Headers */, + 002170D01E970056008204EA /* c_org_ortc_RTCRtpCapabilities.h in Headers */, + 002170AC1E970056008204EA /* c_org_ortc_RTCIceServer.h in Headers */, + 0021711A1E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.h in Headers */, + 002170601E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.h in Headers */, + 002170501E970056008204EA /* c_org_ortc_MediaDevices.h in Headers */, + 0021705E1E970056008204EA /* c_org_ortc_MediaTrackSettings.h in Headers */, + 002170161E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h in Headers */, + 002170EA1E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.h in Headers */, + 002170281E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h in Headers */, + 0021709C1E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.h in Headers */, + 002170C81E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.h in Headers */, + 002170801E970056008204EA /* c_org_ortc_RTCDtlsParameters.h in Headers */, + 002170C61E970056008204EA /* c_org_ortc_RTCMessageEvent.h in Headers */, + 002170941E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.h in Headers */, + 0021711E1E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.h in Headers */, + 002170221E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h in Headers */, + 0021703C1E970056008204EA /* c_org_ortc_ConstrainString.h in Headers */, + 002170A01E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.h in Headers */, + 002170CE1E970056008204EA /* c_org_ortc_RTCRtcpTransport.h in Headers */, + 002170721E970056008204EA /* c_org_ortc_RTCDataChannelEvent.h in Headers */, + 002170AE1E970056008204EA /* c_org_ortc_RTCIceTransport.h in Headers */, + 0021708A1E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.h in Headers */, + 002170C41E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.h in Headers */, + 0021706A1E970056008204EA /* c_org_ortc_RTCCertificate.h in Headers */, + 002170A61E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.h in Headers */, + 002170361E970056008204EA /* c_org_ortc_ConstrainDoubleRange.h in Headers */, + 0021702A1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.h in Headers */, + 002170B41E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.h in Headers */, + 002170D61E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.h in Headers */, + 002170B81E970056008204EA /* c_org_ortc_RTCIdentity.h in Headers */, + 0021707E1E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 00216EB91E970020008204EA /* ortclib-c-osx */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00216EBE1E970020008204EA /* Build configuration list for PBXNativeTarget "ortclib-c-osx" */; + buildPhases = ( + 00216EB61E970020008204EA /* Sources */, + 00216EB71E970020008204EA /* Frameworks */, + 00216EB81E970020008204EA /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ortclib-c-osx"; + productName = "ortclib-c-osx"; + productReference = 00216EBA1E970020008204EA /* libortclib-c-osx.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 00216EB21E970020008204EA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Open Peer Foundation"; + TargetAttributes = { + 00216EB91E970020008204EA = { + CreatedOnToolsVersion = 8.3; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 00216EB51E970020008204EA /* Build configuration list for PBXProject "ortclib-c-osx" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 00216EB11E970020008204EA; + productRefGroup = 00216EBB1E970020008204EA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 00216EB91E970020008204EA /* ortclib-c-osx */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 00216EB61E970020008204EA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 002170791E970056008204EA /* c_org_ortc_RTCDataTransport.cpp in Sources */, + 002170671E970056008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp in Sources */, + 002170391E970056008204EA /* c_org_ortc_ConstrainLongRange.cpp in Sources */, + 0021712B1E970056008204EA /* c_org_ortc_RTCStatsReport.cpp in Sources */, + 0021707B1E970056008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */, + 002170AD1E970056008204EA /* c_org_ortc_RTCIceTransport.cpp in Sources */, + 002170171E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */, + 0021705F1E970056008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */, + 002170571E970056008204EA /* c_org_ortc_MediaTrackCapabilities.cpp in Sources */, + 002170D11E970056008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp in Sources */, + 002170AF1E970056008204EA /* c_org_ortc_RTCIceTransportController.cpp in Sources */, + 002170851E970056008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp in Sources */, + 0021708F1E970056008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp in Sources */, + 002170E71E970056008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */, + 002170751E970056008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */, + 002171311E970056008204EA /* c_org_ortc_StringOrStringList.cpp in Sources */, + 0021708D1E970056008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp in Sources */, + 002170C51E970056008204EA /* c_org_ortc_RTCMessageEvent.cpp in Sources */, + 002170231E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */, + 002171051E970056008204EA /* c_org_ortc_RTCRtpTransport.cpp in Sources */, + 002170EF1E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */, + 002170831E970056008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */, + 002170BF1E970056008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */, + 00216FFF1E970056008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */, + 0021702D1E970056008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp in Sources */, + 0021704F1E970056008204EA /* c_org_ortc_MediaDevices.cpp in Sources */, + 0021710D1E970056008204EA /* c_org_ortc_RTCSctpCapabilities.cpp in Sources */, + 00216FFB1E970056008204EA /* c_helpers.cpp in Sources */, + 002170631E970056008204EA /* c_org_ortc_OrtcLib.cpp in Sources */, + 002170431E970056008204EA /* c_org_ortc_ErrorEvent.cpp in Sources */, + 0021711D1E970056008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp in Sources */, + 0021710F1E970056008204EA /* c_org_ortc_RTCSctpTransport.cpp in Sources */, + 0021705B1E970056008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp in Sources */, + 002171271E970056008204EA /* c_org_ortc_RTCStats.cpp in Sources */, + 002170351E970056008204EA /* c_org_ortc_ConstrainDoubleRange.cpp in Sources */, + 002170FD1E970056008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */, + 002170ED1E970056008204EA /* c_org_ortc_RTCRtpListener.cpp in Sources */, + 002170551E970056008204EA /* c_org_ortc_MediaStreamTrack.cpp in Sources */, + 002170411E970056008204EA /* c_org_ortc_Error.cpp in Sources */, + 002170DB1E970056008204EA /* c_org_ortc_RTCRtpContributingSource.cpp in Sources */, + 002170531E970056008204EA /* c_org_ortc_MediaStreamConstraints.cpp in Sources */, + 002171231E970056008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp in Sources */, + 0021705D1E970056008204EA /* c_org_ortc_MediaTrackSettings.cpp in Sources */, + 002170051E970056008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp in Sources */, + 002170CB1E970056008204EA /* c_org_ortc_RTCRtcpParameters.cpp in Sources */, + 0021710B1E970056008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */, + 0021704B1E970056008204EA /* c_org_ortc_MediaControl.cpp in Sources */, + 002171211E970056008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */, + 002170211E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */, + 0021700F1E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */, + 002170A51E970056008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */, + 002170D51E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */, + 002170F91E970056008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */, + 002170FF1E970056008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp in Sources */, + 002170771E970056008204EA /* c_org_ortc_RTCDataChannelStats.cpp in Sources */, + 0021708B1E970056008204EA /* c_org_ortc_RTCIceCandidate.cpp in Sources */, + 002170331E970056008204EA /* c_org_ortc_ConstrainDouble.cpp in Sources */, + 002170E31E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */, + 002170591E970056008204EA /* c_org_ortc_MediaTrackConstraints.cpp in Sources */, + 002170C91E970056008204EA /* c_org_ortc_RTCRtcpFeedback.cpp in Sources */, + 0021701F1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */, + 002170A71E970056008204EA /* c_org_ortc_RTCIceGatherOptions.cpp in Sources */, + 002171011E970056008204EA /* c_org_ortc_RTCRtpSender.cpp in Sources */, + 0021702F1E970056008204EA /* c_org_ortc_ConstrainBoolean.cpp in Sources */, + 002170031E970056008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp in Sources */, + 0021703F1E970056008204EA /* c_org_ortc_DoubleRange.cpp in Sources */, + 002170BB1E970056008204EA /* c_org_ortc_RTCIdentityError.cpp in Sources */, + 002170111E970056008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */, + 002170E11E970056008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */, + 002170811E970056008204EA /* c_org_ortc_RTCDtlsTransport.cpp in Sources */, + 002170C31E970056008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */, + 002170711E970056008204EA /* c_org_ortc_RTCDataChannelEvent.cpp in Sources */, + 0021711F1E970056008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp in Sources */, + 0021707D1E970056008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp in Sources */, + 0021701D1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */, + 0021706B1E970056008204EA /* c_org_ortc_RTCCertificateStats.cpp in Sources */, + 002170091E970056008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */, + 002170971E970056008204EA /* c_org_ortc_RTCIceGatherer.cpp in Sources */, + 0021709D1E970056008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */, + 002170451E970056008204EA /* c_org_ortc_Json.cpp in Sources */, + 0021712D1E970056008204EA /* c_org_ortc_RTCStatsTypeSet.cpp in Sources */, + 002170F11E970056008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */, + 002170291E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */, + 002170911E970056008204EA /* c_org_ortc_RTCIceCandidatePair.cpp in Sources */, + 002170E51E970056008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */, + 002170CF1E970056008204EA /* c_org_ortc_RTCRtpCapabilities.cpp in Sources */, + 002170BD1E970056008204EA /* c_org_ortc_RTCIdentityResult.cpp in Sources */, + 002170491E970056008204EA /* c_org_ortc_LongRange.cpp in Sources */, + 002171071E970056008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */, + 002170B51E970056008204EA /* c_org_ortc_RTCIceTransportStats.cpp in Sources */, + 002170B91E970056008204EA /* c_org_ortc_RTCIdentityAssertion.cpp in Sources */, + 002170CD1E970056008204EA /* c_org_ortc_RTCRtcpTransport.cpp in Sources */, + 002171251E970056008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp in Sources */, + 002170DD1E970056008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp in Sources */, + 0021709B1E970056008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */, + 002170EB1E970056008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */, + 002170311E970056008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp in Sources */, + 002170871E970056008204EA /* c_org_ortc_RTCDtmfSender.cpp in Sources */, + 00216FFD1E970056008204EA /* c_org_ortc_adapter_MediaStream.cpp in Sources */, + 002170C11E970056008204EA /* c_org_ortc_RTCMediaStreamStats.cpp in Sources */, + 0021700D1E970056008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp in Sources */, + 002170931E970056008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */, + 002170891E970056008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */, + 002170B31E970056008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */, + 002170F31E970056008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */, + 002170D31E970056008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */, + 002171191E970056008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */, + 002170271E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */, + 002170131E970056008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp in Sources */, + 002170951E970056008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp in Sources */, + 002170F71E970056008204EA /* c_org_ortc_RTCRtpReceiver.cpp in Sources */, + 002170151E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */, + 002170471E970056008204EA /* c_org_ortc_Logger.cpp in Sources */, + 002171151E970056008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */, + 0021711B1E970056008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */, + 0021700B1E970056008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp in Sources */, + 002170AB1E970056008204EA /* c_org_ortc_RTCIceServer.cpp in Sources */, + 002170F51E970056008204EA /* c_org_ortc_RTCRtpParameters.cpp in Sources */, + 002170E91E970056008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp in Sources */, + 0021703D1E970056008204EA /* c_org_ortc_ConstrainStringParameters.cpp in Sources */, + 002170651E970056008204EA /* c_org_ortc_OverconstrainedError.cpp in Sources */, + 0021701B1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */, + 002170991E970056008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp in Sources */, + 0021702B1E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */, + 002170B11E970056008204EA /* c_org_ortc_RTCIceTransportOptions.cpp in Sources */, + 002170A91E970056008204EA /* c_org_ortc_RTCIceParameters.cpp in Sources */, + 0021709F1E970056008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */, + 0021706D1E970056008204EA /* c_org_ortc_RTCCodec.cpp in Sources */, + 002170A31E970056008204EA /* c_org_ortc_RTCIceGathererStats.cpp in Sources */, + 002170511E970056008204EA /* c_org_ortc_MediaSource.cpp in Sources */, + 002170731E970056008204EA /* c_org_ortc_RTCDataChannelParameters.cpp in Sources */, + 0021703B1E970056008204EA /* c_org_ortc_ConstrainString.cpp in Sources */, + 002170191E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */, + 002171031E970056008204EA /* c_org_ortc_RTCRtpStreamStats.cpp in Sources */, + 002171291E970056008204EA /* c_org_ortc_RTCStatsProvider.cpp in Sources */, + 002171111E970056008204EA /* c_org_ortc_RTCSctpTransportListener.cpp in Sources */, + 002170251E970056008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */, + 002171171E970056008204EA /* c_org_ortc_RTCSctpTransportStats.cpp in Sources */, + 002170A11E970056008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */, + 0021706F1E970056008204EA /* c_org_ortc_RTCDataChannel.cpp in Sources */, + 0021707F1E970056008204EA /* c_org_ortc_RTCDtlsParameters.cpp in Sources */, + 002171091E970056008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */, + 002170B71E970056008204EA /* c_org_ortc_RTCIdentity.cpp in Sources */, + 002170691E970056008204EA /* c_org_ortc_RTCCertificate.cpp in Sources */, + 002170D71E970056008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp in Sources */, + 002170371E970056008204EA /* c_org_ortc_ConstrainLong.cpp in Sources */, + 0021704D1E970056008204EA /* c_org_ortc_MediaDeviceInfo.cpp in Sources */, + 0021712F1E970056008204EA /* c_org_ortc_Settings.cpp in Sources */, + 002170D91E970056008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */, + 002170C71E970056008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */, + 002170071E970056008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */, + 002170DF1E970056008204EA /* c_org_ortc_RTCRtpFecParameters.cpp in Sources */, + 002170611E970056008204EA /* c_org_ortc_MessageQueue.cpp in Sources */, + 002171131E970056008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */, + 002170FB1E970056008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */, + 002170011E970056008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 00216EBC1E970020008204EA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../../../zsLib, + "../../../../zsLib-eventing", + ../../../.., + ); + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 00216EBD1E970020008204EA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../../../zsLib, + "../../../../zsLib-eventing", + ../../../.., + ); + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 00216EBF1E970020008204EA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_PREFIX = lib; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 00216EC01E970020008204EA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_PREFIX = lib; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00216EB51E970020008204EA /* Build configuration list for PBXProject "ortclib-c-osx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00216EBC1E970020008204EA /* Debug */, + 00216EBD1E970020008204EA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 00216EBE1E970020008204EA /* Build configuration list for PBXNativeTarget "ortclib-c-osx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00216EBF1E970020008204EA /* Debug */, + 00216EC01E970020008204EA /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 00216EB21E970020008204EA /* Project object */; +} diff --git a/projects/xcode/ortclib-wrapper-ios/ortclib-wrapper-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-wrapper-ios/ortclib-wrapper-ios.xcodeproj/project.pbxproj new file mode 100644 index 00000000..1c3aaaa3 --- /dev/null +++ b/projects/xcode/ortclib-wrapper-ios/ortclib-wrapper-ios.xcodeproj/project.pbxproj @@ -0,0 +1,1229 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 002177701E9701C6008204EA /* impl_org_ortc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002174FA1E9701C3008204EA /* impl_org_ortc.cpp */; }; + 002177711E9701C6008204EA /* impl_org_ortc_adapter_MediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002174FB1E9701C3008204EA /* impl_org_ortc_adapter_MediaStream.cpp */; }; + 002177721E9701C6008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002174FD1E9701C3008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp */; }; + 002177731E9701C6008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002174FF1E9701C3008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp */; }; + 002177741E9701C6008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175011E9701C3008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp */; }; + 002177751E9701C6008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175031E9701C3008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp */; }; + 002177761E9701C6008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175051E9701C3008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */; }; + 002177771E9701C6008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175071E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp */; }; + 002177781E9701C6008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175091E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp */; }; + 002177791E9701C6008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021750B1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp */; }; + 0021777A1E9701C6008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021750D1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */; }; + 0021777B1E9701C6008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021750F1E9701C4008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */; }; + 0021777C1E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175111E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp */; }; + 0021777D1E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175131E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */; }; + 0021777E1E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175151E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */; }; + 0021777F1E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175171E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */; }; + 002177801E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175191E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */; }; + 002177811E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021751B1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */; }; + 002177821E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021751D1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */; }; + 002177831E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021751F1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */; }; + 002177841E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175211E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */; }; + 002177851E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175231E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */; }; + 002177861E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175251E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */; }; + 002177871E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175271E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */; }; + 002177881E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175291E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */; }; + 002177891E9701C6008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021752B1E9701C4008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp */; }; + 0021778A1E9701C6008204EA /* impl_org_ortc_ConstrainBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021752D1E9701C4008204EA /* impl_org_ortc_ConstrainBoolean.cpp */; }; + 0021778B1E9701C6008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021752F1E9701C4008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp */; }; + 0021778C1E9701C6008204EA /* impl_org_ortc_ConstrainDouble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175311E9701C4008204EA /* impl_org_ortc_ConstrainDouble.cpp */; }; + 0021778D1E9701C6008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175331E9701C4008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp */; }; + 0021778E1E9701C6008204EA /* impl_org_ortc_ConstrainLong.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175351E9701C4008204EA /* impl_org_ortc_ConstrainLong.cpp */; }; + 0021778F1E9701C6008204EA /* impl_org_ortc_ConstrainLongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175371E9701C4008204EA /* impl_org_ortc_ConstrainLongRange.cpp */; }; + 002177901E9701C6008204EA /* impl_org_ortc_ConstrainString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175391E9701C4008204EA /* impl_org_ortc_ConstrainString.cpp */; }; + 002177911E9701C6008204EA /* impl_org_ortc_ConstrainStringParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021753B1E9701C4008204EA /* impl_org_ortc_ConstrainStringParameters.cpp */; }; + 002177931E9701C6008204EA /* impl_org_ortc_DoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021753F1E9701C4008204EA /* impl_org_ortc_DoubleRange.cpp */; }; + 002177941E9701C6008204EA /* impl_org_ortc_Error.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175411E9701C4008204EA /* impl_org_ortc_Error.cpp */; }; + 002177951E9701C6008204EA /* impl_org_ortc_ErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175431E9701C4008204EA /* impl_org_ortc_ErrorEvent.cpp */; }; + 002177961E9701C6008204EA /* impl_org_ortc_Helper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175451E9701C4008204EA /* impl_org_ortc_Helper.cpp */; }; + 002177971E9701C6008204EA /* impl_org_ortc_Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175471E9701C4008204EA /* impl_org_ortc_Json.cpp */; }; + 002177981E9701C6008204EA /* impl_org_ortc_Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175491E9701C4008204EA /* impl_org_ortc_Logger.cpp */; }; + 002177991E9701C6008204EA /* impl_org_ortc_LongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021754B1E9701C4008204EA /* impl_org_ortc_LongRange.cpp */; }; + 0021779A1E9701C6008204EA /* impl_org_ortc_MediaControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021754D1E9701C4008204EA /* impl_org_ortc_MediaControl.cpp */; }; + 0021779B1E9701C6008204EA /* impl_org_ortc_MediaDeviceInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021754F1E9701C4008204EA /* impl_org_ortc_MediaDeviceInfo.cpp */; }; + 0021779C1E9701C6008204EA /* impl_org_ortc_MediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175511E9701C4008204EA /* impl_org_ortc_MediaDevices.cpp */; }; + 0021779D1E9701C6008204EA /* impl_org_ortc_MediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175531E9701C4008204EA /* impl_org_ortc_MediaSource.cpp */; }; + 0021779E1E9701C6008204EA /* impl_org_ortc_MediaStreamConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175551E9701C4008204EA /* impl_org_ortc_MediaStreamConstraints.cpp */; }; + 0021779F1E9701C6008204EA /* impl_org_ortc_MediaStreamTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175571E9701C4008204EA /* impl_org_ortc_MediaStreamTrack.cpp */; }; + 002177A01E9701C6008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175591E9701C4008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp */; }; + 002177A11E9701C6008204EA /* impl_org_ortc_MediaTrackConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021755B1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraints.cpp */; }; + 002177A21E9701C6008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021755D1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp */; }; + 002177A31E9701C6008204EA /* impl_org_ortc_MediaTrackSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021755F1E9701C4008204EA /* impl_org_ortc_MediaTrackSettings.cpp */; }; + 002177A41E9701C6008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175611E9701C4008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp */; }; + 002177A51E9701C6008204EA /* impl_org_ortc_MessageQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175631E9701C4008204EA /* impl_org_ortc_MessageQueue.cpp */; }; + 002177A61E9701C6008204EA /* impl_org_ortc_OrtcLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175651E9701C4008204EA /* impl_org_ortc_OrtcLib.cpp */; }; + 002177A81E9701C6008204EA /* impl_org_ortc_OverconstrainedError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175691E9701C4008204EA /* impl_org_ortc_OverconstrainedError.cpp */; }; + 002177A91E9701C6008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021756B1E9701C4008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp */; }; + 002177AA1E9701C6008204EA /* impl_org_ortc_RTCCertificate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021756D1E9701C4008204EA /* impl_org_ortc_RTCCertificate.cpp */; }; + 002177AB1E9701C6008204EA /* impl_org_ortc_RTCCertificateStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021756F1E9701C4008204EA /* impl_org_ortc_RTCCertificateStats.cpp */; }; + 002177AC1E9701C6008204EA /* impl_org_ortc_RTCCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175711E9701C4008204EA /* impl_org_ortc_RTCCodec.cpp */; }; + 002177AD1E9701C6008204EA /* impl_org_ortc_RTCDataChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175731E9701C4008204EA /* impl_org_ortc_RTCDataChannel.cpp */; }; + 002177AE1E9701C6008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175751E9701C4008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp */; }; + 002177AF1E9701C6008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175771E9701C4008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp */; }; + 002177B01E9701C6008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175791E9701C4008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp */; }; + 002177B11E9701C6008204EA /* impl_org_ortc_RTCDataChannelStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021757B1E9701C4008204EA /* impl_org_ortc_RTCDataChannelStats.cpp */; }; + 002177B21E9701C6008204EA /* impl_org_ortc_RTCDataTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021757D1E9701C4008204EA /* impl_org_ortc_RTCDataTransport.cpp */; }; + 002177B31E9701C6008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021757F1E9701C4008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp */; }; + 002177B41E9701C6008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175811E9701C4008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp */; }; + 002177B51E9701C6008204EA /* impl_org_ortc_RTCDtlsParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175831E9701C4008204EA /* impl_org_ortc_RTCDtlsParameters.cpp */; }; + 002177B61E9701C6008204EA /* impl_org_ortc_RTCDtlsTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175851E9701C4008204EA /* impl_org_ortc_RTCDtlsTransport.cpp */; }; + 002177B71E9701C6008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175871E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */; }; + 002177B81E9701C6008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175891E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp */; }; + 002177B91E9701C6008204EA /* impl_org_ortc_RTCDtmfSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021758B1E9701C4008204EA /* impl_org_ortc_RTCDtmfSender.cpp */; }; + 002177BA1E9701C6008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021758D1E9701C4008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp */; }; + 002177BB1E9701C6008204EA /* impl_org_ortc_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021758F1E9701C4008204EA /* impl_org_ortc_RTCIceCandidate.cpp */; }; + 002177BC1E9701C6008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175911E9701C4008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp */; }; + 002177BD1E9701C6008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175931E9701C5008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp */; }; + 002177BE1E9701C6008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175951E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp */; }; + 002177BF1E9701C6008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175971E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp */; }; + 002177C01E9701C6008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175991E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp */; }; + 002177C11E9701C6008204EA /* impl_org_ortc_RTCIceGatherer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021759B1E9701C5008204EA /* impl_org_ortc_RTCIceGatherer.cpp */; }; + 002177C21E9701C6008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021759D1E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp */; }; + 002177C31E9701C6008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021759F1E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */; }; + 002177C41E9701C6008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175A11E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp */; }; + 002177C51E9701C6008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175A31E9701C5008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp */; }; + 002177C61E9701C6008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175A51E9701C5008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp */; }; + 002177C71E9701C6008204EA /* impl_org_ortc_RTCIceGathererStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175A71E9701C5008204EA /* impl_org_ortc_RTCIceGathererStats.cpp */; }; + 002177C81E9701C6008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175A91E9701C5008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp */; }; + 002177C91E9701C6008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175AB1E9701C5008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp */; }; + 002177CA1E9701C6008204EA /* impl_org_ortc_RTCIceParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175AD1E9701C5008204EA /* impl_org_ortc_RTCIceParameters.cpp */; }; + 002177CB1E9701C6008204EA /* impl_org_ortc_RTCIceServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175AF1E9701C5008204EA /* impl_org_ortc_RTCIceServer.cpp */; }; + 002177CC1E9701C6008204EA /* impl_org_ortc_RTCIceTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175B11E9701C5008204EA /* impl_org_ortc_RTCIceTransport.cpp */; }; + 002177CD1E9701C6008204EA /* impl_org_ortc_RTCIceTransportController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175B31E9701C5008204EA /* impl_org_ortc_RTCIceTransportController.cpp */; }; + 002177CE1E9701C6008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175B51E9701C5008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp */; }; + 002177CF1E9701C6008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175B71E9701C5008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp */; }; + 002177D01E9701C6008204EA /* impl_org_ortc_RTCIceTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175B91E9701C5008204EA /* impl_org_ortc_RTCIceTransportStats.cpp */; }; + 002177D11E9701C6008204EA /* impl_org_ortc_RTCIdentity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175BB1E9701C5008204EA /* impl_org_ortc_RTCIdentity.cpp */; }; + 002177D21E9701C6008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175BD1E9701C5008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp */; }; + 002177D31E9701C6008204EA /* impl_org_ortc_RTCIdentityError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175BF1E9701C5008204EA /* impl_org_ortc_RTCIdentityError.cpp */; }; + 002177D41E9701C6008204EA /* impl_org_ortc_RTCIdentityResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175C11E9701C5008204EA /* impl_org_ortc_RTCIdentityResult.cpp */; }; + 002177D51E9701C6008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175C31E9701C5008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp */; }; + 002177D61E9701C6008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175C51E9701C5008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp */; }; + 002177D71E9701C6008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175C71E9701C5008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp */; }; + 002177D81E9701C6008204EA /* impl_org_ortc_RTCMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175C91E9701C5008204EA /* impl_org_ortc_RTCMessageEvent.cpp */; }; + 002177D91E9701C6008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175CB1E9701C5008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp */; }; + 002177DA1E9701C6008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175CD1E9701C5008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp */; }; + 002177DB1E9701C6008204EA /* impl_org_ortc_RTCRtcpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175CF1E9701C5008204EA /* impl_org_ortc_RTCRtcpParameters.cpp */; }; + 002177DC1E9701C6008204EA /* impl_org_ortc_RTCRtcpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175D11E9701C5008204EA /* impl_org_ortc_RTCRtcpTransport.cpp */; }; + 002177DD1E9701C6008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175D31E9701C5008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp */; }; + 002177DE1E9701C6008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175D51E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp */; }; + 002177DF1E9701C6008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175D71E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp */; }; + 002177E01E9701C6008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175D91E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp */; }; + 002177E11E9701C6008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175DB1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp */; }; + 002177E21E9701C7008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175DD1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp */; }; + 002177E31E9701C7008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175DF1E9701C5008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp */; }; + 002177E41E9701C7008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175E11E9701C5008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp */; }; + 002177E51E9701C7008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175E31E9701C5008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp */; }; + 002177E61E9701C7008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175E51E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */; }; + 002177E71E9701C7008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175E71E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */; }; + 002177E81E9701C7008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175E91E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */; }; + 002177E91E9701C7008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175EB1E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp */; }; + 002177EA1E9701C7008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175ED1E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp */; }; + 002177EB1E9701C7008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175EF1E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp */; }; + 002177EC1E9701C7008204EA /* impl_org_ortc_RTCRtpListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175F11E9701C5008204EA /* impl_org_ortc_RTCRtpListener.cpp */; }; + 002177ED1E9701C7008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175F31E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */; }; + 002177EE1E9701C7008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175F51E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */; }; + 002177EF1E9701C7008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175F71E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */; }; + 002177F01E9701C7008204EA /* impl_org_ortc_RTCRtpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175F91E9701C5008204EA /* impl_org_ortc_RTCRtpParameters.cpp */; }; + 002177F11E9701C7008204EA /* impl_org_ortc_RTCRtpReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175FB1E9701C5008204EA /* impl_org_ortc_RTCRtpReceiver.cpp */; }; + 002177F21E9701C7008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175FD1E9701C5008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp */; }; + 002177F31E9701C7008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002175FF1E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */; }; + 002177F41E9701C7008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176011E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */; }; + 002177F51E9701C7008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176031E9701C5008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp */; }; + 002177F61E9701C7008204EA /* impl_org_ortc_RTCRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176051E9701C5008204EA /* impl_org_ortc_RTCRtpSender.cpp */; }; + 002177F71E9701C7008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176071E9701C5008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp */; }; + 002177F81E9701C7008204EA /* impl_org_ortc_RTCRtpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176091E9701C6008204EA /* impl_org_ortc_RTCRtpTransport.cpp */; }; + 002177F91E9701C7008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021760B1E9701C6008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp */; }; + 002177FA1E9701C7008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021760D1E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */; }; + 002177FB1E9701C7008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021760F1E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */; }; + 002177FC1E9701C7008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176111E9701C6008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp */; }; + 002177FD1E9701C7008204EA /* impl_org_ortc_RTCSctpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176131E9701C6008204EA /* impl_org_ortc_RTCSctpTransport.cpp */; }; + 002177FE1E9701C7008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176151E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp */; }; + 002177FF1E9701C7008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176171E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp */; }; + 002178001E9701C7008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176191E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp */; }; + 002178011E9701C7008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021761B1E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp */; }; + 002178021E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021761D1E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp */; }; + 002178031E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021761F1E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp */; }; + 002178041E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176211E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp */; }; + 002178051E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176231E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp */; }; + 002178061E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176251E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */; }; + 002178071E9701C7008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176271E9701C6008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp */; }; + 002178081E9701C7008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176291E9701C6008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp */; }; + 002178091E9701C7008204EA /* impl_org_ortc_RTCStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021762B1E9701C6008204EA /* impl_org_ortc_RTCStats.cpp */; }; + 0021780A1E9701C7008204EA /* impl_org_ortc_RTCStatsProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021762D1E9701C6008204EA /* impl_org_ortc_RTCStatsProvider.cpp */; }; + 0021780B1E9701C7008204EA /* impl_org_ortc_RTCStatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0021762F1E9701C6008204EA /* impl_org_ortc_RTCStatsReport.cpp */; }; + 0021780C1E9701C7008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176311E9701C6008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp */; }; + 0021780D1E9701C7008204EA /* impl_org_ortc_Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176331E9701C6008204EA /* impl_org_ortc_Settings.cpp */; }; + 0021780E1E9701C7008204EA /* impl_org_ortc_StringOrStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 002176351E9701C6008204EA /* impl_org_ortc_StringOrStringList.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 0021713B1E97017D008204EA /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0021713D1E97017D008204EA /* libortclib-wrapper-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libortclib-wrapper-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 002174FA1E9701C3008204EA /* impl_org_ortc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc.cpp; sourceTree = ""; }; + 002174FB1E9701C3008204EA /* impl_org_ortc_adapter_MediaStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_MediaStream.cpp; sourceTree = ""; }; + 002174FC1E9701C3008204EA /* impl_org_ortc_adapter_MediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_MediaStream.h; sourceTree = ""; }; + 002174FD1E9701C3008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCAnswerOptions.cpp; sourceTree = ""; }; + 002174FE1E9701C3008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCAnswerOptions.h; sourceTree = ""; }; + 002174FF1E9701C3008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCCapabilityOptions.cpp; sourceTree = ""; }; + 002175001E9701C3008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCCapabilityOptions.h; sourceTree = ""; }; + 002175011E9701C3008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCConfiguration.cpp; sourceTree = ""; }; + 002175021E9701C3008204EA /* impl_org_ortc_adapter_RTCConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCConfiguration.h; sourceTree = ""; }; + 002175031E9701C3008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCIceCandidate.cpp; sourceTree = ""; }; + 002175041E9701C3008204EA /* impl_org_ortc_adapter_RTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCIceCandidate.h; sourceTree = ""; }; + 002175051E9701C3008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp; sourceTree = ""; }; + 002175061E9701C3008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h; sourceTree = ""; }; + 002175071E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp; sourceTree = ""; }; + 002175081E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCOfferAnswerOptions.h; sourceTree = ""; }; + 002175091E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCOfferOptions.cpp; sourceTree = ""; }; + 0021750A1E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCOfferOptions.h; sourceTree = ""; }; + 0021750B1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCPeerConnection.cpp; sourceTree = ""; }; + 0021750C1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCPeerConnection.h; sourceTree = ""; }; + 0021750D1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp; sourceTree = ""; }; + 0021750E1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h; sourceTree = ""; }; + 0021750F1E9701C4008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp; sourceTree = ""; }; + 002175101E9701C4008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h; sourceTree = ""; }; + 002175111E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescription.cpp; sourceTree = ""; }; + 002175121E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescription.h; sourceTree = ""; }; + 002175131E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp; sourceTree = ""; }; + 002175141E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h; sourceTree = ""; }; + 002175151E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp; sourceTree = ""; }; + 002175161E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h; sourceTree = ""; }; + 002175171E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp; sourceTree = ""; }; + 002175181E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionDescription.h; sourceTree = ""; }; + 002175191E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp; sourceTree = ""; }; + 0021751A1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h; sourceTree = ""; }; + 0021751B1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp; sourceTree = ""; }; + 0021751C1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h; sourceTree = ""; }; + 0021751D1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp; sourceTree = ""; }; + 0021751E1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h; sourceTree = ""; }; + 0021751F1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp; sourceTree = ""; }; + 002175201E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h; sourceTree = ""; }; + 002175211E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp; sourceTree = ""; }; + 002175221E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h; sourceTree = ""; }; + 002175231E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp; sourceTree = ""; }; + 002175241E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h; sourceTree = ""; }; + 002175251E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp; sourceTree = ""; }; + 002175261E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h; sourceTree = ""; }; + 002175271E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp; sourceTree = ""; }; + 002175281E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionTransport.h; sourceTree = ""; }; + 002175291E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp; sourceTree = ""; }; + 0021752A1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h; sourceTree = ""; }; + 0021752B1E9701C4008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCTrackEvent.cpp; sourceTree = ""; }; + 0021752C1E9701C4008204EA /* impl_org_ortc_adapter_RTCTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCTrackEvent.h; sourceTree = ""; }; + 0021752D1E9701C4008204EA /* impl_org_ortc_ConstrainBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainBoolean.cpp; sourceTree = ""; }; + 0021752E1E9701C4008204EA /* impl_org_ortc_ConstrainBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainBoolean.h; sourceTree = ""; }; + 0021752F1E9701C4008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainBooleanParameters.cpp; sourceTree = ""; }; + 002175301E9701C4008204EA /* impl_org_ortc_ConstrainBooleanParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainBooleanParameters.h; sourceTree = ""; }; + 002175311E9701C4008204EA /* impl_org_ortc_ConstrainDouble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainDouble.cpp; sourceTree = ""; }; + 002175321E9701C4008204EA /* impl_org_ortc_ConstrainDouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainDouble.h; sourceTree = ""; }; + 002175331E9701C4008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainDoubleRange.cpp; sourceTree = ""; }; + 002175341E9701C4008204EA /* impl_org_ortc_ConstrainDoubleRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainDoubleRange.h; sourceTree = ""; }; + 002175351E9701C4008204EA /* impl_org_ortc_ConstrainLong.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainLong.cpp; sourceTree = ""; }; + 002175361E9701C4008204EA /* impl_org_ortc_ConstrainLong.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainLong.h; sourceTree = ""; }; + 002175371E9701C4008204EA /* impl_org_ortc_ConstrainLongRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainLongRange.cpp; sourceTree = ""; }; + 002175381E9701C4008204EA /* impl_org_ortc_ConstrainLongRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainLongRange.h; sourceTree = ""; }; + 002175391E9701C4008204EA /* impl_org_ortc_ConstrainString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainString.cpp; sourceTree = ""; }; + 0021753A1E9701C4008204EA /* impl_org_ortc_ConstrainString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainString.h; sourceTree = ""; }; + 0021753B1E9701C4008204EA /* impl_org_ortc_ConstrainStringParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainStringParameters.cpp; sourceTree = ""; }; + 0021753C1E9701C4008204EA /* impl_org_ortc_ConstrainStringParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainStringParameters.h; sourceTree = ""; }; + 0021753D1E9701C4008204EA /* impl_org_ortc_Dispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Dispatcher.cpp; sourceTree = ""; }; + 0021753E1E9701C4008204EA /* impl_org_ortc_Dispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Dispatcher.h; sourceTree = ""; }; + 0021753F1E9701C4008204EA /* impl_org_ortc_DoubleRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_DoubleRange.cpp; sourceTree = ""; }; + 002175401E9701C4008204EA /* impl_org_ortc_DoubleRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_DoubleRange.h; sourceTree = ""; }; + 002175411E9701C4008204EA /* impl_org_ortc_Error.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Error.cpp; sourceTree = ""; }; + 002175421E9701C4008204EA /* impl_org_ortc_Error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Error.h; sourceTree = ""; }; + 002175431E9701C4008204EA /* impl_org_ortc_ErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ErrorEvent.cpp; sourceTree = ""; }; + 002175441E9701C4008204EA /* impl_org_ortc_ErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ErrorEvent.h; sourceTree = ""; }; + 002175451E9701C4008204EA /* impl_org_ortc_Helper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Helper.cpp; sourceTree = ""; }; + 002175461E9701C4008204EA /* impl_org_ortc_Helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Helper.h; sourceTree = ""; }; + 002175471E9701C4008204EA /* impl_org_ortc_Json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Json.cpp; sourceTree = ""; }; + 002175481E9701C4008204EA /* impl_org_ortc_Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Json.h; sourceTree = ""; }; + 002175491E9701C4008204EA /* impl_org_ortc_Logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Logger.cpp; sourceTree = ""; }; + 0021754A1E9701C4008204EA /* impl_org_ortc_Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Logger.h; sourceTree = ""; }; + 0021754B1E9701C4008204EA /* impl_org_ortc_LongRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_LongRange.cpp; sourceTree = ""; }; + 0021754C1E9701C4008204EA /* impl_org_ortc_LongRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_LongRange.h; sourceTree = ""; }; + 0021754D1E9701C4008204EA /* impl_org_ortc_MediaControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaControl.cpp; sourceTree = ""; }; + 0021754E1E9701C4008204EA /* impl_org_ortc_MediaControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaControl.h; sourceTree = ""; }; + 0021754F1E9701C4008204EA /* impl_org_ortc_MediaDeviceInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaDeviceInfo.cpp; sourceTree = ""; }; + 002175501E9701C4008204EA /* impl_org_ortc_MediaDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaDeviceInfo.h; sourceTree = ""; }; + 002175511E9701C4008204EA /* impl_org_ortc_MediaDevices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaDevices.cpp; sourceTree = ""; }; + 002175521E9701C4008204EA /* impl_org_ortc_MediaDevices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaDevices.h; sourceTree = ""; }; + 002175531E9701C4008204EA /* impl_org_ortc_MediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaSource.cpp; sourceTree = ""; }; + 002175541E9701C4008204EA /* impl_org_ortc_MediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaSource.h; sourceTree = ""; }; + 002175551E9701C4008204EA /* impl_org_ortc_MediaStreamConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaStreamConstraints.cpp; sourceTree = ""; }; + 002175561E9701C4008204EA /* impl_org_ortc_MediaStreamConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaStreamConstraints.h; sourceTree = ""; }; + 002175571E9701C4008204EA /* impl_org_ortc_MediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaStreamTrack.cpp; sourceTree = ""; }; + 002175581E9701C4008204EA /* impl_org_ortc_MediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaStreamTrack.h; sourceTree = ""; }; + 002175591E9701C4008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackCapabilities.cpp; sourceTree = ""; }; + 0021755A1E9701C4008204EA /* impl_org_ortc_MediaTrackCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackCapabilities.h; sourceTree = ""; }; + 0021755B1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackConstraints.cpp; sourceTree = ""; }; + 0021755C1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackConstraints.h; sourceTree = ""; }; + 0021755D1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackConstraintSet.cpp; sourceTree = ""; }; + 0021755E1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraintSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackConstraintSet.h; sourceTree = ""; }; + 0021755F1E9701C4008204EA /* impl_org_ortc_MediaTrackSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackSettings.cpp; sourceTree = ""; }; + 002175601E9701C4008204EA /* impl_org_ortc_MediaTrackSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackSettings.h; sourceTree = ""; }; + 002175611E9701C4008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackSupportedConstraints.cpp; sourceTree = ""; }; + 002175621E9701C4008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackSupportedConstraints.h; sourceTree = ""; }; + 002175631E9701C4008204EA /* impl_org_ortc_MessageQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MessageQueue.cpp; sourceTree = ""; }; + 002175641E9701C4008204EA /* impl_org_ortc_MessageQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MessageQueue.h; sourceTree = ""; }; + 002175651E9701C4008204EA /* impl_org_ortc_OrtcLib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_OrtcLib.cpp; sourceTree = ""; }; + 002175661E9701C4008204EA /* impl_org_ortc_OrtcLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_OrtcLib.h; sourceTree = ""; }; + 002175671E9701C4008204EA /* impl_org_ortc_OrtcLibWithDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_OrtcLibWithDispatcher.cpp; sourceTree = ""; }; + 002175681E9701C4008204EA /* impl_org_ortc_OrtcLibWithDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_OrtcLibWithDispatcher.h; sourceTree = ""; }; + 002175691E9701C4008204EA /* impl_org_ortc_OverconstrainedError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_OverconstrainedError.cpp; sourceTree = ""; }; + 0021756A1E9701C4008204EA /* impl_org_ortc_OverconstrainedError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_OverconstrainedError.h; sourceTree = ""; }; + 0021756B1E9701C4008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_OverconstrainedErrorEvent.cpp; sourceTree = ""; }; + 0021756C1E9701C4008204EA /* impl_org_ortc_OverconstrainedErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_OverconstrainedErrorEvent.h; sourceTree = ""; }; + 0021756D1E9701C4008204EA /* impl_org_ortc_RTCCertificate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCCertificate.cpp; sourceTree = ""; }; + 0021756E1E9701C4008204EA /* impl_org_ortc_RTCCertificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCCertificate.h; sourceTree = ""; }; + 0021756F1E9701C4008204EA /* impl_org_ortc_RTCCertificateStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCCertificateStats.cpp; sourceTree = ""; }; + 002175701E9701C4008204EA /* impl_org_ortc_RTCCertificateStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCCertificateStats.h; sourceTree = ""; }; + 002175711E9701C4008204EA /* impl_org_ortc_RTCCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCCodec.cpp; sourceTree = ""; }; + 002175721E9701C4008204EA /* impl_org_ortc_RTCCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCCodec.h; sourceTree = ""; }; + 002175731E9701C4008204EA /* impl_org_ortc_RTCDataChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannel.cpp; sourceTree = ""; }; + 002175741E9701C4008204EA /* impl_org_ortc_RTCDataChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannel.h; sourceTree = ""; }; + 002175751E9701C4008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannelEvent.cpp; sourceTree = ""; }; + 002175761E9701C4008204EA /* impl_org_ortc_RTCDataChannelEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannelEvent.h; sourceTree = ""; }; + 002175771E9701C4008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannelParameters.cpp; sourceTree = ""; }; + 002175781E9701C4008204EA /* impl_org_ortc_RTCDataChannelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannelParameters.h; sourceTree = ""; }; + 002175791E9701C4008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannelStateChangeEvent.cpp; sourceTree = ""; }; + 0021757A1E9701C4008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannelStateChangeEvent.h; sourceTree = ""; }; + 0021757B1E9701C4008204EA /* impl_org_ortc_RTCDataChannelStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannelStats.cpp; sourceTree = ""; }; + 0021757C1E9701C4008204EA /* impl_org_ortc_RTCDataChannelStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannelStats.h; sourceTree = ""; }; + 0021757D1E9701C4008204EA /* impl_org_ortc_RTCDataTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataTransport.cpp; sourceTree = ""; }; + 0021757E1E9701C4008204EA /* impl_org_ortc_RTCDataTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataTransport.h; sourceTree = ""; }; + 0021757F1E9701C4008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsCertificateBinary.cpp; sourceTree = ""; }; + 002175801E9701C4008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsCertificateBinary.h; sourceTree = ""; }; + 002175811E9701C4008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsFingerprint.cpp; sourceTree = ""; }; + 002175821E9701C4008204EA /* impl_org_ortc_RTCDtlsFingerprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsFingerprint.h; sourceTree = ""; }; + 002175831E9701C4008204EA /* impl_org_ortc_RTCDtlsParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsParameters.cpp; sourceTree = ""; }; + 002175841E9701C4008204EA /* impl_org_ortc_RTCDtlsParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsParameters.h; sourceTree = ""; }; + 002175851E9701C4008204EA /* impl_org_ortc_RTCDtlsTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsTransport.cpp; sourceTree = ""; }; + 002175861E9701C4008204EA /* impl_org_ortc_RTCDtlsTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsTransport.h; sourceTree = ""; }; + 002175871E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp; sourceTree = ""; }; + 002175881E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsTransportStateChangeEvent.h; sourceTree = ""; }; + 002175891E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsTransportStats.cpp; sourceTree = ""; }; + 0021758A1E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsTransportStats.h; sourceTree = ""; }; + 0021758B1E9701C4008204EA /* impl_org_ortc_RTCDtmfSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtmfSender.cpp; sourceTree = ""; }; + 0021758C1E9701C4008204EA /* impl_org_ortc_RTCDtmfSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtmfSender.h; sourceTree = ""; }; + 0021758D1E9701C4008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtmfToneChangeEvent.cpp; sourceTree = ""; }; + 0021758E1E9701C4008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtmfToneChangeEvent.h; sourceTree = ""; }; + 0021758F1E9701C4008204EA /* impl_org_ortc_RTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidate.cpp; sourceTree = ""; }; + 002175901E9701C4008204EA /* impl_org_ortc_RTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidate.h; sourceTree = ""; }; + 002175911E9701C4008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidateAttributes.cpp; sourceTree = ""; }; + 002175921E9701C4008204EA /* impl_org_ortc_RTCIceCandidateAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidateAttributes.h; sourceTree = ""; }; + 002175931E9701C5008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidateComplete.cpp; sourceTree = ""; }; + 002175941E9701C5008204EA /* impl_org_ortc_RTCIceCandidateComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidateComplete.h; sourceTree = ""; }; + 002175951E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidatePair.cpp; sourceTree = ""; }; + 002175961E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidatePair.h; sourceTree = ""; }; + 002175971E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp; sourceTree = ""; }; + 002175981E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidatePairChangeEvent.h; sourceTree = ""; }; + 002175991E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidatePairStats.cpp; sourceTree = ""; }; + 0021759A1E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidatePairStats.h; sourceTree = ""; }; + 0021759B1E9701C5008204EA /* impl_org_ortc_RTCIceGatherer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGatherer.cpp; sourceTree = ""; }; + 0021759C1E9701C5008204EA /* impl_org_ortc_RTCIceGatherer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGatherer.h; sourceTree = ""; }; + 0021759D1E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererCandidate.cpp; sourceTree = ""; }; + 0021759E1E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererCandidate.h; sourceTree = ""; }; + 0021759F1E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp; sourceTree = ""; }; + 002175A01E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h; sourceTree = ""; }; + 002175A11E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererCandidateEvent.cpp; sourceTree = ""; }; + 002175A21E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererCandidateEvent.h; sourceTree = ""; }; + 002175A31E9701C5008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererIceErrorEvent.cpp; sourceTree = ""; }; + 002175A41E9701C5008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererIceErrorEvent.h; sourceTree = ""; }; + 002175A51E9701C5008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererStateChangeEvent.cpp; sourceTree = ""; }; + 002175A61E9701C5008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererStateChangeEvent.h; sourceTree = ""; }; + 002175A71E9701C5008204EA /* impl_org_ortc_RTCIceGathererStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererStats.cpp; sourceTree = ""; }; + 002175A81E9701C5008204EA /* impl_org_ortc_RTCIceGathererStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererStats.h; sourceTree = ""; }; + 002175A91E9701C5008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGatherInterfacePolicy.cpp; sourceTree = ""; }; + 002175AA1E9701C5008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGatherInterfacePolicy.h; sourceTree = ""; }; + 002175AB1E9701C5008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGatherOptions.cpp; sourceTree = ""; }; + 002175AC1E9701C5008204EA /* impl_org_ortc_RTCIceGatherOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGatherOptions.h; sourceTree = ""; }; + 002175AD1E9701C5008204EA /* impl_org_ortc_RTCIceParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceParameters.cpp; sourceTree = ""; }; + 002175AE1E9701C5008204EA /* impl_org_ortc_RTCIceParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceParameters.h; sourceTree = ""; }; + 002175AF1E9701C5008204EA /* impl_org_ortc_RTCIceServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceServer.cpp; sourceTree = ""; }; + 002175B01E9701C5008204EA /* impl_org_ortc_RTCIceServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceServer.h; sourceTree = ""; }; + 002175B11E9701C5008204EA /* impl_org_ortc_RTCIceTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransport.cpp; sourceTree = ""; }; + 002175B21E9701C5008204EA /* impl_org_ortc_RTCIceTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransport.h; sourceTree = ""; }; + 002175B31E9701C5008204EA /* impl_org_ortc_RTCIceTransportController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransportController.cpp; sourceTree = ""; }; + 002175B41E9701C5008204EA /* impl_org_ortc_RTCIceTransportController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransportController.h; sourceTree = ""; }; + 002175B51E9701C5008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransportOptions.cpp; sourceTree = ""; }; + 002175B61E9701C5008204EA /* impl_org_ortc_RTCIceTransportOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransportOptions.h; sourceTree = ""; }; + 002175B71E9701C5008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransportStateChangeEvent.cpp; sourceTree = ""; }; + 002175B81E9701C5008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransportStateChangeEvent.h; sourceTree = ""; }; + 002175B91E9701C5008204EA /* impl_org_ortc_RTCIceTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransportStats.cpp; sourceTree = ""; }; + 002175BA1E9701C5008204EA /* impl_org_ortc_RTCIceTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransportStats.h; sourceTree = ""; }; + 002175BB1E9701C5008204EA /* impl_org_ortc_RTCIdentity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIdentity.cpp; sourceTree = ""; }; + 002175BC1E9701C5008204EA /* impl_org_ortc_RTCIdentity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIdentity.h; sourceTree = ""; }; + 002175BD1E9701C5008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIdentityAssertion.cpp; sourceTree = ""; }; + 002175BE1E9701C5008204EA /* impl_org_ortc_RTCIdentityAssertion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIdentityAssertion.h; sourceTree = ""; }; + 002175BF1E9701C5008204EA /* impl_org_ortc_RTCIdentityError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIdentityError.cpp; sourceTree = ""; }; + 002175C01E9701C5008204EA /* impl_org_ortc_RTCIdentityError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIdentityError.h; sourceTree = ""; }; + 002175C11E9701C5008204EA /* impl_org_ortc_RTCIdentityResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIdentityResult.cpp; sourceTree = ""; }; + 002175C21E9701C5008204EA /* impl_org_ortc_RTCIdentityResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIdentityResult.h; sourceTree = ""; }; + 002175C31E9701C5008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCInboundRtpStreamStats.cpp; sourceTree = ""; }; + 002175C41E9701C5008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCInboundRtpStreamStats.h; sourceTree = ""; }; + 002175C51E9701C5008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCMediaStreamStats.cpp; sourceTree = ""; }; + 002175C61E9701C5008204EA /* impl_org_ortc_RTCMediaStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCMediaStreamStats.h; sourceTree = ""; }; + 002175C71E9701C5008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCMediaStreamTrackStats.cpp; sourceTree = ""; }; + 002175C81E9701C5008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCMediaStreamTrackStats.h; sourceTree = ""; }; + 002175C91E9701C5008204EA /* impl_org_ortc_RTCMessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCMessageEvent.cpp; sourceTree = ""; }; + 002175CA1E9701C5008204EA /* impl_org_ortc_RTCMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCMessageEvent.h; sourceTree = ""; }; + 002175CB1E9701C5008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCOutboundRtpStreamStats.cpp; sourceTree = ""; }; + 002175CC1E9701C5008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCOutboundRtpStreamStats.h; sourceTree = ""; }; + 002175CD1E9701C5008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtcpFeedback.cpp; sourceTree = ""; }; + 002175CE1E9701C5008204EA /* impl_org_ortc_RTCRtcpFeedback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtcpFeedback.h; sourceTree = ""; }; + 002175CF1E9701C5008204EA /* impl_org_ortc_RTCRtcpParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtcpParameters.cpp; sourceTree = ""; }; + 002175D01E9701C5008204EA /* impl_org_ortc_RTCRtcpParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtcpParameters.h; sourceTree = ""; }; + 002175D11E9701C5008204EA /* impl_org_ortc_RTCRtcpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtcpTransport.cpp; sourceTree = ""; }; + 002175D21E9701C5008204EA /* impl_org_ortc_RTCRtcpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtcpTransport.h; sourceTree = ""; }; + 002175D31E9701C5008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCapabilities.cpp; sourceTree = ""; }; + 002175D41E9701C5008204EA /* impl_org_ortc_RTCRtpCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCapabilities.h; sourceTree = ""; }; + 002175D51E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecCapability.cpp; sourceTree = ""; }; + 002175D61E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecCapability.h; sourceTree = ""; }; + 002175D71E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp; sourceTree = ""; }; + 002175D81E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecCapabilityOptions.h; sourceTree = ""; }; + 002175D91E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp; sourceTree = ""; }; + 002175DA1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecCapabilityParameters.h; sourceTree = ""; }; + 002175DB1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecParameters.cpp; sourceTree = ""; }; + 002175DC1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecParameters.h; sourceTree = ""; }; + 002175DD1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecParameterSettings.cpp; sourceTree = ""; }; + 002175DE1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecParameterSettings.h; sourceTree = ""; }; + 002175DF1E9701C5008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpContributingSource.cpp; sourceTree = ""; }; + 002175E01E9701C5008204EA /* impl_org_ortc_RTCRtpContributingSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpContributingSource.h; sourceTree = ""; }; + 002175E11E9701C5008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpEncodingParameters.cpp; sourceTree = ""; }; + 002175E21E9701C5008204EA /* impl_org_ortc_RTCRtpEncodingParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpEncodingParameters.h; sourceTree = ""; }; + 002175E31E9701C5008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpFecParameters.cpp; sourceTree = ""; }; + 002175E41E9701C5008204EA /* impl_org_ortc_RTCRtpFecParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpFecParameters.h; sourceTree = ""; }; + 002175E51E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp; sourceTree = ""; }; + 002175E61E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h; sourceTree = ""; }; + 002175E71E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp; sourceTree = ""; }; + 002175E81E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h; sourceTree = ""; }; + 002175E91E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp; sourceTree = ""; }; + 002175EA1E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h; sourceTree = ""; }; + 002175EB1E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp; sourceTree = ""; }; + 002175EC1E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpH264CodecParameterSettings.h; sourceTree = ""; }; + 002175ED1E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpHeaderExtension.cpp; sourceTree = ""; }; + 002175EE1E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpHeaderExtension.h; sourceTree = ""; }; + 002175EF1E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp; sourceTree = ""; }; + 002175F01E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpHeaderExtensionParameters.h; sourceTree = ""; }; + 002175F11E9701C5008204EA /* impl_org_ortc_RTCRtpListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpListener.cpp; sourceTree = ""; }; + 002175F21E9701C5008204EA /* impl_org_ortc_RTCRtpListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpListener.h; sourceTree = ""; }; + 002175F31E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp; sourceTree = ""; }; + 002175F41E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h; sourceTree = ""; }; + 002175F51E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp; sourceTree = ""; }; + 002175F61E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h; sourceTree = ""; }; + 002175F71E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp; sourceTree = ""; }; + 002175F81E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpOpusCodecParameterSettings.h; sourceTree = ""; }; + 002175F91E9701C5008204EA /* impl_org_ortc_RTCRtpParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpParameters.cpp; sourceTree = ""; }; + 002175FA1E9701C5008204EA /* impl_org_ortc_RTCRtpParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpParameters.h; sourceTree = ""; }; + 002175FB1E9701C5008204EA /* impl_org_ortc_RTCRtpReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpReceiver.cpp; sourceTree = ""; }; + 002175FC1E9701C5008204EA /* impl_org_ortc_RTCRtpReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpReceiver.h; sourceTree = ""; }; + 002175FD1E9701C5008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp; sourceTree = ""; }; + 002175FE1E9701C5008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpRedCodecParameterSettings.h; sourceTree = ""; }; + 002175FF1E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp; sourceTree = ""; }; + 002176001E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h; sourceTree = ""; }; + 002176011E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp; sourceTree = ""; }; + 002176021E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpRtxCodecParameterSettings.h; sourceTree = ""; }; + 002176031E9701C5008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpRtxParameters.cpp; sourceTree = ""; }; + 002176041E9701C5008204EA /* impl_org_ortc_RTCRtpRtxParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpRtxParameters.h; sourceTree = ""; }; + 002176051E9701C5008204EA /* impl_org_ortc_RTCRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpSender.cpp; sourceTree = ""; }; + 002176061E9701C5008204EA /* impl_org_ortc_RTCRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpSender.h; sourceTree = ""; }; + 002176071E9701C5008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpStreamStats.cpp; sourceTree = ""; }; + 002176081E9701C6008204EA /* impl_org_ortc_RTCRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpStreamStats.h; sourceTree = ""; }; + 002176091E9701C6008204EA /* impl_org_ortc_RTCRtpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpTransport.cpp; sourceTree = ""; }; + 0021760A1E9701C6008204EA /* impl_org_ortc_RTCRtpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpTransport.h; sourceTree = ""; }; + 0021760B1E9701C6008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpUnhandledEvent.cpp; sourceTree = ""; }; + 0021760C1E9701C6008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpUnhandledEvent.h; sourceTree = ""; }; + 0021760D1E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp; sourceTree = ""; }; + 0021760E1E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h; sourceTree = ""; }; + 0021760F1E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp; sourceTree = ""; }; + 002176101E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpVp8CodecParameterSettings.h; sourceTree = ""; }; + 002176111E9701C6008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpCapabilities.cpp; sourceTree = ""; }; + 002176121E9701C6008204EA /* impl_org_ortc_RTCSctpCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpCapabilities.h; sourceTree = ""; }; + 002176131E9701C6008204EA /* impl_org_ortc_RTCSctpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransport.cpp; sourceTree = ""; }; + 002176141E9701C6008204EA /* impl_org_ortc_RTCSctpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransport.h; sourceTree = ""; }; + 002176151E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransportListener.cpp; sourceTree = ""; }; + 002176161E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransportListener.h; sourceTree = ""; }; + 002176171E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransportListenerEvent.cpp; sourceTree = ""; }; + 002176181E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransportListenerEvent.h; sourceTree = ""; }; + 002176191E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp; sourceTree = ""; }; + 0021761A1E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransportStateChangeEvent.h; sourceTree = ""; }; + 0021761B1E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransportStats.cpp; sourceTree = ""; }; + 0021761C1E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransportStats.h; sourceTree = ""; }; + 0021761D1E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp; sourceTree = ""; }; + 0021761E1E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesCryptoParameters.h; sourceTree = ""; }; + 0021761F1E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesKeyParameters.cpp; sourceTree = ""; }; + 002176201E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesKeyParameters.h; sourceTree = ""; }; + 002176211E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesParameters.cpp; sourceTree = ""; }; + 002176221E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesParameters.h; sourceTree = ""; }; + 002176231E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesTransport.cpp; sourceTree = ""; }; + 002176241E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesTransport.h; sourceTree = ""; }; + 002176251E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp; sourceTree = ""; }; + 002176261E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h; sourceTree = ""; }; + 002176271E9701C6008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpTransportStats.cpp; sourceTree = ""; }; + 002176281E9701C6008204EA /* impl_org_ortc_RTCSrtpTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpTransportStats.h; sourceTree = ""; }; + 002176291E9701C6008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSsrcConflictEvent.cpp; sourceTree = ""; }; + 0021762A1E9701C6008204EA /* impl_org_ortc_RTCSsrcConflictEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSsrcConflictEvent.h; sourceTree = ""; }; + 0021762B1E9701C6008204EA /* impl_org_ortc_RTCStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCStats.cpp; sourceTree = ""; }; + 0021762C1E9701C6008204EA /* impl_org_ortc_RTCStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCStats.h; sourceTree = ""; }; + 0021762D1E9701C6008204EA /* impl_org_ortc_RTCStatsProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCStatsProvider.cpp; sourceTree = ""; }; + 0021762E1E9701C6008204EA /* impl_org_ortc_RTCStatsProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCStatsProvider.h; sourceTree = ""; }; + 0021762F1E9701C6008204EA /* impl_org_ortc_RTCStatsReport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCStatsReport.cpp; sourceTree = ""; }; + 002176301E9701C6008204EA /* impl_org_ortc_RTCStatsReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCStatsReport.h; sourceTree = ""; }; + 002176311E9701C6008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCStatsTypeSet.cpp; sourceTree = ""; }; + 002176321E9701C6008204EA /* impl_org_ortc_RTCStatsTypeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCStatsTypeSet.h; sourceTree = ""; }; + 002176331E9701C6008204EA /* impl_org_ortc_Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Settings.cpp; sourceTree = ""; }; + 002176341E9701C6008204EA /* impl_org_ortc_Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Settings.h; sourceTree = ""; }; + 002176351E9701C6008204EA /* impl_org_ortc_StringOrStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_StringOrStringList.cpp; sourceTree = ""; }; + 002176361E9701C6008204EA /* impl_org_ortc_StringOrStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_StringOrStringList.h; sourceTree = ""; }; + 002176371E9701C6008204EA /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0021713A1E97017D008204EA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 002171341E97017D008204EA = { + isa = PBXGroup; + children = ( + 002171491E9701C1008204EA /* wrapper */, + 0021713E1E97017D008204EA /* Products */, + ); + sourceTree = ""; + }; + 0021713E1E97017D008204EA /* Products */ = { + isa = PBXGroup; + children = ( + 0021713D1E97017D008204EA /* libortclib-wrapper-ios.a */, + ); + name = Products; + sourceTree = ""; + }; + 002171491E9701C1008204EA /* wrapper */ = { + isa = PBXGroup; + children = ( + 002174FA1E9701C3008204EA /* impl_org_ortc.cpp */, + 002174FB1E9701C3008204EA /* impl_org_ortc_adapter_MediaStream.cpp */, + 002174FC1E9701C3008204EA /* impl_org_ortc_adapter_MediaStream.h */, + 002174FD1E9701C3008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp */, + 002174FE1E9701C3008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.h */, + 002174FF1E9701C3008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp */, + 002175001E9701C3008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.h */, + 002175011E9701C3008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp */, + 002175021E9701C3008204EA /* impl_org_ortc_adapter_RTCConfiguration.h */, + 002175031E9701C3008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp */, + 002175041E9701C3008204EA /* impl_org_ortc_adapter_RTCIceCandidate.h */, + 002175051E9701C3008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */, + 002175061E9701C3008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */, + 002175071E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp */, + 002175081E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.h */, + 002175091E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp */, + 0021750A1E9701C3008204EA /* impl_org_ortc_adapter_RTCOfferOptions.h */, + 0021750B1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp */, + 0021750C1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnection.h */, + 0021750D1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */, + 0021750E1E9701C3008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */, + 0021750F1E9701C4008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */, + 002175101E9701C4008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h */, + 002175111E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp */, + 002175121E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescription.h */, + 002175131E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */, + 002175141E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */, + 002175151E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */, + 002175161E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */, + 002175171E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */, + 002175181E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.h */, + 002175191E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */, + 0021751A1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */, + 0021751B1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */, + 0021751C1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */, + 0021751D1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */, + 0021751E1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */, + 0021751F1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */, + 002175201E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */, + 002175211E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */, + 002175221E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */, + 002175231E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */, + 002175241E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */, + 002175251E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */, + 002175261E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */, + 002175271E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */, + 002175281E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.h */, + 002175291E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */, + 0021752A1E9701C4008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */, + 0021752B1E9701C4008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp */, + 0021752C1E9701C4008204EA /* impl_org_ortc_adapter_RTCTrackEvent.h */, + 0021752D1E9701C4008204EA /* impl_org_ortc_ConstrainBoolean.cpp */, + 0021752E1E9701C4008204EA /* impl_org_ortc_ConstrainBoolean.h */, + 0021752F1E9701C4008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp */, + 002175301E9701C4008204EA /* impl_org_ortc_ConstrainBooleanParameters.h */, + 002175311E9701C4008204EA /* impl_org_ortc_ConstrainDouble.cpp */, + 002175321E9701C4008204EA /* impl_org_ortc_ConstrainDouble.h */, + 002175331E9701C4008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp */, + 002175341E9701C4008204EA /* impl_org_ortc_ConstrainDoubleRange.h */, + 002175351E9701C4008204EA /* impl_org_ortc_ConstrainLong.cpp */, + 002175361E9701C4008204EA /* impl_org_ortc_ConstrainLong.h */, + 002175371E9701C4008204EA /* impl_org_ortc_ConstrainLongRange.cpp */, + 002175381E9701C4008204EA /* impl_org_ortc_ConstrainLongRange.h */, + 002175391E9701C4008204EA /* impl_org_ortc_ConstrainString.cpp */, + 0021753A1E9701C4008204EA /* impl_org_ortc_ConstrainString.h */, + 0021753B1E9701C4008204EA /* impl_org_ortc_ConstrainStringParameters.cpp */, + 0021753C1E9701C4008204EA /* impl_org_ortc_ConstrainStringParameters.h */, + 0021753D1E9701C4008204EA /* impl_org_ortc_Dispatcher.cpp */, + 0021753E1E9701C4008204EA /* impl_org_ortc_Dispatcher.h */, + 0021753F1E9701C4008204EA /* impl_org_ortc_DoubleRange.cpp */, + 002175401E9701C4008204EA /* impl_org_ortc_DoubleRange.h */, + 002175411E9701C4008204EA /* impl_org_ortc_Error.cpp */, + 002175421E9701C4008204EA /* impl_org_ortc_Error.h */, + 002175431E9701C4008204EA /* impl_org_ortc_ErrorEvent.cpp */, + 002175441E9701C4008204EA /* impl_org_ortc_ErrorEvent.h */, + 002175451E9701C4008204EA /* impl_org_ortc_Helper.cpp */, + 002175461E9701C4008204EA /* impl_org_ortc_Helper.h */, + 002175471E9701C4008204EA /* impl_org_ortc_Json.cpp */, + 002175481E9701C4008204EA /* impl_org_ortc_Json.h */, + 002175491E9701C4008204EA /* impl_org_ortc_Logger.cpp */, + 0021754A1E9701C4008204EA /* impl_org_ortc_Logger.h */, + 0021754B1E9701C4008204EA /* impl_org_ortc_LongRange.cpp */, + 0021754C1E9701C4008204EA /* impl_org_ortc_LongRange.h */, + 0021754D1E9701C4008204EA /* impl_org_ortc_MediaControl.cpp */, + 0021754E1E9701C4008204EA /* impl_org_ortc_MediaControl.h */, + 0021754F1E9701C4008204EA /* impl_org_ortc_MediaDeviceInfo.cpp */, + 002175501E9701C4008204EA /* impl_org_ortc_MediaDeviceInfo.h */, + 002175511E9701C4008204EA /* impl_org_ortc_MediaDevices.cpp */, + 002175521E9701C4008204EA /* impl_org_ortc_MediaDevices.h */, + 002175531E9701C4008204EA /* impl_org_ortc_MediaSource.cpp */, + 002175541E9701C4008204EA /* impl_org_ortc_MediaSource.h */, + 002175551E9701C4008204EA /* impl_org_ortc_MediaStreamConstraints.cpp */, + 002175561E9701C4008204EA /* impl_org_ortc_MediaStreamConstraints.h */, + 002175571E9701C4008204EA /* impl_org_ortc_MediaStreamTrack.cpp */, + 002175581E9701C4008204EA /* impl_org_ortc_MediaStreamTrack.h */, + 002175591E9701C4008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp */, + 0021755A1E9701C4008204EA /* impl_org_ortc_MediaTrackCapabilities.h */, + 0021755B1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraints.cpp */, + 0021755C1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraints.h */, + 0021755D1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp */, + 0021755E1E9701C4008204EA /* impl_org_ortc_MediaTrackConstraintSet.h */, + 0021755F1E9701C4008204EA /* impl_org_ortc_MediaTrackSettings.cpp */, + 002175601E9701C4008204EA /* impl_org_ortc_MediaTrackSettings.h */, + 002175611E9701C4008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp */, + 002175621E9701C4008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.h */, + 002175631E9701C4008204EA /* impl_org_ortc_MessageQueue.cpp */, + 002175641E9701C4008204EA /* impl_org_ortc_MessageQueue.h */, + 002175651E9701C4008204EA /* impl_org_ortc_OrtcLib.cpp */, + 002175661E9701C4008204EA /* impl_org_ortc_OrtcLib.h */, + 002175671E9701C4008204EA /* impl_org_ortc_OrtcLibWithDispatcher.cpp */, + 002175681E9701C4008204EA /* impl_org_ortc_OrtcLibWithDispatcher.h */, + 002175691E9701C4008204EA /* impl_org_ortc_OverconstrainedError.cpp */, + 0021756A1E9701C4008204EA /* impl_org_ortc_OverconstrainedError.h */, + 0021756B1E9701C4008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp */, + 0021756C1E9701C4008204EA /* impl_org_ortc_OverconstrainedErrorEvent.h */, + 0021756D1E9701C4008204EA /* impl_org_ortc_RTCCertificate.cpp */, + 0021756E1E9701C4008204EA /* impl_org_ortc_RTCCertificate.h */, + 0021756F1E9701C4008204EA /* impl_org_ortc_RTCCertificateStats.cpp */, + 002175701E9701C4008204EA /* impl_org_ortc_RTCCertificateStats.h */, + 002175711E9701C4008204EA /* impl_org_ortc_RTCCodec.cpp */, + 002175721E9701C4008204EA /* impl_org_ortc_RTCCodec.h */, + 002175731E9701C4008204EA /* impl_org_ortc_RTCDataChannel.cpp */, + 002175741E9701C4008204EA /* impl_org_ortc_RTCDataChannel.h */, + 002175751E9701C4008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp */, + 002175761E9701C4008204EA /* impl_org_ortc_RTCDataChannelEvent.h */, + 002175771E9701C4008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp */, + 002175781E9701C4008204EA /* impl_org_ortc_RTCDataChannelParameters.h */, + 002175791E9701C4008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp */, + 0021757A1E9701C4008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.h */, + 0021757B1E9701C4008204EA /* impl_org_ortc_RTCDataChannelStats.cpp */, + 0021757C1E9701C4008204EA /* impl_org_ortc_RTCDataChannelStats.h */, + 0021757D1E9701C4008204EA /* impl_org_ortc_RTCDataTransport.cpp */, + 0021757E1E9701C4008204EA /* impl_org_ortc_RTCDataTransport.h */, + 0021757F1E9701C4008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp */, + 002175801E9701C4008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.h */, + 002175811E9701C4008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp */, + 002175821E9701C4008204EA /* impl_org_ortc_RTCDtlsFingerprint.h */, + 002175831E9701C4008204EA /* impl_org_ortc_RTCDtlsParameters.cpp */, + 002175841E9701C4008204EA /* impl_org_ortc_RTCDtlsParameters.h */, + 002175851E9701C4008204EA /* impl_org_ortc_RTCDtlsTransport.cpp */, + 002175861E9701C4008204EA /* impl_org_ortc_RTCDtlsTransport.h */, + 002175871E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */, + 002175881E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.h */, + 002175891E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp */, + 0021758A1E9701C4008204EA /* impl_org_ortc_RTCDtlsTransportStats.h */, + 0021758B1E9701C4008204EA /* impl_org_ortc_RTCDtmfSender.cpp */, + 0021758C1E9701C4008204EA /* impl_org_ortc_RTCDtmfSender.h */, + 0021758D1E9701C4008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp */, + 0021758E1E9701C4008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.h */, + 0021758F1E9701C4008204EA /* impl_org_ortc_RTCIceCandidate.cpp */, + 002175901E9701C4008204EA /* impl_org_ortc_RTCIceCandidate.h */, + 002175911E9701C4008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp */, + 002175921E9701C4008204EA /* impl_org_ortc_RTCIceCandidateAttributes.h */, + 002175931E9701C5008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp */, + 002175941E9701C5008204EA /* impl_org_ortc_RTCIceCandidateComplete.h */, + 002175951E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp */, + 002175961E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePair.h */, + 002175971E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp */, + 002175981E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.h */, + 002175991E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp */, + 0021759A1E9701C5008204EA /* impl_org_ortc_RTCIceCandidatePairStats.h */, + 0021759B1E9701C5008204EA /* impl_org_ortc_RTCIceGatherer.cpp */, + 0021759C1E9701C5008204EA /* impl_org_ortc_RTCIceGatherer.h */, + 0021759D1E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp */, + 0021759E1E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidate.h */, + 0021759F1E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */, + 002175A01E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h */, + 002175A11E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp */, + 002175A21E9701C5008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.h */, + 002175A31E9701C5008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp */, + 002175A41E9701C5008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.h */, + 002175A51E9701C5008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp */, + 002175A61E9701C5008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.h */, + 002175A71E9701C5008204EA /* impl_org_ortc_RTCIceGathererStats.cpp */, + 002175A81E9701C5008204EA /* impl_org_ortc_RTCIceGathererStats.h */, + 002175A91E9701C5008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp */, + 002175AA1E9701C5008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.h */, + 002175AB1E9701C5008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp */, + 002175AC1E9701C5008204EA /* impl_org_ortc_RTCIceGatherOptions.h */, + 002175AD1E9701C5008204EA /* impl_org_ortc_RTCIceParameters.cpp */, + 002175AE1E9701C5008204EA /* impl_org_ortc_RTCIceParameters.h */, + 002175AF1E9701C5008204EA /* impl_org_ortc_RTCIceServer.cpp */, + 002175B01E9701C5008204EA /* impl_org_ortc_RTCIceServer.h */, + 002175B11E9701C5008204EA /* impl_org_ortc_RTCIceTransport.cpp */, + 002175B21E9701C5008204EA /* impl_org_ortc_RTCIceTransport.h */, + 002175B31E9701C5008204EA /* impl_org_ortc_RTCIceTransportController.cpp */, + 002175B41E9701C5008204EA /* impl_org_ortc_RTCIceTransportController.h */, + 002175B51E9701C5008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp */, + 002175B61E9701C5008204EA /* impl_org_ortc_RTCIceTransportOptions.h */, + 002175B71E9701C5008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp */, + 002175B81E9701C5008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.h */, + 002175B91E9701C5008204EA /* impl_org_ortc_RTCIceTransportStats.cpp */, + 002175BA1E9701C5008204EA /* impl_org_ortc_RTCIceTransportStats.h */, + 002175BB1E9701C5008204EA /* impl_org_ortc_RTCIdentity.cpp */, + 002175BC1E9701C5008204EA /* impl_org_ortc_RTCIdentity.h */, + 002175BD1E9701C5008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp */, + 002175BE1E9701C5008204EA /* impl_org_ortc_RTCIdentityAssertion.h */, + 002175BF1E9701C5008204EA /* impl_org_ortc_RTCIdentityError.cpp */, + 002175C01E9701C5008204EA /* impl_org_ortc_RTCIdentityError.h */, + 002175C11E9701C5008204EA /* impl_org_ortc_RTCIdentityResult.cpp */, + 002175C21E9701C5008204EA /* impl_org_ortc_RTCIdentityResult.h */, + 002175C31E9701C5008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp */, + 002175C41E9701C5008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.h */, + 002175C51E9701C5008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp */, + 002175C61E9701C5008204EA /* impl_org_ortc_RTCMediaStreamStats.h */, + 002175C71E9701C5008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp */, + 002175C81E9701C5008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.h */, + 002175C91E9701C5008204EA /* impl_org_ortc_RTCMessageEvent.cpp */, + 002175CA1E9701C5008204EA /* impl_org_ortc_RTCMessageEvent.h */, + 002175CB1E9701C5008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp */, + 002175CC1E9701C5008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.h */, + 002175CD1E9701C5008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp */, + 002175CE1E9701C5008204EA /* impl_org_ortc_RTCRtcpFeedback.h */, + 002175CF1E9701C5008204EA /* impl_org_ortc_RTCRtcpParameters.cpp */, + 002175D01E9701C5008204EA /* impl_org_ortc_RTCRtcpParameters.h */, + 002175D11E9701C5008204EA /* impl_org_ortc_RTCRtcpTransport.cpp */, + 002175D21E9701C5008204EA /* impl_org_ortc_RTCRtcpTransport.h */, + 002175D31E9701C5008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp */, + 002175D41E9701C5008204EA /* impl_org_ortc_RTCRtpCapabilities.h */, + 002175D51E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp */, + 002175D61E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapability.h */, + 002175D71E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp */, + 002175D81E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.h */, + 002175D91E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp */, + 002175DA1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.h */, + 002175DB1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp */, + 002175DC1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameters.h */, + 002175DD1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp */, + 002175DE1E9701C5008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.h */, + 002175DF1E9701C5008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp */, + 002175E01E9701C5008204EA /* impl_org_ortc_RTCRtpContributingSource.h */, + 002175E11E9701C5008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp */, + 002175E21E9701C5008204EA /* impl_org_ortc_RTCRtpEncodingParameters.h */, + 002175E31E9701C5008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp */, + 002175E41E9701C5008204EA /* impl_org_ortc_RTCRtpFecParameters.h */, + 002175E51E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */, + 002175E61E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */, + 002175E71E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */, + 002175E81E9701C5008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */, + 002175E91E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */, + 002175EA1E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h */, + 002175EB1E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp */, + 002175EC1E9701C5008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.h */, + 002175ED1E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp */, + 002175EE1E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtension.h */, + 002175EF1E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp */, + 002175F01E9701C5008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.h */, + 002175F11E9701C5008204EA /* impl_org_ortc_RTCRtpListener.cpp */, + 002175F21E9701C5008204EA /* impl_org_ortc_RTCRtpListener.h */, + 002175F31E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */, + 002175F41E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */, + 002175F51E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */, + 002175F61E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */, + 002175F71E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */, + 002175F81E9701C5008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.h */, + 002175F91E9701C5008204EA /* impl_org_ortc_RTCRtpParameters.cpp */, + 002175FA1E9701C5008204EA /* impl_org_ortc_RTCRtpParameters.h */, + 002175FB1E9701C5008204EA /* impl_org_ortc_RTCRtpReceiver.cpp */, + 002175FC1E9701C5008204EA /* impl_org_ortc_RTCRtpReceiver.h */, + 002175FD1E9701C5008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp */, + 002175FE1E9701C5008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.h */, + 002175FF1E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */, + 002176001E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */, + 002176011E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */, + 002176021E9701C5008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.h */, + 002176031E9701C5008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp */, + 002176041E9701C5008204EA /* impl_org_ortc_RTCRtpRtxParameters.h */, + 002176051E9701C5008204EA /* impl_org_ortc_RTCRtpSender.cpp */, + 002176061E9701C5008204EA /* impl_org_ortc_RTCRtpSender.h */, + 002176071E9701C5008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp */, + 002176081E9701C6008204EA /* impl_org_ortc_RTCRtpStreamStats.h */, + 002176091E9701C6008204EA /* impl_org_ortc_RTCRtpTransport.cpp */, + 0021760A1E9701C6008204EA /* impl_org_ortc_RTCRtpTransport.h */, + 0021760B1E9701C6008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp */, + 0021760C1E9701C6008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.h */, + 0021760D1E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */, + 0021760E1E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */, + 0021760F1E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */, + 002176101E9701C6008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.h */, + 002176111E9701C6008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp */, + 002176121E9701C6008204EA /* impl_org_ortc_RTCSctpCapabilities.h */, + 002176131E9701C6008204EA /* impl_org_ortc_RTCSctpTransport.cpp */, + 002176141E9701C6008204EA /* impl_org_ortc_RTCSctpTransport.h */, + 002176151E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp */, + 002176161E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListener.h */, + 002176171E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp */, + 002176181E9701C6008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.h */, + 002176191E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp */, + 0021761A1E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.h */, + 0021761B1E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp */, + 0021761C1E9701C6008204EA /* impl_org_ortc_RTCSctpTransportStats.h */, + 0021761D1E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp */, + 0021761E1E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.h */, + 0021761F1E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp */, + 002176201E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.h */, + 002176211E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp */, + 002176221E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesParameters.h */, + 002176231E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp */, + 002176241E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransport.h */, + 002176251E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */, + 002176261E9701C6008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */, + 002176271E9701C6008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp */, + 002176281E9701C6008204EA /* impl_org_ortc_RTCSrtpTransportStats.h */, + 002176291E9701C6008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp */, + 0021762A1E9701C6008204EA /* impl_org_ortc_RTCSsrcConflictEvent.h */, + 0021762B1E9701C6008204EA /* impl_org_ortc_RTCStats.cpp */, + 0021762C1E9701C6008204EA /* impl_org_ortc_RTCStats.h */, + 0021762D1E9701C6008204EA /* impl_org_ortc_RTCStatsProvider.cpp */, + 0021762E1E9701C6008204EA /* impl_org_ortc_RTCStatsProvider.h */, + 0021762F1E9701C6008204EA /* impl_org_ortc_RTCStatsReport.cpp */, + 002176301E9701C6008204EA /* impl_org_ortc_RTCStatsReport.h */, + 002176311E9701C6008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp */, + 002176321E9701C6008204EA /* impl_org_ortc_RTCStatsTypeSet.h */, + 002176331E9701C6008204EA /* impl_org_ortc_Settings.cpp */, + 002176341E9701C6008204EA /* impl_org_ortc_Settings.h */, + 002176351E9701C6008204EA /* impl_org_ortc_StringOrStringList.cpp */, + 002176361E9701C6008204EA /* impl_org_ortc_StringOrStringList.h */, + 002176371E9701C6008204EA /* types.h */, + ); + name = wrapper; + path = ../../../ortc/idl/wrapper; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0021713C1E97017D008204EA /* ortclib-wrapper-ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = 002171461E97017D008204EA /* Build configuration list for PBXNativeTarget "ortclib-wrapper-ios" */; + buildPhases = ( + 002171391E97017D008204EA /* Sources */, + 0021713A1E97017D008204EA /* Frameworks */, + 0021713B1E97017D008204EA /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ortclib-wrapper-ios"; + productName = "ortclib-wrapper-ios"; + productReference = 0021713D1E97017D008204EA /* libortclib-wrapper-ios.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 002171351E97017D008204EA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Open Peer Foundation"; + TargetAttributes = { + 0021713C1E97017D008204EA = { + CreatedOnToolsVersion = 8.3; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 002171381E97017D008204EA /* Build configuration list for PBXProject "ortclib-wrapper-ios" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 002171341E97017D008204EA; + productRefGroup = 0021713E1E97017D008204EA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0021713C1E97017D008204EA /* ortclib-wrapper-ios */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 002171391E97017D008204EA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 002178071E9701C7008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp in Sources */, + 002177CA1E9701C6008204EA /* impl_org_ortc_RTCIceParameters.cpp in Sources */, + 002177CD1E9701C6008204EA /* impl_org_ortc_RTCIceTransportController.cpp in Sources */, + 002177CF1E9701C6008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */, + 002177BC1E9701C6008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp in Sources */, + 002177C81E9701C6008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */, + 002177E91E9701C7008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */, + 002177B61E9701C6008204EA /* impl_org_ortc_RTCDtlsTransport.cpp in Sources */, + 002177F61E9701C7008204EA /* impl_org_ortc_RTCRtpSender.cpp in Sources */, + 002177DB1E9701C6008204EA /* impl_org_ortc_RTCRtcpParameters.cpp in Sources */, + 0021780E1E9701C7008204EA /* impl_org_ortc_StringOrStringList.cpp in Sources */, + 002177A41E9701C6008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */, + 002177FB1E9701C7008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */, + 002177EA1E9701C7008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp in Sources */, + 002177751E9701C6008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp in Sources */, + 002177D81E9701C6008204EA /* impl_org_ortc_RTCMessageEvent.cpp in Sources */, + 002177D31E9701C6008204EA /* impl_org_ortc_RTCIdentityError.cpp in Sources */, + 002177741E9701C6008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp in Sources */, + 002178051E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp in Sources */, + 002177851E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */, + 002178011E9701C7008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp in Sources */, + 0021779E1E9701C6008204EA /* impl_org_ortc_MediaStreamConstraints.cpp in Sources */, + 002177E01E9701C6008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */, + 002177BA1E9701C6008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */, + 002177A21E9701C6008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp in Sources */, + 002177C61E9701C6008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */, + 002177E31E9701C7008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp in Sources */, + 002177CB1E9701C6008204EA /* impl_org_ortc_RTCIceServer.cpp in Sources */, + 0021778F1E9701C6008204EA /* impl_org_ortc_ConstrainLongRange.cpp in Sources */, + 002177781E9701C6008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp in Sources */, + 002177831E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */, + 002177DC1E9701C6008204EA /* impl_org_ortc_RTCRtcpTransport.cpp in Sources */, + 0021780C1E9701C7008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp in Sources */, + 002177EC1E9701C7008204EA /* impl_org_ortc_RTCRtpListener.cpp in Sources */, + 0021777C1E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp in Sources */, + 002177CC1E9701C6008204EA /* impl_org_ortc_RTCIceTransport.cpp in Sources */, + 002177F71E9701C7008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp in Sources */, + 0021778D1E9701C6008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp in Sources */, + 002177D21E9701C6008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp in Sources */, + 0021779A1E9701C6008204EA /* impl_org_ortc_MediaControl.cpp in Sources */, + 0021779D1E9701C6008204EA /* impl_org_ortc_MediaSource.cpp in Sources */, + 002177FA1E9701C7008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */, + 002177EF1E9701C7008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */, + 002177D11E9701C6008204EA /* impl_org_ortc_RTCIdentity.cpp in Sources */, + 002177C71E9701C6008204EA /* impl_org_ortc_RTCIceGathererStats.cpp in Sources */, + 002178021E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */, + 002177AC1E9701C6008204EA /* impl_org_ortc_RTCCodec.cpp in Sources */, + 002177F11E9701C7008204EA /* impl_org_ortc_RTCRtpReceiver.cpp in Sources */, + 002177A31E9701C6008204EA /* impl_org_ortc_MediaTrackSettings.cpp in Sources */, + 002177A91E9701C6008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp in Sources */, + 002177B51E9701C6008204EA /* impl_org_ortc_RTCDtlsParameters.cpp in Sources */, + 002177981E9701C6008204EA /* impl_org_ortc_Logger.cpp in Sources */, + 0021778A1E9701C6008204EA /* impl_org_ortc_ConstrainBoolean.cpp in Sources */, + 002177C91E9701C6008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp in Sources */, + 002178081E9701C7008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp in Sources */, + 002177891E9701C6008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp in Sources */, + 002177B71E9701C6008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */, + 002177AB1E9701C6008204EA /* impl_org_ortc_RTCCertificateStats.cpp in Sources */, + 002177761E9701C6008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */, + 002177801E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */, + 002177FF1E9701C7008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */, + 002177EE1E9701C7008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */, + 0021780B1E9701C7008204EA /* impl_org_ortc_RTCStatsReport.cpp in Sources */, + 002177DA1E9701C6008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp in Sources */, + 002177701E9701C6008204EA /* impl_org_ortc.cpp in Sources */, + 002178061E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */, + 0021777D1E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */, + 002177A81E9701C6008204EA /* impl_org_ortc_OverconstrainedError.cpp in Sources */, + 002177DF1E9701C6008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */, + 002177C31E9701C6008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */, + 002177A61E9701C6008204EA /* impl_org_ortc_OrtcLib.cpp in Sources */, + 002177A01E9701C6008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp in Sources */, + 002177711E9701C6008204EA /* impl_org_ortc_adapter_MediaStream.cpp in Sources */, + 002177BD1E9701C6008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp in Sources */, + 002177C01E9701C6008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp in Sources */, + 002177B31E9701C6008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */, + 002177D71E9701C6008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */, + 0021778C1E9701C6008204EA /* impl_org_ortc_ConstrainDouble.cpp in Sources */, + 002177BB1E9701C6008204EA /* impl_org_ortc_RTCIceCandidate.cpp in Sources */, + 002177AA1E9701C6008204EA /* impl_org_ortc_RTCCertificate.cpp in Sources */, + 002178001E9701C7008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */, + 002177F41E9701C7008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */, + 002177771E9701C6008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */, + 002177E71E9701C7008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */, + 002177941E9701C6008204EA /* impl_org_ortc_Error.cpp in Sources */, + 002177991E9701C6008204EA /* impl_org_ortc_LongRange.cpp in Sources */, + 002177ED1E9701C7008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */, + 002177EB1E9701C7008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */, + 002177E21E9701C7008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */, + 002177B21E9701C6008204EA /* impl_org_ortc_RTCDataTransport.cpp in Sources */, + 002177FE1E9701C7008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp in Sources */, + 002177BE1E9701C6008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp in Sources */, + 002177F81E9701C7008204EA /* impl_org_ortc_RTCRtpTransport.cpp in Sources */, + 002177D41E9701C6008204EA /* impl_org_ortc_RTCIdentityResult.cpp in Sources */, + 0021780D1E9701C7008204EA /* impl_org_ortc_Settings.cpp in Sources */, + 002177B01E9701C6008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */, + 002177F21E9701C7008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */, + 002177961E9701C6008204EA /* impl_org_ortc_Helper.cpp in Sources */, + 002177721E9701C6008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */, + 002177E41E9701C7008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp in Sources */, + 002177B11E9701C6008204EA /* impl_org_ortc_RTCDataChannelStats.cpp in Sources */, + 002177911E9701C6008204EA /* impl_org_ortc_ConstrainStringParameters.cpp in Sources */, + 002177881E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */, + 002177931E9701C6008204EA /* impl_org_ortc_DoubleRange.cpp in Sources */, + 0021778B1E9701C6008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp in Sources */, + 0021778E1E9701C6008204EA /* impl_org_ortc_ConstrainLong.cpp in Sources */, + 002177D91E9701C6008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */, + 0021777B1E9701C6008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */, + 002177C51E9701C6008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */, + 002177D51E9701C6008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */, + 002177E11E9701C6008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp in Sources */, + 002177E61E9701C7008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */, + 0021777E1E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */, + 0021777A1E9701C6008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */, + 002177F51E9701C7008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp in Sources */, + 002177A51E9701C6008204EA /* impl_org_ortc_MessageQueue.cpp in Sources */, + 002177951E9701C6008204EA /* impl_org_ortc_ErrorEvent.cpp in Sources */, + 002177D61E9701C6008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp in Sources */, + 002177E51E9701C7008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp in Sources */, + 002177E81E9701C7008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */, + 002177FC1E9701C7008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp in Sources */, + 002177AD1E9701C6008204EA /* impl_org_ortc_RTCDataChannel.cpp in Sources */, + 002177901E9701C6008204EA /* impl_org_ortc_ConstrainString.cpp in Sources */, + 002177821E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */, + 002177C41E9701C6008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */, + 002177DD1E9701C6008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp in Sources */, + 002177B91E9701C6008204EA /* impl_org_ortc_RTCDtmfSender.cpp in Sources */, + 002177B81E9701C6008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp in Sources */, + 002177DE1E9701C6008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp in Sources */, + 002177AE1E9701C6008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp in Sources */, + 002177F31E9701C7008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */, + 002177C11E9701C6008204EA /* impl_org_ortc_RTCIceGatherer.cpp in Sources */, + 002177871E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */, + 002177791E9701C6008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp in Sources */, + 002177FD1E9701C7008204EA /* impl_org_ortc_RTCSctpTransport.cpp in Sources */, + 0021780A1E9701C7008204EA /* impl_org_ortc_RTCStatsProvider.cpp in Sources */, + 002178031E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */, + 0021779C1E9701C6008204EA /* impl_org_ortc_MediaDevices.cpp in Sources */, + 002177F01E9701C7008204EA /* impl_org_ortc_RTCRtpParameters.cpp in Sources */, + 002177B41E9701C6008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp in Sources */, + 002177861E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */, + 002177811E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */, + 002177C21E9701C6008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp in Sources */, + 002177A11E9701C6008204EA /* impl_org_ortc_MediaTrackConstraints.cpp in Sources */, + 002177CE1E9701C6008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp in Sources */, + 002177AF1E9701C6008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp in Sources */, + 002177D01E9701C6008204EA /* impl_org_ortc_RTCIceTransportStats.cpp in Sources */, + 0021779B1E9701C6008204EA /* impl_org_ortc_MediaDeviceInfo.cpp in Sources */, + 002177971E9701C6008204EA /* impl_org_ortc_Json.cpp in Sources */, + 002178091E9701C7008204EA /* impl_org_ortc_RTCStats.cpp in Sources */, + 002177F91E9701C7008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */, + 002178041E9701C7008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp in Sources */, + 002177BF1E9701C6008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */, + 0021777F1E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */, + 0021779F1E9701C6008204EA /* impl_org_ortc_MediaStreamTrack.cpp in Sources */, + 002177731E9701C6008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */, + 002177841E9701C6008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 002171441E97017D008204EA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "../../../../ortclib-cpp", + "../../../../ortclib-services-cpp", + ../../../../zsLib, + "../../../../zsLib-eventing", + ../../../.., + ../../../../../../webrtc/xplatform/webrtc, + ); + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 002171451E97017D008204EA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "../../../../ortclib-cpp", + "../../../../ortclib-services-cpp", + ../../../../zsLib, + "../../../../zsLib-eventing", + ../../../.., + ../../../../../../webrtc/xplatform/webrtc, + ); + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 002171471E97017D008204EA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 002171481E97017D008204EA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 002171381E97017D008204EA /* Build configuration list for PBXProject "ortclib-wrapper-ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 002171441E97017D008204EA /* Debug */, + 002171451E97017D008204EA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 002171461E97017D008204EA /* Build configuration list for PBXNativeTarget "ortclib-wrapper-ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 002171471E97017D008204EA /* Debug */, + 002171481E97017D008204EA /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 002171351E97017D008204EA /* Project object */; +} diff --git a/projects/xcode/ortclib-wrapper-osx/ortclib-wrapper-osx.xcodeproj/project.pbxproj b/projects/xcode/ortclib-wrapper-osx/ortclib-wrapper-osx.xcodeproj/project.pbxproj new file mode 100644 index 00000000..8095aaa7 --- /dev/null +++ b/projects/xcode/ortclib-wrapper-osx/ortclib-wrapper-osx.xcodeproj/project.pbxproj @@ -0,0 +1,1228 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 002180231E970520008204EA /* impl_org_ortc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BD71E97051D008204EA /* impl_org_ortc.cpp */; }; + 002180241E970520008204EA /* impl_org_ortc_adapter_MediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BD81E97051D008204EA /* impl_org_ortc_adapter_MediaStream.cpp */; }; + 002180261E970520008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BDA1E97051D008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp */; }; + 002180281E970520008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BDC1E97051D008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp */; }; + 0021802A1E970520008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BDE1E97051D008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp */; }; + 0021802C1E970520008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BE01E97051D008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp */; }; + 0021802E1E970520008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BE21E97051D008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */; }; + 002180301E970520008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BE41E97051D008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp */; }; + 002180321E970520008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BE61E97051D008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp */; }; + 002180341E970520008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BE81E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp */; }; + 002180361E970520008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BEA1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */; }; + 002180381E970520008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BEC1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */; }; + 0021803A1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BEE1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp */; }; + 0021803C1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BF01E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */; }; + 0021803E1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BF21E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */; }; + 002180401E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BF41E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */; }; + 002180421E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BF61E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */; }; + 002180441E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BF81E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */; }; + 002180461E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BFA1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */; }; + 002180481E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BFC1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */; }; + 0021804A1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217BFE1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */; }; + 0021804C1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C001E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */; }; + 0021804E1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C021E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */; }; + 002180501E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C041E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */; }; + 002180521E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C061E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */; }; + 002180541E970520008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C081E97051D008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp */; }; + 002180561E970520008204EA /* impl_org_ortc_ConstrainBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C0A1E97051D008204EA /* impl_org_ortc_ConstrainBoolean.cpp */; }; + 002180581E970520008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C0C1E97051D008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp */; }; + 0021805A1E970520008204EA /* impl_org_ortc_ConstrainDouble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C0E1E97051D008204EA /* impl_org_ortc_ConstrainDouble.cpp */; }; + 0021805C1E970520008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C101E97051D008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp */; }; + 0021805E1E970520008204EA /* impl_org_ortc_ConstrainLong.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C121E97051D008204EA /* impl_org_ortc_ConstrainLong.cpp */; }; + 002180601E970520008204EA /* impl_org_ortc_ConstrainLongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C141E97051D008204EA /* impl_org_ortc_ConstrainLongRange.cpp */; }; + 002180621E970520008204EA /* impl_org_ortc_ConstrainString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C161E97051D008204EA /* impl_org_ortc_ConstrainString.cpp */; }; + 002180641E970520008204EA /* impl_org_ortc_ConstrainStringParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C181E97051D008204EA /* impl_org_ortc_ConstrainStringParameters.cpp */; }; + 002180681E970520008204EA /* impl_org_ortc_DoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C1C1E97051D008204EA /* impl_org_ortc_DoubleRange.cpp */; }; + 0021806A1E970520008204EA /* impl_org_ortc_Error.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C1E1E97051D008204EA /* impl_org_ortc_Error.cpp */; }; + 0021806C1E970520008204EA /* impl_org_ortc_ErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C201E97051D008204EA /* impl_org_ortc_ErrorEvent.cpp */; }; + 0021806E1E970520008204EA /* impl_org_ortc_Helper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C221E97051D008204EA /* impl_org_ortc_Helper.cpp */; }; + 002180701E970520008204EA /* impl_org_ortc_Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C241E97051D008204EA /* impl_org_ortc_Json.cpp */; }; + 002180721E970520008204EA /* impl_org_ortc_Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C261E97051D008204EA /* impl_org_ortc_Logger.cpp */; }; + 002180741E970520008204EA /* impl_org_ortc_LongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C281E97051D008204EA /* impl_org_ortc_LongRange.cpp */; }; + 002180761E970520008204EA /* impl_org_ortc_MediaControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C2A1E97051D008204EA /* impl_org_ortc_MediaControl.cpp */; }; + 002180781E970520008204EA /* impl_org_ortc_MediaDeviceInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C2C1E97051D008204EA /* impl_org_ortc_MediaDeviceInfo.cpp */; }; + 0021807A1E970520008204EA /* impl_org_ortc_MediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C2E1E97051D008204EA /* impl_org_ortc_MediaDevices.cpp */; }; + 0021807C1E970520008204EA /* impl_org_ortc_MediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C301E97051D008204EA /* impl_org_ortc_MediaSource.cpp */; }; + 0021807E1E970520008204EA /* impl_org_ortc_MediaStreamConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C321E97051D008204EA /* impl_org_ortc_MediaStreamConstraints.cpp */; }; + 002180801E970520008204EA /* impl_org_ortc_MediaStreamTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C341E97051D008204EA /* impl_org_ortc_MediaStreamTrack.cpp */; }; + 002180821E970520008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C361E97051D008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp */; }; + 002180841E970520008204EA /* impl_org_ortc_MediaTrackConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C381E97051D008204EA /* impl_org_ortc_MediaTrackConstraints.cpp */; }; + 002180861E970520008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C3A1E97051D008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp */; }; + 002180881E970520008204EA /* impl_org_ortc_MediaTrackSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C3C1E97051D008204EA /* impl_org_ortc_MediaTrackSettings.cpp */; }; + 0021808A1E970520008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C3E1E97051D008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp */; }; + 0021808C1E970520008204EA /* impl_org_ortc_MessageQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C401E97051D008204EA /* impl_org_ortc_MessageQueue.cpp */; }; + 0021808E1E970520008204EA /* impl_org_ortc_OrtcLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C421E97051D008204EA /* impl_org_ortc_OrtcLib.cpp */; }; + 002180921E970520008204EA /* impl_org_ortc_OverconstrainedError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C461E97051D008204EA /* impl_org_ortc_OverconstrainedError.cpp */; }; + 002180941E970520008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C481E97051D008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp */; }; + 002180961E970520008204EA /* impl_org_ortc_RTCCertificate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C4A1E97051D008204EA /* impl_org_ortc_RTCCertificate.cpp */; }; + 002180981E970520008204EA /* impl_org_ortc_RTCCertificateStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C4C1E97051D008204EA /* impl_org_ortc_RTCCertificateStats.cpp */; }; + 0021809A1E970520008204EA /* impl_org_ortc_RTCCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C4E1E97051D008204EA /* impl_org_ortc_RTCCodec.cpp */; }; + 0021809C1E970520008204EA /* impl_org_ortc_RTCDataChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C501E97051D008204EA /* impl_org_ortc_RTCDataChannel.cpp */; }; + 0021809E1E970520008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C521E97051D008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp */; }; + 002180A01E970520008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C541E97051D008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp */; }; + 002180A21E970520008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C561E97051E008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp */; }; + 002180A41E970520008204EA /* impl_org_ortc_RTCDataChannelStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C581E97051E008204EA /* impl_org_ortc_RTCDataChannelStats.cpp */; }; + 002180A61E970520008204EA /* impl_org_ortc_RTCDataTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C5A1E97051E008204EA /* impl_org_ortc_RTCDataTransport.cpp */; }; + 002180A81E970520008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C5C1E97051E008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp */; }; + 002180AA1E970520008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C5E1E97051E008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp */; }; + 002180AC1E970520008204EA /* impl_org_ortc_RTCDtlsParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C601E97051E008204EA /* impl_org_ortc_RTCDtlsParameters.cpp */; }; + 002180AE1E970520008204EA /* impl_org_ortc_RTCDtlsTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C621E97051E008204EA /* impl_org_ortc_RTCDtlsTransport.cpp */; }; + 002180B01E970520008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C641E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */; }; + 002180B21E970520008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C661E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp */; }; + 002180B41E970520008204EA /* impl_org_ortc_RTCDtmfSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C681E97051E008204EA /* impl_org_ortc_RTCDtmfSender.cpp */; }; + 002180B61E970520008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C6A1E97051E008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp */; }; + 002180B81E970520008204EA /* impl_org_ortc_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C6C1E97051E008204EA /* impl_org_ortc_RTCIceCandidate.cpp */; }; + 002180BA1E970520008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C6E1E97051E008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp */; }; + 002180BC1E970520008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C701E97051E008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp */; }; + 002180BE1E970520008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C721E97051E008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp */; }; + 002180C01E970520008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C741E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp */; }; + 002180C21E970520008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C761E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp */; }; + 002180C41E970520008204EA /* impl_org_ortc_RTCIceGatherer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C781E97051E008204EA /* impl_org_ortc_RTCIceGatherer.cpp */; }; + 002180C61E970520008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C7A1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp */; }; + 002180C81E970520008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C7C1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */; }; + 002180CA1E970520008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C7E1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp */; }; + 002180CC1E970520008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C801E97051E008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp */; }; + 002180CE1E970520008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C821E97051E008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp */; }; + 002180D01E970520008204EA /* impl_org_ortc_RTCIceGathererStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C841E97051E008204EA /* impl_org_ortc_RTCIceGathererStats.cpp */; }; + 002180D21E970520008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C861E97051E008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp */; }; + 002180D41E970520008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C881E97051E008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp */; }; + 002180D61E970520008204EA /* impl_org_ortc_RTCIceParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C8A1E97051E008204EA /* impl_org_ortc_RTCIceParameters.cpp */; }; + 002180D81E970520008204EA /* impl_org_ortc_RTCIceServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C8C1E97051E008204EA /* impl_org_ortc_RTCIceServer.cpp */; }; + 002180DA1E970520008204EA /* impl_org_ortc_RTCIceTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C8E1E97051E008204EA /* impl_org_ortc_RTCIceTransport.cpp */; }; + 002180DC1E970520008204EA /* impl_org_ortc_RTCIceTransportController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C901E97051E008204EA /* impl_org_ortc_RTCIceTransportController.cpp */; }; + 002180DE1E970520008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C921E97051E008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp */; }; + 002180E01E970520008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C941E97051E008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp */; }; + 002180E21E970520008204EA /* impl_org_ortc_RTCIceTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C961E97051E008204EA /* impl_org_ortc_RTCIceTransportStats.cpp */; }; + 002180E41E970520008204EA /* impl_org_ortc_RTCIdentity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C981E97051E008204EA /* impl_org_ortc_RTCIdentity.cpp */; }; + 002180E61E970520008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C9A1E97051E008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp */; }; + 002180E81E970520008204EA /* impl_org_ortc_RTCIdentityError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C9C1E97051E008204EA /* impl_org_ortc_RTCIdentityError.cpp */; }; + 002180EA1E970520008204EA /* impl_org_ortc_RTCIdentityResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217C9E1E97051E008204EA /* impl_org_ortc_RTCIdentityResult.cpp */; }; + 002180EC1E970520008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CA01E97051E008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp */; }; + 002180EE1E970520008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CA21E97051E008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp */; }; + 002180F01E970520008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CA41E97051E008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp */; }; + 002180F21E970520008204EA /* impl_org_ortc_RTCMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CA61E97051E008204EA /* impl_org_ortc_RTCMessageEvent.cpp */; }; + 002180F41E970520008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CA81E97051E008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp */; }; + 002180F61E970520008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CAA1E97051E008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp */; }; + 002180F81E970520008204EA /* impl_org_ortc_RTCRtcpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CAC1E97051E008204EA /* impl_org_ortc_RTCRtcpParameters.cpp */; }; + 002180FA1E970520008204EA /* impl_org_ortc_RTCRtcpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CAE1E97051E008204EA /* impl_org_ortc_RTCRtcpTransport.cpp */; }; + 002180FC1E970520008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CB01E97051E008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp */; }; + 002180FE1E970520008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CB21E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp */; }; + 002181001E970520008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CB41E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp */; }; + 002181021E970520008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CB61E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp */; }; + 002181041E970520008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CB81E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp */; }; + 002181061E970520008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CBA1E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp */; }; + 002181081E970520008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CBC1E97051E008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp */; }; + 0021810A1E970520008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CBE1E97051E008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp */; }; + 0021810C1E970520008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CC01E97051E008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp */; }; + 0021810E1E970520008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CC21E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */; }; + 002181101E970520008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CC41E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */; }; + 002181121E970520008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CC61E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */; }; + 002181141E970520008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CC81E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp */; }; + 002181161E970520008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CCA1E97051E008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp */; }; + 002181181E970520008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CCC1E97051F008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp */; }; + 0021811A1E970520008204EA /* impl_org_ortc_RTCRtpListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CCE1E97051F008204EA /* impl_org_ortc_RTCRtpListener.cpp */; }; + 0021811C1E970520008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CD01E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */; }; + 0021811E1E970520008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CD21E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */; }; + 002181201E970520008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CD41E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */; }; + 002181221E970520008204EA /* impl_org_ortc_RTCRtpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CD61E97051F008204EA /* impl_org_ortc_RTCRtpParameters.cpp */; }; + 002181241E970520008204EA /* impl_org_ortc_RTCRtpReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CD81E97051F008204EA /* impl_org_ortc_RTCRtpReceiver.cpp */; }; + 002181261E970520008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CDA1E97051F008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp */; }; + 002181281E970520008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CDC1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */; }; + 0021812A1E970520008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CDE1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */; }; + 0021812C1E970520008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CE01E97051F008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp */; }; + 0021812E1E970520008204EA /* impl_org_ortc_RTCRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CE21E97051F008204EA /* impl_org_ortc_RTCRtpSender.cpp */; }; + 002181301E970520008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CE41E97051F008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp */; }; + 002181321E970520008204EA /* impl_org_ortc_RTCRtpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CE61E97051F008204EA /* impl_org_ortc_RTCRtpTransport.cpp */; }; + 002181341E970520008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CE81E97051F008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp */; }; + 002181361E970520008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CEA1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */; }; + 002181381E970520008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CEC1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */; }; + 0021813A1E970520008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CEE1E97051F008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp */; }; + 0021813C1E970520008204EA /* impl_org_ortc_RTCSctpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CF01E97051F008204EA /* impl_org_ortc_RTCSctpTransport.cpp */; }; + 0021813E1E970520008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CF21E97051F008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp */; }; + 002181401E970520008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CF41E97051F008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp */; }; + 002181421E970520008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CF61E97051F008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp */; }; + 002181441E970520008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CF81E97051F008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp */; }; + 002181461E970520008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CFA1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp */; }; + 002181481E970520008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CFC1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp */; }; + 0021814A1E970520008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217CFE1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp */; }; + 0021814C1E970520008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D001E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp */; }; + 0021814E1E970520008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D021E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */; }; + 002181501E970520008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D041E97051F008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp */; }; + 002181521E970520008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D061E97051F008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp */; }; + 002181541E970520008204EA /* impl_org_ortc_RTCStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D081E97051F008204EA /* impl_org_ortc_RTCStats.cpp */; }; + 002181561E970520008204EA /* impl_org_ortc_RTCStatsProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D0A1E97051F008204EA /* impl_org_ortc_RTCStatsProvider.cpp */; }; + 002181581E970520008204EA /* impl_org_ortc_RTCStatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D0C1E97051F008204EA /* impl_org_ortc_RTCStatsReport.cpp */; }; + 0021815A1E970521008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D0E1E97051F008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp */; }; + 0021815C1E970521008204EA /* impl_org_ortc_Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D101E97051F008204EA /* impl_org_ortc_Settings.cpp */; }; + 0021815E1E970521008204EA /* impl_org_ortc_StringOrStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00217D121E97051F008204EA /* impl_org_ortc_StringOrStringList.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 002178181E9704E2008204EA /* libortclib-wrapper-osx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libortclib-wrapper-osx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 00217BD71E97051D008204EA /* impl_org_ortc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc.cpp; sourceTree = ""; }; + 00217BD81E97051D008204EA /* impl_org_ortc_adapter_MediaStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_MediaStream.cpp; sourceTree = ""; }; + 00217BD91E97051D008204EA /* impl_org_ortc_adapter_MediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_MediaStream.h; sourceTree = ""; }; + 00217BDA1E97051D008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCAnswerOptions.cpp; sourceTree = ""; }; + 00217BDB1E97051D008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCAnswerOptions.h; sourceTree = ""; }; + 00217BDC1E97051D008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCCapabilityOptions.cpp; sourceTree = ""; }; + 00217BDD1E97051D008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCCapabilityOptions.h; sourceTree = ""; }; + 00217BDE1E97051D008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCConfiguration.cpp; sourceTree = ""; }; + 00217BDF1E97051D008204EA /* impl_org_ortc_adapter_RTCConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCConfiguration.h; sourceTree = ""; }; + 00217BE01E97051D008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCIceCandidate.cpp; sourceTree = ""; }; + 00217BE11E97051D008204EA /* impl_org_ortc_adapter_RTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCIceCandidate.h; sourceTree = ""; }; + 00217BE21E97051D008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp; sourceTree = ""; }; + 00217BE31E97051D008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h; sourceTree = ""; }; + 00217BE41E97051D008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp; sourceTree = ""; }; + 00217BE51E97051D008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCOfferAnswerOptions.h; sourceTree = ""; }; + 00217BE61E97051D008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCOfferOptions.cpp; sourceTree = ""; }; + 00217BE71E97051D008204EA /* impl_org_ortc_adapter_RTCOfferOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCOfferOptions.h; sourceTree = ""; }; + 00217BE81E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCPeerConnection.cpp; sourceTree = ""; }; + 00217BE91E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCPeerConnection.h; sourceTree = ""; }; + 00217BEA1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp; sourceTree = ""; }; + 00217BEB1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h; sourceTree = ""; }; + 00217BEC1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp; sourceTree = ""; }; + 00217BED1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h; sourceTree = ""; }; + 00217BEE1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescription.cpp; sourceTree = ""; }; + 00217BEF1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescription.h; sourceTree = ""; }; + 00217BF01E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp; sourceTree = ""; }; + 00217BF11E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h; sourceTree = ""; }; + 00217BF21E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp; sourceTree = ""; }; + 00217BF31E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h; sourceTree = ""; }; + 00217BF41E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp; sourceTree = ""; }; + 00217BF51E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionDescription.h; sourceTree = ""; }; + 00217BF61E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp; sourceTree = ""; }; + 00217BF71E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h; sourceTree = ""; }; + 00217BF81E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp; sourceTree = ""; }; + 00217BF91E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h; sourceTree = ""; }; + 00217BFA1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp; sourceTree = ""; }; + 00217BFB1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h; sourceTree = ""; }; + 00217BFC1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp; sourceTree = ""; }; + 00217BFD1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h; sourceTree = ""; }; + 00217BFE1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp; sourceTree = ""; }; + 00217BFF1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h; sourceTree = ""; }; + 00217C001E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp; sourceTree = ""; }; + 00217C011E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h; sourceTree = ""; }; + 00217C021E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp; sourceTree = ""; }; + 00217C031E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h; sourceTree = ""; }; + 00217C041E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp; sourceTree = ""; }; + 00217C051E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionTransport.h; sourceTree = ""; }; + 00217C061E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp; sourceTree = ""; }; + 00217C071E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h; sourceTree = ""; }; + 00217C081E97051D008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_adapter_RTCTrackEvent.cpp; sourceTree = ""; }; + 00217C091E97051D008204EA /* impl_org_ortc_adapter_RTCTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_adapter_RTCTrackEvent.h; sourceTree = ""; }; + 00217C0A1E97051D008204EA /* impl_org_ortc_ConstrainBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainBoolean.cpp; sourceTree = ""; }; + 00217C0B1E97051D008204EA /* impl_org_ortc_ConstrainBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainBoolean.h; sourceTree = ""; }; + 00217C0C1E97051D008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainBooleanParameters.cpp; sourceTree = ""; }; + 00217C0D1E97051D008204EA /* impl_org_ortc_ConstrainBooleanParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainBooleanParameters.h; sourceTree = ""; }; + 00217C0E1E97051D008204EA /* impl_org_ortc_ConstrainDouble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainDouble.cpp; sourceTree = ""; }; + 00217C0F1E97051D008204EA /* impl_org_ortc_ConstrainDouble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainDouble.h; sourceTree = ""; }; + 00217C101E97051D008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainDoubleRange.cpp; sourceTree = ""; }; + 00217C111E97051D008204EA /* impl_org_ortc_ConstrainDoubleRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainDoubleRange.h; sourceTree = ""; }; + 00217C121E97051D008204EA /* impl_org_ortc_ConstrainLong.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainLong.cpp; sourceTree = ""; }; + 00217C131E97051D008204EA /* impl_org_ortc_ConstrainLong.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainLong.h; sourceTree = ""; }; + 00217C141E97051D008204EA /* impl_org_ortc_ConstrainLongRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainLongRange.cpp; sourceTree = ""; }; + 00217C151E97051D008204EA /* impl_org_ortc_ConstrainLongRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainLongRange.h; sourceTree = ""; }; + 00217C161E97051D008204EA /* impl_org_ortc_ConstrainString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainString.cpp; sourceTree = ""; }; + 00217C171E97051D008204EA /* impl_org_ortc_ConstrainString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainString.h; sourceTree = ""; }; + 00217C181E97051D008204EA /* impl_org_ortc_ConstrainStringParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ConstrainStringParameters.cpp; sourceTree = ""; }; + 00217C191E97051D008204EA /* impl_org_ortc_ConstrainStringParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ConstrainStringParameters.h; sourceTree = ""; }; + 00217C1A1E97051D008204EA /* impl_org_ortc_Dispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Dispatcher.cpp; sourceTree = ""; }; + 00217C1B1E97051D008204EA /* impl_org_ortc_Dispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Dispatcher.h; sourceTree = ""; }; + 00217C1C1E97051D008204EA /* impl_org_ortc_DoubleRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_DoubleRange.cpp; sourceTree = ""; }; + 00217C1D1E97051D008204EA /* impl_org_ortc_DoubleRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_DoubleRange.h; sourceTree = ""; }; + 00217C1E1E97051D008204EA /* impl_org_ortc_Error.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Error.cpp; sourceTree = ""; }; + 00217C1F1E97051D008204EA /* impl_org_ortc_Error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Error.h; sourceTree = ""; }; + 00217C201E97051D008204EA /* impl_org_ortc_ErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_ErrorEvent.cpp; sourceTree = ""; }; + 00217C211E97051D008204EA /* impl_org_ortc_ErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_ErrorEvent.h; sourceTree = ""; }; + 00217C221E97051D008204EA /* impl_org_ortc_Helper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Helper.cpp; sourceTree = ""; }; + 00217C231E97051D008204EA /* impl_org_ortc_Helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Helper.h; sourceTree = ""; }; + 00217C241E97051D008204EA /* impl_org_ortc_Json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Json.cpp; sourceTree = ""; }; + 00217C251E97051D008204EA /* impl_org_ortc_Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Json.h; sourceTree = ""; }; + 00217C261E97051D008204EA /* impl_org_ortc_Logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Logger.cpp; sourceTree = ""; }; + 00217C271E97051D008204EA /* impl_org_ortc_Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Logger.h; sourceTree = ""; }; + 00217C281E97051D008204EA /* impl_org_ortc_LongRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_LongRange.cpp; sourceTree = ""; }; + 00217C291E97051D008204EA /* impl_org_ortc_LongRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_LongRange.h; sourceTree = ""; }; + 00217C2A1E97051D008204EA /* impl_org_ortc_MediaControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaControl.cpp; sourceTree = ""; }; + 00217C2B1E97051D008204EA /* impl_org_ortc_MediaControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaControl.h; sourceTree = ""; }; + 00217C2C1E97051D008204EA /* impl_org_ortc_MediaDeviceInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaDeviceInfo.cpp; sourceTree = ""; }; + 00217C2D1E97051D008204EA /* impl_org_ortc_MediaDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaDeviceInfo.h; sourceTree = ""; }; + 00217C2E1E97051D008204EA /* impl_org_ortc_MediaDevices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaDevices.cpp; sourceTree = ""; }; + 00217C2F1E97051D008204EA /* impl_org_ortc_MediaDevices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaDevices.h; sourceTree = ""; }; + 00217C301E97051D008204EA /* impl_org_ortc_MediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaSource.cpp; sourceTree = ""; }; + 00217C311E97051D008204EA /* impl_org_ortc_MediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaSource.h; sourceTree = ""; }; + 00217C321E97051D008204EA /* impl_org_ortc_MediaStreamConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaStreamConstraints.cpp; sourceTree = ""; }; + 00217C331E97051D008204EA /* impl_org_ortc_MediaStreamConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaStreamConstraints.h; sourceTree = ""; }; + 00217C341E97051D008204EA /* impl_org_ortc_MediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaStreamTrack.cpp; sourceTree = ""; }; + 00217C351E97051D008204EA /* impl_org_ortc_MediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaStreamTrack.h; sourceTree = ""; }; + 00217C361E97051D008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackCapabilities.cpp; sourceTree = ""; }; + 00217C371E97051D008204EA /* impl_org_ortc_MediaTrackCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackCapabilities.h; sourceTree = ""; }; + 00217C381E97051D008204EA /* impl_org_ortc_MediaTrackConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackConstraints.cpp; sourceTree = ""; }; + 00217C391E97051D008204EA /* impl_org_ortc_MediaTrackConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackConstraints.h; sourceTree = ""; }; + 00217C3A1E97051D008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackConstraintSet.cpp; sourceTree = ""; }; + 00217C3B1E97051D008204EA /* impl_org_ortc_MediaTrackConstraintSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackConstraintSet.h; sourceTree = ""; }; + 00217C3C1E97051D008204EA /* impl_org_ortc_MediaTrackSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackSettings.cpp; sourceTree = ""; }; + 00217C3D1E97051D008204EA /* impl_org_ortc_MediaTrackSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackSettings.h; sourceTree = ""; }; + 00217C3E1E97051D008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MediaTrackSupportedConstraints.cpp; sourceTree = ""; }; + 00217C3F1E97051D008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MediaTrackSupportedConstraints.h; sourceTree = ""; }; + 00217C401E97051D008204EA /* impl_org_ortc_MessageQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_MessageQueue.cpp; sourceTree = ""; }; + 00217C411E97051D008204EA /* impl_org_ortc_MessageQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_MessageQueue.h; sourceTree = ""; }; + 00217C421E97051D008204EA /* impl_org_ortc_OrtcLib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_OrtcLib.cpp; sourceTree = ""; }; + 00217C431E97051D008204EA /* impl_org_ortc_OrtcLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_OrtcLib.h; sourceTree = ""; }; + 00217C441E97051D008204EA /* impl_org_ortc_OrtcLibWithDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_OrtcLibWithDispatcher.cpp; sourceTree = ""; }; + 00217C451E97051D008204EA /* impl_org_ortc_OrtcLibWithDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_OrtcLibWithDispatcher.h; sourceTree = ""; }; + 00217C461E97051D008204EA /* impl_org_ortc_OverconstrainedError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_OverconstrainedError.cpp; sourceTree = ""; }; + 00217C471E97051D008204EA /* impl_org_ortc_OverconstrainedError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_OverconstrainedError.h; sourceTree = ""; }; + 00217C481E97051D008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_OverconstrainedErrorEvent.cpp; sourceTree = ""; }; + 00217C491E97051D008204EA /* impl_org_ortc_OverconstrainedErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_OverconstrainedErrorEvent.h; sourceTree = ""; }; + 00217C4A1E97051D008204EA /* impl_org_ortc_RTCCertificate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCCertificate.cpp; sourceTree = ""; }; + 00217C4B1E97051D008204EA /* impl_org_ortc_RTCCertificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCCertificate.h; sourceTree = ""; }; + 00217C4C1E97051D008204EA /* impl_org_ortc_RTCCertificateStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCCertificateStats.cpp; sourceTree = ""; }; + 00217C4D1E97051D008204EA /* impl_org_ortc_RTCCertificateStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCCertificateStats.h; sourceTree = ""; }; + 00217C4E1E97051D008204EA /* impl_org_ortc_RTCCodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCCodec.cpp; sourceTree = ""; }; + 00217C4F1E97051D008204EA /* impl_org_ortc_RTCCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCCodec.h; sourceTree = ""; }; + 00217C501E97051D008204EA /* impl_org_ortc_RTCDataChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannel.cpp; sourceTree = ""; }; + 00217C511E97051D008204EA /* impl_org_ortc_RTCDataChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannel.h; sourceTree = ""; }; + 00217C521E97051D008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannelEvent.cpp; sourceTree = ""; }; + 00217C531E97051D008204EA /* impl_org_ortc_RTCDataChannelEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannelEvent.h; sourceTree = ""; }; + 00217C541E97051D008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannelParameters.cpp; sourceTree = ""; }; + 00217C551E97051D008204EA /* impl_org_ortc_RTCDataChannelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannelParameters.h; sourceTree = ""; }; + 00217C561E97051E008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannelStateChangeEvent.cpp; sourceTree = ""; }; + 00217C571E97051E008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannelStateChangeEvent.h; sourceTree = ""; }; + 00217C581E97051E008204EA /* impl_org_ortc_RTCDataChannelStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataChannelStats.cpp; sourceTree = ""; }; + 00217C591E97051E008204EA /* impl_org_ortc_RTCDataChannelStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataChannelStats.h; sourceTree = ""; }; + 00217C5A1E97051E008204EA /* impl_org_ortc_RTCDataTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDataTransport.cpp; sourceTree = ""; }; + 00217C5B1E97051E008204EA /* impl_org_ortc_RTCDataTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDataTransport.h; sourceTree = ""; }; + 00217C5C1E97051E008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsCertificateBinary.cpp; sourceTree = ""; }; + 00217C5D1E97051E008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsCertificateBinary.h; sourceTree = ""; }; + 00217C5E1E97051E008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsFingerprint.cpp; sourceTree = ""; }; + 00217C5F1E97051E008204EA /* impl_org_ortc_RTCDtlsFingerprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsFingerprint.h; sourceTree = ""; }; + 00217C601E97051E008204EA /* impl_org_ortc_RTCDtlsParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsParameters.cpp; sourceTree = ""; }; + 00217C611E97051E008204EA /* impl_org_ortc_RTCDtlsParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsParameters.h; sourceTree = ""; }; + 00217C621E97051E008204EA /* impl_org_ortc_RTCDtlsTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsTransport.cpp; sourceTree = ""; }; + 00217C631E97051E008204EA /* impl_org_ortc_RTCDtlsTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsTransport.h; sourceTree = ""; }; + 00217C641E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00217C651E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsTransportStateChangeEvent.h; sourceTree = ""; }; + 00217C661E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtlsTransportStats.cpp; sourceTree = ""; }; + 00217C671E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtlsTransportStats.h; sourceTree = ""; }; + 00217C681E97051E008204EA /* impl_org_ortc_RTCDtmfSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtmfSender.cpp; sourceTree = ""; }; + 00217C691E97051E008204EA /* impl_org_ortc_RTCDtmfSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtmfSender.h; sourceTree = ""; }; + 00217C6A1E97051E008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCDtmfToneChangeEvent.cpp; sourceTree = ""; }; + 00217C6B1E97051E008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCDtmfToneChangeEvent.h; sourceTree = ""; }; + 00217C6C1E97051E008204EA /* impl_org_ortc_RTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidate.cpp; sourceTree = ""; }; + 00217C6D1E97051E008204EA /* impl_org_ortc_RTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidate.h; sourceTree = ""; }; + 00217C6E1E97051E008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidateAttributes.cpp; sourceTree = ""; }; + 00217C6F1E97051E008204EA /* impl_org_ortc_RTCIceCandidateAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidateAttributes.h; sourceTree = ""; }; + 00217C701E97051E008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidateComplete.cpp; sourceTree = ""; }; + 00217C711E97051E008204EA /* impl_org_ortc_RTCIceCandidateComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidateComplete.h; sourceTree = ""; }; + 00217C721E97051E008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidatePair.cpp; sourceTree = ""; }; + 00217C731E97051E008204EA /* impl_org_ortc_RTCIceCandidatePair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidatePair.h; sourceTree = ""; }; + 00217C741E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp; sourceTree = ""; }; + 00217C751E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidatePairChangeEvent.h; sourceTree = ""; }; + 00217C761E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceCandidatePairStats.cpp; sourceTree = ""; }; + 00217C771E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceCandidatePairStats.h; sourceTree = ""; }; + 00217C781E97051E008204EA /* impl_org_ortc_RTCIceGatherer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGatherer.cpp; sourceTree = ""; }; + 00217C791E97051E008204EA /* impl_org_ortc_RTCIceGatherer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGatherer.h; sourceTree = ""; }; + 00217C7A1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererCandidate.cpp; sourceTree = ""; }; + 00217C7B1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererCandidate.h; sourceTree = ""; }; + 00217C7C1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp; sourceTree = ""; }; + 00217C7D1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h; sourceTree = ""; }; + 00217C7E1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererCandidateEvent.cpp; sourceTree = ""; }; + 00217C7F1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererCandidateEvent.h; sourceTree = ""; }; + 00217C801E97051E008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererIceErrorEvent.cpp; sourceTree = ""; }; + 00217C811E97051E008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererIceErrorEvent.h; sourceTree = ""; }; + 00217C821E97051E008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererStateChangeEvent.cpp; sourceTree = ""; }; + 00217C831E97051E008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererStateChangeEvent.h; sourceTree = ""; }; + 00217C841E97051E008204EA /* impl_org_ortc_RTCIceGathererStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGathererStats.cpp; sourceTree = ""; }; + 00217C851E97051E008204EA /* impl_org_ortc_RTCIceGathererStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGathererStats.h; sourceTree = ""; }; + 00217C861E97051E008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGatherInterfacePolicy.cpp; sourceTree = ""; }; + 00217C871E97051E008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGatherInterfacePolicy.h; sourceTree = ""; }; + 00217C881E97051E008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceGatherOptions.cpp; sourceTree = ""; }; + 00217C891E97051E008204EA /* impl_org_ortc_RTCIceGatherOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceGatherOptions.h; sourceTree = ""; }; + 00217C8A1E97051E008204EA /* impl_org_ortc_RTCIceParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceParameters.cpp; sourceTree = ""; }; + 00217C8B1E97051E008204EA /* impl_org_ortc_RTCIceParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceParameters.h; sourceTree = ""; }; + 00217C8C1E97051E008204EA /* impl_org_ortc_RTCIceServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceServer.cpp; sourceTree = ""; }; + 00217C8D1E97051E008204EA /* impl_org_ortc_RTCIceServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceServer.h; sourceTree = ""; }; + 00217C8E1E97051E008204EA /* impl_org_ortc_RTCIceTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransport.cpp; sourceTree = ""; }; + 00217C8F1E97051E008204EA /* impl_org_ortc_RTCIceTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransport.h; sourceTree = ""; }; + 00217C901E97051E008204EA /* impl_org_ortc_RTCIceTransportController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransportController.cpp; sourceTree = ""; }; + 00217C911E97051E008204EA /* impl_org_ortc_RTCIceTransportController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransportController.h; sourceTree = ""; }; + 00217C921E97051E008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransportOptions.cpp; sourceTree = ""; }; + 00217C931E97051E008204EA /* impl_org_ortc_RTCIceTransportOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransportOptions.h; sourceTree = ""; }; + 00217C941E97051E008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00217C951E97051E008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransportStateChangeEvent.h; sourceTree = ""; }; + 00217C961E97051E008204EA /* impl_org_ortc_RTCIceTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIceTransportStats.cpp; sourceTree = ""; }; + 00217C971E97051E008204EA /* impl_org_ortc_RTCIceTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIceTransportStats.h; sourceTree = ""; }; + 00217C981E97051E008204EA /* impl_org_ortc_RTCIdentity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIdentity.cpp; sourceTree = ""; }; + 00217C991E97051E008204EA /* impl_org_ortc_RTCIdentity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIdentity.h; sourceTree = ""; }; + 00217C9A1E97051E008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIdentityAssertion.cpp; sourceTree = ""; }; + 00217C9B1E97051E008204EA /* impl_org_ortc_RTCIdentityAssertion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIdentityAssertion.h; sourceTree = ""; }; + 00217C9C1E97051E008204EA /* impl_org_ortc_RTCIdentityError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIdentityError.cpp; sourceTree = ""; }; + 00217C9D1E97051E008204EA /* impl_org_ortc_RTCIdentityError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIdentityError.h; sourceTree = ""; }; + 00217C9E1E97051E008204EA /* impl_org_ortc_RTCIdentityResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCIdentityResult.cpp; sourceTree = ""; }; + 00217C9F1E97051E008204EA /* impl_org_ortc_RTCIdentityResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCIdentityResult.h; sourceTree = ""; }; + 00217CA01E97051E008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCInboundRtpStreamStats.cpp; sourceTree = ""; }; + 00217CA11E97051E008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCInboundRtpStreamStats.h; sourceTree = ""; }; + 00217CA21E97051E008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCMediaStreamStats.cpp; sourceTree = ""; }; + 00217CA31E97051E008204EA /* impl_org_ortc_RTCMediaStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCMediaStreamStats.h; sourceTree = ""; }; + 00217CA41E97051E008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCMediaStreamTrackStats.cpp; sourceTree = ""; }; + 00217CA51E97051E008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCMediaStreamTrackStats.h; sourceTree = ""; }; + 00217CA61E97051E008204EA /* impl_org_ortc_RTCMessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCMessageEvent.cpp; sourceTree = ""; }; + 00217CA71E97051E008204EA /* impl_org_ortc_RTCMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCMessageEvent.h; sourceTree = ""; }; + 00217CA81E97051E008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCOutboundRtpStreamStats.cpp; sourceTree = ""; }; + 00217CA91E97051E008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCOutboundRtpStreamStats.h; sourceTree = ""; }; + 00217CAA1E97051E008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtcpFeedback.cpp; sourceTree = ""; }; + 00217CAB1E97051E008204EA /* impl_org_ortc_RTCRtcpFeedback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtcpFeedback.h; sourceTree = ""; }; + 00217CAC1E97051E008204EA /* impl_org_ortc_RTCRtcpParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtcpParameters.cpp; sourceTree = ""; }; + 00217CAD1E97051E008204EA /* impl_org_ortc_RTCRtcpParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtcpParameters.h; sourceTree = ""; }; + 00217CAE1E97051E008204EA /* impl_org_ortc_RTCRtcpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtcpTransport.cpp; sourceTree = ""; }; + 00217CAF1E97051E008204EA /* impl_org_ortc_RTCRtcpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtcpTransport.h; sourceTree = ""; }; + 00217CB01E97051E008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCapabilities.cpp; sourceTree = ""; }; + 00217CB11E97051E008204EA /* impl_org_ortc_RTCRtpCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCapabilities.h; sourceTree = ""; }; + 00217CB21E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecCapability.cpp; sourceTree = ""; }; + 00217CB31E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecCapability.h; sourceTree = ""; }; + 00217CB41E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp; sourceTree = ""; }; + 00217CB51E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecCapabilityOptions.h; sourceTree = ""; }; + 00217CB61E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00217CB71E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecCapabilityParameters.h; sourceTree = ""; }; + 00217CB81E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecParameters.cpp; sourceTree = ""; }; + 00217CB91E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecParameters.h; sourceTree = ""; }; + 00217CBA1E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpCodecParameterSettings.cpp; sourceTree = ""; }; + 00217CBB1E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpCodecParameterSettings.h; sourceTree = ""; }; + 00217CBC1E97051E008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpContributingSource.cpp; sourceTree = ""; }; + 00217CBD1E97051E008204EA /* impl_org_ortc_RTCRtpContributingSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpContributingSource.h; sourceTree = ""; }; + 00217CBE1E97051E008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpEncodingParameters.cpp; sourceTree = ""; }; + 00217CBF1E97051E008204EA /* impl_org_ortc_RTCRtpEncodingParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpEncodingParameters.h; sourceTree = ""; }; + 00217CC01E97051E008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpFecParameters.cpp; sourceTree = ""; }; + 00217CC11E97051E008204EA /* impl_org_ortc_RTCRtpFecParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpFecParameters.h; sourceTree = ""; }; + 00217CC21E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00217CC31E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h; sourceTree = ""; }; + 00217CC41E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp; sourceTree = ""; }; + 00217CC51E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h; sourceTree = ""; }; + 00217CC61E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp; sourceTree = ""; }; + 00217CC71E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h; sourceTree = ""; }; + 00217CC81E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp; sourceTree = ""; }; + 00217CC91E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpH264CodecParameterSettings.h; sourceTree = ""; }; + 00217CCA1E97051E008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpHeaderExtension.cpp; sourceTree = ""; }; + 00217CCB1E97051E008204EA /* impl_org_ortc_RTCRtpHeaderExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpHeaderExtension.h; sourceTree = ""; }; + 00217CCC1E97051F008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp; sourceTree = ""; }; + 00217CCD1E97051F008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpHeaderExtensionParameters.h; sourceTree = ""; }; + 00217CCE1E97051F008204EA /* impl_org_ortc_RTCRtpListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpListener.cpp; sourceTree = ""; }; + 00217CCF1E97051F008204EA /* impl_org_ortc_RTCRtpListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpListener.h; sourceTree = ""; }; + 00217CD01E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp; sourceTree = ""; }; + 00217CD11E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h; sourceTree = ""; }; + 00217CD21E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00217CD31E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h; sourceTree = ""; }; + 00217CD41E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp; sourceTree = ""; }; + 00217CD51E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpOpusCodecParameterSettings.h; sourceTree = ""; }; + 00217CD61E97051F008204EA /* impl_org_ortc_RTCRtpParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpParameters.cpp; sourceTree = ""; }; + 00217CD71E97051F008204EA /* impl_org_ortc_RTCRtpParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpParameters.h; sourceTree = ""; }; + 00217CD81E97051F008204EA /* impl_org_ortc_RTCRtpReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpReceiver.cpp; sourceTree = ""; }; + 00217CD91E97051F008204EA /* impl_org_ortc_RTCRtpReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpReceiver.h; sourceTree = ""; }; + 00217CDA1E97051F008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp; sourceTree = ""; }; + 00217CDB1E97051F008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpRedCodecParameterSettings.h; sourceTree = ""; }; + 00217CDC1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp; sourceTree = ""; }; + 00217CDD1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h; sourceTree = ""; }; + 00217CDE1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp; sourceTree = ""; }; + 00217CDF1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpRtxCodecParameterSettings.h; sourceTree = ""; }; + 00217CE01E97051F008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpRtxParameters.cpp; sourceTree = ""; }; + 00217CE11E97051F008204EA /* impl_org_ortc_RTCRtpRtxParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpRtxParameters.h; sourceTree = ""; }; + 00217CE21E97051F008204EA /* impl_org_ortc_RTCRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpSender.cpp; sourceTree = ""; }; + 00217CE31E97051F008204EA /* impl_org_ortc_RTCRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpSender.h; sourceTree = ""; }; + 00217CE41E97051F008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpStreamStats.cpp; sourceTree = ""; }; + 00217CE51E97051F008204EA /* impl_org_ortc_RTCRtpStreamStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpStreamStats.h; sourceTree = ""; }; + 00217CE61E97051F008204EA /* impl_org_ortc_RTCRtpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpTransport.cpp; sourceTree = ""; }; + 00217CE71E97051F008204EA /* impl_org_ortc_RTCRtpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpTransport.h; sourceTree = ""; }; + 00217CE81E97051F008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpUnhandledEvent.cpp; sourceTree = ""; }; + 00217CE91E97051F008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpUnhandledEvent.h; sourceTree = ""; }; + 00217CEA1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp; sourceTree = ""; }; + 00217CEB1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h; sourceTree = ""; }; + 00217CEC1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp; sourceTree = ""; }; + 00217CED1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCRtpVp8CodecParameterSettings.h; sourceTree = ""; }; + 00217CEE1E97051F008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpCapabilities.cpp; sourceTree = ""; }; + 00217CEF1E97051F008204EA /* impl_org_ortc_RTCSctpCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpCapabilities.h; sourceTree = ""; }; + 00217CF01E97051F008204EA /* impl_org_ortc_RTCSctpTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransport.cpp; sourceTree = ""; }; + 00217CF11E97051F008204EA /* impl_org_ortc_RTCSctpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransport.h; sourceTree = ""; }; + 00217CF21E97051F008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransportListener.cpp; sourceTree = ""; }; + 00217CF31E97051F008204EA /* impl_org_ortc_RTCSctpTransportListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransportListener.h; sourceTree = ""; }; + 00217CF41E97051F008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransportListenerEvent.cpp; sourceTree = ""; }; + 00217CF51E97051F008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransportListenerEvent.h; sourceTree = ""; }; + 00217CF61E97051F008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp; sourceTree = ""; }; + 00217CF71E97051F008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransportStateChangeEvent.h; sourceTree = ""; }; + 00217CF81E97051F008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSctpTransportStats.cpp; sourceTree = ""; }; + 00217CF91E97051F008204EA /* impl_org_ortc_RTCSctpTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSctpTransportStats.h; sourceTree = ""; }; + 00217CFA1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp; sourceTree = ""; }; + 00217CFB1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesCryptoParameters.h; sourceTree = ""; }; + 00217CFC1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesKeyParameters.cpp; sourceTree = ""; }; + 00217CFD1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesKeyParameters.h; sourceTree = ""; }; + 00217CFE1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesParameters.cpp; sourceTree = ""; }; + 00217CFF1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesParameters.h; sourceTree = ""; }; + 00217D001E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesTransport.cpp; sourceTree = ""; }; + 00217D011E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesTransport.h; sourceTree = ""; }; + 00217D021E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp; sourceTree = ""; }; + 00217D031E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h; sourceTree = ""; }; + 00217D041E97051F008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSrtpTransportStats.cpp; sourceTree = ""; }; + 00217D051E97051F008204EA /* impl_org_ortc_RTCSrtpTransportStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSrtpTransportStats.h; sourceTree = ""; }; + 00217D061E97051F008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCSsrcConflictEvent.cpp; sourceTree = ""; }; + 00217D071E97051F008204EA /* impl_org_ortc_RTCSsrcConflictEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCSsrcConflictEvent.h; sourceTree = ""; }; + 00217D081E97051F008204EA /* impl_org_ortc_RTCStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCStats.cpp; sourceTree = ""; }; + 00217D091E97051F008204EA /* impl_org_ortc_RTCStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCStats.h; sourceTree = ""; }; + 00217D0A1E97051F008204EA /* impl_org_ortc_RTCStatsProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCStatsProvider.cpp; sourceTree = ""; }; + 00217D0B1E97051F008204EA /* impl_org_ortc_RTCStatsProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCStatsProvider.h; sourceTree = ""; }; + 00217D0C1E97051F008204EA /* impl_org_ortc_RTCStatsReport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCStatsReport.cpp; sourceTree = ""; }; + 00217D0D1E97051F008204EA /* impl_org_ortc_RTCStatsReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCStatsReport.h; sourceTree = ""; }; + 00217D0E1E97051F008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_RTCStatsTypeSet.cpp; sourceTree = ""; }; + 00217D0F1E97051F008204EA /* impl_org_ortc_RTCStatsTypeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_RTCStatsTypeSet.h; sourceTree = ""; }; + 00217D101E97051F008204EA /* impl_org_ortc_Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_Settings.cpp; sourceTree = ""; }; + 00217D111E97051F008204EA /* impl_org_ortc_Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_Settings.h; sourceTree = ""; }; + 00217D121E97051F008204EA /* impl_org_ortc_StringOrStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = impl_org_ortc_StringOrStringList.cpp; sourceTree = ""; }; + 00217D131E97051F008204EA /* impl_org_ortc_StringOrStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl_org_ortc_StringOrStringList.h; sourceTree = ""; }; + 00217D141E97051F008204EA /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 002178151E9704E2008204EA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0021780F1E9704E2008204EA = { + isa = PBXGroup; + children = ( + 002178261E97051A008204EA /* wrapper */, + 002178191E9704E2008204EA /* Products */, + ); + sourceTree = ""; + }; + 002178191E9704E2008204EA /* Products */ = { + isa = PBXGroup; + children = ( + 002178181E9704E2008204EA /* libortclib-wrapper-osx.a */, + ); + name = Products; + sourceTree = ""; + }; + 002178261E97051A008204EA /* wrapper */ = { + isa = PBXGroup; + children = ( + 00217BD71E97051D008204EA /* impl_org_ortc.cpp */, + 00217BD81E97051D008204EA /* impl_org_ortc_adapter_MediaStream.cpp */, + 00217BD91E97051D008204EA /* impl_org_ortc_adapter_MediaStream.h */, + 00217BDA1E97051D008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp */, + 00217BDB1E97051D008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.h */, + 00217BDC1E97051D008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp */, + 00217BDD1E97051D008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.h */, + 00217BDE1E97051D008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp */, + 00217BDF1E97051D008204EA /* impl_org_ortc_adapter_RTCConfiguration.h */, + 00217BE01E97051D008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp */, + 00217BE11E97051D008204EA /* impl_org_ortc_adapter_RTCIceCandidate.h */, + 00217BE21E97051D008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */, + 00217BE31E97051D008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h */, + 00217BE41E97051D008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp */, + 00217BE51E97051D008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.h */, + 00217BE61E97051D008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp */, + 00217BE71E97051D008204EA /* impl_org_ortc_adapter_RTCOfferOptions.h */, + 00217BE81E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp */, + 00217BE91E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnection.h */, + 00217BEA1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */, + 00217BEB1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h */, + 00217BEC1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */, + 00217BED1E97051D008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h */, + 00217BEE1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp */, + 00217BEF1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescription.h */, + 00217BF01E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */, + 00217BF11E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h */, + 00217BF21E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */, + 00217BF31E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h */, + 00217BF41E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */, + 00217BF51E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.h */, + 00217BF61E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */, + 00217BF71E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h */, + 00217BF81E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */, + 00217BF91E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h */, + 00217BFA1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */, + 00217BFB1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h */, + 00217BFC1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */, + 00217BFD1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h */, + 00217BFE1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */, + 00217BFF1E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h */, + 00217C001E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */, + 00217C011E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h */, + 00217C021E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */, + 00217C031E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h */, + 00217C041E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */, + 00217C051E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.h */, + 00217C061E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */, + 00217C071E97051D008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h */, + 00217C081E97051D008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp */, + 00217C091E97051D008204EA /* impl_org_ortc_adapter_RTCTrackEvent.h */, + 00217C0A1E97051D008204EA /* impl_org_ortc_ConstrainBoolean.cpp */, + 00217C0B1E97051D008204EA /* impl_org_ortc_ConstrainBoolean.h */, + 00217C0C1E97051D008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp */, + 00217C0D1E97051D008204EA /* impl_org_ortc_ConstrainBooleanParameters.h */, + 00217C0E1E97051D008204EA /* impl_org_ortc_ConstrainDouble.cpp */, + 00217C0F1E97051D008204EA /* impl_org_ortc_ConstrainDouble.h */, + 00217C101E97051D008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp */, + 00217C111E97051D008204EA /* impl_org_ortc_ConstrainDoubleRange.h */, + 00217C121E97051D008204EA /* impl_org_ortc_ConstrainLong.cpp */, + 00217C131E97051D008204EA /* impl_org_ortc_ConstrainLong.h */, + 00217C141E97051D008204EA /* impl_org_ortc_ConstrainLongRange.cpp */, + 00217C151E97051D008204EA /* impl_org_ortc_ConstrainLongRange.h */, + 00217C161E97051D008204EA /* impl_org_ortc_ConstrainString.cpp */, + 00217C171E97051D008204EA /* impl_org_ortc_ConstrainString.h */, + 00217C181E97051D008204EA /* impl_org_ortc_ConstrainStringParameters.cpp */, + 00217C191E97051D008204EA /* impl_org_ortc_ConstrainStringParameters.h */, + 00217C1A1E97051D008204EA /* impl_org_ortc_Dispatcher.cpp */, + 00217C1B1E97051D008204EA /* impl_org_ortc_Dispatcher.h */, + 00217C1C1E97051D008204EA /* impl_org_ortc_DoubleRange.cpp */, + 00217C1D1E97051D008204EA /* impl_org_ortc_DoubleRange.h */, + 00217C1E1E97051D008204EA /* impl_org_ortc_Error.cpp */, + 00217C1F1E97051D008204EA /* impl_org_ortc_Error.h */, + 00217C201E97051D008204EA /* impl_org_ortc_ErrorEvent.cpp */, + 00217C211E97051D008204EA /* impl_org_ortc_ErrorEvent.h */, + 00217C221E97051D008204EA /* impl_org_ortc_Helper.cpp */, + 00217C231E97051D008204EA /* impl_org_ortc_Helper.h */, + 00217C241E97051D008204EA /* impl_org_ortc_Json.cpp */, + 00217C251E97051D008204EA /* impl_org_ortc_Json.h */, + 00217C261E97051D008204EA /* impl_org_ortc_Logger.cpp */, + 00217C271E97051D008204EA /* impl_org_ortc_Logger.h */, + 00217C281E97051D008204EA /* impl_org_ortc_LongRange.cpp */, + 00217C291E97051D008204EA /* impl_org_ortc_LongRange.h */, + 00217C2A1E97051D008204EA /* impl_org_ortc_MediaControl.cpp */, + 00217C2B1E97051D008204EA /* impl_org_ortc_MediaControl.h */, + 00217C2C1E97051D008204EA /* impl_org_ortc_MediaDeviceInfo.cpp */, + 00217C2D1E97051D008204EA /* impl_org_ortc_MediaDeviceInfo.h */, + 00217C2E1E97051D008204EA /* impl_org_ortc_MediaDevices.cpp */, + 00217C2F1E97051D008204EA /* impl_org_ortc_MediaDevices.h */, + 00217C301E97051D008204EA /* impl_org_ortc_MediaSource.cpp */, + 00217C311E97051D008204EA /* impl_org_ortc_MediaSource.h */, + 00217C321E97051D008204EA /* impl_org_ortc_MediaStreamConstraints.cpp */, + 00217C331E97051D008204EA /* impl_org_ortc_MediaStreamConstraints.h */, + 00217C341E97051D008204EA /* impl_org_ortc_MediaStreamTrack.cpp */, + 00217C351E97051D008204EA /* impl_org_ortc_MediaStreamTrack.h */, + 00217C361E97051D008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp */, + 00217C371E97051D008204EA /* impl_org_ortc_MediaTrackCapabilities.h */, + 00217C381E97051D008204EA /* impl_org_ortc_MediaTrackConstraints.cpp */, + 00217C391E97051D008204EA /* impl_org_ortc_MediaTrackConstraints.h */, + 00217C3A1E97051D008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp */, + 00217C3B1E97051D008204EA /* impl_org_ortc_MediaTrackConstraintSet.h */, + 00217C3C1E97051D008204EA /* impl_org_ortc_MediaTrackSettings.cpp */, + 00217C3D1E97051D008204EA /* impl_org_ortc_MediaTrackSettings.h */, + 00217C3E1E97051D008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp */, + 00217C3F1E97051D008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.h */, + 00217C401E97051D008204EA /* impl_org_ortc_MessageQueue.cpp */, + 00217C411E97051D008204EA /* impl_org_ortc_MessageQueue.h */, + 00217C421E97051D008204EA /* impl_org_ortc_OrtcLib.cpp */, + 00217C431E97051D008204EA /* impl_org_ortc_OrtcLib.h */, + 00217C441E97051D008204EA /* impl_org_ortc_OrtcLibWithDispatcher.cpp */, + 00217C451E97051D008204EA /* impl_org_ortc_OrtcLibWithDispatcher.h */, + 00217C461E97051D008204EA /* impl_org_ortc_OverconstrainedError.cpp */, + 00217C471E97051D008204EA /* impl_org_ortc_OverconstrainedError.h */, + 00217C481E97051D008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp */, + 00217C491E97051D008204EA /* impl_org_ortc_OverconstrainedErrorEvent.h */, + 00217C4A1E97051D008204EA /* impl_org_ortc_RTCCertificate.cpp */, + 00217C4B1E97051D008204EA /* impl_org_ortc_RTCCertificate.h */, + 00217C4C1E97051D008204EA /* impl_org_ortc_RTCCertificateStats.cpp */, + 00217C4D1E97051D008204EA /* impl_org_ortc_RTCCertificateStats.h */, + 00217C4E1E97051D008204EA /* impl_org_ortc_RTCCodec.cpp */, + 00217C4F1E97051D008204EA /* impl_org_ortc_RTCCodec.h */, + 00217C501E97051D008204EA /* impl_org_ortc_RTCDataChannel.cpp */, + 00217C511E97051D008204EA /* impl_org_ortc_RTCDataChannel.h */, + 00217C521E97051D008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp */, + 00217C531E97051D008204EA /* impl_org_ortc_RTCDataChannelEvent.h */, + 00217C541E97051D008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp */, + 00217C551E97051D008204EA /* impl_org_ortc_RTCDataChannelParameters.h */, + 00217C561E97051E008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp */, + 00217C571E97051E008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.h */, + 00217C581E97051E008204EA /* impl_org_ortc_RTCDataChannelStats.cpp */, + 00217C591E97051E008204EA /* impl_org_ortc_RTCDataChannelStats.h */, + 00217C5A1E97051E008204EA /* impl_org_ortc_RTCDataTransport.cpp */, + 00217C5B1E97051E008204EA /* impl_org_ortc_RTCDataTransport.h */, + 00217C5C1E97051E008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp */, + 00217C5D1E97051E008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.h */, + 00217C5E1E97051E008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp */, + 00217C5F1E97051E008204EA /* impl_org_ortc_RTCDtlsFingerprint.h */, + 00217C601E97051E008204EA /* impl_org_ortc_RTCDtlsParameters.cpp */, + 00217C611E97051E008204EA /* impl_org_ortc_RTCDtlsParameters.h */, + 00217C621E97051E008204EA /* impl_org_ortc_RTCDtlsTransport.cpp */, + 00217C631E97051E008204EA /* impl_org_ortc_RTCDtlsTransport.h */, + 00217C641E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */, + 00217C651E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.h */, + 00217C661E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp */, + 00217C671E97051E008204EA /* impl_org_ortc_RTCDtlsTransportStats.h */, + 00217C681E97051E008204EA /* impl_org_ortc_RTCDtmfSender.cpp */, + 00217C691E97051E008204EA /* impl_org_ortc_RTCDtmfSender.h */, + 00217C6A1E97051E008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp */, + 00217C6B1E97051E008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.h */, + 00217C6C1E97051E008204EA /* impl_org_ortc_RTCIceCandidate.cpp */, + 00217C6D1E97051E008204EA /* impl_org_ortc_RTCIceCandidate.h */, + 00217C6E1E97051E008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp */, + 00217C6F1E97051E008204EA /* impl_org_ortc_RTCIceCandidateAttributes.h */, + 00217C701E97051E008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp */, + 00217C711E97051E008204EA /* impl_org_ortc_RTCIceCandidateComplete.h */, + 00217C721E97051E008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp */, + 00217C731E97051E008204EA /* impl_org_ortc_RTCIceCandidatePair.h */, + 00217C741E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp */, + 00217C751E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.h */, + 00217C761E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp */, + 00217C771E97051E008204EA /* impl_org_ortc_RTCIceCandidatePairStats.h */, + 00217C781E97051E008204EA /* impl_org_ortc_RTCIceGatherer.cpp */, + 00217C791E97051E008204EA /* impl_org_ortc_RTCIceGatherer.h */, + 00217C7A1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp */, + 00217C7B1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidate.h */, + 00217C7C1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */, + 00217C7D1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h */, + 00217C7E1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp */, + 00217C7F1E97051E008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.h */, + 00217C801E97051E008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp */, + 00217C811E97051E008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.h */, + 00217C821E97051E008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp */, + 00217C831E97051E008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.h */, + 00217C841E97051E008204EA /* impl_org_ortc_RTCIceGathererStats.cpp */, + 00217C851E97051E008204EA /* impl_org_ortc_RTCIceGathererStats.h */, + 00217C861E97051E008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp */, + 00217C871E97051E008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.h */, + 00217C881E97051E008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp */, + 00217C891E97051E008204EA /* impl_org_ortc_RTCIceGatherOptions.h */, + 00217C8A1E97051E008204EA /* impl_org_ortc_RTCIceParameters.cpp */, + 00217C8B1E97051E008204EA /* impl_org_ortc_RTCIceParameters.h */, + 00217C8C1E97051E008204EA /* impl_org_ortc_RTCIceServer.cpp */, + 00217C8D1E97051E008204EA /* impl_org_ortc_RTCIceServer.h */, + 00217C8E1E97051E008204EA /* impl_org_ortc_RTCIceTransport.cpp */, + 00217C8F1E97051E008204EA /* impl_org_ortc_RTCIceTransport.h */, + 00217C901E97051E008204EA /* impl_org_ortc_RTCIceTransportController.cpp */, + 00217C911E97051E008204EA /* impl_org_ortc_RTCIceTransportController.h */, + 00217C921E97051E008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp */, + 00217C931E97051E008204EA /* impl_org_ortc_RTCIceTransportOptions.h */, + 00217C941E97051E008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp */, + 00217C951E97051E008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.h */, + 00217C961E97051E008204EA /* impl_org_ortc_RTCIceTransportStats.cpp */, + 00217C971E97051E008204EA /* impl_org_ortc_RTCIceTransportStats.h */, + 00217C981E97051E008204EA /* impl_org_ortc_RTCIdentity.cpp */, + 00217C991E97051E008204EA /* impl_org_ortc_RTCIdentity.h */, + 00217C9A1E97051E008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp */, + 00217C9B1E97051E008204EA /* impl_org_ortc_RTCIdentityAssertion.h */, + 00217C9C1E97051E008204EA /* impl_org_ortc_RTCIdentityError.cpp */, + 00217C9D1E97051E008204EA /* impl_org_ortc_RTCIdentityError.h */, + 00217C9E1E97051E008204EA /* impl_org_ortc_RTCIdentityResult.cpp */, + 00217C9F1E97051E008204EA /* impl_org_ortc_RTCIdentityResult.h */, + 00217CA01E97051E008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp */, + 00217CA11E97051E008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.h */, + 00217CA21E97051E008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp */, + 00217CA31E97051E008204EA /* impl_org_ortc_RTCMediaStreamStats.h */, + 00217CA41E97051E008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp */, + 00217CA51E97051E008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.h */, + 00217CA61E97051E008204EA /* impl_org_ortc_RTCMessageEvent.cpp */, + 00217CA71E97051E008204EA /* impl_org_ortc_RTCMessageEvent.h */, + 00217CA81E97051E008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp */, + 00217CA91E97051E008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.h */, + 00217CAA1E97051E008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp */, + 00217CAB1E97051E008204EA /* impl_org_ortc_RTCRtcpFeedback.h */, + 00217CAC1E97051E008204EA /* impl_org_ortc_RTCRtcpParameters.cpp */, + 00217CAD1E97051E008204EA /* impl_org_ortc_RTCRtcpParameters.h */, + 00217CAE1E97051E008204EA /* impl_org_ortc_RTCRtcpTransport.cpp */, + 00217CAF1E97051E008204EA /* impl_org_ortc_RTCRtcpTransport.h */, + 00217CB01E97051E008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp */, + 00217CB11E97051E008204EA /* impl_org_ortc_RTCRtpCapabilities.h */, + 00217CB21E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp */, + 00217CB31E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapability.h */, + 00217CB41E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp */, + 00217CB51E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.h */, + 00217CB61E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp */, + 00217CB71E97051E008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.h */, + 00217CB81E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp */, + 00217CB91E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameters.h */, + 00217CBA1E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp */, + 00217CBB1E97051E008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.h */, + 00217CBC1E97051E008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp */, + 00217CBD1E97051E008204EA /* impl_org_ortc_RTCRtpContributingSource.h */, + 00217CBE1E97051E008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp */, + 00217CBF1E97051E008204EA /* impl_org_ortc_RTCRtpEncodingParameters.h */, + 00217CC01E97051E008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp */, + 00217CC11E97051E008204EA /* impl_org_ortc_RTCRtpFecParameters.h */, + 00217CC21E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */, + 00217CC31E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h */, + 00217CC41E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */, + 00217CC51E97051E008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h */, + 00217CC61E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */, + 00217CC71E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h */, + 00217CC81E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp */, + 00217CC91E97051E008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.h */, + 00217CCA1E97051E008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp */, + 00217CCB1E97051E008204EA /* impl_org_ortc_RTCRtpHeaderExtension.h */, + 00217CCC1E97051F008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp */, + 00217CCD1E97051F008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.h */, + 00217CCE1E97051F008204EA /* impl_org_ortc_RTCRtpListener.cpp */, + 00217CCF1E97051F008204EA /* impl_org_ortc_RTCRtpListener.h */, + 00217CD01E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */, + 00217CD11E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h */, + 00217CD21E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */, + 00217CD31E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h */, + 00217CD41E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */, + 00217CD51E97051F008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.h */, + 00217CD61E97051F008204EA /* impl_org_ortc_RTCRtpParameters.cpp */, + 00217CD71E97051F008204EA /* impl_org_ortc_RTCRtpParameters.h */, + 00217CD81E97051F008204EA /* impl_org_ortc_RTCRtpReceiver.cpp */, + 00217CD91E97051F008204EA /* impl_org_ortc_RTCRtpReceiver.h */, + 00217CDA1E97051F008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp */, + 00217CDB1E97051F008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.h */, + 00217CDC1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */, + 00217CDD1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h */, + 00217CDE1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */, + 00217CDF1E97051F008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.h */, + 00217CE01E97051F008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp */, + 00217CE11E97051F008204EA /* impl_org_ortc_RTCRtpRtxParameters.h */, + 00217CE21E97051F008204EA /* impl_org_ortc_RTCRtpSender.cpp */, + 00217CE31E97051F008204EA /* impl_org_ortc_RTCRtpSender.h */, + 00217CE41E97051F008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp */, + 00217CE51E97051F008204EA /* impl_org_ortc_RTCRtpStreamStats.h */, + 00217CE61E97051F008204EA /* impl_org_ortc_RTCRtpTransport.cpp */, + 00217CE71E97051F008204EA /* impl_org_ortc_RTCRtpTransport.h */, + 00217CE81E97051F008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp */, + 00217CE91E97051F008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.h */, + 00217CEA1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */, + 00217CEB1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h */, + 00217CEC1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */, + 00217CED1E97051F008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.h */, + 00217CEE1E97051F008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp */, + 00217CEF1E97051F008204EA /* impl_org_ortc_RTCSctpCapabilities.h */, + 00217CF01E97051F008204EA /* impl_org_ortc_RTCSctpTransport.cpp */, + 00217CF11E97051F008204EA /* impl_org_ortc_RTCSctpTransport.h */, + 00217CF21E97051F008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp */, + 00217CF31E97051F008204EA /* impl_org_ortc_RTCSctpTransportListener.h */, + 00217CF41E97051F008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp */, + 00217CF51E97051F008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.h */, + 00217CF61E97051F008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp */, + 00217CF71E97051F008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.h */, + 00217CF81E97051F008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp */, + 00217CF91E97051F008204EA /* impl_org_ortc_RTCSctpTransportStats.h */, + 00217CFA1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp */, + 00217CFB1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.h */, + 00217CFC1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp */, + 00217CFD1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.h */, + 00217CFE1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp */, + 00217CFF1E97051F008204EA /* impl_org_ortc_RTCSrtpSdesParameters.h */, + 00217D001E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp */, + 00217D011E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransport.h */, + 00217D021E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */, + 00217D031E97051F008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h */, + 00217D041E97051F008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp */, + 00217D051E97051F008204EA /* impl_org_ortc_RTCSrtpTransportStats.h */, + 00217D061E97051F008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp */, + 00217D071E97051F008204EA /* impl_org_ortc_RTCSsrcConflictEvent.h */, + 00217D081E97051F008204EA /* impl_org_ortc_RTCStats.cpp */, + 00217D091E97051F008204EA /* impl_org_ortc_RTCStats.h */, + 00217D0A1E97051F008204EA /* impl_org_ortc_RTCStatsProvider.cpp */, + 00217D0B1E97051F008204EA /* impl_org_ortc_RTCStatsProvider.h */, + 00217D0C1E97051F008204EA /* impl_org_ortc_RTCStatsReport.cpp */, + 00217D0D1E97051F008204EA /* impl_org_ortc_RTCStatsReport.h */, + 00217D0E1E97051F008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp */, + 00217D0F1E97051F008204EA /* impl_org_ortc_RTCStatsTypeSet.h */, + 00217D101E97051F008204EA /* impl_org_ortc_Settings.cpp */, + 00217D111E97051F008204EA /* impl_org_ortc_Settings.h */, + 00217D121E97051F008204EA /* impl_org_ortc_StringOrStringList.cpp */, + 00217D131E97051F008204EA /* impl_org_ortc_StringOrStringList.h */, + 00217D141E97051F008204EA /* types.h */, + ); + name = wrapper; + path = ../../../ortc/idl/wrapper; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 002178161E9704E2008204EA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 002178171E9704E2008204EA /* ortclib-wrapper-osx */ = { + isa = PBXNativeTarget; + buildConfigurationList = 002178231E9704E2008204EA /* Build configuration list for PBXNativeTarget "ortclib-wrapper-osx" */; + buildPhases = ( + 002178141E9704E2008204EA /* Sources */, + 002178151E9704E2008204EA /* Frameworks */, + 002178161E9704E2008204EA /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ortclib-wrapper-osx"; + productName = "ortclib-wrapper-osx"; + productReference = 002178181E9704E2008204EA /* libortclib-wrapper-osx.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 002178101E9704E2008204EA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Open Peer Foundation"; + TargetAttributes = { + 002178171E9704E2008204EA = { + CreatedOnToolsVersion = 8.3; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 002178131E9704E2008204EA /* Build configuration list for PBXProject "ortclib-wrapper-osx" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 0021780F1E9704E2008204EA; + productRefGroup = 002178191E9704E2008204EA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 002178171E9704E2008204EA /* ortclib-wrapper-osx */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 002178141E9704E2008204EA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0021809E1E970520008204EA /* impl_org_ortc_RTCDataChannelEvent.cpp in Sources */, + 0021803E1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */, + 002180F41E970520008204EA /* impl_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */, + 002180EE1E970520008204EA /* impl_org_ortc_RTCMediaStreamStats.cpp in Sources */, + 002180B81E970520008204EA /* impl_org_ortc_RTCIceCandidate.cpp in Sources */, + 0021802A1E970520008204EA /* impl_org_ortc_adapter_RTCConfiguration.cpp in Sources */, + 002180801E970520008204EA /* impl_org_ortc_MediaStreamTrack.cpp in Sources */, + 002181241E970520008204EA /* impl_org_ortc_RTCRtpReceiver.cpp in Sources */, + 0021813E1E970520008204EA /* impl_org_ortc_RTCSctpTransportListener.cpp in Sources */, + 002181581E970520008204EA /* impl_org_ortc_RTCStatsReport.cpp in Sources */, + 002180341E970520008204EA /* impl_org_ortc_adapter_RTCPeerConnection.cpp in Sources */, + 002181401E970520008204EA /* impl_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */, + 0021815C1E970521008204EA /* impl_org_ortc_Settings.cpp in Sources */, + 002180601E970520008204EA /* impl_org_ortc_ConstrainLongRange.cpp in Sources */, + 002180DE1E970520008204EA /* impl_org_ortc_RTCIceTransportOptions.cpp in Sources */, + 002180E61E970520008204EA /* impl_org_ortc_RTCIdentityAssertion.cpp in Sources */, + 002180481E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */, + 0021805A1E970520008204EA /* impl_org_ortc_ConstrainDouble.cpp in Sources */, + 002180CA1E970520008204EA /* impl_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */, + 002180921E970520008204EA /* impl_org_ortc_OverconstrainedError.cpp in Sources */, + 002180BC1E970520008204EA /* impl_org_ortc_RTCIceCandidateComplete.cpp in Sources */, + 002180D01E970520008204EA /* impl_org_ortc_RTCIceGathererStats.cpp in Sources */, + 0021814C1E970520008204EA /* impl_org_ortc_RTCSrtpSdesTransport.cpp in Sources */, + 0021807C1E970520008204EA /* impl_org_ortc_MediaSource.cpp in Sources */, + 002180231E970520008204EA /* impl_org_ortc.cpp in Sources */, + 0021811A1E970520008204EA /* impl_org_ortc_RTCRtpListener.cpp in Sources */, + 002181561E970520008204EA /* impl_org_ortc_RTCStatsProvider.cpp in Sources */, + 0021809A1E970520008204EA /* impl_org_ortc_RTCCodec.cpp in Sources */, + 0021813C1E970520008204EA /* impl_org_ortc_RTCSctpTransport.cpp in Sources */, + 0021804A1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */, + 0021805E1E970520008204EA /* impl_org_ortc_ConstrainLong.cpp in Sources */, + 0021806A1E970520008204EA /* impl_org_ortc_Error.cpp in Sources */, + 0021806C1E970520008204EA /* impl_org_ortc_ErrorEvent.cpp in Sources */, + 002180561E970520008204EA /* impl_org_ortc_ConstrainBoolean.cpp in Sources */, + 002180521E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */, + 002180361E970520008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */, + 0021814A1E970520008204EA /* impl_org_ortc_RTCSrtpSdesParameters.cpp in Sources */, + 002180841E970520008204EA /* impl_org_ortc_MediaTrackConstraints.cpp in Sources */, + 0021814E1E970520008204EA /* impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */, + 002180FE1E970520008204EA /* impl_org_ortc_RTCRtpCodecCapability.cpp in Sources */, + 002180F61E970520008204EA /* impl_org_ortc_RTCRtcpFeedback.cpp in Sources */, + 002180DC1E970520008204EA /* impl_org_ortc_RTCIceTransportController.cpp in Sources */, + 002181281E970520008204EA /* impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */, + 002180BA1E970520008204EA /* impl_org_ortc_RTCIceCandidateAttributes.cpp in Sources */, + 002181321E970520008204EA /* impl_org_ortc_RTCRtpTransport.cpp in Sources */, + 0021810C1E970520008204EA /* impl_org_ortc_RTCRtpFecParameters.cpp in Sources */, + 0021813A1E970520008204EA /* impl_org_ortc_RTCSctpCapabilities.cpp in Sources */, + 002181501E970520008204EA /* impl_org_ortc_RTCSrtpTransportStats.cpp in Sources */, + 0021804E1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */, + 002180441E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */, + 0021807E1E970520008204EA /* impl_org_ortc_MediaStreamConstraints.cpp in Sources */, + 002180501E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */, + 002180D21E970520008204EA /* impl_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */, + 002180CC1E970520008204EA /* impl_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */, + 002181421E970520008204EA /* impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */, + 002181521E970520008204EA /* impl_org_ortc_RTCSsrcConflictEvent.cpp in Sources */, + 002181201E970520008204EA /* impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */, + 002181081E970520008204EA /* impl_org_ortc_RTCRtpContributingSource.cpp in Sources */, + 002180881E970520008204EA /* impl_org_ortc_MediaTrackSettings.cpp in Sources */, + 002180741E970520008204EA /* impl_org_ortc_LongRange.cpp in Sources */, + 002180C41E970520008204EA /* impl_org_ortc_RTCIceGatherer.cpp in Sources */, + 002180621E970520008204EA /* impl_org_ortc_ConstrainString.cpp in Sources */, + 0021804C1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */, + 0021812E1E970520008204EA /* impl_org_ortc_RTCRtpSender.cpp in Sources */, + 002180981E970520008204EA /* impl_org_ortc_RTCCertificateStats.cpp in Sources */, + 0021812C1E970520008204EA /* impl_org_ortc_RTCRtpRtxParameters.cpp in Sources */, + 002180EC1E970520008204EA /* impl_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */, + 002181101E970520008204EA /* impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */, + 002180961E970520008204EA /* impl_org_ortc_RTCCertificate.cpp in Sources */, + 002180D61E970520008204EA /* impl_org_ortc_RTCIceParameters.cpp in Sources */, + 002180C21E970520008204EA /* impl_org_ortc_RTCIceCandidatePairStats.cpp in Sources */, + 002181041E970520008204EA /* impl_org_ortc_RTCRtpCodecParameters.cpp in Sources */, + 0021808A1E970520008204EA /* impl_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */, + 0021803C1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */, + 0021803A1E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescription.cpp in Sources */, + 002180261E970520008204EA /* impl_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */, + 002180D41E970520008204EA /* impl_org_ortc_RTCIceGatherOptions.cpp in Sources */, + 002181061E970520008204EA /* impl_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */, + 0021802C1E970520008204EA /* impl_org_ortc_adapter_RTCIceCandidate.cpp in Sources */, + 002181481E970520008204EA /* impl_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */, + 002180FA1E970520008204EA /* impl_org_ortc_RTCRtcpTransport.cpp in Sources */, + 002181381E970520008204EA /* impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */, + 002180301E970520008204EA /* impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */, + 0021810E1E970520008204EA /* impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */, + 002180B21E970520008204EA /* impl_org_ortc_RTCDtlsTransportStats.cpp in Sources */, + 002181301E970520008204EA /* impl_org_ortc_RTCRtpStreamStats.cpp in Sources */, + 002180401E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */, + 002180D81E970520008204EA /* impl_org_ortc_RTCIceServer.cpp in Sources */, + 002180281E970520008204EA /* impl_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */, + 0021805C1E970520008204EA /* impl_org_ortc_ConstrainDoubleRange.cpp in Sources */, + 0021806E1E970520008204EA /* impl_org_ortc_Helper.cpp in Sources */, + 002180B01E970520008204EA /* impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */, + 002180AC1E970520008204EA /* impl_org_ortc_RTCDtlsParameters.cpp in Sources */, + 002180E41E970520008204EA /* impl_org_ortc_RTCIdentity.cpp in Sources */, + 002180641E970520008204EA /* impl_org_ortc_ConstrainStringParameters.cpp in Sources */, + 002180C01E970520008204EA /* impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */, + 002180CE1E970520008204EA /* impl_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */, + 002180C61E970520008204EA /* impl_org_ortc_RTCIceGathererCandidate.cpp in Sources */, + 002180FC1E970520008204EA /* impl_org_ortc_RTCRtpCapabilities.cpp in Sources */, + 002180A01E970520008204EA /* impl_org_ortc_RTCDataChannelParameters.cpp in Sources */, + 002180AA1E970520008204EA /* impl_org_ortc_RTCDtlsFingerprint.cpp in Sources */, + 002180861E970520008204EA /* impl_org_ortc_MediaTrackConstraintSet.cpp in Sources */, + 002180DA1E970520008204EA /* impl_org_ortc_RTCIceTransport.cpp in Sources */, + 002181121E970520008204EA /* impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */, + 002180EA1E970520008204EA /* impl_org_ortc_RTCIdentityResult.cpp in Sources */, + 002181021E970520008204EA /* impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */, + 002180BE1E970520008204EA /* impl_org_ortc_RTCIceCandidatePair.cpp in Sources */, + 002180AE1E970520008204EA /* impl_org_ortc_RTCDtlsTransport.cpp in Sources */, + 002180B41E970520008204EA /* impl_org_ortc_RTCDtmfSender.cpp in Sources */, + 002180941E970520008204EA /* impl_org_ortc_OverconstrainedErrorEvent.cpp in Sources */, + 0021811E1E970520008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */, + 002180A81E970520008204EA /* impl_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */, + 002180B61E970520008204EA /* impl_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */, + 002180F21E970520008204EA /* impl_org_ortc_RTCMessageEvent.cpp in Sources */, + 0021808C1E970520008204EA /* impl_org_ortc_MessageQueue.cpp in Sources */, + 002181341E970520008204EA /* impl_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */, + 002180461E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */, + 002180681E970520008204EA /* impl_org_ortc_DoubleRange.cpp in Sources */, + 002181261E970520008204EA /* impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */, + 002180381E970520008204EA /* impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */, + 002181441E970520008204EA /* impl_org_ortc_RTCSctpTransportStats.cpp in Sources */, + 0021809C1E970520008204EA /* impl_org_ortc_RTCDataChannel.cpp in Sources */, + 002180E01E970520008204EA /* impl_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */, + 002180241E970520008204EA /* impl_org_ortc_adapter_MediaStream.cpp in Sources */, + 0021802E1E970520008204EA /* impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */, + 002181221E970520008204EA /* impl_org_ortc_RTCRtpParameters.cpp in Sources */, + 002180A21E970520008204EA /* impl_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */, + 002180721E970520008204EA /* impl_org_ortc_Logger.cpp in Sources */, + 002180E81E970520008204EA /* impl_org_ortc_RTCIdentityError.cpp in Sources */, + 002180761E970520008204EA /* impl_org_ortc_MediaControl.cpp in Sources */, + 002181361E970520008204EA /* impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */, + 0021811C1E970520008204EA /* impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */, + 002180581E970520008204EA /* impl_org_ortc_ConstrainBooleanParameters.cpp in Sources */, + 002180541E970520008204EA /* impl_org_ortc_adapter_RTCTrackEvent.cpp in Sources */, + 002180E21E970520008204EA /* impl_org_ortc_RTCIceTransportStats.cpp in Sources */, + 002180421E970520008204EA /* impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */, + 0021812A1E970520008204EA /* impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */, + 002180F01E970520008204EA /* impl_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */, + 002180A61E970520008204EA /* impl_org_ortc_RTCDataTransport.cpp in Sources */, + 002180821E970520008204EA /* impl_org_ortc_MediaTrackCapabilities.cpp in Sources */, + 002181181E970520008204EA /* impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */, + 002181161E970520008204EA /* impl_org_ortc_RTCRtpHeaderExtension.cpp in Sources */, + 0021808E1E970520008204EA /* impl_org_ortc_OrtcLib.cpp in Sources */, + 002181001E970520008204EA /* impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */, + 002181141E970520008204EA /* impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */, + 0021810A1E970520008204EA /* impl_org_ortc_RTCRtpEncodingParameters.cpp in Sources */, + 002180701E970520008204EA /* impl_org_ortc_Json.cpp in Sources */, + 002180C81E970520008204EA /* impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */, + 002180A41E970520008204EA /* impl_org_ortc_RTCDataChannelStats.cpp in Sources */, + 0021807A1E970520008204EA /* impl_org_ortc_MediaDevices.cpp in Sources */, + 002180781E970520008204EA /* impl_org_ortc_MediaDeviceInfo.cpp in Sources */, + 002181461E970520008204EA /* impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */, + 002180321E970520008204EA /* impl_org_ortc_adapter_RTCOfferOptions.cpp in Sources */, + 0021815E1E970521008204EA /* impl_org_ortc_StringOrStringList.cpp in Sources */, + 002181541E970520008204EA /* impl_org_ortc_RTCStats.cpp in Sources */, + 002180F81E970520008204EA /* impl_org_ortc_RTCRtcpParameters.cpp in Sources */, + 0021815A1E970521008204EA /* impl_org_ortc_RTCStatsTypeSet.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 002178211E9704E2008204EA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "../../../../ortclib-cpp", + "../../../../ortclib-services-cpp", + ../../../../zsLib, + "../../../../zsLib-eventing", + ../../../.., + ../../../../../../webrtc/xplatform/webrtc, + ); + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 002178221E9704E2008204EA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_SHADOW = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "../../../../ortclib-cpp", + "../../../../ortclib-services-cpp", + ../../../../zsLib, + "../../../../zsLib-eventing", + ../../../.., + ../../../../../../webrtc/xplatform/webrtc, + ); + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 002178241E9704E2008204EA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_CPP_EXCEPTIONS = YES; + GCC_ENABLE_CPP_RTTI = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 002178251E9704E2008204EA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_CPP_EXCEPTIONS = YES; + GCC_ENABLE_CPP_RTTI = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 002178131E9704E2008204EA /* Build configuration list for PBXProject "ortclib-wrapper-osx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 002178211E9704E2008204EA /* Debug */, + 002178221E9704E2008204EA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 002178231E9704E2008204EA /* Build configuration list for PBXNativeTarget "ortclib-wrapper-osx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 002178241E9704E2008204EA /* Debug */, + 002178251E9704E2008204EA /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 002178101E9704E2008204EA /* Project object */; +} From 6538bec47c05d18a33313d5ae6ad6769f7949a25 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 9 Apr 2017 21:01:04 -0400 Subject: [PATCH 108/187] - added missing preprocessor WEBRTC_WIN --- .../ortclib.wrapper.vcxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj index 6374fac5..20e8df85 100644 --- a/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper.Universal/ortclib.wrapper.vcxproj @@ -609,7 +609,7 @@ NotUsing true true - USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) + WEBRTC_WIN;USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) 4068;4290 $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) @@ -627,7 +627,7 @@ NotUsing true true - USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) + WEBRTC_WIN;USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) 4068;4290 $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) @@ -645,7 +645,7 @@ NotUsing true true - USE_ETW;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + WEBRTC_WIN;USE_ETW;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) 4068;4290 $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) @@ -663,7 +663,7 @@ NotUsing true true - USE_ETW;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + WEBRTC_WIN;USE_ETW;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) 4068;4290 $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) @@ -681,7 +681,7 @@ NotUsing true true - USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) + WEBRTC_WIN;USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) 4068;4290 $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) @@ -699,7 +699,7 @@ NotUsing true true - USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) + WEBRTC_WIN;USE_ETW;_UNICODE;UNICODE;%(PreprocessorDefinitions) 4068;4290 $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) From 02b416d4a0819488a9a02136c7a40f3f5d4b2f69 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Tue, 11 Apr 2017 15:00:30 +0200 Subject: [PATCH 109/187] Resolved most of the linking issues --- .../ortclib-c-ios.xcodeproj/project.pbxproj | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj index 5e992e63..19c552dc 100644 --- a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj @@ -163,6 +163,26 @@ 00216EAE1E96E980008204EA /* c_org_ortc_RTCStatsTypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E0E1E96E97F008204EA /* c_org_ortc_RTCStatsTypeSet.cpp */; }; 00216EAF1E96E980008204EA /* c_org_ortc_Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E101E96E97F008204EA /* c_org_ortc_Settings.cpp */; }; 00216EB01E96E980008204EA /* c_org_ortc_StringOrStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E121E96E97F008204EA /* c_org_ortc_StringOrStringList.cpp */; }; + 52BFF6211E9CFBEE00DF88A1 /* libcryptopp-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6191E9CFBEE00DF88A1 /* libcryptopp-ios.a */; }; + 52BFF6221E9CFBEE00DF88A1 /* libidnkit-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF61A1E9CFBEE00DF88A1 /* libidnkit-ios.a */; }; + 52BFF6231E9CFBEE00DF88A1 /* libortclib-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF61B1E9CFBEE00DF88A1 /* libortclib-ios.a */; }; + 52BFF6241E9CFBEE00DF88A1 /* libortclib-wrapper-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF61C1E9CFBEE00DF88A1 /* libortclib-wrapper-ios.a */; }; + 52BFF6251E9CFBEE00DF88A1 /* libortclib.services-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF61D1E9CFBEE00DF88A1 /* libortclib.services-ios.a */; }; + 52BFF6261E9CFBEE00DF88A1 /* libudns-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF61E1E9CFBEE00DF88A1 /* libudns-ios.a */; }; + 52BFF6271E9CFBEE00DF88A1 /* libzsLib-eventing-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF61F1E9CFBEE00DF88A1 /* libzsLib-eventing-ios.a */; }; + 52BFF6281E9CFBEE00DF88A1 /* libzsLib-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6201E9CFBEE00DF88A1 /* libzsLib-ios.a */; }; + 52BFF6331E9CFC5500DF88A1 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6291E9CFC5500DF88A1 /* AudioToolbox.framework */; }; + 52BFF6341E9CFC5500DF88A1 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62A1E9CFC5500DF88A1 /* AVFoundation.framework */; }; + 52BFF6351E9CFC5500DF88A1 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62B1E9CFC5500DF88A1 /* CoreMedia.framework */; }; + 52BFF6361E9CFC5500DF88A1 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62C1E9CFC5500DF88A1 /* CoreVideo.framework */; }; + 52BFF6371E9CFC5500DF88A1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62D1E9CFC5500DF88A1 /* Foundation.framework */; }; + 52BFF6381E9CFC5500DF88A1 /* libresolv.9.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62E1E9CFC5500DF88A1 /* libresolv.9.tbd */; }; + 52BFF6391E9CFC5500DF88A1 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62F1E9CFC5500DF88A1 /* libz.tbd */; }; + 52BFF63A1E9CFC5500DF88A1 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6301E9CFC5500DF88A1 /* Security.framework */; }; + 52BFF63B1E9CFC5500DF88A1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6311E9CFC5500DF88A1 /* UIKit.framework */; }; + 52BFF63C1E9CFC5500DF88A1 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6321E9CFC5500DF88A1 /* VideoToolbox.framework */; }; + 52BFF63E1E9D053900DF88A1 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF63D1E9D053900DF88A1 /* libcurl.a */; }; + 52BFF6401E9D0A1800DF88A1 /* webrtc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -492,6 +512,26 @@ 00216E121E96E97F008204EA /* c_org_ortc_StringOrStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_StringOrStringList.cpp; sourceTree = ""; }; 00216E131E96E97F008204EA /* c_org_ortc_StringOrStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_StringOrStringList.h; sourceTree = ""; }; 00216E141E96E97F008204EA /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; + 52BFF6191E9CFBEE00DF88A1 /* libcryptopp-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libcryptopp-ios.a"; path = "../../../../cryptopp/projects/xcode/cryptopp-ios/build/Debug-iphoneos/libcryptopp-ios.a"; sourceTree = ""; }; + 52BFF61A1E9CFBEE00DF88A1 /* libidnkit-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libidnkit-ios.a"; path = "../../../../idnkit/projects/xcode/idnkit-ios/build/Debug-iphoneos/libidnkit-ios.a"; sourceTree = ""; }; + 52BFF61B1E9CFBEE00DF88A1 /* libortclib-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libortclib-ios.a"; path = "../ortclib-ios/build/Debug-iphoneos/libortclib-ios.a"; sourceTree = ""; }; + 52BFF61C1E9CFBEE00DF88A1 /* libortclib-wrapper-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libortclib-wrapper-ios.a"; path = "../ortclib-wrapper-ios/build/Debug-iphoneos/libortclib-wrapper-ios.a"; sourceTree = ""; }; + 52BFF61D1E9CFBEE00DF88A1 /* libortclib.services-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libortclib.services-ios.a"; path = "../../../../ortclib-services-cpp/projects/xcode/ortclib.services-ios/build/Debug-iphoneos/libortclib.services-ios.a"; sourceTree = ""; }; + 52BFF61E1E9CFBEE00DF88A1 /* libudns-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libudns-ios.a"; path = "../../../../udns/projects/xcode/udns-ios/build/Debug-iphoneos/libudns-ios.a"; sourceTree = ""; }; + 52BFF61F1E9CFBEE00DF88A1 /* libzsLib-eventing-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libzsLib-eventing-ios.a"; path = "../../../../zsLib-eventing/projects/xcode/zsLib-eventing-ios/build/Debug-iphoneos/libzsLib-eventing-ios.a"; sourceTree = ""; }; + 52BFF6201E9CFBEE00DF88A1 /* libzsLib-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libzsLib-ios.a"; path = "../../../../zsLib/projects/xcode/zsLib-ios/build/Debug-iphoneos/libzsLib-ios.a"; sourceTree = ""; }; + 52BFF6291E9CFC5500DF88A1 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 52BFF62A1E9CFC5500DF88A1 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 52BFF62B1E9CFC5500DF88A1 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 52BFF62C1E9CFC5500DF88A1 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; + 52BFF62D1E9CFC5500DF88A1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 52BFF62E1E9CFC5500DF88A1 /* libresolv.9.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.9.tbd; path = usr/lib/libresolv.9.tbd; sourceTree = SDKROOT; }; + 52BFF62F1E9CFC5500DF88A1 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + 52BFF6301E9CFC5500DF88A1 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + 52BFF6311E9CFC5500DF88A1 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 52BFF6321E9CFC5500DF88A1 /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; }; + 52BFF63D1E9D053900DF88A1 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = "../../../../curl/curl/ios-appstore/lib/libcurl.a"; sourceTree = ""; }; + 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = webrtc.a; path = ../../../../../../webrtc/xplatform/webrtc/out_ios/webrtc.a; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -499,6 +539,26 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 52BFF6401E9D0A1800DF88A1 /* webrtc.a in Frameworks */, + 52BFF63E1E9D053900DF88A1 /* libcurl.a in Frameworks */, + 52BFF6331E9CFC5500DF88A1 /* AudioToolbox.framework in Frameworks */, + 52BFF6341E9CFC5500DF88A1 /* AVFoundation.framework in Frameworks */, + 52BFF6351E9CFC5500DF88A1 /* CoreMedia.framework in Frameworks */, + 52BFF6361E9CFC5500DF88A1 /* CoreVideo.framework in Frameworks */, + 52BFF6371E9CFC5500DF88A1 /* Foundation.framework in Frameworks */, + 52BFF6381E9CFC5500DF88A1 /* libresolv.9.tbd in Frameworks */, + 52BFF6391E9CFC5500DF88A1 /* libz.tbd in Frameworks */, + 52BFF63A1E9CFC5500DF88A1 /* Security.framework in Frameworks */, + 52BFF63B1E9CFC5500DF88A1 /* UIKit.framework in Frameworks */, + 52BFF63C1E9CFC5500DF88A1 /* VideoToolbox.framework in Frameworks */, + 52BFF6211E9CFBEE00DF88A1 /* libcryptopp-ios.a in Frameworks */, + 52BFF6221E9CFBEE00DF88A1 /* libidnkit-ios.a in Frameworks */, + 52BFF6231E9CFBEE00DF88A1 /* libortclib-ios.a in Frameworks */, + 52BFF6241E9CFBEE00DF88A1 /* libortclib-wrapper-ios.a in Frameworks */, + 52BFF6251E9CFBEE00DF88A1 /* libortclib.services-ios.a in Frameworks */, + 52BFF6261E9CFBEE00DF88A1 /* libudns-ios.a in Frameworks */, + 52BFF6271E9CFBEE00DF88A1 /* libzsLib-eventing-ios.a in Frameworks */, + 52BFF6281E9CFBEE00DF88A1 /* libzsLib-ios.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -510,6 +570,7 @@ children = ( 00216CDB1E96E97F008204EA /* c */, 00216CD01E96E939008204EA /* Products */, + 52BFF6181E9CFBEC00DF88A1 /* Frameworks */, ); sourceTree = ""; }; @@ -842,6 +903,33 @@ path = ../../../ortc/idl/wrapper/generated/c; sourceTree = ""; }; + 52BFF6181E9CFBEC00DF88A1 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */, + 52BFF63D1E9D053900DF88A1 /* libcurl.a */, + 52BFF6291E9CFC5500DF88A1 /* AudioToolbox.framework */, + 52BFF62A1E9CFC5500DF88A1 /* AVFoundation.framework */, + 52BFF62B1E9CFC5500DF88A1 /* CoreMedia.framework */, + 52BFF62C1E9CFC5500DF88A1 /* CoreVideo.framework */, + 52BFF62D1E9CFC5500DF88A1 /* Foundation.framework */, + 52BFF62E1E9CFC5500DF88A1 /* libresolv.9.tbd */, + 52BFF62F1E9CFC5500DF88A1 /* libz.tbd */, + 52BFF6301E9CFC5500DF88A1 /* Security.framework */, + 52BFF6311E9CFC5500DF88A1 /* UIKit.framework */, + 52BFF6321E9CFC5500DF88A1 /* VideoToolbox.framework */, + 52BFF6191E9CFBEE00DF88A1 /* libcryptopp-ios.a */, + 52BFF61A1E9CFBEE00DF88A1 /* libidnkit-ios.a */, + 52BFF61B1E9CFBEE00DF88A1 /* libortclib-ios.a */, + 52BFF61C1E9CFBEE00DF88A1 /* libortclib-wrapper-ios.a */, + 52BFF61D1E9CFBEE00DF88A1 /* libortclib.services-ios.a */, + 52BFF61E1E9CFBEE00DF88A1 /* libudns-ios.a */, + 52BFF61F1E9CFBEE00DF88A1 /* libzsLib-eventing-ios.a */, + 52BFF6201E9CFBEE00DF88A1 /* libzsLib-ios.a */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -1170,6 +1258,7 @@ 00216CD91E96E939008204EA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1179,6 +1268,7 @@ 00216CDA1E96E939008204EA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1204,6 +1294,7 @@ 00216CDA1E96E939008204EA /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; From e06fbf0c8601998773031fa016f59649f9cb1705 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Tue, 11 Apr 2017 17:03:11 +0200 Subject: [PATCH 110/187] Added dynamic library target for ortclib-c-ios project --- .../ortclib-c-ios.xcodeproj/project.pbxproj | 460 ++++++++++++++++++ 1 file changed, 460 insertions(+) diff --git a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj index 19c552dc..f5d5c0e2 100644 --- a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj @@ -183,6 +183,182 @@ 52BFF63C1E9CFC5500DF88A1 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6321E9CFC5500DF88A1 /* VideoToolbox.framework */; }; 52BFF63E1E9D053900DF88A1 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF63D1E9D053900DF88A1 /* libcurl.a */; }; 52BFF6401E9D0A1800DF88A1 /* webrtc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */; }; + 52BFF6491E9D0C2800DF88A1 /* c_helpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CDC1E96E97F008204EA /* c_helpers.cpp */; }; + 52BFF64A1E9D0C2800DF88A1 /* c_org_ortc_adapter_MediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CDE1E96E97F008204EA /* c_org_ortc_adapter_MediaStream.cpp */; }; + 52BFF64B1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE01E96E97F008204EA /* c_org_ortc_adapter_RTCAnswerOptions.cpp */; }; + 52BFF64C1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE21E96E97F008204EA /* c_org_ortc_adapter_RTCCapabilityOptions.cpp */; }; + 52BFF64D1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE41E96E97F008204EA /* c_org_ortc_adapter_RTCConfiguration.cpp */; }; + 52BFF64E1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE61E96E97F008204EA /* c_org_ortc_adapter_RTCIceCandidate.cpp */; }; + 52BFF64F1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CE81E96E97F008204EA /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp */; }; + 52BFF6501E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CEA1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp */; }; + 52BFF6511E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCOfferOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CEC1E96E97F008204EA /* c_org_ortc_adapter_RTCOfferOptions.cpp */; }; + 52BFF6521E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCPeerConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CEE1E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnection.cpp */; }; + 52BFF6531E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF01E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp */; }; + 52BFF6541E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF21E96E97F008204EA /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp */; }; + 52BFF6551E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF41E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescription.cpp */; }; + 52BFF6561E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF61E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp */; }; + 52BFF6571E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CF81E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp */; }; + 52BFF6581E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CFA1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp */; }; + 52BFF6591E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CFC1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp */; }; + 52BFF65A1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216CFE1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp */; }; + 52BFF65B1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D001E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp */; }; + 52BFF65C1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D021E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp */; }; + 52BFF65D1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D041E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp */; }; + 52BFF65E1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D061E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp */; }; + 52BFF65F1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D081E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp */; }; + 52BFF6601E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D0A1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp */; }; + 52BFF6611E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D0C1E96E97F008204EA /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp */; }; + 52BFF6621E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D0E1E96E97F008204EA /* c_org_ortc_adapter_RTCTrackEvent.cpp */; }; + 52BFF6631E9D0C2800DF88A1 /* c_org_ortc_ConstrainBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D101E96E97F008204EA /* c_org_ortc_ConstrainBoolean.cpp */; }; + 52BFF6641E9D0C2800DF88A1 /* c_org_ortc_ConstrainBooleanParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D121E96E97F008204EA /* c_org_ortc_ConstrainBooleanParameters.cpp */; }; + 52BFF6651E9D0C2800DF88A1 /* c_org_ortc_ConstrainDouble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D141E96E97F008204EA /* c_org_ortc_ConstrainDouble.cpp */; }; + 52BFF6661E9D0C2800DF88A1 /* c_org_ortc_ConstrainDoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D161E96E97F008204EA /* c_org_ortc_ConstrainDoubleRange.cpp */; }; + 52BFF6671E9D0C2800DF88A1 /* c_org_ortc_ConstrainLong.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D181E96E97F008204EA /* c_org_ortc_ConstrainLong.cpp */; }; + 52BFF6681E9D0C2800DF88A1 /* c_org_ortc_ConstrainLongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D1A1E96E97F008204EA /* c_org_ortc_ConstrainLongRange.cpp */; }; + 52BFF6691E9D0C2800DF88A1 /* c_org_ortc_ConstrainString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D1C1E96E97F008204EA /* c_org_ortc_ConstrainString.cpp */; }; + 52BFF66A1E9D0C2800DF88A1 /* c_org_ortc_ConstrainStringParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D1E1E96E97F008204EA /* c_org_ortc_ConstrainStringParameters.cpp */; }; + 52BFF66B1E9D0C2800DF88A1 /* c_org_ortc_DoubleRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D201E96E97F008204EA /* c_org_ortc_DoubleRange.cpp */; }; + 52BFF66C1E9D0C2800DF88A1 /* c_org_ortc_Error.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D221E96E97F008204EA /* c_org_ortc_Error.cpp */; }; + 52BFF66D1E9D0C2800DF88A1 /* c_org_ortc_ErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D241E96E97F008204EA /* c_org_ortc_ErrorEvent.cpp */; }; + 52BFF66E1E9D0C2800DF88A1 /* c_org_ortc_Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D261E96E97F008204EA /* c_org_ortc_Json.cpp */; }; + 52BFF66F1E9D0C2800DF88A1 /* c_org_ortc_Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D281E96E97F008204EA /* c_org_ortc_Logger.cpp */; }; + 52BFF6701E9D0C2800DF88A1 /* c_org_ortc_LongRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D2A1E96E97F008204EA /* c_org_ortc_LongRange.cpp */; }; + 52BFF6711E9D0C2800DF88A1 /* c_org_ortc_MediaControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D2C1E96E97F008204EA /* c_org_ortc_MediaControl.cpp */; }; + 52BFF6721E9D0C2800DF88A1 /* c_org_ortc_MediaDeviceInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D2E1E96E97F008204EA /* c_org_ortc_MediaDeviceInfo.cpp */; }; + 52BFF6731E9D0C2800DF88A1 /* c_org_ortc_MediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D301E96E97F008204EA /* c_org_ortc_MediaDevices.cpp */; }; + 52BFF6741E9D0C2800DF88A1 /* c_org_ortc_MediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D321E96E97F008204EA /* c_org_ortc_MediaSource.cpp */; }; + 52BFF6751E9D0C2800DF88A1 /* c_org_ortc_MediaStreamConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D341E96E97F008204EA /* c_org_ortc_MediaStreamConstraints.cpp */; }; + 52BFF6761E9D0C2800DF88A1 /* c_org_ortc_MediaStreamTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D361E96E97F008204EA /* c_org_ortc_MediaStreamTrack.cpp */; }; + 52BFF6771E9D0C2800DF88A1 /* c_org_ortc_MediaTrackCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D381E96E97F008204EA /* c_org_ortc_MediaTrackCapabilities.cpp */; }; + 52BFF6781E9D0C2800DF88A1 /* c_org_ortc_MediaTrackConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D3A1E96E97F008204EA /* c_org_ortc_MediaTrackConstraints.cpp */; }; + 52BFF6791E9D0C2800DF88A1 /* c_org_ortc_MediaTrackConstraintSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D3C1E96E97F008204EA /* c_org_ortc_MediaTrackConstraintSet.cpp */; }; + 52BFF67A1E9D0C2800DF88A1 /* c_org_ortc_MediaTrackSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D3E1E96E97F008204EA /* c_org_ortc_MediaTrackSettings.cpp */; }; + 52BFF67B1E9D0C2800DF88A1 /* c_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D401E96E97F008204EA /* c_org_ortc_MediaTrackSupportedConstraints.cpp */; }; + 52BFF67C1E9D0C2800DF88A1 /* c_org_ortc_MessageQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D421E96E97F008204EA /* c_org_ortc_MessageQueue.cpp */; }; + 52BFF67D1E9D0C2800DF88A1 /* c_org_ortc_OrtcLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D441E96E97F008204EA /* c_org_ortc_OrtcLib.cpp */; }; + 52BFF67E1E9D0C2800DF88A1 /* c_org_ortc_OverconstrainedError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D461E96E97F008204EA /* c_org_ortc_OverconstrainedError.cpp */; }; + 52BFF67F1E9D0C2800DF88A1 /* c_org_ortc_OverconstrainedErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D481E96E97F008204EA /* c_org_ortc_OverconstrainedErrorEvent.cpp */; }; + 52BFF6801E9D0C2800DF88A1 /* c_org_ortc_RTCCertificate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D4A1E96E97F008204EA /* c_org_ortc_RTCCertificate.cpp */; }; + 52BFF6811E9D0C2800DF88A1 /* c_org_ortc_RTCCertificateStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D4C1E96E97F008204EA /* c_org_ortc_RTCCertificateStats.cpp */; }; + 52BFF6821E9D0C2800DF88A1 /* c_org_ortc_RTCCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D4E1E96E97F008204EA /* c_org_ortc_RTCCodec.cpp */; }; + 52BFF6831E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D501E96E97F008204EA /* c_org_ortc_RTCDataChannel.cpp */; }; + 52BFF6841E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannelEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D521E96E97F008204EA /* c_org_ortc_RTCDataChannelEvent.cpp */; }; + 52BFF6851E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D541E96E97F008204EA /* c_org_ortc_RTCDataChannelParameters.cpp */; }; + 52BFF6861E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D561E96E97F008204EA /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp */; }; + 52BFF6871E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannelStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D581E96E97F008204EA /* c_org_ortc_RTCDataChannelStats.cpp */; }; + 52BFF6881E9D0C2800DF88A1 /* c_org_ortc_RTCDataTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D5A1E96E97F008204EA /* c_org_ortc_RTCDataTransport.cpp */; }; + 52BFF6891E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D5C1E96E97F008204EA /* c_org_ortc_RTCDtlsCertificateBinary.cpp */; }; + 52BFF68A1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsFingerprint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D5E1E96E97F008204EA /* c_org_ortc_RTCDtlsFingerprint.cpp */; }; + 52BFF68B1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D601E96E97F008204EA /* c_org_ortc_RTCDtlsParameters.cpp */; }; + 52BFF68C1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D621E96E97F008204EA /* c_org_ortc_RTCDtlsTransport.cpp */; }; + 52BFF68D1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D641E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp */; }; + 52BFF68E1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D661E96E97F008204EA /* c_org_ortc_RTCDtlsTransportStats.cpp */; }; + 52BFF68F1E9D0C2800DF88A1 /* c_org_ortc_RTCDtmfSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D681E96E97F008204EA /* c_org_ortc_RTCDtmfSender.cpp */; }; + 52BFF6901E9D0C2800DF88A1 /* c_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D6A1E96E97F008204EA /* c_org_ortc_RTCDtmfToneChangeEvent.cpp */; }; + 52BFF6911E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D6C1E96E97F008204EA /* c_org_ortc_RTCIceCandidate.cpp */; }; + 52BFF6921E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidateAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D6E1E96E97F008204EA /* c_org_ortc_RTCIceCandidateAttributes.cpp */; }; + 52BFF6931E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidateComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D701E96E97F008204EA /* c_org_ortc_RTCIceCandidateComplete.cpp */; }; + 52BFF6941E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidatePair.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D721E96E97F008204EA /* c_org_ortc_RTCIceCandidatePair.cpp */; }; + 52BFF6951E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D741E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp */; }; + 52BFF6961E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidatePairStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D761E96E97F008204EA /* c_org_ortc_RTCIceCandidatePairStats.cpp */; }; + 52BFF6971E9D0C2800DF88A1 /* c_org_ortc_RTCIceGatherer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D781E96E97F008204EA /* c_org_ortc_RTCIceGatherer.cpp */; }; + 52BFF6981E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D7A1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidate.cpp */; }; + 52BFF6991E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D7C1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp */; }; + 52BFF69A1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D7E1E96E97F008204EA /* c_org_ortc_RTCIceGathererCandidateEvent.cpp */; }; + 52BFF69B1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D801E96E97F008204EA /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp */; }; + 52BFF69C1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D821E96E97F008204EA /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp */; }; + 52BFF69D1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D841E96E97F008204EA /* c_org_ortc_RTCIceGathererStats.cpp */; }; + 52BFF69E1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D861E96E97F008204EA /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp */; }; + 52BFF69F1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGatherOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D881E96E97F008204EA /* c_org_ortc_RTCIceGatherOptions.cpp */; }; + 52BFF6A01E9D0C2800DF88A1 /* c_org_ortc_RTCIceParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D8A1E96E97F008204EA /* c_org_ortc_RTCIceParameters.cpp */; }; + 52BFF6A11E9D0C2800DF88A1 /* c_org_ortc_RTCIceServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D8C1E96E97F008204EA /* c_org_ortc_RTCIceServer.cpp */; }; + 52BFF6A21E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D8E1E96E97F008204EA /* c_org_ortc_RTCIceTransport.cpp */; }; + 52BFF6A31E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransportController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D901E96E97F008204EA /* c_org_ortc_RTCIceTransportController.cpp */; }; + 52BFF6A41E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransportOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D921E96E97F008204EA /* c_org_ortc_RTCIceTransportOptions.cpp */; }; + 52BFF6A51E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D941E96E97F008204EA /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp */; }; + 52BFF6A61E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D961E96E97F008204EA /* c_org_ortc_RTCIceTransportStats.cpp */; }; + 52BFF6A71E9D0C2800DF88A1 /* c_org_ortc_RTCIdentity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D981E96E97F008204EA /* c_org_ortc_RTCIdentity.cpp */; }; + 52BFF6A81E9D0C2800DF88A1 /* c_org_ortc_RTCIdentityAssertion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D9A1E96E97F008204EA /* c_org_ortc_RTCIdentityAssertion.cpp */; }; + 52BFF6A91E9D0C2800DF88A1 /* c_org_ortc_RTCIdentityError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D9C1E96E97F008204EA /* c_org_ortc_RTCIdentityError.cpp */; }; + 52BFF6AA1E9D0C2800DF88A1 /* c_org_ortc_RTCIdentityResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216D9E1E96E97F008204EA /* c_org_ortc_RTCIdentityResult.cpp */; }; + 52BFF6AB1E9D0C2800DF88A1 /* c_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA01E96E97F008204EA /* c_org_ortc_RTCInboundRtpStreamStats.cpp */; }; + 52BFF6AC1E9D0C2800DF88A1 /* c_org_ortc_RTCMediaStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA21E96E97F008204EA /* c_org_ortc_RTCMediaStreamStats.cpp */; }; + 52BFF6AD1E9D0C2800DF88A1 /* c_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA41E96E97F008204EA /* c_org_ortc_RTCMediaStreamTrackStats.cpp */; }; + 52BFF6AE1E9D0C2800DF88A1 /* c_org_ortc_RTCMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA61E96E97F008204EA /* c_org_ortc_RTCMessageEvent.cpp */; }; + 52BFF6AF1E9D0C2900DF88A1 /* c_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DA81E96E97F008204EA /* c_org_ortc_RTCOutboundRtpStreamStats.cpp */; }; + 52BFF6B01E9D0C2900DF88A1 /* c_org_ortc_RTCRtcpFeedback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DAA1E96E97F008204EA /* c_org_ortc_RTCRtcpFeedback.cpp */; }; + 52BFF6B11E9D0C2900DF88A1 /* c_org_ortc_RTCRtcpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DAC1E96E97F008204EA /* c_org_ortc_RTCRtcpParameters.cpp */; }; + 52BFF6B21E9D0C2900DF88A1 /* c_org_ortc_RTCRtcpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DAE1E96E97F008204EA /* c_org_ortc_RTCRtcpTransport.cpp */; }; + 52BFF6B31E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB01E96E97F008204EA /* c_org_ortc_RTCRtpCapabilities.cpp */; }; + 52BFF6B41E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecCapability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB21E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapability.cpp */; }; + 52BFF6B51E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB41E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp */; }; + 52BFF6B61E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB61E96E97F008204EA /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp */; }; + 52BFF6B71E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DB81E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameters.cpp */; }; + 52BFF6B81E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DBA1E96E97F008204EA /* c_org_ortc_RTCRtpCodecParameterSettings.cpp */; }; + 52BFF6B91E9D0C2900DF88A1 /* c_org_ortc_RTCRtpContributingSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DBC1E96E97F008204EA /* c_org_ortc_RTCRtpContributingSource.cpp */; }; + 52BFF6BA1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpEncodingParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DBE1E96E97F008204EA /* c_org_ortc_RTCRtpEncodingParameters.cpp */; }; + 52BFF6BB1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpFecParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC01E96E97F008204EA /* c_org_ortc_RTCRtpFecParameters.cpp */; }; + 52BFF6BC1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC21E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp */; }; + 52BFF6BD1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC41E96E97F008204EA /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp */; }; + 52BFF6BE1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC61E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp */; }; + 52BFF6BF1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DC81E96E97F008204EA /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp */; }; + 52BFF6C01E9D0C2900DF88A1 /* c_org_ortc_RTCRtpHeaderExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DCA1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtension.cpp */; }; + 52BFF6C11E9D0C2900DF88A1 /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DCC1E96E97F008204EA /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp */; }; + 52BFF6C21E9D0C2900DF88A1 /* c_org_ortc_RTCRtpListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DCE1E96E97F008204EA /* c_org_ortc_RTCRtpListener.cpp */; }; + 52BFF6C31E9D0C2900DF88A1 /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD01E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp */; }; + 52BFF6C41E9D0C2900DF88A1 /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD21E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp */; }; + 52BFF6C51E9D0C2900DF88A1 /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD41E96E97F008204EA /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp */; }; + 52BFF6C61E9D0C2900DF88A1 /* c_org_ortc_RTCRtpParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD61E96E97F008204EA /* c_org_ortc_RTCRtpParameters.cpp */; }; + 52BFF6C71E9D0C2900DF88A1 /* c_org_ortc_RTCRtpReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DD81E96E97F008204EA /* c_org_ortc_RTCRtpReceiver.cpp */; }; + 52BFF6C81E9D0C2900DF88A1 /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DDA1E96E97F008204EA /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp */; }; + 52BFF6C91E9D0C2900DF88A1 /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DDC1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp */; }; + 52BFF6CA1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DDE1E96E97F008204EA /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp */; }; + 52BFF6CB1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpRtxParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE01E96E97F008204EA /* c_org_ortc_RTCRtpRtxParameters.cpp */; }; + 52BFF6CC1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE21E96E97F008204EA /* c_org_ortc_RTCRtpSender.cpp */; }; + 52BFF6CD1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpStreamStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE41E96E97F008204EA /* c_org_ortc_RTCRtpStreamStats.cpp */; }; + 52BFF6CE1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE61E96E97F008204EA /* c_org_ortc_RTCRtpTransport.cpp */; }; + 52BFF6CF1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DE81E96E97F008204EA /* c_org_ortc_RTCRtpUnhandledEvent.cpp */; }; + 52BFF6D01E9D0C2900DF88A1 /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DEA1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp */; }; + 52BFF6D11E9D0C2900DF88A1 /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DEC1E96E97F008204EA /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp */; }; + 52BFF6D21E9D0C2900DF88A1 /* c_org_ortc_RTCSctpCapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DEE1E96E97F008204EA /* c_org_ortc_RTCSctpCapabilities.cpp */; }; + 52BFF6D31E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF01E96E97F008204EA /* c_org_ortc_RTCSctpTransport.cpp */; }; + 52BFF6D41E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransportListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF21E96E97F008204EA /* c_org_ortc_RTCSctpTransportListener.cpp */; }; + 52BFF6D51E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF41E96E97F008204EA /* c_org_ortc_RTCSctpTransportListenerEvent.cpp */; }; + 52BFF6D61E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF61E96E97F008204EA /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp */; }; + 52BFF6D71E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DF81E96E97F008204EA /* c_org_ortc_RTCSctpTransportStats.cpp */; }; + 52BFF6D81E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DFA1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp */; }; + 52BFF6D91E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DFC1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp */; }; + 52BFF6DA1E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216DFE1E96E97F008204EA /* c_org_ortc_RTCSrtpSdesParameters.cpp */; }; + 52BFF6DB1E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E001E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransport.cpp */; }; + 52BFF6DC1E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E021E96E97F008204EA /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp */; }; + 52BFF6DD1E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpTransportStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E041E96E97F008204EA /* c_org_ortc_RTCSrtpTransportStats.cpp */; }; + 52BFF6DE1E9D0C2900DF88A1 /* c_org_ortc_RTCSsrcConflictEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E061E96E97F008204EA /* c_org_ortc_RTCSsrcConflictEvent.cpp */; }; + 52BFF6DF1E9D0C2900DF88A1 /* c_org_ortc_RTCStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E081E96E97F008204EA /* c_org_ortc_RTCStats.cpp */; }; + 52BFF6E01E9D0C2900DF88A1 /* c_org_ortc_RTCStatsProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E0A1E96E97F008204EA /* c_org_ortc_RTCStatsProvider.cpp */; }; + 52BFF6E11E9D0C2900DF88A1 /* c_org_ortc_RTCStatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E0C1E96E97F008204EA /* c_org_ortc_RTCStatsReport.cpp */; }; + 52BFF6E21E9D0C2900DF88A1 /* c_org_ortc_RTCStatsTypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E0E1E96E97F008204EA /* c_org_ortc_RTCStatsTypeSet.cpp */; }; + 52BFF6E31E9D0C2900DF88A1 /* c_org_ortc_Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E101E96E97F008204EA /* c_org_ortc_Settings.cpp */; }; + 52BFF6E41E9D0C2900DF88A1 /* c_org_ortc_StringOrStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00216E121E96E97F008204EA /* c_org_ortc_StringOrStringList.cpp */; }; + 52BFF6E51E9D0D6F00DF88A1 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6291E9CFC5500DF88A1 /* AudioToolbox.framework */; }; + 52BFF6E61E9D0D6F00DF88A1 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62A1E9CFC5500DF88A1 /* AVFoundation.framework */; }; + 52BFF6E71E9D0D6F00DF88A1 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62B1E9CFC5500DF88A1 /* CoreMedia.framework */; }; + 52BFF6E81E9D0D6F00DF88A1 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62C1E9CFC5500DF88A1 /* CoreVideo.framework */; }; + 52BFF6E91E9D0D6F00DF88A1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62D1E9CFC5500DF88A1 /* Foundation.framework */; }; + 52BFF6EA1E9D0D6F00DF88A1 /* libresolv.9.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62E1E9CFC5500DF88A1 /* libresolv.9.tbd */; }; + 52BFF6EB1E9D0D6F00DF88A1 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF62F1E9CFC5500DF88A1 /* libz.tbd */; }; + 52BFF6EC1E9D0D6F00DF88A1 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6301E9CFC5500DF88A1 /* Security.framework */; }; + 52BFF6ED1E9D0D6F00DF88A1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6311E9CFC5500DF88A1 /* UIKit.framework */; }; + 52BFF6EE1E9D0D6F00DF88A1 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6321E9CFC5500DF88A1 /* VideoToolbox.framework */; }; + 52BFF6F71E9D0D6F00DF88A1 /* libcryptopp-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6EF1E9D0D6F00DF88A1 /* libcryptopp-ios.a */; }; + 52BFF6F81E9D0D6F00DF88A1 /* libidnkit-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6F01E9D0D6F00DF88A1 /* libidnkit-ios.a */; }; + 52BFF6F91E9D0D6F00DF88A1 /* libortclib-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6F11E9D0D6F00DF88A1 /* libortclib-ios.a */; }; + 52BFF6FA1E9D0D6F00DF88A1 /* libortclib-wrapper-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6F21E9D0D6F00DF88A1 /* libortclib-wrapper-ios.a */; }; + 52BFF6FB1E9D0D6F00DF88A1 /* libortclib.services-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6F31E9D0D6F00DF88A1 /* libortclib.services-ios.a */; }; + 52BFF6FC1E9D0D6F00DF88A1 /* libudns-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6F41E9D0D6F00DF88A1 /* libudns-ios.a */; }; + 52BFF6FD1E9D0D6F00DF88A1 /* libzsLib-eventing-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6F51E9D0D6F00DF88A1 /* libzsLib-eventing-ios.a */; }; + 52BFF6FE1E9D0D6F00DF88A1 /* libzsLib-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF6F61E9D0D6F00DF88A1 /* libzsLib-ios.a */; }; + 52BFF6FF1E9D0D8300DF88A1 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF63D1E9D053900DF88A1 /* libcurl.a */; }; + 52BFF7001E9D0D9400DF88A1 /* webrtc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -532,6 +708,15 @@ 52BFF6321E9CFC5500DF88A1 /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; }; 52BFF63D1E9D053900DF88A1 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = "../../../../curl/curl/ios-appstore/lib/libcurl.a"; sourceTree = ""; }; 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = webrtc.a; path = ../../../../../../webrtc/xplatform/webrtc/out_ios/webrtc.a; sourceTree = ""; }; + 52BFF6451E9D0B9200DF88A1 /* libortclib-c-ios-wrapper.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libortclib-c-ios-wrapper.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + 52BFF6EF1E9D0D6F00DF88A1 /* libcryptopp-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libcryptopp-ios.a"; path = "../../../../cryptopp/projects/xcode/cryptopp-ios/build/Debug-iphoneos/libcryptopp-ios.a"; sourceTree = ""; }; + 52BFF6F01E9D0D6F00DF88A1 /* libidnkit-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libidnkit-ios.a"; path = "../../../../idnkit/projects/xcode/idnkit-ios/build/Debug-iphoneos/libidnkit-ios.a"; sourceTree = ""; }; + 52BFF6F11E9D0D6F00DF88A1 /* libortclib-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libortclib-ios.a"; path = "../ortclib-ios/build/Debug-iphoneos/libortclib-ios.a"; sourceTree = ""; }; + 52BFF6F21E9D0D6F00DF88A1 /* libortclib-wrapper-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libortclib-wrapper-ios.a"; path = "../ortclib-wrapper-ios/build/Debug-iphoneos/libortclib-wrapper-ios.a"; sourceTree = ""; }; + 52BFF6F31E9D0D6F00DF88A1 /* libortclib.services-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libortclib.services-ios.a"; path = "../../../../ortclib-services-cpp/projects/xcode/ortclib.services-ios/build/Debug-iphoneos/libortclib.services-ios.a"; sourceTree = ""; }; + 52BFF6F41E9D0D6F00DF88A1 /* libudns-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libudns-ios.a"; path = "../../../../udns/projects/xcode/udns-ios/build/Debug-iphoneos/libudns-ios.a"; sourceTree = ""; }; + 52BFF6F51E9D0D6F00DF88A1 /* libzsLib-eventing-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libzsLib-eventing-ios.a"; path = "../../../../zsLib-eventing/projects/xcode/zsLib-eventing-ios/build/Debug-iphoneos/libzsLib-eventing-ios.a"; sourceTree = ""; }; + 52BFF6F61E9D0D6F00DF88A1 /* libzsLib-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libzsLib-ios.a"; path = "../../../../zsLib/projects/xcode/zsLib-ios/build/Debug-iphoneos/libzsLib-ios.a"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -562,6 +747,33 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 52BFF6421E9D0B9200DF88A1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 52BFF7001E9D0D9400DF88A1 /* webrtc.a in Frameworks */, + 52BFF6FF1E9D0D8300DF88A1 /* libcurl.a in Frameworks */, + 52BFF6F71E9D0D6F00DF88A1 /* libcryptopp-ios.a in Frameworks */, + 52BFF6F81E9D0D6F00DF88A1 /* libidnkit-ios.a in Frameworks */, + 52BFF6F91E9D0D6F00DF88A1 /* libortclib-ios.a in Frameworks */, + 52BFF6FA1E9D0D6F00DF88A1 /* libortclib-wrapper-ios.a in Frameworks */, + 52BFF6FB1E9D0D6F00DF88A1 /* libortclib.services-ios.a in Frameworks */, + 52BFF6FC1E9D0D6F00DF88A1 /* libudns-ios.a in Frameworks */, + 52BFF6FD1E9D0D6F00DF88A1 /* libzsLib-eventing-ios.a in Frameworks */, + 52BFF6FE1E9D0D6F00DF88A1 /* libzsLib-ios.a in Frameworks */, + 52BFF6E51E9D0D6F00DF88A1 /* AudioToolbox.framework in Frameworks */, + 52BFF6E61E9D0D6F00DF88A1 /* AVFoundation.framework in Frameworks */, + 52BFF6E71E9D0D6F00DF88A1 /* CoreMedia.framework in Frameworks */, + 52BFF6E81E9D0D6F00DF88A1 /* CoreVideo.framework in Frameworks */, + 52BFF6E91E9D0D6F00DF88A1 /* Foundation.framework in Frameworks */, + 52BFF6EA1E9D0D6F00DF88A1 /* libresolv.9.tbd in Frameworks */, + 52BFF6EB1E9D0D6F00DF88A1 /* libz.tbd in Frameworks */, + 52BFF6EC1E9D0D6F00DF88A1 /* Security.framework in Frameworks */, + 52BFF6ED1E9D0D6F00DF88A1 /* UIKit.framework in Frameworks */, + 52BFF6EE1E9D0D6F00DF88A1 /* VideoToolbox.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -578,6 +790,7 @@ isa = PBXGroup; children = ( 00216CCF1E96E939008204EA /* libortclib-c-ios.a */, + 52BFF6451E9D0B9200DF88A1 /* libortclib-c-ios-wrapper.dylib */, ); name = Products; sourceTree = ""; @@ -906,6 +1119,14 @@ 52BFF6181E9CFBEC00DF88A1 /* Frameworks */ = { isa = PBXGroup; children = ( + 52BFF6EF1E9D0D6F00DF88A1 /* libcryptopp-ios.a */, + 52BFF6F01E9D0D6F00DF88A1 /* libidnkit-ios.a */, + 52BFF6F11E9D0D6F00DF88A1 /* libortclib-ios.a */, + 52BFF6F21E9D0D6F00DF88A1 /* libortclib-wrapper-ios.a */, + 52BFF6F31E9D0D6F00DF88A1 /* libortclib.services-ios.a */, + 52BFF6F41E9D0D6F00DF88A1 /* libudns-ios.a */, + 52BFF6F51E9D0D6F00DF88A1 /* libzsLib-eventing-ios.a */, + 52BFF6F61E9D0D6F00DF88A1 /* libzsLib-ios.a */, 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */, 52BFF63D1E9D053900DF88A1 /* libcurl.a */, 52BFF6291E9CFC5500DF88A1 /* AudioToolbox.framework */, @@ -932,6 +1153,16 @@ }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + 52BFF6431E9D0B9200DF88A1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ 00216CCE1E96E939008204EA /* ortclib-c-ios */ = { isa = PBXNativeTarget; @@ -950,6 +1181,23 @@ productReference = 00216CCF1E96E939008204EA /* libortclib-c-ios.a */; productType = "com.apple.product-type.library.static"; }; + 52BFF6441E9D0B9200DF88A1 /* ortclib-c-ios-wrapper */ = { + isa = PBXNativeTarget; + buildConfigurationList = 52BFF6461E9D0B9200DF88A1 /* Build configuration list for PBXNativeTarget "ortclib-c-ios-wrapper" */; + buildPhases = ( + 52BFF6411E9D0B9200DF88A1 /* Sources */, + 52BFF6421E9D0B9200DF88A1 /* Frameworks */, + 52BFF6431E9D0B9200DF88A1 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ortclib-c-ios-wrapper"; + productName = "ortclib-c-ios-wrapper"; + productReference = 52BFF6451E9D0B9200DF88A1 /* libortclib-c-ios-wrapper.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -963,6 +1211,10 @@ CreatedOnToolsVersion = 8.3; ProvisioningStyle = Automatic; }; + 52BFF6441E9D0B9200DF88A1 = { + CreatedOnToolsVersion = 8.3.1; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = 00216CCA1E96E939008204EA /* Build configuration list for PBXProject "ortclib-c-ios" */; @@ -978,6 +1230,7 @@ projectRoot = ""; targets = ( 00216CCE1E96E939008204EA /* ortclib-c-ios */, + 52BFF6441E9D0B9200DF88A1 /* ortclib-c-ios-wrapper */, ); }; /* End PBXProject section */ @@ -1146,6 +1399,169 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 52BFF6411E9D0B9200DF88A1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 52BFF6491E9D0C2800DF88A1 /* c_helpers.cpp in Sources */, + 52BFF64A1E9D0C2800DF88A1 /* c_org_ortc_adapter_MediaStream.cpp in Sources */, + 52BFF64B1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCAnswerOptions.cpp in Sources */, + 52BFF64C1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCCapabilityOptions.cpp in Sources */, + 52BFF64D1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCConfiguration.cpp in Sources */, + 52BFF64E1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCIceCandidate.cpp in Sources */, + 52BFF64F1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp in Sources */, + 52BFF6501E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCOfferAnswerOptions.cpp in Sources */, + 52BFF6511E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCOfferOptions.cpp in Sources */, + 52BFF6521E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCPeerConnection.cpp in Sources */, + 52BFF6531E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp in Sources */, + 52BFF6541E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp in Sources */, + 52BFF6551E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescription.cpp in Sources */, + 52BFF6561E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp in Sources */, + 52BFF6571E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp in Sources */, + 52BFF6581E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp in Sources */, + 52BFF6591E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp in Sources */, + 52BFF65A1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp in Sources */, + 52BFF65B1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp in Sources */, + 52BFF65C1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp in Sources */, + 52BFF65D1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp in Sources */, + 52BFF65E1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp in Sources */, + 52BFF65F1E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp in Sources */, + 52BFF6601E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp in Sources */, + 52BFF6611E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp in Sources */, + 52BFF6621E9D0C2800DF88A1 /* c_org_ortc_adapter_RTCTrackEvent.cpp in Sources */, + 52BFF6631E9D0C2800DF88A1 /* c_org_ortc_ConstrainBoolean.cpp in Sources */, + 52BFF6641E9D0C2800DF88A1 /* c_org_ortc_ConstrainBooleanParameters.cpp in Sources */, + 52BFF6651E9D0C2800DF88A1 /* c_org_ortc_ConstrainDouble.cpp in Sources */, + 52BFF6661E9D0C2800DF88A1 /* c_org_ortc_ConstrainDoubleRange.cpp in Sources */, + 52BFF6671E9D0C2800DF88A1 /* c_org_ortc_ConstrainLong.cpp in Sources */, + 52BFF6681E9D0C2800DF88A1 /* c_org_ortc_ConstrainLongRange.cpp in Sources */, + 52BFF6691E9D0C2800DF88A1 /* c_org_ortc_ConstrainString.cpp in Sources */, + 52BFF66A1E9D0C2800DF88A1 /* c_org_ortc_ConstrainStringParameters.cpp in Sources */, + 52BFF66B1E9D0C2800DF88A1 /* c_org_ortc_DoubleRange.cpp in Sources */, + 52BFF66C1E9D0C2800DF88A1 /* c_org_ortc_Error.cpp in Sources */, + 52BFF66D1E9D0C2800DF88A1 /* c_org_ortc_ErrorEvent.cpp in Sources */, + 52BFF66E1E9D0C2800DF88A1 /* c_org_ortc_Json.cpp in Sources */, + 52BFF66F1E9D0C2800DF88A1 /* c_org_ortc_Logger.cpp in Sources */, + 52BFF6701E9D0C2800DF88A1 /* c_org_ortc_LongRange.cpp in Sources */, + 52BFF6711E9D0C2800DF88A1 /* c_org_ortc_MediaControl.cpp in Sources */, + 52BFF6721E9D0C2800DF88A1 /* c_org_ortc_MediaDeviceInfo.cpp in Sources */, + 52BFF6731E9D0C2800DF88A1 /* c_org_ortc_MediaDevices.cpp in Sources */, + 52BFF6741E9D0C2800DF88A1 /* c_org_ortc_MediaSource.cpp in Sources */, + 52BFF6751E9D0C2800DF88A1 /* c_org_ortc_MediaStreamConstraints.cpp in Sources */, + 52BFF6761E9D0C2800DF88A1 /* c_org_ortc_MediaStreamTrack.cpp in Sources */, + 52BFF6771E9D0C2800DF88A1 /* c_org_ortc_MediaTrackCapabilities.cpp in Sources */, + 52BFF6781E9D0C2800DF88A1 /* c_org_ortc_MediaTrackConstraints.cpp in Sources */, + 52BFF6791E9D0C2800DF88A1 /* c_org_ortc_MediaTrackConstraintSet.cpp in Sources */, + 52BFF67A1E9D0C2800DF88A1 /* c_org_ortc_MediaTrackSettings.cpp in Sources */, + 52BFF67B1E9D0C2800DF88A1 /* c_org_ortc_MediaTrackSupportedConstraints.cpp in Sources */, + 52BFF67C1E9D0C2800DF88A1 /* c_org_ortc_MessageQueue.cpp in Sources */, + 52BFF67D1E9D0C2800DF88A1 /* c_org_ortc_OrtcLib.cpp in Sources */, + 52BFF67E1E9D0C2800DF88A1 /* c_org_ortc_OverconstrainedError.cpp in Sources */, + 52BFF67F1E9D0C2800DF88A1 /* c_org_ortc_OverconstrainedErrorEvent.cpp in Sources */, + 52BFF6801E9D0C2800DF88A1 /* c_org_ortc_RTCCertificate.cpp in Sources */, + 52BFF6811E9D0C2800DF88A1 /* c_org_ortc_RTCCertificateStats.cpp in Sources */, + 52BFF6821E9D0C2800DF88A1 /* c_org_ortc_RTCCodec.cpp in Sources */, + 52BFF6831E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannel.cpp in Sources */, + 52BFF6841E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannelEvent.cpp in Sources */, + 52BFF6851E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannelParameters.cpp in Sources */, + 52BFF6861E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannelStateChangeEvent.cpp in Sources */, + 52BFF6871E9D0C2800DF88A1 /* c_org_ortc_RTCDataChannelStats.cpp in Sources */, + 52BFF6881E9D0C2800DF88A1 /* c_org_ortc_RTCDataTransport.cpp in Sources */, + 52BFF6891E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsCertificateBinary.cpp in Sources */, + 52BFF68A1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsFingerprint.cpp in Sources */, + 52BFF68B1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsParameters.cpp in Sources */, + 52BFF68C1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsTransport.cpp in Sources */, + 52BFF68D1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp in Sources */, + 52BFF68E1E9D0C2800DF88A1 /* c_org_ortc_RTCDtlsTransportStats.cpp in Sources */, + 52BFF68F1E9D0C2800DF88A1 /* c_org_ortc_RTCDtmfSender.cpp in Sources */, + 52BFF6901E9D0C2800DF88A1 /* c_org_ortc_RTCDtmfToneChangeEvent.cpp in Sources */, + 52BFF6911E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidate.cpp in Sources */, + 52BFF6921E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidateAttributes.cpp in Sources */, + 52BFF6931E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidateComplete.cpp in Sources */, + 52BFF6941E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidatePair.cpp in Sources */, + 52BFF6951E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidatePairChangeEvent.cpp in Sources */, + 52BFF6961E9D0C2800DF88A1 /* c_org_ortc_RTCIceCandidatePairStats.cpp in Sources */, + 52BFF6971E9D0C2800DF88A1 /* c_org_ortc_RTCIceGatherer.cpp in Sources */, + 52BFF6981E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererCandidate.cpp in Sources */, + 52BFF6991E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp in Sources */, + 52BFF69A1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererCandidateEvent.cpp in Sources */, + 52BFF69B1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererIceErrorEvent.cpp in Sources */, + 52BFF69C1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererStateChangeEvent.cpp in Sources */, + 52BFF69D1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGathererStats.cpp in Sources */, + 52BFF69E1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGatherInterfacePolicy.cpp in Sources */, + 52BFF69F1E9D0C2800DF88A1 /* c_org_ortc_RTCIceGatherOptions.cpp in Sources */, + 52BFF6A01E9D0C2800DF88A1 /* c_org_ortc_RTCIceParameters.cpp in Sources */, + 52BFF6A11E9D0C2800DF88A1 /* c_org_ortc_RTCIceServer.cpp in Sources */, + 52BFF6A21E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransport.cpp in Sources */, + 52BFF6A31E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransportController.cpp in Sources */, + 52BFF6A41E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransportOptions.cpp in Sources */, + 52BFF6A51E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransportStateChangeEvent.cpp in Sources */, + 52BFF6A61E9D0C2800DF88A1 /* c_org_ortc_RTCIceTransportStats.cpp in Sources */, + 52BFF6A71E9D0C2800DF88A1 /* c_org_ortc_RTCIdentity.cpp in Sources */, + 52BFF6A81E9D0C2800DF88A1 /* c_org_ortc_RTCIdentityAssertion.cpp in Sources */, + 52BFF6A91E9D0C2800DF88A1 /* c_org_ortc_RTCIdentityError.cpp in Sources */, + 52BFF6AA1E9D0C2800DF88A1 /* c_org_ortc_RTCIdentityResult.cpp in Sources */, + 52BFF6AB1E9D0C2800DF88A1 /* c_org_ortc_RTCInboundRtpStreamStats.cpp in Sources */, + 52BFF6AC1E9D0C2800DF88A1 /* c_org_ortc_RTCMediaStreamStats.cpp in Sources */, + 52BFF6AD1E9D0C2800DF88A1 /* c_org_ortc_RTCMediaStreamTrackStats.cpp in Sources */, + 52BFF6AE1E9D0C2800DF88A1 /* c_org_ortc_RTCMessageEvent.cpp in Sources */, + 52BFF6AF1E9D0C2900DF88A1 /* c_org_ortc_RTCOutboundRtpStreamStats.cpp in Sources */, + 52BFF6B01E9D0C2900DF88A1 /* c_org_ortc_RTCRtcpFeedback.cpp in Sources */, + 52BFF6B11E9D0C2900DF88A1 /* c_org_ortc_RTCRtcpParameters.cpp in Sources */, + 52BFF6B21E9D0C2900DF88A1 /* c_org_ortc_RTCRtcpTransport.cpp in Sources */, + 52BFF6B31E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCapabilities.cpp in Sources */, + 52BFF6B41E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecCapability.cpp in Sources */, + 52BFF6B51E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecCapabilityOptions.cpp in Sources */, + 52BFF6B61E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecCapabilityParameters.cpp in Sources */, + 52BFF6B71E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecParameters.cpp in Sources */, + 52BFF6B81E9D0C2900DF88A1 /* c_org_ortc_RTCRtpCodecParameterSettings.cpp in Sources */, + 52BFF6B91E9D0C2900DF88A1 /* c_org_ortc_RTCRtpContributingSource.cpp in Sources */, + 52BFF6BA1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpEncodingParameters.cpp in Sources */, + 52BFF6BB1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpFecParameters.cpp in Sources */, + 52BFF6BC1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp in Sources */, + 52BFF6BD1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp in Sources */, + 52BFF6BE1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp in Sources */, + 52BFF6BF1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpH264CodecParameterSettings.cpp in Sources */, + 52BFF6C01E9D0C2900DF88A1 /* c_org_ortc_RTCRtpHeaderExtension.cpp in Sources */, + 52BFF6C11E9D0C2900DF88A1 /* c_org_ortc_RTCRtpHeaderExtensionParameters.cpp in Sources */, + 52BFF6C21E9D0C2900DF88A1 /* c_org_ortc_RTCRtpListener.cpp in Sources */, + 52BFF6C31E9D0C2900DF88A1 /* c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp in Sources */, + 52BFF6C41E9D0C2900DF88A1 /* c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp in Sources */, + 52BFF6C51E9D0C2900DF88A1 /* c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp in Sources */, + 52BFF6C61E9D0C2900DF88A1 /* c_org_ortc_RTCRtpParameters.cpp in Sources */, + 52BFF6C71E9D0C2900DF88A1 /* c_org_ortc_RTCRtpReceiver.cpp in Sources */, + 52BFF6C81E9D0C2900DF88A1 /* c_org_ortc_RTCRtpRedCodecParameterSettings.cpp in Sources */, + 52BFF6C91E9D0C2900DF88A1 /* c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp in Sources */, + 52BFF6CA1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp in Sources */, + 52BFF6CB1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpRtxParameters.cpp in Sources */, + 52BFF6CC1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpSender.cpp in Sources */, + 52BFF6CD1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpStreamStats.cpp in Sources */, + 52BFF6CE1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpTransport.cpp in Sources */, + 52BFF6CF1E9D0C2900DF88A1 /* c_org_ortc_RTCRtpUnhandledEvent.cpp in Sources */, + 52BFF6D01E9D0C2900DF88A1 /* c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp in Sources */, + 52BFF6D11E9D0C2900DF88A1 /* c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp in Sources */, + 52BFF6D21E9D0C2900DF88A1 /* c_org_ortc_RTCSctpCapabilities.cpp in Sources */, + 52BFF6D31E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransport.cpp in Sources */, + 52BFF6D41E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransportListener.cpp in Sources */, + 52BFF6D51E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransportListenerEvent.cpp in Sources */, + 52BFF6D61E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransportStateChangeEvent.cpp in Sources */, + 52BFF6D71E9D0C2900DF88A1 /* c_org_ortc_RTCSctpTransportStats.cpp in Sources */, + 52BFF6D81E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesCryptoParameters.cpp in Sources */, + 52BFF6D91E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesKeyParameters.cpp in Sources */, + 52BFF6DA1E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesParameters.cpp in Sources */, + 52BFF6DB1E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesTransport.cpp in Sources */, + 52BFF6DC1E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp in Sources */, + 52BFF6DD1E9D0C2900DF88A1 /* c_org_ortc_RTCSrtpTransportStats.cpp in Sources */, + 52BFF6DE1E9D0C2900DF88A1 /* c_org_ortc_RTCSsrcConflictEvent.cpp in Sources */, + 52BFF6DF1E9D0C2900DF88A1 /* c_org_ortc_RTCStats.cpp in Sources */, + 52BFF6E01E9D0C2900DF88A1 /* c_org_ortc_RTCStatsProvider.cpp in Sources */, + 52BFF6E11E9D0C2900DF88A1 /* c_org_ortc_RTCStatsReport.cpp in Sources */, + 52BFF6E21E9D0C2900DF88A1 /* c_org_ortc_RTCStatsTypeSet.cpp in Sources */, + 52BFF6E31E9D0C2900DF88A1 /* c_org_ortc_Settings.cpp in Sources */, + 52BFF6E41E9D0C2900DF88A1 /* c_org_ortc_StringOrStringList.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ @@ -1258,6 +1674,7 @@ 00216CD91E96E939008204EA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_BITCODE = NO; LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1268,6 +1685,7 @@ 00216CDA1E96E939008204EA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_BITCODE = NO; LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1275,6 +1693,40 @@ }; name = Release; }; + 52BFF6471E9D0B9200DF88A1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + ENABLE_BITCODE = NO; + EXECUTABLE_PREFIX = lib; + LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = iphoneos; + VALID_ARCHS = "arm64 armv7s"; + }; + name = Debug; + }; + 52BFF6481E9D0B9200DF88A1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Distribution"; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + ENABLE_BITCODE = NO; + EXECUTABLE_PREFIX = lib; + LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = iphoneos; + VALID_ARCHS = "arm64 armv7s"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1296,6 +1748,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 52BFF6461E9D0B9200DF88A1 /* Build configuration list for PBXNativeTarget "ortclib-c-ios-wrapper" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 52BFF6471E9D0B9200DF88A1 /* Debug */, + 52BFF6481E9D0B9200DF88A1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; /* End XCConfigurationList section */ }; rootObject = 00216CC71E96E939008204EA /* Project object */; From 6a7b2b8f22064b725466f9693d6857765373b955 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 12 Apr 2017 00:08:33 +0200 Subject: [PATCH 111/187] armv7 architecture is supported now --- .../ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj index f5d5c0e2..ef7c2863 100644 --- a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj @@ -1706,7 +1706,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; - VALID_ARCHS = "arm64 armv7s"; + VALID_ARCHS = "arm64 armv7s armv7"; }; name = Debug; }; @@ -1723,7 +1723,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; - VALID_ARCHS = "arm64 armv7s"; + VALID_ARCHS = "arm64 armv7s armv7"; }; name = Release; }; @@ -1755,6 +1755,7 @@ 52BFF6481E9D0B9200DF88A1 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; From ab7a061bfe4ac0d798fd4dd3ed3e52544d54a2f5 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Thu, 13 Apr 2017 13:07:28 +0200 Subject: [PATCH 112/187] Added webrtcWrapper_ios dependency --- .../ortclib-c-ios.xcodeproj/project.pbxproj | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj index ef7c2863..aec0168c 100644 --- a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj @@ -361,6 +361,23 @@ 52BFF7001E9D0D9400DF88A1 /* webrtc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 529AA64F1E9F90B8007ACFD2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 529AA64B1E9F90B8007ACFD2 /* webrtcWrapper_ios.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9451F25C1BC54F57008CB8D7; + remoteInfo = webrtcWrapper_ios; + }; + 529AA6511E9F90C0007ACFD2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 529AA64B1E9F90B8007ACFD2 /* webrtcWrapper_ios.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 9451F25B1BC54F57008CB8D7; + remoteInfo = webrtcWrapper_ios; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 00216CCD1E96E939008204EA /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; @@ -688,6 +705,7 @@ 00216E121E96E97F008204EA /* c_org_ortc_StringOrStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_org_ortc_StringOrStringList.cpp; sourceTree = ""; }; 00216E131E96E97F008204EA /* c_org_ortc_StringOrStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_org_ortc_StringOrStringList.h; sourceTree = ""; }; 00216E141E96E97F008204EA /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; + 529AA64B1E9F90B8007ACFD2 /* webrtcWrapper_ios.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = webrtcWrapper_ios.xcodeproj; path = "/Users/sergejjovanovic/Work/Projects/opticaltone/dylib_test/ortclib-sdk/ortc/apple/workspaces/xcode/../../projects/xcode/webrtcWrappers/webrtcWrapper_ios/webrtcWrapper_ios.xcodeproj"; sourceTree = ""; }; 52BFF6191E9CFBEE00DF88A1 /* libcryptopp-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libcryptopp-ios.a"; path = "../../../../cryptopp/projects/xcode/cryptopp-ios/build/Debug-iphoneos/libcryptopp-ios.a"; sourceTree = ""; }; 52BFF61A1E9CFBEE00DF88A1 /* libidnkit-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libidnkit-ios.a"; path = "../../../../idnkit/projects/xcode/idnkit-ios/build/Debug-iphoneos/libidnkit-ios.a"; sourceTree = ""; }; 52BFF61B1E9CFBEE00DF88A1 /* libortclib-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libortclib-ios.a"; path = "../ortclib-ios/build/Debug-iphoneos/libortclib-ios.a"; sourceTree = ""; }; @@ -780,6 +798,7 @@ 00216CC61E96E939008204EA = { isa = PBXGroup; children = ( + 529AA64B1E9F90B8007ACFD2 /* webrtcWrapper_ios.xcodeproj */, 00216CDB1E96E97F008204EA /* c */, 00216CD01E96E939008204EA /* Products */, 52BFF6181E9CFBEC00DF88A1 /* Frameworks */, @@ -1116,6 +1135,14 @@ path = ../../../ortc/idl/wrapper/generated/c; sourceTree = ""; }; + 529AA64C1E9F90B8007ACFD2 /* Products */ = { + isa = PBXGroup; + children = ( + 529AA6501E9F90B8007ACFD2 /* libwebrtcWrapper_ios.a */, + ); + name = Products; + sourceTree = ""; + }; 52BFF6181E9CFBEC00DF88A1 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1192,6 +1219,7 @@ buildRules = ( ); dependencies = ( + 529AA6521E9F90C0007ACFD2 /* PBXTargetDependency */, ); name = "ortclib-c-ios-wrapper"; productName = "ortclib-c-ios-wrapper"; @@ -1227,6 +1255,12 @@ mainGroup = 00216CC61E96E939008204EA; productRefGroup = 00216CD01E96E939008204EA /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 529AA64C1E9F90B8007ACFD2 /* Products */; + ProjectRef = 529AA64B1E9F90B8007ACFD2 /* webrtcWrapper_ios.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 00216CCE1E96E939008204EA /* ortclib-c-ios */, @@ -1235,6 +1269,16 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 529AA6501E9F90B8007ACFD2 /* libwebrtcWrapper_ios.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libwebrtcWrapper_ios.a; + remoteRef = 529AA64F1E9F90B8007ACFD2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXSourcesBuildPhase section */ 00216CCB1E96E939008204EA /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -1564,6 +1608,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 529AA6521E9F90C0007ACFD2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = webrtcWrapper_ios; + targetProxy = 529AA6511E9F90C0007ACFD2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 00216CD61E96E939008204EA /* Debug */ = { isa = XCBuildConfiguration; @@ -1676,6 +1728,7 @@ buildSettings = { ENABLE_BITCODE = NO; LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; + MACH_O_TYPE = mh_dylib; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1687,6 +1740,7 @@ buildSettings = { ENABLE_BITCODE = NO; LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; + MACH_O_TYPE = mh_dylib; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; From 7418a4a22595dafa18e5a3ae01837a59e1d70e7d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 19 Apr 2017 20:02:29 -0400 Subject: [PATCH 113/187] attempt to handle janis sdp parsing and instruduction to previosly unsupported RFC --- ortc/adapter/cpp/ortc_adapter_SDPParser.cpp | 30 +++++++++++++++---- .../ortc_adapter_SDPParser_GenerateSDP.cpp | 4 +-- .../cpp/ortc_adapter_SDPParser_ParseSDP.cpp | 2 +- .../adapter/internal/ortc_adapter_SDPParser.h | 9 +++--- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp index 85575323..1b3f862e 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp @@ -363,7 +363,7 @@ namespace ortc case Attribute_MSIDSemantic: return AttributeLevel_Session; case Attribute_ICEUFrag: return AttributeLevel_SessionAndMedia; case Attribute_ICEPwd: return AttributeLevel_SessionAndMedia; - case Attribute_ICEOptions: return AttributeLevel_Session; + case Attribute_ICEOptions: return AttributeLevel_SessionAndMedia; case Attribute_ICELite: return AttributeLevel_Session; case Attribute_Candidate: return AttributeLevel_Media; case Attribute_EndOfCandidates: return AttributeLevel_Media; @@ -436,7 +436,21 @@ namespace ortc } //----------------------------------------------------------------------- - const char *ISDPTypes::toString(Directions direction) + const char *ISDPTypes::toStringForA(Directions direction) + { + switch (direction) + { + case Direction_None: return "inactive"; + case Direction_Send: return "sendonly"; + case Direction_Receive: return "recvonly"; + case Direction_SendReceive: return "sendrecv"; + } + + ORTC_THROW_NOT_SUPPORTED_ERRROR("unknown direction"); + } + + //----------------------------------------------------------------------- + const char *ISDPTypes::toStringForRID(Directions direction) { switch (direction) { @@ -464,7 +478,10 @@ namespace ortc if (str.isEmpty()) return Direction_None; for (size_t index = 0; index <= (sizeof(check)/sizeof(check[0])); ++index) { - if (0 == str.compareNoCase(toString(check[index]))) return check[index]; + if (0 == str.compareNoCase(toStringForA(check[index]))) return check[index]; + } + for (size_t index = 0; index <= (sizeof(check) / sizeof(check[0])); ++index) { + if (0 == str.compareNoCase(toStringForRID(check[index]))) return check[index]; } ORTC_THROW_INVALID_PARAMETERS("Invalid parameter value: " + str); @@ -887,7 +904,8 @@ namespace ortc } //----------------------------------------------------------------------- - ISDPTypes::AICEOptionsLine::AICEOptionsLine(const char *value) + ISDPTypes::AICEOptionsLine::AICEOptionsLine(MLinePtr mline, const char *value) : + AMediaLine(mline) { IHelper::SplitMap split; IHelper::split(String(value), split, " "); @@ -1188,7 +1206,7 @@ namespace ortc case Direction_Send: case Direction_Receive: { result.append("/"); - result.append(ISDPTypes::toString(mDirection)); + result.append(ISDPTypes::toStringForA(mDirection)); break; } } @@ -1584,7 +1602,7 @@ namespace ortc case ISDPTypes::Direction_None: case ISDPTypes::Direction_SendReceive: return String(); case ISDPTypes::Direction_Send: - case ISDPTypes::Direction_Receive: result.append(ISDPTypes::toString(mDirection)); break; + case ISDPTypes::Direction_Receive: result.append(ISDPTypes::toStringForRID(mDirection)); break; } bool inserted = false; if (mPayloadTypes.size() > 0) { diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp index ded6ce9b..b6adefcd 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp @@ -151,7 +151,7 @@ namespace ortc appendLine(ioResult, 'c', ISDPTypes::CLine::toString(sdp.mCLine)); if (sdp.mMediaDirection.hasValue()) { - appendLine(ioResult, 'a', ISDPTypes::toString(sdp.mMediaDirection.value())); + appendLine(ioResult, 'a', ISDPTypes::toStringForA(sdp.mMediaDirection.value())); } if ((sdp.mICELite.hasValue()) && @@ -202,7 +202,7 @@ namespace ortc appendLine(ioResult, 'a', ISDPTypes::AMaxMessageSizeLine::toString(mline.mAMaxMessageSize)); if (mline.mMediaDirection.hasValue()) { - appendLine(ioResult, 'a', ISDPTypes::toString(mline.mMediaDirection.value())); + appendLine(ioResult, 'a', ISDPTypes::toStringForA(mline.mMediaDirection.value())); } if ((mline.mRTCPMux.hasValue()) && (mline.mRTCPMux.value())) { diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp index ddebeb68..9588d6ea 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp @@ -336,7 +336,7 @@ namespace ortc case Attribute_MSIDSemantic: info.mLineValue = make_shared(info.mValue); break; case Attribute_ICEUFrag: info.mLineValue = make_shared(currentMLine, info.mValue); break; case Attribute_ICEPwd: info.mLineValue = make_shared(currentMLine, info.mValue); break; - case Attribute_ICEOptions: info.mLineValue = make_shared(info.mValue); break; + case Attribute_ICEOptions: info.mLineValue = make_shared(currentMLine, info.mValue); break; case Attribute_ICELite: break; // session level flag; struct not needed case Attribute_Candidate: info.mLineValue = make_shared(currentMLine, info.mValue); break; case Attribute_EndOfCandidates: info.mLineValue = make_shared(currentMLine); break; diff --git a/ortc/adapter/internal/ortc_adapter_SDPParser.h b/ortc/adapter/internal/ortc_adapter_SDPParser.h index 56e37942..91221642 100644 --- a/ortc/adapter/internal/ortc_adapter_SDPParser.h +++ b/ortc/adapter/internal/ortc_adapter_SDPParser.h @@ -240,7 +240,8 @@ namespace ortc Direction_SendReceive = Direction_Send | Direction_Receive, }; - static const char *toString(Directions direction); + static const char *toStringForA(Directions direction); + static const char *toStringForRID(Directions direction); static Directions toDirection(const char *direction); static bool isValid( Directions direction, @@ -492,12 +493,12 @@ namespace ortc }; // https://tools.ietf.org/html/rfc5245#section-15.5 - struct AICEOptionsLine : public ALine + struct AICEOptionsLine : public AMediaLine { StringList mTags; - AICEOptionsLine(const Noop &) {} - AICEOptionsLine(const char *value); + AICEOptionsLine(const Noop &) : AMediaLine(nullptr) {} + AICEOptionsLine(MLinePtr mline, const char *value); String toString() const; static String toString(const AICEOptionsLinePtr &line) { if (!line) return String(); return line->toString(); } }; From 769043ef1c089d97fbaeaa997a5182542275b99e Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Thu, 20 Apr 2017 12:00:07 +0200 Subject: [PATCH 114/187] Target renamed from ortclib-c-ios-wrapper to Ortc --- .../ortclib-c-ios.xcodeproj/project.pbxproj | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj index aec0168c..2913cc8b 100644 --- a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj @@ -726,7 +726,7 @@ 52BFF6321E9CFC5500DF88A1 /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; }; 52BFF63D1E9D053900DF88A1 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = "../../../../curl/curl/ios-appstore/lib/libcurl.a"; sourceTree = ""; }; 52BFF63F1E9D0A1800DF88A1 /* webrtc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = webrtc.a; path = ../../../../../../webrtc/xplatform/webrtc/out_ios/webrtc.a; sourceTree = ""; }; - 52BFF6451E9D0B9200DF88A1 /* libortclib-c-ios-wrapper.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libortclib-c-ios-wrapper.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + 52BFF6451E9D0B9200DF88A1 /* libOrtc.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libOrtc.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 52BFF6EF1E9D0D6F00DF88A1 /* libcryptopp-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libcryptopp-ios.a"; path = "../../../../cryptopp/projects/xcode/cryptopp-ios/build/Debug-iphoneos/libcryptopp-ios.a"; sourceTree = ""; }; 52BFF6F01E9D0D6F00DF88A1 /* libidnkit-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libidnkit-ios.a"; path = "../../../../idnkit/projects/xcode/idnkit-ios/build/Debug-iphoneos/libidnkit-ios.a"; sourceTree = ""; }; 52BFF6F11E9D0D6F00DF88A1 /* libortclib-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libortclib-ios.a"; path = "../ortclib-ios/build/Debug-iphoneos/libortclib-ios.a"; sourceTree = ""; }; @@ -809,7 +809,7 @@ isa = PBXGroup; children = ( 00216CCF1E96E939008204EA /* libortclib-c-ios.a */, - 52BFF6451E9D0B9200DF88A1 /* libortclib-c-ios-wrapper.dylib */, + 52BFF6451E9D0B9200DF88A1 /* libOrtc.dylib */, ); name = Products; sourceTree = ""; @@ -1208,9 +1208,9 @@ productReference = 00216CCF1E96E939008204EA /* libortclib-c-ios.a */; productType = "com.apple.product-type.library.static"; }; - 52BFF6441E9D0B9200DF88A1 /* ortclib-c-ios-wrapper */ = { + 52BFF6441E9D0B9200DF88A1 /* Ortc */ = { isa = PBXNativeTarget; - buildConfigurationList = 52BFF6461E9D0B9200DF88A1 /* Build configuration list for PBXNativeTarget "ortclib-c-ios-wrapper" */; + buildConfigurationList = 52BFF6461E9D0B9200DF88A1 /* Build configuration list for PBXNativeTarget "Ortc" */; buildPhases = ( 52BFF6411E9D0B9200DF88A1 /* Sources */, 52BFF6421E9D0B9200DF88A1 /* Frameworks */, @@ -1221,9 +1221,9 @@ dependencies = ( 529AA6521E9F90C0007ACFD2 /* PBXTargetDependency */, ); - name = "ortclib-c-ios-wrapper"; + name = Ortc; productName = "ortclib-c-ios-wrapper"; - productReference = 52BFF6451E9D0B9200DF88A1 /* libortclib-c-ios-wrapper.dylib */; + productReference = 52BFF6451E9D0B9200DF88A1 /* libOrtc.dylib */; productType = "com.apple.product-type.library.dynamic"; }; /* End PBXNativeTarget section */ @@ -1241,6 +1241,7 @@ }; 52BFF6441E9D0B9200DF88A1 = { CreatedOnToolsVersion = 8.3.1; + DevelopmentTeam = QE9E5R8GUP; ProvisioningStyle = Automatic; }; }; @@ -1264,7 +1265,7 @@ projectRoot = ""; targets = ( 00216CCE1E96E939008204EA /* ortclib-c-ios */, - 52BFF6441E9D0B9200DF88A1 /* ortclib-c-ios-wrapper */, + 52BFF6441E9D0B9200DF88A1 /* Ortc */, ); }; /* End PBXProject section */ @@ -1751,11 +1752,12 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = QE9E5R8GUP; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = NO; EXECUTABLE_PREFIX = lib; + LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1768,11 +1770,12 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Distribution"; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = QE9E5R8GUP; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; ENABLE_BITCODE = NO; EXECUTABLE_PREFIX = lib; + LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1802,7 +1805,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 52BFF6461E9D0B9200DF88A1 /* Build configuration list for PBXNativeTarget "ortclib-c-ios-wrapper" */ = { + 52BFF6461E9D0B9200DF88A1 /* Build configuration list for PBXNativeTarget "Ortc" */ = { isa = XCConfigurationList; buildConfigurations = ( 52BFF6471E9D0B9200DF88A1 /* Debug */, From c8a0c4237b374edfec183c2992822a46ce2aae8e Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 20 Apr 2017 17:08:21 -0400 Subject: [PATCH 115/187] - ICE candidates were not being parsed properly from SDP --- .../cpp/ortc_adapter_PeerConnection.cpp | 40 ++++++++++++++++++- ...rtc_adapter_SDPParser_SDPToDescription.cpp | 2 +- .../internal/ortc_adapter_PeerConnection.h | 5 ++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp index 4c4c06db..f6ad9eb5 100644 --- a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp +++ b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp @@ -82,7 +82,7 @@ namespace ortc UseServicesHelper::debugAppend(resultEl, "ice gatherer", mGatherer ? mGatherer->getID() : 0); UseServicesHelper::debugAppend(resultEl, "ice transort", mTransport ? mTransport->getID() : 0); - UseServicesHelper::debugAppend(resultEl, "end of candidates", mRTPEndOfCandidates); + UseServicesHelper::debugAppend(resultEl, "end of candidates", mICEEndOfCandidates); UseServicesHelper::debugAppend(resultEl, "dtls transport", mDTLSTransport ? mDTLSTransport->getID() : 0); UseServicesHelper::debugAppend(resultEl, "srtp/sdes transport", mSRTPSDESTransport ? mSRTPSDESTransport->getID() : 0); @@ -2076,6 +2076,44 @@ namespace ortc try { // scope: setup ICE { + for (auto iterCandidates = transport.mRTP->mICECandidates.begin(); iterCandidates != transport.mRTP->mICECandidates.end(); ++iterCandidates) + { + auto &candidate = (*iterCandidates); + if (!candidate) continue; + auto hash = candidate->hash(); + if (transportInfo->mRTP.mProcessedICECandidates.end() != transportInfo->mRTP.mProcessedICECandidates.find(hash)) { + transportInfo->mRTP.mProcessedICECandidates.insert(hash); + transportInfo->mRTP.mTransport->addRemoteCandidate(*candidate); + } + } + if (transport.mRTP->mEndOfCandidates) { + if (!transportInfo->mRTP.mICEEndOfCandidates) { + IICEGathererTypes::CandidateComplete complete; + transportInfo->mRTP.mTransport->addRemoteCandidate(complete); + transportInfo->mRTP.mICEEndOfCandidates = true; + } + } + + if (hasRTCPICE) { + for (auto iterCandidates = transport.mRTCP->mICECandidates.begin(); iterCandidates != transport.mRTCP->mICECandidates.end(); ++iterCandidates) + { + auto &candidate = (*iterCandidates); + if (!candidate) continue; + auto hash = candidate->hash(); + if (transportInfo->mRTCP.mProcessedICECandidates.end() != transportInfo->mRTCP.mProcessedICECandidates.find(hash)) { + transportInfo->mRTCP.mProcessedICECandidates.insert(hash); + transportInfo->mRTCP.mTransport->addRemoteCandidate(*candidate); + } + } + if (transport.mRTCP->mEndOfCandidates) { + if (!transportInfo->mRTCP.mICEEndOfCandidates) { + IICEGathererTypes::CandidateComplete complete; + transportInfo->mRTCP.mTransport->addRemoteCandidate(complete); + transportInfo->mRTCP.mICEEndOfCandidates = true; + } + } + } + transportInfo->mRTP.mTransport->start(transportInfo->mRTP.mGatherer, *(transport.mRTP->mICEParameters), options); if (hasRTCPICE) { transportInfo->mRTCP.mTransport->start(transportInfo->mRTCP.mGatherer, *useRTCPICEParams, options); diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp index c35445fe..170cd502 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp @@ -314,7 +314,7 @@ namespace ortc auto &acandidate = *(*iter); auto candidate = convertCandidate(acandidate); - if (0 == acandidate.mComponentID) { + if (acandidate.mComponentID < 2) { outRTPCandidates.push_back(candidate); } else { if (!ioRTCPTransport) { diff --git a/ortc/adapter/internal/ortc_adapter_PeerConnection.h b/ortc/adapter/internal/ortc_adapter_PeerConnection.h index 75e28e36..9d440bde 100644 --- a/ortc/adapter/internal/ortc_adapter_PeerConnection.h +++ b/ortc/adapter/internal/ortc_adapter_PeerConnection.h @@ -179,13 +179,16 @@ namespace ortc typedef std::map DataChannelMap; ZS_DECLARE_PTR(DataChannelMap); + typedef std::set HashSet; + struct TransportInfo { struct Details { IICEGathererPtr mGatherer; IICETransportPtr mTransport; - bool mRTPEndOfCandidates {false}; + HashSet mProcessedICECandidates; + bool mICEEndOfCandidates {false}; IDTLSTransportPtr mDTLSTransport; ISRTPSDESTransportPtr mSRTPSDESTransport; From e0bf0e0b5e023653fab017ca518820a5217c0d36 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 25 Apr 2017 10:39:51 -0400 Subject: [PATCH 116/187] - handle bundling of transports by ensuring an offered bundled transport does not create a new transport --- .../cpp/ortc_adapter_PeerConnection.cpp | 93 +++++++++++++++++-- ...rtc_adapter_SDPParser_DescriptionToSDP.cpp | 40 +++++--- ...rtc_adapter_SDPParser_SDPToDescription.cpp | 2 +- .../internal/ortc_adapter_PeerConnection.h | 2 + 4 files changed, 116 insertions(+), 21 deletions(-) diff --git a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp index f6ad9eb5..577296e3 100644 --- a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp +++ b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -1979,6 +1980,55 @@ namespace ortc { auto found = mTransports.find(transport.mID); if (found == mTransports.end()) { + + bool foundUsage = false; + + // remote offered - but is it needed? if the remote bundles another transport then this one is not needed + for (auto iterLines = description->mRTPMediaLines.begin(); iterLines != description->mRTPMediaLines.end(); ++iterLines) + { + auto &mediaLine = (*iterLines); + if (mediaLine->mTransportID.hasData()) { + if (mediaLine->mTransportID == transport.mID) foundUsage = true; + + auto foundExistingTransport = mTransports.find(mediaLine->mTransportID); + if (foundExistingTransport != mTransports.end()) continue; + } + + if (mediaLine->mDetails) { + if (mediaLine->mDetails->mPrivateTransportID.hasData()) { + if (transport.mID == mediaLine->mDetails->mPrivateTransportID) { + foundUsage = true; + break; + } + } + } + } + + for (auto iterLines = description->mSCTPMediaLines.begin(); iterLines != description->mSCTPMediaLines.end(); ++iterLines) + { + auto &mediaLine = (*iterLines); + if (mediaLine->mTransportID.hasData()) { + if (mediaLine->mTransportID == transport.mID) foundUsage = true; + + auto foundExistingTransport = mTransports.find(mediaLine->mTransportID); + if (foundExistingTransport != mTransports.end()) continue; + } + + if (mediaLine->mDetails) { + if (mediaLine->mDetails->mPrivateTransportID.hasData()) { + if (transport.mID == mediaLine->mDetails->mPrivateTransportID) { + foundUsage = true; + break; + } + } + } + } + + if (!foundUsage) { + ZS_LOG_DEBUG(log("transport offered but media lines only use bundled usages thus transport offered is not needed") + transportInfo->toDebug()); + continue; + } + // no matching local transport, create one transportInfo = getTransportFromPool(transport.mID); transportInfo->mNegotiationState = NegotiationState_RemoteOffered; @@ -2276,13 +2326,20 @@ namespace ortc } } + if (mediaLine.mDetails) { + switch (mediaLine.mDetails->mMediaDirection) + { + case ISDPTypes::Direction_SendReceive: mediaLineInfo->mDirection = ISessionDescriptionTypes::MediaDirection_SendReceive; break; + case ISDPTypes::Direction_None: + case ISDPTypes::Direction_Send: mediaLineInfo->mDirection = ISessionDescriptionTypes::MediaDirection_ReceiveOnly; break; + case ISDPTypes::Direction_Receive: mediaLineInfo->mDirection = ISessionDescriptionTypes::MediaDirection_SendOnly; break; + } + } mediaLineInfo->mMediaType = mediaLine.mMediaType; mediaLineInfo->mBundledTransportID = mediaLine.mTransportID; mediaLineInfo->mPrivateTransportID = mediaLine.mDetails ? mediaLine.mDetails->mPrivateTransportID : String(); mediaLineInfo->mRemoteSenderCapabilities = make_shared(*mediaLine.mSenderCapabilities); mediaLineInfo->mRemoteReceiverCapabilities = make_shared(*mediaLine.mReceiverCapabilities); - mediaLineInfo->mBundledTransportID = mediaLine.mTransportID; - mediaLineInfo->mPrivateTransportID = mediaLine.mDetails ? mediaLine.mDetails->mPrivateTransportID : String(); if ((!mediaLineInfo->mRemoteSenderCapabilities) || (!mediaLineInfo->mRemoteReceiverCapabilities)) { @@ -2447,16 +2504,26 @@ namespace ortc goto reject_sender; } + IRTPTransportPtr useRtpTransport = (transportInfo->mRTP.mDTLSTransport ? IRTPTransportPtr(transportInfo->mRTP.mDTLSTransport) : IRTPTransportPtr(transportInfo->mRTP.mSRTPSDESTransport)); + IRTCPTransportPtr useRtcpTransport = (transportInfo->mRTP.mDTLSTransport ? IRTCPTransportPtr(transportInfo->mRTCP.mDTLSTransport) : IRTCPTransportPtr(transportInfo->mRTCP.mTransport)); + if (!receiverInfo->mReceiver) { receiverInfo->mReceiver = IRTPReceiver::create( mThisWeak.lock(), IMediaStreamTrackTypes::toKind(mediaLine->mMediaType), - transportInfo->mRTP.mDTLSTransport ? IRTPTransportPtr(transportInfo->mRTP.mDTLSTransport) : IRTPTransportPtr(transportInfo->mRTP.mSRTPSDESTransport), - transportInfo->mRTP.mDTLSTransport ? IRTCPTransportPtr(transportInfo->mRTCP.mDTLSTransport) : IRTCPTransportPtr(transportInfo->mRTCP.mTransport) + useRtpTransport, + useRtcpTransport ); eventReceiver = true; } + auto existingTransport = receiverInfo->mReceiver->transport(); + PUID existingTransportID = (existingTransport ? existingTransport->getID() : 0); + PUID useTransportID = (useRtpTransport ? useRtpTransport->getID() : 0); + if (existingTransportID != useTransportID) { + receiverInfo->mReceiver->setTransport(useRtpTransport, useRtcpTransport); + } + try { fillRTCPSSRC(*filteredParams); receiverInfo->mReceiver->receive(*filteredParams); @@ -2468,7 +2535,6 @@ namespace ortc goto reject_sender; } - auto existingSet = convertToSet(receiverInfo->mMediaStreams); MediaStreamSet added; @@ -2639,6 +2705,7 @@ namespace ortc } mediaLineInfo->mSCTPTransport = ISCTPTransport::create(mThisWeak.lock(), transportInfo->mRTP.mDTLSTransport, mediaLine.mPort); } + if (!mediaLineInfo->mRemotePort.hasValue()) { mediaLineInfo->mRemotePort = mediaLine.mPort; mediaLineInfo->mSCTPTransport->start(*mediaLine.mCapabilities, mediaLine.mPort); @@ -3450,7 +3517,7 @@ namespace ortc ZS_LOG_TRACE(log("step - create offer")); if (mPendingMethods.size() < 1) { - ZS_LOG_TRACE(log("skipping step to creeate offer (no pending methods)")); + ZS_LOG_TRACE(log("skipping step to create offer (no pending methods)")); return true; } @@ -3523,8 +3590,8 @@ namespace ortc transport->mRTCP = make_shared(); // always get end of candidates state before candidates - transport->mRTP->mEndOfCandidates = (IICEGathererTypes::State_Complete == transportInfo->mRTCP.mGatherer->state()); - transport->mRTP->mICECandidates = *convertCandidateList(*(transportInfo->mRTCP.mGatherer->getLocalCandidates())); + transport->mRTCP->mEndOfCandidates = (IICEGathererTypes::State_Complete == transportInfo->mRTCP.mGatherer->state()); + transport->mRTCP->mICECandidates = *convertCandidateList(*(transportInfo->mRTCP.mGatherer->getLocalCandidates())); } transport->mUseMux = true; @@ -3542,6 +3609,7 @@ namespace ortc if ((isSDP) || (mediaInfo->mPrivateTransportID.hasData())) { mediaLine->mDetails = make_shared(); + mediaLine->mDetails->mMediaDirection = mediaInfo->mDirection; mediaLine->mDetails->mPrivateTransportID = mediaInfo->mPrivateTransportID; if (isSDP) { mediaLine->mDetails->mInternalIndex = mediaInfo->mLineIndex; @@ -3971,6 +4039,15 @@ namespace ortc for (auto iter = mTransports.begin(); iter != mTransports.end(); ++iter) { auto &transportInfo = (*iter).second; + + switch (transportInfo->mNegotiationState) + { + case NegotiationState_PendingOffer: + case NegotiationState_Agreed: + case NegotiationState_LocalOffered: + case NegotiationState_RemoteOffered: break; + case NegotiationState_Rejected: continue; + } figureOutState(iceTransportStateCount, transportInfo->mRTP.mTransport); figureOutState(iceTransportStateCount, transportInfo->mRTCP.mTransport); diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp index 4f670ef6..8571fb5c 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp @@ -172,26 +172,42 @@ namespace ortc ORTC_THROW_INVALID_PARAMETERS_IF(!mediaLine.mDetails); + bool foundPort = false; + mline.mMedia = mediaLine.mMediaType; mline.mPort = 9; mline.mProtoStr = mediaLine.mDetails->mProtocol; mline.mProto = ISDPTypes::toProtocolType(mline.mProtoStr); - // figure out the port based upon the associated transport's ICE candidates - for (auto iter = description.mTransports.begin(); iter != description.mTransports.end(); ++iter) { - auto &transport = *(*iter); - if (0 != transport.mID.compareNoCase(mediaLine.mTransportID)) continue; + if (mediaLine.mDetails) { + if (mediaLine.mDetails->mConnectionData) { + if (mediaLine.mDetails->mConnectionData->mRTP) { + if (mediaLine.mDetails->mConnectionData->mRTP->mPort.hasValue()) { + mline.mPort = mediaLine.mDetails->mConnectionData->mRTP->mPort.value(); + foundPort = true; + } + } + } + } - if (!transport.mRTP) break; - if (transport.mRTP->mICECandidates.size() < 1) break; + if (!foundPort) { + // figure out the port based upon the associated transport's ICE candidates + for (auto iter = description.mTransports.begin(); iter != description.mTransports.end(); ++iter) { + auto &transport = *(*iter); + if (0 != transport.mID.compareNoCase(mediaLine.mTransportID)) continue; - for (auto iterCandidate = transport.mRTP->mICECandidates.begin(); iterCandidate != transport.mRTP->mICECandidates.end(); ++iterCandidate) { - auto &candidate = *(*iterCandidate); - if (IICETypes::CandidateType_Host != candidate.mCandidateType) continue; - mline.mPort = candidate.mPort; - } + if (!transport.mRTP) break; + if (transport.mRTP->mICECandidates.size() < 1) break; + + for (auto iterCandidate = transport.mRTP->mICECandidates.begin(); iterCandidate != transport.mRTP->mICECandidates.end(); ++iterCandidate) { + auto &candidate = *(*iterCandidate); + if (IICETypes::CandidateType_Host != candidate.mCandidateType) continue; + mline.mPort = candidate.mPort; + break; + } - if (9 != mline.mPort) break; + if (9 != mline.mPort) break; + } } } diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp index 170cd502..9422011d 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp @@ -473,7 +473,7 @@ namespace ortc bool found = false; for (auto iter = description.mTransports.begin(); iter != description.mTransports.end(); ++iter) { auto &transport = *(*iter); - if (transport.mID != foundBundleID) continue; + if (transport.mID != searchForTransportID) continue; mediaLine.mTransportID = foundBundleID; found = true; } diff --git a/ortc/adapter/internal/ortc_adapter_PeerConnection.h b/ortc/adapter/internal/ortc_adapter_PeerConnection.h index 9d440bde..2efe93b4 100644 --- a/ortc/adapter/internal/ortc_adapter_PeerConnection.h +++ b/ortc/adapter/internal/ortc_adapter_PeerConnection.h @@ -226,6 +226,8 @@ namespace ortc { String mMediaType; + ISessionDescriptionTypes::MediaDirections mDirection {ISessionDescriptionTypes::MediaDirection_SendReceive}; + IHelper::IDPreferences mIDPreference {IHelper::IDPreference_First}; IRTPTypes::CapabilitiesPtr mLocalSenderCapabilities; IRTPTypes::CapabilitiesPtr mLocalReceiverCapabilities; From 27e564b617737d574cdc40072e674a0a5fb6bc12 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 26 Apr 2017 11:58:40 +0200 Subject: [PATCH 117/187] Updated project's output and intermediate paths --- .../msvs/ortclib-c.Universal/ortclib-c.vcxproj | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj b/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj index d108cab1..15c67adc 100644 --- a/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj +++ b/projects/msvs/ortclib-c.Universal/ortclib-c.vcxproj @@ -100,26 +100,44 @@ false false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc false false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc false false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc false false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc false false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc false false + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc From 86c78932be10353130d81cbb18c6abb3236f31b0 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Sat, 6 May 2017 16:03:57 +0200 Subject: [PATCH 118/187] Added ortclib.wrapper and ortclib-c projects --- projects/msvs/ortclib-c/dllmain.cpp | 19 + projects/msvs/ortclib-c/ortclib-c.cpp | 6 + projects/msvs/ortclib-c/ortclib-c.vcxproj | 557 ++++++++++ .../msvs/ortclib-c/ortclib-c.vcxproj.filters | 987 ++++++++++++++++++ projects/msvs/ortclib-c/stdafx.cpp | 8 + projects/msvs/ortclib-c/stdafx.h | 16 + projects/msvs/ortclib-c/targetver.h | 8 + projects/msvs/ortclib.wrapper/ReadMe.txt | 29 + .../ortclib.wrapper/ortclib.wrapper.vcxproj | 648 ++++++++++++ .../ortclib.wrapper.vcxproj.bak | 648 ++++++++++++ .../ortclib.wrapper.vcxproj.filters | 20 + 11 files changed, 2946 insertions(+) create mode 100644 projects/msvs/ortclib-c/dllmain.cpp create mode 100644 projects/msvs/ortclib-c/ortclib-c.cpp create mode 100644 projects/msvs/ortclib-c/ortclib-c.vcxproj create mode 100644 projects/msvs/ortclib-c/ortclib-c.vcxproj.filters create mode 100644 projects/msvs/ortclib-c/stdafx.cpp create mode 100644 projects/msvs/ortclib-c/stdafx.h create mode 100644 projects/msvs/ortclib-c/targetver.h create mode 100644 projects/msvs/ortclib.wrapper/ReadMe.txt create mode 100644 projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj create mode 100644 projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.bak create mode 100644 projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.filters diff --git a/projects/msvs/ortclib-c/dllmain.cpp b/projects/msvs/ortclib-c/dllmain.cpp new file mode 100644 index 00000000..69b58914 --- /dev/null +++ b/projects/msvs/ortclib-c/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/projects/msvs/ortclib-c/ortclib-c.cpp b/projects/msvs/ortclib-c/ortclib-c.cpp new file mode 100644 index 00000000..f9f51276 --- /dev/null +++ b/projects/msvs/ortclib-c/ortclib-c.cpp @@ -0,0 +1,6 @@ +// ortclib-c.cpp : Defines the exported functions for the DLL application. +// + +#include "stdafx.h" + + diff --git a/projects/msvs/ortclib-c/ortclib-c.vcxproj b/projects/msvs/ortclib-c/ortclib-c.vcxproj new file mode 100644 index 00000000..65ecfa87 --- /dev/null +++ b/projects/msvs/ortclib-c/ortclib-c.vcxproj @@ -0,0 +1,557 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {2ACCF81D-4C88-4677-834A-CBE8488A66E7} + Win32Proj + ortclibc + 8.1 + + + + DynamicLibrary + true + v140 + Unicode + + + DynamicLibrary + false + v140 + true + Unicode + + + DynamicLibrary + true + v140 + Unicode + + + DynamicLibrary + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc + + + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc + + + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc + + + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + libOrtc + + + + NotUsing + Level3 + Disabled + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;WIN32;_DEBUG;_WINDOWS;_USRDLL;ORTCLIBC_EXPORTS;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + false + false + 4068 + + + + + Windows + true + Strmiids.lib;Userenv.lib;libcurl.lib;webrtc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Dmoguids.lib;wmcodecdspuuid.lib;Msdmo.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\..\curl\$(PlatformTarget)-$(Configuration)-static\lib\;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\win32 + + + + + NotUsing + Level3 + Disabled + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;_DEBUG;_WINDOWS;_USRDLL;ORTCLIBC_EXPORTS;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + false + false + 4068 + true + + + Windows + true + Strmiids.lib;Userenv.lib;libcurl.lib;webrtc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Dmoguids.lib;wmcodecdspuuid.lib;Msdmo.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\..\curl\$(PlatformTarget)-$(Configuration)-static\lib\;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget); + + + + + Level3 + NotUsing + MaxSpeed + true + true + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;WIN32;NDEBUG;_WINDOWS;_USRDLL;ORTCLIBC_EXPORTS;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + false + 4068 + true + + + Windows + true + true + true + Strmiids.lib;Userenv.lib;libcurl.lib;webrtc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Dmoguids.lib;wmcodecdspuuid.lib;Msdmo.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\..\curl\$(PlatformTarget)-$(Configuration)-static\lib\;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\win32 + + + + + Level3 + NotUsing + MaxSpeed + true + true + ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION;NDEBUG;_WINDOWS;_USRDLL;ORTCLIBC_EXPORTS;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..;%(AdditionalIncludeDirectories) + false + 4068 + true + + + Windows + true + true + true + Strmiids.lib;Userenv.lib;libcurl.lib;webrtc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Dmoguids.lib;wmcodecdspuuid.lib;Msdmo.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\..\curl\$(PlatformTarget)-$(Configuration)-static\lib\;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + + + + + + {09a641ee-e209-4f71-9558-71a21720c800} + + + {83e1df0d-525a-4bee-8e22-09b77cfaad27} + + + {51152297-1963-433d-b1ac-3d77a99b5184} + + + {c61e43f2-c43c-4841-951b-e9de605d30b4} + + + {fff92483-103e-4c15-86c3-8865737273cf} + + + {80306fbe-b1df-4741-ae97-9be65c8c4cae} + + + {0cad64d3-2e39-49af-961f-f57f6b1ae786} + + + {606afb99-807e-4306-9b3f-970e10744f0a} + + + + + + \ No newline at end of file diff --git a/projects/msvs/ortclib-c/ortclib-c.vcxproj.filters b/projects/msvs/ortclib-c/ortclib-c.vcxproj.filters new file mode 100644 index 00000000..a2983229 --- /dev/null +++ b/projects/msvs/ortclib-c/ortclib-c.vcxproj.filters @@ -0,0 +1,987 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/projects/msvs/ortclib-c/stdafx.cpp b/projects/msvs/ortclib-c/stdafx.cpp new file mode 100644 index 00000000..2cc10635 --- /dev/null +++ b/projects/msvs/ortclib-c/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ortclib-c.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/projects/msvs/ortclib-c/stdafx.h b/projects/msvs/ortclib-c/stdafx.h new file mode 100644 index 00000000..f3a07375 --- /dev/null +++ b/projects/msvs/ortclib-c/stdafx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + + + +// TODO: reference additional headers your program requires here diff --git a/projects/msvs/ortclib-c/targetver.h b/projects/msvs/ortclib-c/targetver.h new file mode 100644 index 00000000..87c0086d --- /dev/null +++ b/projects/msvs/ortclib-c/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/projects/msvs/ortclib.wrapper/ReadMe.txt b/projects/msvs/ortclib.wrapper/ReadMe.txt new file mode 100644 index 00000000..8eab9bd2 --- /dev/null +++ b/projects/msvs/ortclib.wrapper/ReadMe.txt @@ -0,0 +1,29 @@ +======================================================================== + STATIC LIBRARY : ortclib.wrapper Project Overview +======================================================================== + +AppWizard has created this ortclib.wrapper library project for you. + +No source files were created as part of your project. + + +ortclib.wrapper.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +ortclib.wrapper.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj new file mode 100644 index 00000000..d3ade27d --- /dev/null +++ b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj @@ -0,0 +1,648 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {A7614AFA-6E2A-4037-96CA-B9F043333CA9} + Win32Proj + ortclibwrapper + 10.0.10240.0 + + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + false + v140 + true + Unicode + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + + NotUsing + Level3 + Disabled + WEBRTC_WIN;USE_ETW;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + 4068;4290 + + + EditAndContinue + false + Sync + Default + + + Windows + + + + + NotUsing + Level3 + Disabled + WEBRTC_WIN;USE_ETW;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + 4068;4290 + true + None + + + Windows + + + + + Level3 + NotUsing + MaxSpeed + true + true + WEBRTC_WIN;USE_ETW;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + 4068;4290 + true + None + + + Windows + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WEBRTC_WIN;USE_ETW;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + 4068;4290 + true + None + + + Windows + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.bak b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.bak new file mode 100644 index 00000000..41ae4d41 --- /dev/null +++ b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.bak @@ -0,0 +1,648 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {A7614AFA-6E2A-4037-96CA-B9F043333CA9} + Win32Proj + ortclibwrapper + 8.1 + + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + false + v140 + true + Unicode + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + $(SolutionDir)Build\Output\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)Build\Intermediate\$(PlatformTarget)\$(Configuration)\$(MSBuildProjectName)\ + + + + NotUsing + Level3 + Disabled + WEBRTC_WIN;USE_ETW;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + 4068;4290 + + + EditAndContinue + false + Sync + Default + + + Windows + + + + + NotUsing + Level3 + Disabled + WEBRTC_WIN;USE_ETW;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + 4068;4290 + true + None + + + Windows + + + + + Level3 + NotUsing + MaxSpeed + true + true + WEBRTC_WIN;USE_ETW;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + 4068;4290 + true + None + + + Windows + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WEBRTC_WIN;USE_ETW;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + 4068;4290 + true + None + + + Windows + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.filters new file mode 100644 index 00000000..34c1b077 --- /dev/null +++ b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + \ No newline at end of file From c6d0963d26dd744c54bcba14efd20bfd8f48797d Mon Sep 17 00:00:00 2001 From: Vladimir Morosev Date: Fri, 12 May 2017 12:33:04 +0200 Subject: [PATCH 119/187] - fixed audio device type for win32 --- ortc/cpp/ortc_MediaDevices.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index 843cfcd2..c5933fac 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -398,8 +398,13 @@ namespace ortc } delete info; +#ifdef WINRT rtc::scoped_refptr audioDevice = webrtc::AudioDeviceModuleImpl::Create(1, webrtc::AudioDeviceModule::kWindowsWasapiAudio); +#else + rtc::scoped_refptr audioDevice = + webrtc::AudioDeviceModuleImpl::Create(1, webrtc::AudioDeviceModule::kWindowsCoreAudio); +#endif if (!audioDevice) { promise->reject(); return; From 8ac151294f300c9c7d00113fb0f86723e3c52e87 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sun, 14 May 2017 00:02:35 -0400 Subject: [PATCH 120/187] - removed readme from build that was causing constant rebuilding of project --- projects/msvs/ortclib-c/ortclib-c.vcxproj | 3 - .../msvs/ortclib-c/ortclib-c.vcxproj.filters | 3 - projects/msvs/ortclib.wrapper/ReadMe.txt | 29 - .../ortclib.wrapper/ortclib.wrapper.vcxproj | 3 - .../ortclib.wrapper.vcxproj.filters | 1425 ++++++++++++++++- 5 files changed, 1424 insertions(+), 39 deletions(-) delete mode 100644 projects/msvs/ortclib.wrapper/ReadMe.txt diff --git a/projects/msvs/ortclib-c/ortclib-c.vcxproj b/projects/msvs/ortclib-c/ortclib-c.vcxproj index 65ecfa87..15a19d07 100644 --- a/projects/msvs/ortclib-c/ortclib-c.vcxproj +++ b/projects/msvs/ortclib-c/ortclib-c.vcxproj @@ -184,9 +184,6 @@ $(ProjectDir)..\..\..\..\curl\$(PlatformTarget)-$(Configuration)-static\lib\;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc\WEBRTC_BUILD\ortc\$(Configuration)\$(PlatformTarget); - - - diff --git a/projects/msvs/ortclib-c/ortclib-c.vcxproj.filters b/projects/msvs/ortclib-c/ortclib-c.vcxproj.filters index a2983229..6155c46a 100644 --- a/projects/msvs/ortclib-c/ortclib-c.vcxproj.filters +++ b/projects/msvs/ortclib-c/ortclib-c.vcxproj.filters @@ -14,9 +14,6 @@ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - Header Files diff --git a/projects/msvs/ortclib.wrapper/ReadMe.txt b/projects/msvs/ortclib.wrapper/ReadMe.txt deleted file mode 100644 index 8eab9bd2..00000000 --- a/projects/msvs/ortclib.wrapper/ReadMe.txt +++ /dev/null @@ -1,29 +0,0 @@ -======================================================================== - STATIC LIBRARY : ortclib.wrapper Project Overview -======================================================================== - -AppWizard has created this ortclib.wrapper library project for you. - -No source files were created as part of your project. - - -ortclib.wrapper.vcxproj - This is the main project file for VC++ projects generated using an Application Wizard. - It contains information about the version of Visual C++ that generated the file, and - information about the platforms, configurations, and project features selected with the - Application Wizard. - -ortclib.wrapper.vcxproj.filters - This is the filters file for VC++ projects generated using an Application Wizard. - It contains information about the association between the files in your project - and the filters. This association is used in the IDE to show grouping of files with - similar extensions under a specific node (for e.g. ".cpp" files are associated with the - "Source Files" filter). - -///////////////////////////////////////////////////////////////////////////// -Other notes: - -AppWizard uses "TODO:" comments to indicate parts of the source code you -should add to or customize. - -///////////////////////////////////////////////////////////////////////////// diff --git a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj index d3ade27d..0aa362da 100644 --- a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj @@ -161,9 +161,6 @@ true - - - diff --git a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.filters b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.filters index 34c1b077..c795bda5 100644 --- a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.filters +++ b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj.filters @@ -15,6 +15,1429 @@ - + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + \ No newline at end of file From 5feb71939b8ccc32c454d1f9bc1dc055db94828a Mon Sep 17 00:00:00 2001 From: Vladimir Morosev Date: Thu, 18 May 2017 16:24:11 +0200 Subject: [PATCH 121/187] - selecting audio audio device - support for Android and iOS --- ortc/cpp/ortc_MediaDevices.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index c5933fac..e8c86980 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -398,13 +398,15 @@ namespace ortc } delete info; + webrtc::AudioDeviceModule::AudioLayer audioLayer; #ifdef WINRT - rtc::scoped_refptr audioDevice = - webrtc::AudioDeviceModuleImpl::Create(1, webrtc::AudioDeviceModule::kWindowsWasapiAudio); + audioLayer = webrtc::AudioDeviceModule::kWindowsWasapiAudio; #else - rtc::scoped_refptr audioDevice = - webrtc::AudioDeviceModuleImpl::Create(1, webrtc::AudioDeviceModule::kWindowsCoreAudio); + audioLayer = webrtc::AudioDeviceModule::kPlatformDefaultAudio; #endif + + rtc::scoped_refptr audioDevice = + webrtc::AudioDeviceModuleImpl::Create(1, audioLayer); if (!audioDevice) { promise->reject(); return; From b84bccbadba336b0f0a077854ed6e442bef3678e Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 24 May 2017 11:06:02 +0200 Subject: [PATCH 122/187] Added linking flag ObjC --- .../xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj index 2913cc8b..5ff99c5b 100644 --- a/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj +++ b/projects/xcode/ortclib-c-ios/ortclib-c-ios.xcodeproj/project.pbxproj @@ -1759,6 +1759,7 @@ EXECUTABLE_PREFIX = lib; LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; + OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; @@ -1777,6 +1778,7 @@ EXECUTABLE_PREFIX = lib; LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; LIBRARY_SEARCH_PATHS = "../../../../curl/curl/ios-appstore/lib"; + OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; From b5ecd81a713b306284792abbeadb252b66d729f7 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 26 Jun 2017 22:29:17 -0400 Subject: [PATCH 123/187] - renamed winrt to winuwp - fixed compilation of "all" webrtc solution projects --- ortc/IORTC.h | 4 ++-- ortc/cpp/ortc_ICEGatherer.cpp | 14 +++++++------- ortc/cpp/ortc_ORTC.cpp | 8 ++++---- ortc/cpp/ortc_RTPMediaEngine.cpp | 26 ++++++++++++-------------- ortc/cpp/ortc_StatsReport.cpp | 2 +- ortc/internal/ortc_ICEGatherer.h | 2 +- ortc/internal/ortc_ORTC.h | 4 ++-- ortc/internal/ortc_RTPMediaEngine.h | 2 +- ortc/internal/platform.h | 16 ++++++++-------- ortc/test/TestSetup.cpp | 26 +++++++++++++------------- 10 files changed, 51 insertions(+), 53 deletions(-) diff --git a/ortc/IORTC.h b/ortc/IORTC.h index 3b064d18..58bd7c6e 100644 --- a/ortc/IORTC.h +++ b/ortc/IORTC.h @@ -48,9 +48,9 @@ namespace ortc typedef zsLib::Log Log; static void setup(IMessageQueuePtr defaultDelegateMessageQueue); -#ifdef WINRT +#ifdef WINUWP static void setup(Windows::UI::Core::CoreDispatcher ^dispatcher); -#endif //WINRT +#endif //WINUWP static Milliseconds ntpServerTime(); static void ntpServerTime(const Milliseconds &value); diff --git a/ortc/cpp/ortc_ICEGatherer.cpp b/ortc/cpp/ortc_ICEGatherer.cpp index 5d38ff06..b0614403 100644 --- a/ortc/cpp/ortc_ICEGatherer.cpp +++ b/ortc/cpp/ortc_ICEGatherer.cpp @@ -84,9 +84,9 @@ #pragma comment(lib, "Iphlpapi.lib") #endif //HAVE_IPHLPAPI_H -#ifdef WINRT +#ifdef WINUWP using namespace Windows::Networking::Connectivity; -#endif //WINRT +#endif //WINUWP #ifdef __APPLE__ #include @@ -2681,7 +2681,7 @@ namespace ortc mResolvedHostIPs.clear(); - stepGetHostIPs_WinRT(); + stepGetHostIPs_WinUWP(); stepGetHostIPs_Win32(); stepGetHostIPs_ifaddr(); @@ -2696,14 +2696,14 @@ namespace ortc } //------------------------------------------------------------------------- - void ICEGatherer::stepGetHostIPs_WinRT() + void ICEGatherer::stepGetHostIPs_WinUWP() { -#if defined(WINRT) && !defined(HAVE_GETADAPTERADDRESSES) +#if defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) ZS_EVENTING_1(x, i, Debug, IceGathererStep, ol, IceGatherer, Step, puid, id, mID); // http://stackoverflow.com/questions/10336521/query-local-ip-address - // Use WinRT GetHostNames to search for IP addresses + // Use WinUWP GetHostNames to search for IP addresses { typedef std::map HostNameMap; typedef std::list ConnectionProfileList; @@ -2823,7 +2823,7 @@ namespace ortc } } } -#endif //defined(WINRT) && !defined(HAVE_GETADAPTERADDRESSES) +#endif //defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) } //------------------------------------------------------------------------- diff --git a/ortc/cpp/ortc_ORTC.cpp b/ortc/cpp/ortc_ORTC.cpp index a41277c7..0c6d8aa5 100644 --- a/ortc/cpp/ortc_ORTC.cpp +++ b/ortc/cpp/ortc_ORTC.cpp @@ -267,7 +267,7 @@ namespace ortc ISettings::applyDefaults(); } -#ifdef WINRT +#ifdef WINUWP //------------------------------------------------------------------------- void ORTC::setup(Windows::UI::Core::CoreDispatcher ^dispatcher) { @@ -275,7 +275,7 @@ namespace ortc installAllDefaults(); ISettings::applyDefaults(); } -#endif //WINRT +#endif //WINUWP //------------------------------------------------------------------------- Milliseconds ORTC::ntpServerTime() const @@ -459,14 +459,14 @@ namespace ortc } //--------------------------------------------------------------------------- -#ifdef WINRT +#ifdef WINUWP void IORTC::setup(Windows::UI::Core::CoreDispatcher ^dispatcher) { auto singleton = internal::ORTC::singleton(); if (!singleton) return; singleton->setup(dispatcher); } -#endif //WINRT +#endif //WINUWP //------------------------------------------------------------------------- Milliseconds IORTC::ntpServerTime() diff --git a/ortc/cpp/ortc_RTPMediaEngine.cpp b/ortc/cpp/ortc_RTPMediaEngine.cpp index fcce33c0..64ab1ca8 100644 --- a/ortc/cpp/ortc_RTPMediaEngine.cpp +++ b/ortc/cpp/ortc_RTPMediaEngine.cpp @@ -70,8 +70,8 @@ #include #include #include -#ifdef WINRT -#include +#ifdef WINUWP +#include #endif #ifdef _DEBUG @@ -550,7 +550,7 @@ namespace ortc internalSetLogLevel(level); } -#if defined(WINRT) +#if defined(WINUWP) webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent); #endif @@ -1130,7 +1130,7 @@ namespace ortc #pragma mark RTPMediaEngine => webrtc::SetupEventTracer #pragma mark -#if defined(WINRT) +#if defined(WINUWP) const unsigned char *RTPMediaEngine::GetCategoryGroupEnabled(const char *categoryGroup) { return reinterpret_cast("webrtc"); @@ -1384,14 +1384,14 @@ namespace ortc webrtc::AecmModes aecmMode = webrtc::kAecmSpeakerphone; webrtc::AgcModes agcMode = webrtc::kAgcAdaptiveAnalog; webrtc::NsModes nsMode = webrtc::kNsHighSuppression; -#if defined(WINRT) +#if defined(WINUWP) ecMode = webrtc::kEcAecm; #endif if (webrtc::VoEHardware::GetInterface(mVoiceEngine.get())->BuiltInAECIsAvailable()) webrtc::VoEHardware::GetInterface(mVoiceEngine.get())->EnableBuiltInAEC(true); webrtc::VoEAudioProcessing::GetInterface(mVoiceEngine.get())->SetEcStatus(true, ecMode); -#if !defined(WINRT) +#if !defined(WINUWP) webrtc::VoEAudioProcessing::GetInterface(mVoiceEngine.get())->SetEcMetricsStatus(true); #endif if (ecMode == webrtc::kEcAecm) @@ -2937,9 +2937,7 @@ namespace ortc report->mPacketsLost = receiveStreamStats.packets_lost; report->mJitter = receiveStreamStats.jitter_ms; report->mFractionLost = receiveStreamStats.fraction_lost; -#ifdef WINRT report->mEndToEndDelay = Milliseconds(receiveStreamStats.end_to_end_delay_ms); -#endif reportStats[report->mID] = report; } @@ -4257,9 +4255,9 @@ namespace ortc report->mPacketsLost = receiveStreamStats.rtp_stats.retransmitted.packets; report->mJitter = receiveStreamStats.rtcp_stats.jitter; report->mFractionLost = receiveStreamStats.rtcp_stats.fraction_lost; -#ifdef WINRT +#ifdef WEBRTC_FEATURE_END_TO_END_DELAY report->mEndToEndDelay = Milliseconds(receiveStreamStats.current_endtoend_delay_ms); -#endif +#endif // WEBRTC_FEATURE_END_TO_END_DELAY reportStats[report->mID] = report; } @@ -4467,10 +4465,10 @@ namespace ortc { if (videoCodecSet) continue; -#ifndef WINRT +#ifndef WINUWP webrtc::VideoDecoder* videoDecoder = webrtc::VideoDecoder::Create(webrtc::VideoDecoder::kH264); #else - std::unique_ptr decoderFactory = std::make_unique(); + std::unique_ptr decoderFactory = std::make_unique(); webrtc::VideoDecoder* videoDecoder = decoderFactory->CreateVideoDecoder(webrtc::VideoCodecType::kVideoCodecH264); #endif decoder.decoder = videoDecoder; @@ -5089,10 +5087,10 @@ namespace ortc { if (videoCodecSet) continue; -#ifndef WINRT +#ifndef WINUWP webrtc::VideoEncoder* videoEncoder = webrtc::VideoEncoder::Create(webrtc::VideoEncoder::kH264); #else - std::unique_ptr encoderFactory = std::make_unique(); + std::unique_ptr encoderFactory = std::make_unique(); webrtc::VideoEncoder* videoEncoder = encoderFactory->CreateVideoEncoder(webrtc::VideoCodecType::kVideoCodecH264); #endif config.encoder_settings.encoder = videoEncoder; diff --git a/ortc/cpp/ortc_StatsReport.cpp b/ortc/cpp/ortc_StatsReport.cpp index a1acf203..fb2a7295 100644 --- a/ortc/cpp/ortc_StatsReport.cpp +++ b/ortc/cpp/ortc_StatsReport.cpp @@ -1114,7 +1114,7 @@ namespace ortc internal::reportFloat(mID, timestamp, "fractionLost", static_cast(mFractionLost)); internal::reportInt64(mID, timestamp, "endToEndDelay", SafeInt(mEndToEndDelay.count())); #ifndef ORTC_EXCLUDE_WEBRTC_COMPATIBILITY_STATS - internal::reportInt64(mID, timestamp, "winrtEndToEndDelayMs", SafeInt(mEndToEndDelay.count())); + internal::reportInt64(mID, timestamp, "winuwpEndToEndDelayMs", SafeInt(mEndToEndDelay.count())); internal::reportInt32(mID, timestamp, "googFirsReceived", SafeInt(mFIRCount)); internal::reportInt32(mID, timestamp, "googPlisReceived", SafeInt(mPLICount)); internal::reportInt32(mID, timestamp, "googNacksReceived", SafeInt(mNACKCount)); diff --git a/ortc/internal/ortc_ICEGatherer.h b/ortc/internal/ortc_ICEGatherer.h index 4878e1a5..0db49e62 100644 --- a/ortc/internal/ortc_ICEGatherer.h +++ b/ortc/internal/ortc_ICEGatherer.h @@ -874,7 +874,7 @@ namespace ortc bool stepCalculateOptionsHash(); bool stepResolveHostIPs(); bool stepGetHostIPs(); - void stepGetHostIPs_WinRT(); + void stepGetHostIPs_WinUWP(); void stepGetHostIPs_Win32(); void stepGetHostIPs_ifaddr(); bool stepCalculateHostsHash(); diff --git a/ortc/internal/ortc_ORTC.h b/ortc/internal/ortc_ORTC.h index 0b3458b7..1f4bc6dd 100644 --- a/ortc/internal/ortc_ORTC.h +++ b/ortc/internal/ortc_ORTC.h @@ -108,9 +108,9 @@ namespace ortc virtual PUID getID() const {return mID;} virtual void setup(IMessageQueuePtr defaultDelegateMessageQueue); -#ifdef WINRT +#ifdef WINUWP virtual void setup(Windows::UI::Core::CoreDispatcher ^dispatcher); -#endif //WINRT +#endif //WINUWP virtual Milliseconds ntpServerTime() const; virtual void ntpServerTime(const Milliseconds &value); diff --git a/ortc/internal/ortc_RTPMediaEngine.h b/ortc/internal/ortc_RTPMediaEngine.h index 0448e341..07de1ab6 100644 --- a/ortc/internal/ortc_RTPMediaEngine.h +++ b/ortc/internal/ortc_RTPMediaEngine.h @@ -943,7 +943,7 @@ namespace ortc #pragma mark RTPMediaEngine => webrtc::SetupEventTracer #pragma mark -#if defined(WINRT) +#if defined(WINUWP) static const unsigned char *GetCategoryGroupEnabled(const char *categoryGroup); static void __cdecl AddTraceEvent( diff --git a/ortc/internal/platform.h b/ortc/internal/platform.h index f699b0cc..f12bac30 100644 --- a/ortc/internal/platform.h +++ b/ortc/internal/platform.h @@ -47,8 +47,8 @@ #ifdef _WIN32 #ifdef __cplusplus_winrt -#undef WINRT -#define WINRT +#undef WINUWP +#define WINUWP #endif //__cplusplus_winrt @@ -59,22 +59,22 @@ #define HAVE_SPRINTF_S 1 #define HAVE_GETADAPTERADDRESSES 1 -#ifdef WINRT +#ifdef WINUWP -// WINRT has these defined +// WINUWP has these defined -// WINRT does not support these features (but WIN32 does) +// WINUWP does not support these features (but WIN32 does) #undef HAVE_GETADAPTERADDRESSES #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -// WINRT phone has these defined +// WINUWP phone has these defined -// WINRT phone odes not support these features (but WINRT does) +// WINUWP phone odes not support these features (but WINUWP does) #undef HAVE_IPHLPAPI_H #endif //defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -#endif //WINRT +#endif //WINUWP #endif //_WIN32 diff --git a/ortc/test/TestSetup.cpp b/ortc/test/TestSetup.cpp index 21e9e968..99ab500d 100644 --- a/ortc/test/TestSetup.cpp +++ b/ortc/test/TestSetup.cpp @@ -58,20 +58,20 @@ #include #endif //HAVE_IPHLPAPI_H -#ifdef WINRT +#ifdef WINUWP using namespace Windows::Networking::Connectivity; -#endif //WINRT +#endif //WINUWP -#ifdef WINRT +#ifdef WINUWP #include -#endif //WINRT +#endif //WINUWP -#if defined(WINRT) && !defined(HAVE_GETADAPTERADDRESSES) +#if defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) using Windows::Foundation::Collections::IVectorView; using namespace concurrency; using Windows::Networking::HostNameType; using namespace Windows::UI::Core; -#endif //defined(WINRT) && !defined(HAVE_GETADAPTERADDRESSES) +#endif //defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } @@ -109,7 +109,7 @@ namespace ortc { calculateInterfaces_ifaddr(); calculateInterfaces_Win32(); - calculateInterfaces_WinRT(); + calculateInterfaces_WinUWP(); UseSettings::setUInt("tester/total-host-ips", mTotalHostIPs); } @@ -278,16 +278,16 @@ namespace ortc } //------------------------------------------------------------------------- - void calculateInterfaces_WinRT() + void calculateInterfaces_WinUWP() { -#if defined(WINRT) && !defined(HAVE_GETADAPTERADDRESSES) +#if defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) typedef Windows::Networking::Sockets::DatagramSocket DatagramSocket; typedef Windows::Networking::HostName HostName; typedef Windows::Networking::EndpointPair EndpointPair; // http://stackoverflow.com/questions/10336521/query-local-ip-address - // Use WinRT GetHostNames to search for IP addresses + // Use WinUWP GetHostNames to search for IP addresses { typedef std::map HostNameMap; typedef std::list ConnectionProfileList; @@ -533,7 +533,7 @@ namespace ortc mTotalHostIPs = mFoundIPs.size(); } -#endif //defined(WINRT) && !defined(HAVE_GETADAPTERADDRESSES) +#endif //defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) } @@ -564,9 +564,9 @@ namespace ortc std::atomic mDone {}; std::atomic mTotalHostIPs {}; -#if defined(WINRT) && !defined(HAVE_GETADAPTERADDRESSES) +#if defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) concurrency::cancellation_token_source mCancellationTokenSource; -#endif //defined(WINRT) && !defined(HAVE_GETADAPTERADDRESSES) +#endif //defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) }; } From c90cda2c1f241b7d6b6f1ec4dbc666fed4a27f7a Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 28 Jun 2017 16:49:31 -0400 Subject: [PATCH 124/187] - BIG change of how media is routed inside engine - reworking entire RTP packet path for media routing purposes to better handle the complexity of incoming media being assigned to outgoing media paths --- ortc/IConstraints.h | 35 +- ortc/IMediaDevices.h | 16 +- ortc/IMediaElement.h | 162 + ortc/IMediaStreamTrack.h | 296 +- ortc/IMediaStreamTrackSelector.h | 138 + ortc/IRTPTypes.h | 67 +- ortc/RTCPPacket.h | 1608 +++ ortc/RTPPacket.h | 439 + ortc/adapter/cpp/ortc_adapter_MediaStream.cpp | 3 +- ortc/cpp/ortc.events.json | 25 +- ortc/cpp/ortc_Constraints.cpp | 40 + ortc/cpp/ortc_MediaChannelTraceHelper.cpp | 197 + ortc/cpp/ortc_MediaDevice.cpp | 364 + ...iaBase.cpp => ortc_MediaDeviceCapture.cpp} | 103 +- ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp | 1283 +++ ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp | 1288 +++ ortc/cpp/ortc_MediaDeviceRenderAudio.cpp | 1255 +++ ortc/cpp/ortc_MediaDevices.cpp | 32 +- ortc/cpp/ortc_MediaEngine.cpp | 2050 ++++ ortc/cpp/ortc_MediaStreamTrack.cpp | 144 +- ortc/cpp/ortc_ORTC.cpp | 170 +- ortc/cpp/ortc_RTCPPacket.cpp | 9911 +++++++++-------- ortc/cpp/ortc_RTPDecoderAudio.cpp | 602 + ortc/cpp/ortc_RTPDecoderVideo.cpp | 602 + ortc/cpp/ortc_RTPEncoderAudio.cpp | 597 + ortc/cpp/ortc_RTPEncoderVideo.cpp | 597 + ortc/cpp/ortc_RTPListener.cpp | 5 +- ortc/cpp/ortc_RTPMediaEngine.cpp | 5431 --------- ortc/cpp/ortc_RTPPacket.cpp | 2152 ++-- ortc/cpp/ortc_RTPReceiver.cpp | 23 +- ortc/cpp/ortc_RTPReceiverChannel.cpp | 11 +- ortc/cpp/ortc_RTPReceiverChannelAudio.cpp | 845 -- ortc/cpp/ortc_RTPReceiverChannelVideo.cpp | 828 -- ortc/cpp/ortc_RTPSender.cpp | 30 +- ortc/cpp/ortc_RTPSenderChannel.cpp | 11 +- ortc/cpp/ortc_RTPSenderChannelAudio.cpp | 939 -- ortc/cpp/ortc_RTPSenderChannelVideo.cpp | 763 -- ortc/cpp/ortc_RTPTypes.cpp | 2 +- ortc/internal/ortc.h | 30 +- .../ortc_IMediaDevice.h} | 110 +- ortc/internal/ortc_IMediaDeviceCapture.h | 242 + ortc/internal/ortc_IMediaDeviceRender.h | 209 + ortc/internal/ortc_IMediaStreamTrack.h | 277 + ortc/internal/ortc_IMediaStreamTrackChannel.h | 231 + ortc/internal/ortc_IMediaStreamTrackMonitor.h | 358 + .../ortc_IMediaStreamTrackSubscriber.h | 143 + ortc/internal/ortc_IRTP.h | 104 + ortc/internal/ortc_IRTPDecoder.h | 286 + ortc/internal/ortc_IRTPEncoder.h | 294 + ortc/internal/ortc_MediaChannelTraceHelper.h | 90 + ortc/internal/ortc_MediaDeviceCaptureAudio.h | 497 + ortc/internal/ortc_MediaDeviceCaptureVideo.h | 502 + ortc/internal/ortc_MediaDeviceRenderAudio.h | 502 + ortc/internal/ortc_MediaDevices.h | 31 +- ortc/internal/ortc_MediaEngine.h | 976 ++ ortc/internal/ortc_MediaStreamTrack.h | 517 +- ortc/internal/ortc_MediaStreamTrackChannel.h | 236 + .../ortc_MediaStreamTrackSubscriberMedia.h | 268 + .../ortc_MediaStreamTrackSubscriberRTP.h | 283 + ortc/internal/ortc_ORTC.h | 31 +- ortc/internal/ortc_RTCPPacket.h | 1594 --- ortc/internal/ortc_RTPDecoderAudio.h | 293 + ortc/internal/ortc_RTPDecoderVideo.h | 292 + ortc/internal/ortc_RTPEncoderAudio.h | 292 + ortc/internal/ortc_RTPEncoderVideo.h | 293 + ortc/internal/ortc_RTPListener.h | 2 +- ortc/internal/ortc_RTPMediaEngine.h | 2077 ---- ortc/internal/ortc_RTPPacket.h | 421 - ortc/internal/ortc_RTPReceiver.h | 2 +- ortc/internal/ortc_RTPReceiverChannel.h | 18 +- ortc/internal/ortc_RTPReceiverChannelAudio.h | 465 - .../ortc_RTPReceiverChannelMediaBase.h | 124 - ortc/internal/ortc_RTPReceiverChannelVideo.h | 466 - ortc/internal/ortc_RTPSender.h | 12 +- ortc/internal/ortc_RTPSenderChannel.h | 4 +- ortc/internal/ortc_RTPSenderChannelAudio.h | 492 - .../internal/ortc_RTPSenderChannelMediaBase.h | 129 - ortc/internal/ortc_RTPSenderChannelVideo.h | 458 - ortc/internal/types.h | 44 +- ortc/ortc.h | 1 + ortc/types.h | 52 +- .../msvs/ortclib.Universal/ortclib.vcxproj | 53 +- .../ortclib.Universal/ortclib.vcxproj.filters | 159 +- 83 files changed, 25195 insertions(+), 21829 deletions(-) create mode 100644 ortc/IMediaElement.h create mode 100644 ortc/IMediaStreamTrackSelector.h create mode 100644 ortc/RTCPPacket.h create mode 100644 ortc/RTPPacket.h create mode 100644 ortc/cpp/ortc_MediaChannelTraceHelper.cpp create mode 100644 ortc/cpp/ortc_MediaDevice.cpp rename ortc/cpp/{ortc_RTPSenderChannelMediaBase.cpp => ortc_MediaDeviceCapture.cpp} (52%) create mode 100644 ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp create mode 100644 ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp create mode 100644 ortc/cpp/ortc_MediaDeviceRenderAudio.cpp create mode 100644 ortc/cpp/ortc_MediaEngine.cpp create mode 100644 ortc/cpp/ortc_RTPDecoderAudio.cpp create mode 100644 ortc/cpp/ortc_RTPDecoderVideo.cpp create mode 100644 ortc/cpp/ortc_RTPEncoderAudio.cpp create mode 100644 ortc/cpp/ortc_RTPEncoderVideo.cpp delete mode 100644 ortc/cpp/ortc_RTPMediaEngine.cpp delete mode 100644 ortc/cpp/ortc_RTPReceiverChannelAudio.cpp delete mode 100644 ortc/cpp/ortc_RTPReceiverChannelVideo.cpp delete mode 100644 ortc/cpp/ortc_RTPSenderChannelAudio.cpp delete mode 100644 ortc/cpp/ortc_RTPSenderChannelVideo.cpp rename ortc/{cpp/ortc_RTPReceiverChannelMediaBase.cpp => internal/ortc_IMediaDevice.h} (54%) create mode 100644 ortc/internal/ortc_IMediaDeviceCapture.h create mode 100644 ortc/internal/ortc_IMediaDeviceRender.h create mode 100644 ortc/internal/ortc_IMediaStreamTrack.h create mode 100644 ortc/internal/ortc_IMediaStreamTrackChannel.h create mode 100644 ortc/internal/ortc_IMediaStreamTrackMonitor.h create mode 100644 ortc/internal/ortc_IMediaStreamTrackSubscriber.h create mode 100644 ortc/internal/ortc_IRTP.h create mode 100644 ortc/internal/ortc_IRTPDecoder.h create mode 100644 ortc/internal/ortc_IRTPEncoder.h create mode 100644 ortc/internal/ortc_MediaChannelTraceHelper.h create mode 100644 ortc/internal/ortc_MediaDeviceCaptureAudio.h create mode 100644 ortc/internal/ortc_MediaDeviceCaptureVideo.h create mode 100644 ortc/internal/ortc_MediaDeviceRenderAudio.h create mode 100644 ortc/internal/ortc_MediaEngine.h create mode 100644 ortc/internal/ortc_MediaStreamTrackChannel.h create mode 100644 ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h create mode 100644 ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h delete mode 100644 ortc/internal/ortc_RTCPPacket.h create mode 100644 ortc/internal/ortc_RTPDecoderAudio.h create mode 100644 ortc/internal/ortc_RTPDecoderVideo.h create mode 100644 ortc/internal/ortc_RTPEncoderAudio.h create mode 100644 ortc/internal/ortc_RTPEncoderVideo.h delete mode 100644 ortc/internal/ortc_RTPMediaEngine.h delete mode 100644 ortc/internal/ortc_RTPPacket.h delete mode 100644 ortc/internal/ortc_RTPReceiverChannelAudio.h delete mode 100644 ortc/internal/ortc_RTPReceiverChannelMediaBase.h delete mode 100644 ortc/internal/ortc_RTPReceiverChannelVideo.h delete mode 100644 ortc/internal/ortc_RTPSenderChannelAudio.h delete mode 100644 ortc/internal/ortc_RTPSenderChannelMediaBase.h delete mode 100644 ortc/internal/ortc_RTPSenderChannelVideo.h diff --git a/ortc/IConstraints.h b/ortc/IConstraints.h index ea634b69..ade9539c 100644 --- a/ortc/IConstraints.h +++ b/ortc/IConstraints.h @@ -48,22 +48,22 @@ namespace ortc interaction IConstraints { - ZS_DECLARE_STRUCT_PTR(ConstrainBoolean) - ZS_DECLARE_STRUCT_PTR(ConstrainBooleanParameters) - ZS_DECLARE_STRUCT_PTR(ConstrainLong) - ZS_DECLARE_STRUCT_PTR(ConstrainLongRange) - ZS_DECLARE_STRUCT_PTR(ConstrainDouble) - ZS_DECLARE_STRUCT_PTR(ConstrainDoubleRange) - ZS_DECLARE_STRUCT_PTR(ConstrainString) - ZS_DECLARE_STRUCT_PTR(ConstrainStringParameters) - ZS_DECLARE_STRUCT_PTR(StringOrStringList) - - ZS_DECLARE_TYPEDEF_PTR(zsLib::LONG, Long) - ZS_DECLARE_TYPEDEF_PTR(bool, Bool) - ZS_DECLARE_TYPEDEF_PTR(double, Double) - ZS_DECLARE_TYPEDEF_PTR(String, String) - - ZS_DECLARE_TYPEDEF_PTR(std::list, StringList) + ZS_DECLARE_STRUCT_PTR(ConstrainBoolean); + ZS_DECLARE_STRUCT_PTR(ConstrainBooleanParameters); + ZS_DECLARE_STRUCT_PTR(ConstrainLong); + ZS_DECLARE_STRUCT_PTR(ConstrainLongRange); + ZS_DECLARE_STRUCT_PTR(ConstrainDouble); + ZS_DECLARE_STRUCT_PTR(ConstrainDoubleRange); + ZS_DECLARE_STRUCT_PTR(ConstrainString); + ZS_DECLARE_STRUCT_PTR(ConstrainStringParameters); + ZS_DECLARE_STRUCT_PTR(StringOrStringList); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::LONG, Long); + ZS_DECLARE_TYPEDEF_PTR(bool, Bool); + ZS_DECLARE_TYPEDEF_PTR(double, Double); + ZS_DECLARE_TYPEDEF_PTR(String, String); + + ZS_DECLARE_TYPEDEF_PTR(std::list, StringList); //------------------------------------------------------------------------- #pragma mark @@ -252,6 +252,9 @@ namespace ortc ElementPtr toDebug() const; String hash() const; + + void exact(StringList &values) const; + void ideal(StringList &values) const; }; }; diff --git a/ortc/IMediaDevices.h b/ortc/IMediaDevices.h index 0c97b45c..5d3644f5 100644 --- a/ortc/IMediaDevices.h +++ b/ortc/IMediaDevices.h @@ -53,8 +53,18 @@ namespace ortc ZS_DECLARE_STRUCT_PTR(DeviceList); ZS_DECLARE_STRUCT_PTR(MediaStreamTrackList); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Settings, Settings); + + struct SettingsList : public std::list, + public Any + { + }; + + ZS_DECLARE_PTR(SettingsList); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith, PromiseWithMediaStreamTrackList); ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith, PromiseWithDeviceList); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith, PromiseWithSettingsList); enum DeviceKinds { @@ -105,8 +115,9 @@ namespace ortc #pragma mark IMediaDevices::Device #pragma mark - struct Device { - DeviceKinds mKind {DeviceKind_First}; + struct Device + { + DeviceKinds mKind {DeviceKind_First}; String mLabel; String mDeviceID; @@ -174,6 +185,7 @@ namespace ortc static SupportedConstraintsPtr getSupportedConstraints(); static PromiseWithDeviceListPtr enumerateDevices(); + static PromiseWithSettingsListPtr enumerateDefaultModes(const char *deviceID); static PromiseWithMediaStreamTrackListPtr getUserMedia(const Constraints &constraints = Constraints()); diff --git a/ortc/IMediaElement.h b/ortc/IMediaElement.h new file mode 100644 index 00000000..9ca479fd --- /dev/null +++ b/ortc/IMediaElement.h @@ -0,0 +1,162 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include + +namespace ortc +{ + ZS_DECLARE_INTERACTION_PTR(IWindowSink); + ZS_DECLARE_INTERACTION_PTR(IMediaElementTypes); + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IWindowSink + #pragma mark + + interaction IWindowSink + { +#ifdef _WIN32 +#ifdef __cplusplus_winrt + static IMediaElementPtr create(); +#else + static IMediaElementPtr create(HWND hwnd); +#endif // __cplusplus_winrt +#else + static IMediaElementPtr create(void *window); +#endif // _WIN32 + + virtual PUID getID() const = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaElementTypes + #pragma mark + + interaction IMediaElementTypes + { + typedef std::list MediaStreamTrackList; + typedef IMediaStreamTrackTypes::Kinds Kinds; + typedef IMediaStreamTrackTypes::States States; + + struct MediaSink + { + String mAudioSinkID; + IWindowSinkPtr mVideoSinkWindow; + }; + + virtual ~IMediaElementTypes() {} + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrack + #pragma mark + + interaction IMediaElement : public Any, + public IMediaElementTypes + { + static ElementPtr toDebug(IMediaElementPtr object); + + static IMediaElementPtr convert(AnyPtr any); + + static IMediaElementPtr create(MediaSink sink); + + virtual PUID getID() const = 0; + + virtual IMediaStreamTrackSubscriptionPtr subscribe(IMediaElementDelegatePtr delegate) = 0; + + virtual String sinkID() const = 0; // unique audio device ID delivering audio output + virtual IWindowSinkPtr sinkWindow() const = 0; // window where media is being delivered + + virtual bool muted() const = 0; + virtual void muted(bool muted) = 0; + virtual bool paused() const = 0; + virtual void paused(bool paused) = 0; + virtual States readyState() const = 0; + + virtual void stop() = 0; + + virtual MediaStreamTrackList audioTracks() = 0; + virtual MediaStreamTrackList videoTracks() = 0; + + virtual PromisePtr attach(IMediaStreamTrackPtr track) = 0; + virtual void detach(IMediaStreamTrackPtr track) = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaElementDelegate + #pragma mark + + interaction IMediaElementDelegate + { + virtual ~IMediaElementDelegate() {} + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaElementSubscription + #pragma mark + + interaction IMediaElementSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; +} + +ZS_DECLARE_PROXY_BEGIN(ortc::IMediaElementDelegate) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::IMediaElementDelegate, ortc::IMediaElementSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() diff --git a/ortc/IMediaStreamTrack.h b/ortc/IMediaStreamTrack.h index 45ed33c6..1c399163 100644 --- a/ortc/IMediaStreamTrack.h +++ b/ortc/IMediaStreamTrack.h @@ -34,25 +34,13 @@ #include #include #include +#include #include -#include + +#include namespace ortc { - //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackRenderCallback - #pragma mark - - interaction IMediaStreamTrackRenderCallback - { - virtual int32_t RenderFrame(const uint32_t streamId, const webrtc::VideoFrame& videoFrame) = 0; - virtual ~IMediaStreamTrackRenderCallback() {} - }; - //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- @@ -64,14 +52,30 @@ namespace ortc interaction IMediaStreamTrackTypes : public ICapabilities, public IConstraints { + typedef PUID MediaChannelID; + typedef std::list MediaChannelIDList; + typedef std::set MediaChannelIDSet; + ZS_DECLARE_STRUCT_PTR(Capabilities); ZS_DECLARE_STRUCT_PTR(Settings); + ZS_DECLARE_TYPEDEF_PTR(Settings, ImmutableSettings); ZS_DECLARE_STRUCT_PTR(ConstraintSet); ZS_DECLARE_STRUCT_PTR(TrackConstraints); ZS_DECLARE_STRUCT_PTR(Constraints); ZS_DECLARE_STRUCT_PTR(OverconstrainedError); + ZS_DECLARE_STRUCT_PTR(MediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(MediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_STRUCT_PTR(Frame); + ZS_DECLARE_STRUCT_PTR(AudioFrame); + ZS_DECLARE_STRUCT_PTR(VideoFrame); + + ZS_DECLARE_PTR(MediaChannelIDList); + ZS_DECLARE_PTR(MediaChannelIDSet); + ZS_DECLARE_TYPEDEF_PTR(std::list, ConstraintSetList); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::ImmutableParameters, ImmutableParameters); enum Kinds { @@ -104,6 +108,27 @@ namespace ortc static const char *toString(States state); static States toState(const char *state); + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackTypes::MediaActivityStates + #pragma mark + + enum MediaActivityStates + { + MediaActivityState_First, + + MediaActivityState_Muted = MediaActivityState_First, + MediaActivityState_Inactive, // media source is not active + MediaActivityState_ActiveButUnknown, // media source is active but the active speaker state is unknown + MediaActivityState_Background, // the media is identified as being background (e.g. background noise, and no active speaker) + MediaActivityState_Active, // the media is identified as containing activity (e.g. active speaker / active face detected) + + MediaActivityState_Last = MediaActivityState_Active, + }; + + static const char *toString(MediaActivityStates state); + static MediaActivityStates toMediaActivityState(const char *state); + //------------------------------------------------------------------------- #pragma mark #pragma mark IMediaStreamTrackTypes::Capabilities @@ -126,6 +151,8 @@ namespace ortc String mDeviceID; String mGroupID; + Optional mEncodingFormat; + Capabilities() {} Capabilities(const Capabilities &op2) {(*this) = op2;} Capabilities(ElementPtr elem); @@ -160,6 +187,7 @@ namespace ortc Optional mChannelCount; Optional mDeviceID; Optional mGroupID; + Optional mEncodingFormat; Settings() {} Settings(const Settings &op2) {(*this) = op2;} @@ -195,6 +223,7 @@ namespace ortc ConstrainLong mChannelCount; ConstrainString mDeviceID; ConstrainString mGroupID; + ConstrainString mEncodingFormat; ConstraintSet() {} ConstraintSet(const ConstraintSet &op2) {(*this) = op2;} @@ -252,6 +281,11 @@ namespace ortc String hash() const; }; + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackTypes::OverconstrainedError + #pragma mark + struct OverconstrainedError : public Any { String mName; String mConstraint; @@ -261,6 +295,105 @@ namespace ortc OverconstrainedError(const OverconstrainedError &op2) { *this = (op2); } }; + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackTypes::MediaChannelTrace + #pragma mark + + struct MediaChannelTrace + { + MediaChannelTrace(MediaChannelID mediaChannelID) { mMediaChannelIDTracked.push_back(mediaChannelID); mMediaChannelIDs.insert(mediaChannelID); } + MediaChannelTrace( + const ImmutableMediaChannelTrace &op2, + MediaChannelID mediaChannelID = 0 + ) : + mMediaChannelIDTracked(op2.mMediaChannelIDTracked), + mMediaChannelIDs(op2.mMediaChannelIDs), + mKind(op2.mKind), + mSettings(op2.mSettings), + mParameters(op2.mParameters) + { if (0 == mediaChannelID) return; mMediaChannelIDTracked.push_back(mediaChannelID); mMediaChannelIDs.insert(mediaChannelID); } + + static MediaChannelTracePtr create(MediaChannelID mediaChannelID) { return make_shared(mediaChannelID); } + static MediaChannelTracePtr create( + const MediaChannelTrace &op2, + MediaChannelID mediaChannelID = 0 + ) { return make_shared(op2, mediaChannelID); } + + bool hasChannel(MediaChannelID mediaChannelID) const { auto found = mMediaChannelIDs.find(mediaChannelID); return found != mMediaChannelIDs.end(); } + + PUID id() const { return mID; } + Kinds kind() const { return mKind; } + ImmutableSettingsPtr settings() const { return mSettings; } + ImmutableParametersPtr parameters() const { return mParameters; } + MediaChannelID frontMediaChannelID() const { return mMediaChannelIDTracked.front(); } + MediaChannelID endMediaChannelID() const { return mMediaChannelIDTracked.back(); } + MediaChannelIDList::const_iterator begin() const { return mMediaChannelIDTracked.begin(); } + MediaChannelIDList::const_iterator end() const { return mMediaChannelIDTracked.end(); } + + public: + zsLib::AutoPUID mID; + MediaChannelIDList mMediaChannelIDTracked; + MediaChannelIDSet mMediaChannelIDs; + Kinds mKind {Kind_First}; + ImmutableSettingsPtr mSettings; + ImmutableParametersPtr mParameters; + }; + + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackTypes::Frame + #pragma mark + + struct Frame : public Any + { + virtual Kinds getKind() const = 0; + + virtual MediaActivityStates getMediaActivityState() const = 0; + virtual uint64_t getTimestamp() const = 0; // get the timestamp relative to the clock/sample rate + virtual Milliseconds getNTPTime() const = 0; // get the NTP time + virtual Time getTime() const = 0; // get the absolute time + + virtual const BYTE *getData() const = 0; // get the pointer to the raw buffer + virtual size_t getDataSize() const = 0; // get the number of bytes contained within the raw buffer + }; + + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackTypes::AudioFrame + #pragma mark + + struct AudioFrame : public Frame + { + virtual Kinds getKind() const override { return Kind_Audio; } + }; + + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackTypes::VideoFrame + #pragma mark + + struct VideoFrame : public Frame + { + enum DataFormats + { + DataFormat_NativeTexture, + DataFormat_Packed, + + DataFormat_Y, + DataFormat_U, + DataFormat_V, + }; + + virtual Kinds getKind() const override { return Kind_Video; } + + // returns true of available otherwise false + virtual bool getEncodedData( + DataFormats encodedDataFormat, + const void * &outData, // set to NULL if not available + size_t &outDataSizeIfKnown // set to 0 if not available + ) = 0; // get the pointer to the raw buffer + }; }; //--------------------------------------------------------------------------- @@ -275,11 +408,14 @@ namespace ortc public IMediaStreamTrackTypes, public IStatsProvider { - static ElementPtr toDebug(IMediaStreamTrackPtr object); + static void trace( + IMediaStreamTrackPtr object, + const char *message = NULL + ); static IMediaStreamTrackPtr convert(AnyPtr any); - virtual PUID getID() const = 0; + virtual MediaChannelID getID() const = 0; virtual IMediaStreamTrackSubscriptionPtr subscribe(IMediaStreamTrackDelegatePtr delegate) = 0; @@ -304,9 +440,11 @@ namespace ortc virtual PromisePtr applyConstraints(const TrackConstraints &constraints) = 0; - virtual void setVideoRenderCallback(IMediaStreamTrackRenderCallbackPtr callback) = 0; - virtual void setH264Rendering(bool h264Rendering) = 0; - virtual bool isH264Rendering() = 0; + virtual IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackSyncMediaDelegatePtr delegate) = 0; + + // WARNING: extreme caution must be done not to cause a deadlock or delaying media by blocking. Gather information + // needed within a lock but do any operations outside a lock as fast as possible. + virtual IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackAsyncMediaDelegatePtr delegate) = 0; }; //------------------------------------------------------------------------- @@ -349,6 +487,71 @@ namespace ortc virtual void background() = 0; }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSyncMediaDelegate + #pragma mark + + interaction IMediaStreamTrackSyncMediaDelegate : public IMediaStreamTrackDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + virtual void notifyMediaStreamTrackMediaAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void notifyMediaStreamTrackMediaVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackAsyncMediaDelegate + #pragma mark + + interaction IMediaStreamTrackAsyncMediaDelegate : public IMediaStreamTrackDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + virtual void onMediaStreamTrackMediaAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void onMediaStreamTrackMediaVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMediaSubscription + #pragma mark + + interaction IMediaStreamTrackMediaSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; } ZS_DECLARE_PROXY_BEGIN(ortc::IMediaStreamTrackDelegate) @@ -366,3 +569,56 @@ ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrac ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() + +ZS_DECLARE_PROXY_BEGIN(ortc::IMediaStreamTrackAsyncMediaDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::OverconstrainedErrorPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +ZS_DECLARE_PROXY_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackMediaAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackMediaVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::IMediaStreamTrackAsyncMediaDelegate, ortc::IMediaStreamTrackMediaSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::OverconstrainedErrorPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackMediaAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackMediaVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() + +ZS_DECLARE_PROXY_BEGIN(ortc::IMediaStreamTrackSyncMediaDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::OverconstrainedErrorPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +ZS_DECLARE_PROXY_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyMediaStreamTrackMediaAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyMediaStreamTrackMediaVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::IMediaStreamTrackSyncMediaDelegate, ortc::IMediaStreamTrackMediaSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::OverconstrainedErrorPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyMediaStreamTrackMediaAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyMediaStreamTrackMediaVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() + diff --git a/ortc/IMediaStreamTrackSelector.h b/ortc/IMediaStreamTrackSelector.h new file mode 100644 index 00000000..5b8c7a71 --- /dev/null +++ b/ortc/IMediaStreamTrackSelector.h @@ -0,0 +1,138 @@ +/* + + Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include + +namespace ortc +{ + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSelectorTypes + #pragma mark + + interaction IMediaStreamTrackSelectorTypes + { + typedef IMediaStreamTrackTypes::MediaChannelID MediaChannelID; + typedef IMediaStreamTrackTypes::Kinds Kinds; + ZS_DECLARE_TYPEDEF_PTR(std::list, MediaStreamTrackList); + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSelector + #pragma mark + + interaction IMediaStreamTrackSelector : public Any, + public IMediaStreamTrackSelectorTypes, + public IStatsProvider + { + static IMediaStreamTrackSelectorPtr convert(AnyPtr any); + + static IMediaStreamTrackSelectorPtr create( + Kinds kind, + size_t totalOutputMediaStreamTracks = 1, + IMediaStreamTrackSelectorDelegatePtr delegate = IMediaStreamTrackSelectorDelegatePtr() + ); + + virtual PUID getID() const = 0; + + virtual IMediaStreamTrackSelectorSubscriptionPtr subscribe(IMediaStreamTrackSelectorDelegatePtr delegate) = 0; + + virtual Kinds kind() const = 0; + virtual IMediaStreamTrackPtr getOutputTrack(size_t index) const = 0; + virtual MediaStreamTrackList getInputTracks() const = 0; + + virtual PromisePtr attachInputTrack( + IMediaStreamTrackPtr inputTrack, + IMediaStreamTrackPtr useThisTrackToDetermineMediaActivityState // use this track to detect media activity + ) throw (InvalidParameters); + virtual void detachInputTrack(IMediaStreamTrackPtr track); + + virtual void stop() = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSelectorDelegate + #pragma mark + + interaction IMediaStreamTrackSelectorDelegate + { + virtual ~IMediaStreamTrackSelectorDelegate() {} + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSelectorSubscription + #pragma mark + + interaction IMediaStreamTrackSelectorSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; +} + +ZS_DECLARE_PROXY_BEGIN(ortc::IMediaStreamTrackSelectorDelegate) +//ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +//ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::OverconstrainedErrorPtr, OverconstrainedErrorPtr) +//ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +//ZS_DECLARE_PROXY_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) +//ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::IMediaStreamTrackSelectorDelegate, ortc::IMediaStreamTrackSelectorSubscription) +//ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +//ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::OverconstrainedErrorPtr, OverconstrainedErrorPtr) +//ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +//ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) +//ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() diff --git a/ortc/IRTPTypes.h b/ortc/IRTPTypes.h index b5706ed3..a9dc9f77 100644 --- a/ortc/IRTPTypes.h +++ b/ortc/IRTPTypes.h @@ -48,45 +48,46 @@ namespace ortc interaction IRTPTypes { - ZS_DECLARE_STRUCT_PTR(Capabilities) - ZS_DECLARE_STRUCT_PTR(CodecCapability) - ZS_DECLARE_STRUCT_PTR(OpusCodecCapabilityOptions) - ZS_DECLARE_STRUCT_PTR(OpusCodecCapabilityParameters) - ZS_DECLARE_STRUCT_PTR(VP8CodecCapabilityParameters) - ZS_DECLARE_STRUCT_PTR(H264CodecCapabilityParameters) - ZS_DECLARE_STRUCT_PTR(RTXCodecCapabilityParameters) - ZS_DECLARE_STRUCT_PTR(FlexFECCodecCapabilityParameters) - ZS_DECLARE_STRUCT_PTR(HeaderExtension) - ZS_DECLARE_STRUCT_PTR(RTCPFeedback) - ZS_DECLARE_STRUCT_PTR(Parameters) - ZS_DECLARE_STRUCT_PTR(CodecParameters) - ZS_DECLARE_STRUCT_PTR(OpusCodecParameters) - ZS_DECLARE_TYPEDEF_PTR(VP8CodecCapabilityParameters, VP8CodecParameters) - ZS_DECLARE_TYPEDEF_PTR(H264CodecCapabilityParameters, H264CodecParameters) - ZS_DECLARE_TYPEDEF_PTR(RTXCodecCapabilityParameters, RTXCodecParameters) - ZS_DECLARE_TYPEDEF_PTR(FlexFECCodecCapabilityParameters, FlexFECCodecParameters) - ZS_DECLARE_STRUCT_PTR(REDCodecParameters) - ZS_DECLARE_STRUCT_PTR(HeaderExtensionParameters) - ZS_DECLARE_STRUCT_PTR(EncodingParameters) - ZS_DECLARE_STRUCT_PTR(RTCPParameters) - ZS_DECLARE_STRUCT_PTR(FECParameters) - ZS_DECLARE_STRUCT_PTR(RTXParameters) - - ZS_DECLARE_TYPEDEF_PTR(std::list, CodecCapabilitiesList) - ZS_DECLARE_TYPEDEF_PTR(std::list, HeaderExtensionsList) - ZS_DECLARE_TYPEDEF_PTR(std::list, RTCPFeedbackList) - ZS_DECLARE_TYPEDEF_PTR(std::list, CodecParametersList) - ZS_DECLARE_TYPEDEF_PTR(std::list, HeaderExtensionParametersList) - ZS_DECLARE_TYPEDEF_PTR(std::list, EncodingParametersList) + ZS_DECLARE_STRUCT_PTR(Capabilities); + ZS_DECLARE_STRUCT_PTR(CodecCapability); + ZS_DECLARE_STRUCT_PTR(OpusCodecCapabilityOptions); + ZS_DECLARE_STRUCT_PTR(OpusCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(VP8CodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(H264CodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(RTXCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(FlexFECCodecCapabilityParameters); + ZS_DECLARE_STRUCT_PTR(HeaderExtension); + ZS_DECLARE_STRUCT_PTR(RTCPFeedback); + ZS_DECLARE_STRUCT_PTR(Parameters); + ZS_DECLARE_TYPEDEF_PTR(Parameters, ImmutableParameters); + ZS_DECLARE_STRUCT_PTR(CodecParameters); + ZS_DECLARE_STRUCT_PTR(OpusCodecParameters); + ZS_DECLARE_TYPEDEF_PTR(VP8CodecCapabilityParameters, VP8CodecParameters); + ZS_DECLARE_TYPEDEF_PTR(H264CodecCapabilityParameters, H264CodecParameters); + ZS_DECLARE_TYPEDEF_PTR(RTXCodecCapabilityParameters, RTXCodecParameters); + ZS_DECLARE_TYPEDEF_PTR(FlexFECCodecCapabilityParameters, FlexFECCodecParameters); + ZS_DECLARE_STRUCT_PTR(REDCodecParameters); + ZS_DECLARE_STRUCT_PTR(HeaderExtensionParameters); + ZS_DECLARE_STRUCT_PTR(EncodingParameters); + ZS_DECLARE_STRUCT_PTR(RTCPParameters); + ZS_DECLARE_STRUCT_PTR(FECParameters); + ZS_DECLARE_STRUCT_PTR(RTXParameters); + + ZS_DECLARE_TYPEDEF_PTR(std::list, CodecCapabilitiesList); + ZS_DECLARE_TYPEDEF_PTR(std::list, HeaderExtensionsList); + ZS_DECLARE_TYPEDEF_PTR(std::list, RTCPFeedbackList); + ZS_DECLARE_TYPEDEF_PTR(std::list, CodecParametersList); + ZS_DECLARE_TYPEDEF_PTR(std::list, HeaderExtensionParametersList); + ZS_DECLARE_TYPEDEF_PTR(std::list, EncodingParametersList); typedef String FECMechanism; - ZS_DECLARE_TYPEDEF_PTR(std::list, FECMechanismList) + ZS_DECLARE_TYPEDEF_PTR(std::list, FECMechanismList); typedef BYTE PayloadType; typedef DWORD SSRCType; - ZS_DECLARE_TYPEDEF_PTR(std::list, PayloadTypeList) + ZS_DECLARE_TYPEDEF_PTR(std::list, PayloadTypeList); typedef String EncodingID; - ZS_DECLARE_TYPEDEF_PTR(std::list, EncodingIDList) + ZS_DECLARE_TYPEDEF_PTR(std::list, EncodingIDList); //------------------------------------------------------------------------- #pragma mark diff --git a/ortc/RTCPPacket.h b/ortc/RTCPPacket.h new file mode 100644 index 00000000..58b2efd3 --- /dev/null +++ b/ortc/RTCPPacket.h @@ -0,0 +1,1608 @@ +/* + + Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include +#include + +namespace ortc +{ + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket + #pragma mark + + class RTCPPacket + { + protected: + struct make_private {}; + + public: + typedef IMediaStreamTrackTypes::MediaChannelID MediaChannelID; + + public: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::Report + #pragma mark + + struct Report + { + Report *next() const {return mNext;} + + const BYTE *ptr() const {return mPtr;} + size_t size() const {return mSize;} + + BYTE version() const {return mVersion;} + size_t padding() const {return static_cast(mPadding);} + BYTE reportSpecific() const {return mReportSpecific;} + + BYTE pt() const {return mPT;} + static const char *ptToString(BYTE pt); + const char *ptToString() const {return ptToString(mPT);} + + public: + Report *mNext {}; + + const BYTE *mPtr {}; + size_t mSize {}; + + BYTE mVersion {}; + BYTE mPadding {}; + BYTE mReportSpecific {}; + + BYTE mPT {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SenderReceiverCommonReport + #pragma mark + + struct SenderReceiverCommonReport : public Report + { + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SenderReceiverCommonReport::ReportBlock + #pragma mark + + struct ReportBlock + { + ReportBlock *next() const {return mNext;} + + DWORD ssrc() const {return mSSRC;} + BYTE fractionLost() const {return mFractionLost;} + DWORD cumulativeNumberOfPacketsLost() const {return mCumulativeNumberOfPacketsLost;} + DWORD extendedHighestSequenceNumberReceived() const {return mExtendedHighestSequenceNumberReceived;} + DWORD interarrivalJitter() const {return mInterarrivalJitter;} + DWORD lsr() const {return mLSR;} + DWORD dlsr() const {return mDLSR;} + + public: + ReportBlock *mNext {}; + + DWORD mSSRC {}; + BYTE mFractionLost {}; + DWORD mCumulativeNumberOfPacketsLost {}; + DWORD mExtendedHighestSequenceNumberReceived {}; + DWORD mInterarrivalJitter {}; + DWORD mLSR {}; // last SR timestamp + DWORD mDLSR {}; // delay since last SR + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SenderReceiverCommonReport (public) + #pragma mark + + size_t rc() const {return static_cast(mReportSpecific);} + DWORD ssrcOfSender() const {return mSSRCOfSender;} + + ReportBlock *firstReportBlock() const {return mFirstReportBlock;} + + const BYTE *extension() const {return mExtension;} + size_t extensionSize() const {return mExtensionSize;} + + public: + DWORD mSSRCOfSender {}; + + const BYTE *mExtension {}; + size_t mExtensionSize {}; + + ReportBlock *mFirstReportBlock {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SenderReport + #pragma mark + + struct SenderReport : public SenderReceiverCommonReport + { + // https://tools.ietf.org/html/rfc3550#section-6.4.1 + + static const BYTE kPayloadType {200}; + + SenderReport *nextSenderReport() const {return mNextSenderReport;} + + DWORD ntpTimestampMS() const {return mNTPTimestampMS;} + DWORD ntpTimestampLS() const {return mNTPTimestampLS;} + Time ntpTimestamp() const; + DWORD rtpTimestamp() const {return mRTPTimestamp;} + DWORD senderPacketCount() const {return mSenderPacketCount;} + DWORD senderOctetCount() const {return mSenderOctetCount;} + + public: + SenderReport *mNextSenderReport {}; + + DWORD mNTPTimestampMS {}; + DWORD mNTPTimestampLS {}; + DWORD mRTPTimestamp {}; + DWORD mSenderPacketCount {}; + DWORD mSenderOctetCount {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::ReceiverReport + #pragma mark + + struct ReceiverReport : public SenderReceiverCommonReport + { + // https://tools.ietf.org/html/rfc3550#section-6.4.2 + + static const BYTE kPayloadType {201}; + + ReceiverReport *nextReceiverReport() const {return mNextReceiverReport;} + + DWORD ssrcOfPacketSender() const {return mSSRCOfSender;} + + public: + ReceiverReport *mNextReceiverReport {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES + #pragma mark + + struct SDES : public Report + { + // https://tools.ietf.org/html/rfc3550#section-6.5 + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk + #pragma mark + + struct Chunk + { + static const BYTE kEndOfItemsType = 0; + + struct StringItem + { + BYTE type() const {return mType;} + size_t length() const {return mLength;} + const char *value() const {return mValue;} + + static const char *typeToString(BYTE type); + const char *typeToString() const {return typeToString(mType);} + + public: + StringItem *mNext {}; + + BYTE mType {}; + size_t mLength {}; + const char *mValue {}; + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::CName + #pragma mark + + struct CName : public StringItem + { + // https://tools.ietf.org/html/rfc3550#section-6.5.1 + + static const BYTE kItemType = 1; + + CName *next() const {return static_cast(mNext);} + + const char *userAndDomainName() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Name + #pragma mark + + struct Name : public StringItem + { + // https://tools.ietf.org/html/rfc3550#section-6.5.2 + + static const BYTE kItemType = 2; + + Name *next() const {return static_cast(mNext);} + + const char *commonName() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Email + #pragma mark + + struct Email : public StringItem + { + // https://tools.ietf.org/html/rfc3550#section-6.5.3 + + static const BYTE kItemType = 3; + + Email *next() const {return static_cast(mNext);} + + const char *emailAddress() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Phone + #pragma mark + + struct Phone : public StringItem + { + // https://tools.ietf.org/html/rfc3550#section-6.5.4 + + static const BYTE kItemType = 4; + + Phone *next() const {return static_cast(mNext);} + + const char *phoneNumber() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Loc + #pragma mark + + struct Loc : public StringItem + { + // https://tools.ietf.org/html/rfc3550#section-6.5.5 + + static const BYTE kItemType = 5; + + Loc *next() const {return static_cast(mNext);} + + const char *geographicLocation() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Tool + #pragma mark + + struct Tool : public StringItem + { + // https://tools.ietf.org/html/rfc3550#section-6.5.6 + + static const BYTE kItemType = 6; + + Tool *next() const {return static_cast(mNext);} + + const char *nameVersion() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Note + #pragma mark + + struct Note : public StringItem + { + // https://tools.ietf.org/html/rfc3550#section-6.5.7 + + static const BYTE kItemType = 7; + + Note *next() const {return static_cast(mNext);} + + const char *note() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Priv + #pragma mark + + struct Priv : public StringItem + { + // https://tools.ietf.org/html/rfc3550#section-6.5.8 + + static const BYTE kItemType = 8; + + Priv *next() const {return static_cast(mNext);} + + size_t prefixLength() const {return mPrefixLength;} + const char *prefix() const {return mPrefix;} + + public: + size_t mPrefixLength {}; + const char *mPrefix {}; + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Unknown + #pragma mark + + struct Unknown : public StringItem + { + Unknown *next() const {return static_cast(mNext);} + + const BYTE *ptr() const {return reinterpret_cast(value());} + size_t size() const {return length();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Mid + #pragma mark + + struct Mid : public StringItem + { + // https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-23#section-14.2 + static const BYTE kItemType = 12; // TBD + + Mid *next() const {return static_cast(mNext);} + + const char *mid() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::Rid + #pragma mark + + struct Rid : public StringItem + { + // https://tools.ietf.org/html/draft-roach-avtext-rid-02#section-4.1 + static const BYTE kItemType = 13; // TBD + + Rid *next() const {return static_cast(mNext);} + + const char *rid() const {return value();} + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk + #pragma mark + + Chunk *next() const {return mNext;} + + DWORD ssrc() const {return mSSRC;} + + size_t count() const {return mCount;} + + CName *firstCName() const {return mFirstCName;} + Name *firstName() const {return mFirstName;} + Email *firstEmail() const {return mFirstEmail;} + Phone *firstPhone() const {return mFirstPhone;} + Loc *firstLoc() const {return mFirstLoc;} + Tool *firstTool() const {return mFirstTool;} + Note *firstNote() const {return mFirstNote;} + Priv *firstPriv() const {return mFirstPriv;} + Mid *firstMid() const {return mFirstMid;} + Rid *firstRid() const {return mFirstRid;} + Unknown *firstUnknown() const {return mFirstUnknown;} + + size_t cNameCount() const {return mCNameCount;} + size_t nameCount() const {return mNameCount;} + size_t emailCount() const {return mEmailCount;} + size_t phoneCount() const {return mPhoneCount;} + size_t locCount() const {return mLocCount;} + size_t toolCount() const {return mToolCount;} + size_t noteCount() const {return mNoteCount;} + size_t privCount() const {return mPrivCount;} + size_t midCount() const {return mMidCount;} + size_t ridCount() const {return mRidCount;} + size_t unknownCount() const {return mUnknownCount;} + + CName *cNameAtIndex(size_t index) const; + Name *nameAtIndex(size_t index) const; + Email *emailAtIndex(size_t index) const; + Phone *phoneAtIndex(size_t index) const; + Loc *locAtIndex(size_t index) const; + Tool *toolAtIndex(size_t index) const; + Note *noteAtIndex(size_t index) const; + Priv *privAtIndex(size_t index) const; + Mid *midAtIndex(size_t index) const; + Rid *ridAtIndex(size_t index) const; + Unknown *unknownAtIndex(size_t index) const; + + public: + Chunk *mNext {}; + + DWORD mSSRC {}; + + size_t mCount {}; + + size_t mCNameCount {}; + size_t mNameCount {}; + size_t mEmailCount {}; + size_t mPhoneCount {}; + size_t mLocCount {}; + size_t mToolCount {}; + size_t mNoteCount {}; + size_t mPrivCount {}; + size_t mMidCount {}; + size_t mRidCount {}; + size_t mUnknownCount {}; + + CName *mFirstCName {}; + Name *mFirstName {}; + Email *mFirstEmail {}; + Phone *mFirstPhone {}; + Loc *mFirstLoc {}; + Tool *mFirstTool {}; + Note *mFirstNote {}; + Priv *mFirstPriv {}; + Mid *mFirstMid {}; + Rid *mFirstRid {}; + Unknown *mFirstUnknown {}; + }; + + static const BYTE kPayloadType {202}; + + SDES *nextSDES() const {return mNextSDES;} + + size_t sc() const {return static_cast(mReportSpecific);} + + Chunk *firstChunk() const {return mFirstChunk;} + + public: + SDES *mNextSDES {}; + + Chunk *mFirstChunk {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::Bye + #pragma mark + + struct Bye : public Report + { + // https://tools.ietf.org/html/rfc3550#section-6.6 + + static const BYTE kPayloadType {203}; + + Bye *nextBye() const {return mNextBye;} + + size_t sc() const {return static_cast(mReportSpecific);} + + DWORD ssrc(size_t index) const; + + const char *reasonForLeaving() const {return mReasonForLeaving;} + + public: + Bye *mNextBye {}; + + const char *mReasonForLeaving {}; + + DWORD *mSSRCs {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::App + #pragma mark + + struct App : public Report + { + // https://tools.ietf.org/html/rfc3550#section-6.7 + + static const BYTE kPayloadType {204}; + + App *nextApp() const {return mNextApp;} + + BYTE subtype() const {return mReportSpecific;} + + DWORD ssrc() const {return mSSRC;} + const char *name() const {return &(mName[0]);} + + const BYTE *data() const {return mData;} + size_t dataSize() const {return mDataSize;} + + public: + App *mNextApp {}; + + DWORD mSSRC {}; + char mName[sizeof(DWORD)+1] {}; + + const BYTE *mData {}; + size_t mDataSize {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::FeedbackMessage + #pragma mark + + struct FeedbackMessage : public Report + { + // https://tools.ietf.org/html/rfc4585#section-6.1 + + BYTE fmt() const {return mReportSpecific;} + + DWORD ssrcOfPacketSender() const {return mSSRCOfPacketSender;} + DWORD ssrcOfMediaSource() const {return mSSRCOfMediaSource;} + + const BYTE *fci() const {return mFCI;} + size_t fciSize() const {return mFCISize;} + + static const char *fmtToString(BYTE pt, BYTE fmt, DWORD subFmt = 0); + const char *fmtToString() const; + + public: + DWORD mSSRCOfPacketSender {}; + DWORD mSSRCOfMediaSource {}; + + const BYTE *mFCI {}; + size_t mFCISize {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::TransportLayerFeedbackMessage + #pragma mark + + struct TransportLayerFeedbackMessage : public FeedbackMessage + { + // https://tools.ietf.org/html/rfc4585#section-6.2 + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::TransportLayerFeedbackMessage::GenericNACK + #pragma mark + + struct GenericNACK + { + // https://tools.ietf.org/html/rfc4585#section-6.2.1 + + static const BYTE kFmt {1}; + + WORD pid() const {return mPID;} + WORD blp() const {return mBLP;} + + public: + WORD mPID {}; + WORD mBLP {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::TransportLayerFeedbackMessage::TMMBRCommon + #pragma mark + + struct TMMBRCommon + { + DWORD ssrc() const {return mSSRC;} + + BYTE mxTBRExp() const {return mMxTBRExp;} + DWORD mxTBRMantissa() const {return mMxTBRMantissa;} + WORD measuredOverhead() const {return mMeasuredOverhead;} + + public: + DWORD mSSRC {}; + + BYTE mMxTBRExp {}; + DWORD mMxTBRMantissa {}; + WORD mMeasuredOverhead {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::TransportLayerFeedbackMessage::TMMBR + #pragma mark + + struct TMMBR : public TMMBRCommon + { + // http://tools.ietf.org/html/rfc5104#section-4.2.1.1 + + static const BYTE kFmt {3}; + + public: + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::TransportLayerFeedbackMessage::TMMBN + #pragma mark + + struct TMMBN : public TMMBRCommon + { + // http://tools.ietf.org/html/rfc5104#section-4.2.2.1 + + static const BYTE kFmt {4}; + + public: + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::TransportLayerFeedbackMessage (public) + #pragma mark + + static const BYTE kPayloadType {205}; + + TransportLayerFeedbackMessage *nextTransportLayerFeedbackMessage() const {return mNextTransportLayerFeedbackMessage;} + + size_t genericNACKCount() const {return mGenericNACKCount;} + GenericNACK *genericNACKAtIndex(size_t index) const; + + size_t tmmbrCount() const {return mTMMBRCount;} + TMMBR *tmmbrAtIndex(size_t index) const; + + size_t tmmbnCount() const {return mTMMBNCount;} + TMMBN *tmmbnAtIndex(size_t index) const; + + TransportLayerFeedbackMessage *unknown() const {return mUnknown;} + + public: + TransportLayerFeedbackMessage *mNextTransportLayerFeedbackMessage {}; + + size_t mGenericNACKCount {}; + GenericNACK *mFirstGenericNACK {}; + + size_t mTMMBRCount {}; + TMMBR *mFirstTMMBR {}; + + size_t mTMMBNCount {}; + TMMBN *mFirstTMMBN {}; + + TransportLayerFeedbackMessage *mUnknown {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage + #pragma mark + + struct PayloadSpecificFeedbackMessage : public FeedbackMessage + { + // https://tools.ietf.org/html/rfc4585#section-6.3 + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::PLI + #pragma mark + + struct PLI + { + // https://tools.ietf.org/html/rfc4585#section-6.3.1 + + static const BYTE kFmt {1}; + public: + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::SLI + #pragma mark + + struct SLI + { + // https://tools.ietf.org/html/rfc4585#section-6.3.2 + + static const BYTE kFmt {2}; + + WORD first() const {return mFirst;} + WORD number() const {return mNumber;} + BYTE pictureID() const {return mPictureID;} + + public: + WORD mFirst {}; + WORD mNumber {}; + BYTE mPictureID {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::RPSI + #pragma mark + + struct RPSI + { + // https://tools.ietf.org/html/rfc4585#section-6.3.3 + + static const BYTE kFmt {3}; + + BYTE zeroBit() const {return mZeroBit;} + BYTE payloadType() const {return mPayloadType;} + + const BYTE *nativeRPSIBitString() const {return mNativeRPSIBitString;} + size_t nativeRPSIBitStringSizeInBits() const {return mNativeRPSIBitStringSizeInBits;} + + public: + BYTE mZeroBit {}; + BYTE mPayloadType {}; + + const BYTE *mNativeRPSIBitString {}; + size_t mNativeRPSIBitStringSizeInBits {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::FIR + #pragma mark + + struct CodecControlCommon + { + DWORD ssrc() const {return mSSRC;} + BYTE seqNr() const {return mSeqNr;} + DWORD reserved() const {return mReserved;} + + public: + DWORD mSSRC {}; + BYTE mSeqNr {}; + DWORD mReserved {}; + DWORD mControlSpecific {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::FIR + #pragma mark + + struct FIR : public CodecControlCommon + { + // http://tools.ietf.org/html/rfc5104#section-4.3.1.1 + + static const BYTE kFmt {4}; + + public: + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::TSTR + #pragma mark + + struct TSTR : public CodecControlCommon + { + // http://tools.ietf.org/html/rfc5104#section-4.3.2.1 + + static const BYTE kFmt {5}; + + BYTE index() const {return static_cast(mControlSpecific);} + + public: + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::TSTN + #pragma mark + + struct TSTN : public CodecControlCommon + { + // http://tools.ietf.org/html/rfc5104#section-4.3.3.1 + + static const BYTE kFmt {6}; + + BYTE index() const {return static_cast(mControlSpecific);} + + public: + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::VBCM + #pragma mark + + struct VBCM : public CodecControlCommon + { + // http://tools.ietf.org/html/rfc5104#section-4.3.4.1 + + static const BYTE kFmt {7}; + + BYTE zeroBit() const; + BYTE payloadType() const; + + const BYTE *vbcmOctetString() const {return mVBCMOctetString;} + size_t vbcmOctetStringSize() const; + + public: + const BYTE *mVBCMOctetString {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::AFB + #pragma mark + + struct AFB + { + // https://tools.ietf.org/html/rfc4585#section-6.4 + + static const BYTE kFmt {15}; + + const BYTE *data() const {return mData;} + size_t dataSize() const {return mDataSize;} + + public: + const BYTE *mData {}; + size_t mDataSize {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::REMB + #pragma mark + + struct REMB + { + // https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03#section-2.2 + + static const BYTE kFmt {15}; + + size_t numSSRC() const {return static_cast(mNumSSRC);} + BYTE brExp() const {return mBRExp;} + DWORD brMantissa() const {return mBRMantissa;} + + DWORD ssrcAtIndex(size_t index) const; + + public: + BYTE mNumSSRC {}; + BYTE mBRExp {}; + DWORD mBRMantissa {}; + DWORD *mSSRCs {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage (public) + #pragma mark + + static const BYTE kPayloadType {206}; + + PayloadSpecificFeedbackMessage *nextPayloadSpecificFeedbackMessage() const {return mNextPayloadSpecificFeedbackMessage;} + + size_t sliCount() const {return mSLICount;} + size_t firCount() const {return mFIRCount;} + size_t tstrCount() const {return mTSTRCount;} + size_t tstnCount() const {return mTSTNCount;} + size_t vbcmCount() const {return mVBCMCount;} + + PLI *pli() const; + SLI *sliAtIndex(size_t index) const; + RPSI *rpsi() const; + FIR *firAtIndex(size_t index) const; + TSTR *tstrAtIndex(size_t index) const; + TSTN *tstnAtIndex(size_t index) const; + VBCM *vbcmAtIndex(size_t index) const; + AFB *afb() const; + REMB *remb() const; + PayloadSpecificFeedbackMessage *unknown() const {return mUnknown;} + + public: + PayloadSpecificFeedbackMessage *mNextPayloadSpecificFeedbackMessage {}; + + PLI mPLI {}; + size_t mSLICount {}; + SLI *mFirstSLI {}; + RPSI mRPSI {}; + size_t mFIRCount {}; + FIR *mFirstFIR {}; + size_t mTSTRCount {}; + TSTR *mFirstTSTR {}; + size_t mTSTNCount {}; + TSTN *mFirstTSTN {}; + size_t mVBCMCount {}; + VBCM *mFirstVBCM {}; + AFB mAFB {}; + bool mHasREMB {false}; + REMB mREMB {}; + + PayloadSpecificFeedbackMessage *mUnknown {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR + #pragma mark + + struct XR : public Report + { + // https://tools.ietf.org/html/rfc3611#section-2 + // https://tools.ietf.org/html/rfc3611#section-3 + + typedef WORD RLEChunk; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::ReportBlock + #pragma mark + + struct ReportBlock + { + ReportBlock *next() const {return mNext;} + + BYTE blockType() const {return mBlockType;} + BYTE typeSpecific() const {return mTypeSpecific;} + + const BYTE *typeSpecificContents() const {return mTypeSpecificContents;} + size_t typeSpecificContentSize() const {return mTypeSpecificContentSize;} + + static const char *blockTypeToString(BYTE blockType); + const char *blockTypeToString() const {return blockTypeToString(mBlockType);} + + public: + ReportBlock *mNext {}; + + BYTE mBlockType {}; + BYTE mTypeSpecific {}; + + const BYTE *mTypeSpecificContents {}; + size_t mTypeSpecificContentSize {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::ReportBlockRange + #pragma mark + + struct ReportBlockRange : public ReportBlock + { + BYTE reserved() const; + BYTE thinning() const; + + DWORD ssrcOfSource() const {return mSSRCOfSource;} + WORD beginSeq() const {return mBeginSeq;} + WORD endSeq() const {return mEndSeq;} + + public: + DWORD mSSRCOfSource {}; + WORD mBeginSeq {}; + WORD mEndSeq {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::RLEReportBlock + #pragma mark + + struct RLEReportBlock : public ReportBlockRange + { + size_t chunkCount() const {return mChunkCount;} + RLEChunk chunkAtIndex(size_t index) const; + + public: + size_t mChunkCount {}; + RLEChunk *mChunks {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::LossRLEReportBlock + #pragma mark + + struct LossRLEReportBlock : public RLEReportBlock + { + // https://tools.ietf.org/html/rfc3611#section-4.1 + + static const BYTE kBlockType {1}; + + LossRLEReportBlock *nextLossRLE() const {return mNextLossRLE;} + + public: + LossRLEReportBlock *mNextLossRLE {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::DuplicateRLEReportBlock + #pragma mark + + struct DuplicateRLEReportBlock : public RLEReportBlock + { + // https://tools.ietf.org/html/rfc3611#section-4.2 + + static const BYTE kBlockType {2}; + + DuplicateRLEReportBlock *nextDuplicateRLE() const {return mNextDuplicateRLE;} + + public: + DuplicateRLEReportBlock *mNextDuplicateRLE {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::PacketReceiptTimesReportBlock + #pragma mark + + struct PacketReceiptTimesReportBlock : public ReportBlockRange + { + // https://tools.ietf.org/html/rfc3611#section-4.3 + + static const BYTE kBlockType {3}; + + PacketReceiptTimesReportBlock *nextPacketReceiptTimesReportBlock() const {return mNextPacketReceiptTimesReportBlock;} + + size_t receiptTimeCount() const {return mReceiptTimeCount;} + DWORD receiptTimeAtIndex(size_t index) const; + + public: + PacketReceiptTimesReportBlock *mNextPacketReceiptTimesReportBlock {}; + + size_t mReceiptTimeCount {}; + DWORD *mReceiptTimes {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::ReceiverReferenceTimeReportBlock + #pragma mark + + struct ReceiverReferenceTimeReportBlock : public ReportBlock + { + // https://tools.ietf.org/html/rfc3611#section-4.4 + + static const BYTE kBlockType {4}; + + ReceiverReferenceTimeReportBlock *nextReceiverReferenceTimeReportBlock() const {return mNextReceiverReferenceTimeReportBlock;} + + DWORD ntpTimestampMS() const {return mNTPTimestampMS;} + DWORD ntpTimestampLS() const {return mNTPTimestampLS;} + Time ntpTimestamp() const; + + public: + ReceiverReferenceTimeReportBlock *mNextReceiverReferenceTimeReportBlock {}; + + DWORD mNTPTimestampMS {}; + DWORD mNTPTimestampLS {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::DLRRReportBlock + #pragma mark + + struct DLRRReportBlock : public ReportBlock + { + // https://tools.ietf.org/html/rfc3611#section-4.5 + + static const BYTE kBlockType {5}; + + struct SubBlock + { + DWORD ssrc() const {return mSSRC;} + DWORD lrr() const {return mLRR;} + DWORD dlrr() const {return mDLRR;} + + DWORD mSSRC {}; + DWORD mLRR {}; + DWORD mDLRR {}; + }; + + DLRRReportBlock *nextDLRRReportBlock() const {return mNextDLRRReportBlock;} + + size_t subBlockCount() const {return mSubBlockCount;} + SubBlock *subBlockAtIndex(size_t index) const; + + public: + DLRRReportBlock *mNextDLRRReportBlock {}; + + size_t mSubBlockCount {}; + SubBlock *mSubBlocks {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::StatisticsSummaryReportBlock + #pragma mark + + struct StatisticsSummaryReportBlock : public ReportBlockRange + { + // https://tools.ietf.org/html/rfc3611#section-4.6 + + static const BYTE kBlockType {6}; + + StatisticsSummaryReportBlock *nextStatisticsSummaryReportBlock() const {return mNextStatisticsSummaryReportBlock;} + + bool lossReportFlag() const; + bool duplicateReportFlag() const; + bool jitterFlag() const; + bool ttlFlag() const; + bool hopLimitFlag() const; + + DWORD lostPackets() const {return mLostPackets;} + DWORD dupPackets() const {return mDupPackets;} + + DWORD minJitter() const {return mMinJitter;} + DWORD maxJitter() const {return mMaxJitter;} + DWORD meanJitter() const {return mMeanJitter;} + DWORD devJitter() const {return mDevJitter;} + + BYTE minTTL() const {return mMinTTLOrHL;} + BYTE maxTTL() const {return mMaxTTLOrHL;} + BYTE meanTTL() const {return mMeanTTLOrHL;} + BYTE devTTL() const {return mDevTTLOrHL;} + + BYTE minHopLimit() const {return mMinTTLOrHL;} + BYTE maxHopLimit() const {return mMaxTTLOrHL;} + BYTE meanHopLimit() const {return mMeanTTLOrHL;} + BYTE devHopLimit() const {return mDevTTLOrHL;} + + public: + StatisticsSummaryReportBlock *mNextStatisticsSummaryReportBlock {}; + + DWORD mLostPackets {}; + DWORD mDupPackets {}; + DWORD mMinJitter {}; + DWORD mMaxJitter {}; + DWORD mMeanJitter {}; + DWORD mDevJitter {}; + + BYTE mMinTTLOrHL {}; + BYTE mMaxTTLOrHL {}; + BYTE mMeanTTLOrHL {}; + BYTE mDevTTLOrHL {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::VoIPMetricsReportBlock + #pragma mark + + struct VoIPMetricsReportBlock : public ReportBlock + { + // https://tools.ietf.org/html/rfc3611#section-4.7 + + static const BYTE kBlockType {7}; + + VoIPMetricsReportBlock *nextVoIPMetricsReportBlock() const {return mNextVoIPMetricsReportBlock;} + + DWORD ssrcOfSource() const {return mSSRCOfSource;} + + BYTE lossRate() const {return mLossRate;} + BYTE discardRate() const {return mDiscardRate;} + BYTE burstDensity() const {return mBurstDensity;} + BYTE gapDensity() const {return mGapDensity;} + + WORD burstDuration() const {return mBurstDuration;} + WORD gapDuration() const {return mGapDuration;} + + WORD roundTripDelay() const {return mRoundTripDelay;} + WORD endSystemDelay() const {return mEndSystemDelay;} + + BYTE signalLevel() const {return mSignalLevel;} + BYTE noiseLevel() const {return mNoiseLevel;} + BYTE rerl() const {return mRERL;} + BYTE Gmin() const {return mGmin;} + + BYTE rFactor() const {return mRFactor;} + BYTE extRFactor() const {return mExtRFactor;} + BYTE mosLQ() const {return mMOSLQ;} + BYTE mosCQ() const {return mMOSCQ;} + + BYTE rxConfig() const {return mRXConfig;} + BYTE plc() const; + BYTE jba() const; + BYTE jbRate() const; + + WORD jbNominal() const {return mJBNominal;} + WORD jbMaximum() const {return mJBMaximum;} + WORD jbAbsMax() const {return mJBAbsMax;} + + public: + VoIPMetricsReportBlock *mNextVoIPMetricsReportBlock {}; + + DWORD mSSRCOfSource {}; + + BYTE mLossRate {}; + BYTE mDiscardRate {}; + BYTE mBurstDensity {}; + BYTE mGapDensity {}; + + WORD mBurstDuration {}; + WORD mGapDuration {}; + + WORD mRoundTripDelay {}; + WORD mEndSystemDelay {}; + + BYTE mSignalLevel {}; + BYTE mNoiseLevel {}; + BYTE mRERL {}; + BYTE mGmin {}; + + BYTE mRFactor {}; + BYTE mExtRFactor {}; + BYTE mMOSLQ {}; + BYTE mMOSCQ {}; + + BYTE mRXConfig {}; + BYTE mReservedVoIP {}; + + WORD mJBNominal {}; + WORD mJBMaximum {}; + WORD mJBAbsMax {}; + }; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::UnknownReportBlock + #pragma mark + + struct UnknownReportBlock : public ReportBlock + { + UnknownReportBlock *nextUnknownReportBlock() const {return mNextUnknownReportBlock;} + + public: + UnknownReportBlock *mNextUnknownReportBlock {}; + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::RunLength + #pragma mark + + struct RunLength + { + // https://tools.ietf.org/html/rfc3611#section-4.1.1 + + RunLength(RLEChunk chunk); + + BYTE runType() const {return mRunType;} + size_t runLength() const {return static_cast(mRunLength);} + + public: + BYTE mRunType {}; // Zero indicates a run of 0s. One indicates a run of 1s. + WORD mRunLength {}; // A value between 1 and 16,383. + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::BitVector + #pragma mark + + struct BitVector + { + // https://tools.ietf.org/html/rfc3611#section-4.1.2 + + BitVector(RLEChunk chunk); + + BYTE bitAtIndex(size_t index) const; // Zero indicates loss. + WORD bitVector() const { return mBitVector; } + + public: + WORD mBitVector {}; + }; + + //------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR + #pragma mark + + static const BYTE kPayloadType {207}; + + XR *nextXR() const {return mNextXR;} + + BYTE reserved() const {return mReportSpecific;} + + DWORD ssrc() const {return mSSRC;} + + ReportBlock *firstReportBlock() const {return mFirstReportBlock;} + + LossRLEReportBlock *firstLossRLEReportBlock() const {return mFirstLossRLEReportBlock;} + DuplicateRLEReportBlock *firstDuplicateRLEReportBlock() const {return mFirstDuplicateRLEReportBlock;} + PacketReceiptTimesReportBlock *firstPacketReceiptTimesReportBlock() const {return mFirstPacketReceiptTimesReportBlock;} + ReceiverReferenceTimeReportBlock *firstReceiverReferenceTimeReportBlock() const {return mFirstReceiverReferenceTimeReportBlock;} + DLRRReportBlock *firstDLRRReportBlock() const {return mFirstDLRRReportBlock;} + StatisticsSummaryReportBlock *firstStatisticsSummaryReportBlock() const {return mFirstStatisticsSummaryReportBlock;} + VoIPMetricsReportBlock *firstVoIPMetricsReportBlock() const {return mFirstVoIPMetricsReportBlock;} + UnknownReportBlock *firstUnknownReportBlock() const {return mFirstUnknownReportBlock;} + + size_t reportBlockCount() const {return mReportBlockCount;} + + size_t lossRLEReportBlockCount() const {return mLossRLEReportBlockCount;} + size_t duplicateRLEReportBlockCount() const {return mDuplicateRLEReportBlockCount;} + size_t packetReceiptTimesReportBlockCount() const {return mPacketReceiptTimesReportBlockCount;} + size_t receiverReferenceTimeReportBlockCount() const {return mReceiverReferenceTimeReportBlockCount;} + size_t dlrrReportBlockCount() const {return mDLRRReportBlockCount;} + size_t statisticsSummaryReportBlockCount() const {return mStatisticsSummaryReportBlockCount;} + size_t voIPMetricsReportBlockCount() const {return mVoIPMetricsReportBlockCount;} + size_t unknownReportBlockCount() const {return mUnknownReportBlockCount;} + + LossRLEReportBlock *lossRLEReportBlockAtIndex(size_t index) const; + DuplicateRLEReportBlock *duplicateRLEReportBlockAtIndex(size_t index) const; + PacketReceiptTimesReportBlock *packetReceiptTimesReportBlockAtIndex(size_t index) const; + ReceiverReferenceTimeReportBlock *receiverReferenceTimeReportBlockAtIndex(size_t index) const; + DLRRReportBlock *dlrrReportBlockAtIndex(size_t index) const; + StatisticsSummaryReportBlock *statisticsSummaryReportBlockAtIndex(size_t index) const; + VoIPMetricsReportBlock *voIPMetricsReportBlockAtIndex(size_t index) const; + UnknownReportBlock *unknownReportBlockAtIndex(size_t index) const; + + static bool isRunLengthChunk(RLEChunk chunk); + static bool isBitVectorChunk(RLEChunk chunk); + + static RunLength runLength(RLEChunk chunk) {return RunLength(chunk);} + static BitVector bitVector(RLEChunk chunk) {return BitVector(chunk);} + + public: + XR *mNextXR {}; + + DWORD mSSRC {}; + + size_t mReportBlockCount {}; + + size_t mLossRLEReportBlockCount {}; + size_t mDuplicateRLEReportBlockCount {}; + size_t mPacketReceiptTimesReportBlockCount {}; + size_t mReceiverReferenceTimeReportBlockCount {}; + size_t mDLRRReportBlockCount {}; + size_t mStatisticsSummaryReportBlockCount {}; + size_t mVoIPMetricsReportBlockCount {}; + size_t mUnknownReportBlockCount {}; + + ReportBlock *mFirstReportBlock {}; + + LossRLEReportBlock *mFirstLossRLEReportBlock {}; + DuplicateRLEReportBlock *mFirstDuplicateRLEReportBlock {}; + PacketReceiptTimesReportBlock *mFirstPacketReceiptTimesReportBlock {}; + ReceiverReferenceTimeReportBlock *mFirstReceiverReferenceTimeReportBlock {}; + DLRRReportBlock *mFirstDLRRReportBlock {}; + StatisticsSummaryReportBlock *mFirstStatisticsSummaryReportBlock {}; + VoIPMetricsReportBlock *mFirstVoIPMetricsReportBlock {}; + UnknownReportBlock *mFirstUnknownReportBlock {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::UnknownReport + #pragma mark + + struct UnknownReport : public Report + { + UnknownReport *nextUnknown() const {return mNextUnknown;} + + public: + UnknownReport *mNextUnknown {}; + }; + + public: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark (public) + #pragma mark + + RTCPPacket( + const make_private &, + MediaChannelID mediaChannelID + ); + ~RTCPPacket(); + + static RTCPPacketPtr create( + const BYTE *buffer, + size_t bufferLengthInBytes, + MediaChannelID mediaChannelID = 0 + ); + static RTCPPacketPtr create( + const SecureByteBlock &buffer, + MediaChannelID mediaChannelID = 0 + ); + static RTCPPacketPtr create( + SecureByteBlockPtr buffer, + MediaChannelID mediaChannelID = 0 + ); // NOTE: ownership of buffer is taken / assumed + static RTCPPacketPtr create( + const Report *first, + MediaChannelID mediaChannelID = 0 + ); + static SecureByteBlockPtr generateFrom(const Report *first); + + const BYTE *ptr() const; + size_t size() const; + SecureByteBlockPtr buffer() const; + + Report *first() const {return mFirst;} + + SenderReport *firstSenderReport() const {return mFirstSenderReport;} + ReceiverReport *firstReceiverReport() const {return mFirstReceiverReport;} + SDES *firstSDES() const {return mFirstSDES;} + Bye *firstBye() const {return mFirstBye;} + App *firstApp() const {return mFirstApp;} + TransportLayerFeedbackMessage *firstTransportLayerFeedbackMessage() const {return mFirstTransportLayerFeedbackMessage;} + PayloadSpecificFeedbackMessage *firstPayloadSpecificFeedbackMessage() const {return mFirstPayloadSpecificFeedbackMessage;} + XR *firstXR() const {return mFirstXR;} + UnknownReport *firstUnknownReport() const {return mFirstUnknownReport;} + + size_t count() const {return mCount;} + + size_t senderReportCount() const {return mSenderReportCount;} + size_t receiverReportCount() const {return mReceiverReportCount;} + size_t sdesCount() const {return mSDESCount;} + size_t byeCount() const {return mByeCount;} + size_t appCount() const {return mAppCount;} + size_t transportLayerFeedbackMessageCount() const {return mTransportLayerFeedbackMessageCount;} + size_t payloadSpecificFeedbackMessage() const {return mPayloadSpecificFeedbackMessageCount;} + size_t xrCount() const {return mXRCount;} + size_t unknownReportCount() const {return mUnknownReportCount;} + + SenderReport *senderReportAtIndex(size_t index) const; + ReceiverReport *receiverReportAtIndex(size_t index) const; + SDES *sdesAtIndex(size_t index) const; + Bye *byeAtIndex(size_t index) const; + App *appAtIndex(size_t index) const; + TransportLayerFeedbackMessage *transportLayerFeedbackReportAtIndex(size_t index) const; + PayloadSpecificFeedbackMessage *payloadSpecificFeedbackReportAtIndex(size_t index) const; + XR *xrAtIndex(size_t index) const; + UnknownReport *unknownAtIndex(size_t index) const; + + void trace(const char *message = NULL) const; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark (internal) + #pragma mark + + bool parse(); + + bool getAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, BYTE pt, const BYTE *contents, size_t contentSize); + bool getSenderReportAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + bool getReceiverReportAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + bool getSDESAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + bool getByeAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + bool getAppAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + bool getTransportLayerFeedbackMessageAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + bool getXRAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + bool getUnknownReportAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); + + bool getTransportLayerFeedbackMessageGenericNACKAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getTransportLayerFeedbackMessageTMMBRAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getTransportLayerFeedbackMessageTMMBNAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + + bool getPayloadSpecificFeedbackMessagePLIAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageSLIAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageRPSIAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageFIRAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageTSTRAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageTSTNAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageVBCMAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageAFBAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + bool getPayloadSpecificFeedbackMessageREMBAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); + + bool getXRLossRLEReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); + bool getXRDuplicateRLEReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); + bool getXRPacketReceiptTimesReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); + bool getXRReceiverReferenceTimeReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); + bool getXRDLRRReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); + bool getXRStatisticsSummaryReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); + bool getXRVoIPMetricsReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); + bool getXRUnknownReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); + + bool parse(Report * &ioLastReport, BYTE version, BYTE padding, BYTE reportSpecific, BYTE pt, const BYTE *contents, size_t contentSize); + void fill(Report *report, BYTE version, BYTE padding, BYTE reportSpecific, BYTE pt, const BYTE *contents, size_t contentSize); + + bool parseCommon( + SenderReceiverCommonReport *report, + size_t detailedHeaderSize + ); + bool parse(SenderReport *report); + bool parse(ReceiverReport *report); + bool parse(SDES *report); + bool parse(Bye *report); + bool parse(App *report); + bool parse(TransportLayerFeedbackMessage *report); + bool parse(PayloadSpecificFeedbackMessage *report); + bool parse(XR *report); + bool parse(UnknownReport *report); + + void fill(FeedbackMessage *report, const BYTE *contents, size_t contentSize); + void fill(XR *report, XR::ReportBlock *reportBlock, XR::ReportBlock * &ioPreviousReportBlock, BYTE blockType, BYTE typeSpecific, const BYTE *contents, size_t contentSize); + + bool parseGenericNACK(TransportLayerFeedbackMessage *report); + void fillTMMBRCommon(TransportLayerFeedbackMessage *report, TransportLayerFeedbackMessage::TMMBRCommon *common, const BYTE *pos); + bool parseTMMBR(TransportLayerFeedbackMessage *report); + bool parseTMMBN(TransportLayerFeedbackMessage *report); + bool parseUnknown(TransportLayerFeedbackMessage *report); + + //CodecControlCommon + bool parsePLI(PayloadSpecificFeedbackMessage *report); + bool parseSLI(PayloadSpecificFeedbackMessage *report); + bool parseRPSI(PayloadSpecificFeedbackMessage *report); + void fillCodecControlCommon(PayloadSpecificFeedbackMessage *report, PayloadSpecificFeedbackMessage::CodecControlCommon *common, const BYTE *pos); + bool parseFIR(PayloadSpecificFeedbackMessage *report); + bool parseTSTR(PayloadSpecificFeedbackMessage *report); + bool parseTSTN(PayloadSpecificFeedbackMessage *report); + bool parseVBCM(PayloadSpecificFeedbackMessage *report); + bool parseAFB(PayloadSpecificFeedbackMessage *report); + bool parseREMB(PayloadSpecificFeedbackMessage *report); + bool parseUnknown(PayloadSpecificFeedbackMessage *report); + + bool parseCommonRange(XR *xr, XR::ReportBlockRange *reportBlock); + bool parseCommonRLE(XR *xr, XR::RLEReportBlock *reportBlock); + bool parse(XR *xr, XR::LossRLEReportBlock *reportBlock); + bool parse(XR *xr, XR::DuplicateRLEReportBlock *reportBlock); + bool parse(XR *xr, XR::PacketReceiptTimesReportBlock *reportBlock); + bool parse(XR *xr, XR::ReceiverReferenceTimeReportBlock *reportBlock); + bool parse(XR *xr, XR::DLRRReportBlock *reportBlock); + bool parse(XR *xr, XR::StatisticsSummaryReportBlock *reportBlock); + bool parse(XR *xr, XR::VoIPMetricsReportBlock *reportBlock); + bool parse(XR *xr, XR::UnknownReportBlock *reportBlock); + + void *allocateBuffer(size_t size); + + static size_t getPacketSize(const Report *first); + static void writePacket(const Report *first, BYTE * &ioPos, size_t &ioRemaining); + + public: + SecureByteBlockPtr mBuffer; + SecureByteBlockPtr mAllocationBuffer; + + MediaChannelID mMediaChannelID {}; + + BYTE *mAllocationPos {}; + size_t mAllocationSize {}; + + Report *mFirst {}; + + size_t mCount {}; + + size_t mSenderReportCount {}; + size_t mReceiverReportCount {}; + size_t mSDESCount {}; + size_t mByeCount {}; + size_t mAppCount {}; + size_t mTransportLayerFeedbackMessageCount {}; + size_t mPayloadSpecificFeedbackMessageCount {}; + size_t mXRCount {}; + size_t mUnknownReportCount {}; + + SenderReport *mFirstSenderReport {}; + ReceiverReport *mFirstReceiverReport {}; + SDES *mFirstSDES {}; + Bye *mFirstBye {}; + App *mFirstApp {}; + TransportLayerFeedbackMessage *mFirstTransportLayerFeedbackMessage {}; + PayloadSpecificFeedbackMessage *mFirstPayloadSpecificFeedbackMessage {}; + XR *mFirstXR {}; + UnknownReport *mFirstUnknownReport {}; + }; + +} // namespace ortc diff --git a/ortc/RTPPacket.h b/ortc/RTPPacket.h new file mode 100644 index 00000000..15fee285 --- /dev/null +++ b/ortc/RTPPacket.h @@ -0,0 +1,439 @@ +/* + + Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include +#include + +namespace ortc +{ + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket + #pragma mark + + class RTPPacket + { + protected: + struct make_private {}; + + public: + struct HeaderExtension; + struct VideoOrientationHeaderExtension; + struct VideoOrientation6HeaderExtension; + typedef IMediaStreamTrackTypes::MediaChannelID MediaChannelID; + + public: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::CreationParams + #pragma mark + + struct CreationParams + { + MediaChannelID mMediaChannelID {}; + BYTE mVersion {2}; + size_t mPadding {}; + bool mM {}; + BYTE mPT {}; + WORD mSequenceNumber {}; + DWORD mTimestamp {}; + DWORD mSSRC {}; + + size_t mCC {}; + DWORD *mCSRCList {}; + + const BYTE *mPayload {}; + size_t mPayloadSize {}; + + HeaderExtension *mFirstHeaderExtension {}; + BYTE mHeaderExtensionAppBits {}; + + size_t mHeaderExtensionPrepaddedSize {}; + const BYTE *mHeaderExtensionStopParsePos {}; + size_t mHeaderExtensionStopParseSize {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::Extension + #pragma mark + + struct HeaderExtension + { + // see https://tools.ietf.org/html/rfc5285 + + BYTE mID {}; + + const BYTE *mData {}; + size_t mDataSizeInBytes {}; + size_t mPostPaddingSize {}; + + HeaderExtension *mNext {}; + + virtual void trace(const char *message) const; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::ClientToMixerExtension + #pragma mark + + struct ClientToMixerExtension : public HeaderExtension + { + // see https://tools.ietf.org/html/rfc6464 + + ClientToMixerExtension(const HeaderExtension &header); + ClientToMixerExtension( + BYTE id, + bool voiceActivity, + BYTE level + ); + + bool voiceActivity() const; + BYTE level() const; + + virtual void trace(const char *message) const override; + + public: + BYTE mLevelBuffer {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::MixerToClientExtension + #pragma mark + + struct MixerToClientExtension : public HeaderExtension + { + // see https://tools.ietf.org/html/rfc6464 + + static const size_t kMaxLevelCount {0xF}; + + MixerToClientExtension(const HeaderExtension &header); + MixerToClientExtension( + BYTE id, + BYTE *levels, + size_t count + ); + + size_t levelsCount() const; + + BYTE unusedBit(size_t index) const; + BYTE level(size_t index) const; + + virtual void trace(const char *message) const override; + + public: + BYTE mLevelBuffer[kMaxLevelCount] {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::StringHeaderExtension + #pragma mark + + struct StringHeaderExtension : public HeaderExtension + { + static const size_t kMaxStringLength {0xFF}; + + StringHeaderExtension(const HeaderExtension &header); + StringHeaderExtension( + BYTE id, + const char *str + ); + + const char *str() const; + + virtual void trace(const char *message) const override; + + public: + BYTE mStringBuffer[kMaxStringLength+sizeof(char)] {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::NumberHeaderExtension + #pragma mark + + struct NumberHeaderExtension : public HeaderExtension + { + static const size_t kMaxNumberByteLength {0xFF}; + + NumberHeaderExtension(const HeaderExtension &header); + NumberHeaderExtension( + BYTE id, + const BYTE *number, + size_t lengthInBytes + ); + NumberHeaderExtension( + BYTE id, + const char *valueInBase10 + ); + + const BYTE *number() const; + size_t length() const; + + String str() const; + + virtual void trace(const char *message) const override; + + public: + BYTE mNumberBuffer[kMaxNumberByteLength] {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::MidHeaderExtension + #pragma mark + + struct MidHeaderExtension : public StringHeaderExtension + { + // https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-23#section-14.3 + + static const size_t kMaxMidLength = kMaxStringLength; + + MidHeaderExtension(const HeaderExtension &header) : StringHeaderExtension(header) {} + MidHeaderExtension( + BYTE id, + const char *mid + ) : StringHeaderExtension(id, mid) {} + + const char *mid() const {return str();} + + virtual void trace(const char *message) const override; + + public: + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::RidHeaderExtension + #pragma mark + + struct RidHeaderExtension : public StringHeaderExtension + { + // https://tools.ietf.org/html/draft-pthatcher-mmusic-rid-00 + + static const size_t kMaxMidLength = kMaxStringLength; + + RidHeaderExtension(const HeaderExtension &header) : StringHeaderExtension(header) {} + RidHeaderExtension( + BYTE id, + const char *rid + ) : StringHeaderExtension(id, rid) {} + + const char *rid() const {return str();} + + virtual void trace(const char *message) const override; + + public: + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::VideoOrientationHeaderExtension + #pragma mark + + struct VideoOrientationHeaderExtension : public HeaderExtension + { + struct Clockwise {}; + struct CounterClockwise {}; + + VideoOrientationHeaderExtension(const HeaderExtension &header); + VideoOrientationHeaderExtension(const VideoOrientation6HeaderExtension &); + VideoOrientationHeaderExtension( + const Clockwise &, + bool frontFacingCamera, // true = front facing, false = backfacing + bool flip, // horizontal left-right flip (mirro) + UINT orientation + ); + VideoOrientationHeaderExtension( + const CounterClockwise &, + bool frontFacingCamera, // true = front facing, false = backfacing + bool flip, // horizontal left-right flip (mirro) + UINT orientation + ); + + bool frontFacing() const; + bool backFacing() const; + bool flip() const; + virtual UINT degreesClockwise() const; + virtual UINT degreesCounterClockwise() const; + + virtual void trace(const char *message) const override; + + public: + BYTE mEncoded[1] {}; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::VideoOrientationHeaderExtension + #pragma mark + + struct VideoOrientation6HeaderExtension : public VideoOrientationHeaderExtension + { + VideoOrientation6HeaderExtension(const HeaderExtension &header); + VideoOrientation6HeaderExtension( + const Clockwise &, + bool frontFacingCamera, // true = front facing, false = backfacing + bool flip, // horizontal left-right flip (mirro) + UINT orientation + ); + VideoOrientation6HeaderExtension( + const CounterClockwise &, + bool frontFacingCamera, // true = front facing, false = backfacing + bool flip, // horizontal left-right flip (mirro) + UINT orientation + ); + + virtual UINT degreesClockwise() const override; + virtual UINT degreesCounterClockwise() const override; + + public: + }; + + public: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark (public) + #pragma mark + + RTPPacket( + const make_private &, + MediaChannelID mediaChannelID + ); + ~RTPPacket(); + + static RTPPacketPtr create( + const RTPPacket &packet, + MediaChannelID mediaChannelID = 0 + ); + static RTPPacketPtr create(const CreationParams ¶ms); + static RTPPacketPtr create( + const BYTE *buffer, + size_t bufferLengthInBytes, + MediaChannelID mediaChannelID = 0 + ); + static RTPPacketPtr create( + const SecureByteBlock &buffer, + MediaChannelID mediaChannelID = 0 + ); + static RTPPacketPtr create( + SecureByteBlockPtr buffer, + MediaChannelID mediaChannelID = 0 + ); // NOTE: exclusive ownership of buffer is taken / assumed + + MediaChannelID mediaChannelID() const {return mMediaChannelID;} + + const BYTE *ptr() const; + size_t size() const; + SecureByteBlockPtr buffer() const; + + BYTE version() const {return mVersion;} + size_t padding() const {return mPadding;} + size_t cc() const {return static_cast(mCC);} + bool m() const {return mM;} + BYTE pt() const {return mPT;} + WORD sequenceNumber() const {return mSequenceNumber;} + DWORD timestamp() const {return mTimestamp;} + DWORD ssrc() const {return mSSRC;} + + size_t headerSize() {return mHeaderSize;} + size_t headerExtensionSize() {return mHeaderExtensionSize;} + size_t payloadSize() {return mPayloadSize;} + + DWORD getCSRC(size_t index) const; + const BYTE *payload() const; + size_t payloadSize() const {return mPayloadSize;} + + size_t totalHeaderExtensions() const {return mTotalHeaderExtensions;} + HeaderExtension *firstHeaderExtension() const {return mHeaderExtensions;} + HeaderExtension *getHeaderExtensionAtIndex(size_t index) const; + BYTE headerExtensionAppBits() const {return mHeaderExtensionAppBits;} + + size_t headerExtensionPrepaddedSize() const {return mHeaderExtensionPrepaddedSize;} + const BYTE *headerExtensionParseStopped() const {return mHeaderExtensionParseStoppedPos;} + size_t headerExtensionParseStoppedSize() const {return mHeaderExtensionParseStoppedSize;} + + void changeHeaderExtensions(HeaderExtension *firstExtension); + + void trace(const char *message = NULL) const; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark (internal) + #pragma mark + + bool parse(); + + void writeHeaderExtensions( + HeaderExtension *firstExtension, + bool twoByteHeader + ); + void generate(const RTPPacket ¶ms); + void generate(const CreationParams ¶ms); + + public: + SecureByteBlockPtr mBuffer; + + MediaChannelID mMediaChannelID {}; + + BYTE mVersion {}; + size_t mPadding {}; + BYTE mCC {}; + bool mM {}; + BYTE mPT {}; + WORD mSequenceNumber {}; + DWORD mTimestamp {}; + DWORD mSSRC {}; + + size_t mHeaderSize {}; + size_t mHeaderExtensionSize {}; + size_t mPayloadSize {}; + + size_t mTotalHeaderExtensions {}; + HeaderExtension *mHeaderExtensions {}; + BYTE mHeaderExtensionAppBits {}; + + size_t mHeaderExtensionPrepaddedSize {}; + const BYTE *mHeaderExtensionParseStoppedPos {}; + size_t mHeaderExtensionParseStoppedSize {}; + }; +} + diff --git a/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp b/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp index 8bf34d86..b5e0d3b7 100644 --- a/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp +++ b/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp @@ -325,7 +325,8 @@ namespace ortc AutoRecursiveLock lock(*this); auto result = getTrackByID(track->id()); if (nullptr != result) { - ZS_LOG_WARNING(Debug, log("already added track (not added again)") + IMediaStreamTrack::toDebug(track)); + IMediaStreamTrack::trace(track, "already added track (not added again)"); + ZS_LOG_WARNING(Debug, log("already added track (not added again)")); return; } mTracks.push_back(MediaStreamTrack::convert(track)); diff --git a/ortc/cpp/ortc.events.json b/ortc/cpp/ortc.events.json index 429ced3a..90633887 100644 --- a/ortc/cpp/ortc.events.json +++ b/ortc/cpp/ortc.events.json @@ -73,14 +73,23 @@ "ortc_ICETransportController.cpp", "ortc_ORTC.cpp", "ortc_RTPListener.cpp", - "ortc_RTPMediaEngine.cpp", + "ortc_MediaEngine.cpp", + "ortc_MediaDeviceCaptureAudio.cpp", + "ortc_MediaDeviceCaptureVideo.cpp", + "ortc_MediaDeviceRenderAudio.cpp", + "ortc_RTPEncoderAudio.cpp", + "ortc_RTPEncoderVideo.cpp", + "ortc_RTPDecoderAudio.cpp", + "ortc_RTPDecoderVideo.cpp", "ortc_RTPReceiver.cpp", "ortc_RTPReceiverChannel.cpp", "ortc_RTPSender.cpp", "ortc_RTPSenderChannel.cpp", "ortc_SCTPTransport.cpp", "ortc_SCTPTransportListener.cpp", - "ortc_SRTPTransport.cpp" + "ortc_SRTPTransport.cpp", + "ortc_RTPPacket.cpp", + "ortc_RTCPPacket.cpp" ] }, "channels": { @@ -136,6 +145,15 @@ { "name": "IceTransportController" }, + { + "name": "MediaEngine" + }, + { + "name": "RtpPacket" + }, + { + "name": "RtcpPacket" + }, { "name": "RtpListener" }, @@ -208,6 +226,9 @@ { "name": "Deliver" }, + { + "name": "Parse" + }, { "name": "Event" }, diff --git a/ortc/cpp/ortc_Constraints.cpp b/ortc/cpp/ortc_Constraints.cpp index 5b529de1..25736bcc 100644 --- a/ortc/cpp/ortc_Constraints.cpp +++ b/ortc/cpp/ortc_Constraints.cpp @@ -710,4 +710,44 @@ namespace ortc return hasher->finalizeAsString(); } + //--------------------------------------------------------------------------- + void IConstraints::ConstrainString::exact(StringList &values) const + { + if (mValue.hasValue()) { + if (mValue.value().mValue.hasValue()) { + values.push_back(mValue.value().mValue.value()); + return; + } + if (mValue.value().mValues.hasValue()) { + auto &source = mValue.value().mValues.value(); + values.insert(values.end(), source.begin(), source.end()); + return; + } + } + + if (!mParameters.hasValue()) return; + if (!mParameters.value().mExact.hasValue()) return; + if (mParameters.value().mExact.value().mValue.hasValue()) { + values.push_back(mValue.value().mValue.value()); + return; + } + if (!mParameters.value().mExact.value().mValues.hasValue()) return; + auto &source = mParameters.value().mExact.value().mValues.value(); + values.insert(values.end(), source.begin(), source.end()); + } + + //--------------------------------------------------------------------------- + void IConstraints::ConstrainString::ideal(StringList &values) const + { + if (!mParameters.hasValue()) return; + if (!mParameters.value().mIdeal.hasValue()) return; + if (mParameters.value().mIdeal.value().mValue.hasValue()) { + values.push_back(mValue.value().mValue.value()); + return; + } + if (!mParameters.value().mIdeal.value().mValues.hasValue()) return; + auto &source = mParameters.value().mIdeal.value().mValues.value(); + values.insert(values.end(), source.begin(), source.end()); + } + } diff --git a/ortc/cpp/ortc_MediaChannelTraceHelper.cpp b/ortc/cpp/ortc_MediaChannelTraceHelper.cpp new file mode 100644 index 00000000..2695ccce --- /dev/null +++ b/ortc/cpp/ortc_MediaChannelTraceHelper.cpp @@ -0,0 +1,197 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include + +#include +#include +#include + +#include + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediastreamtrack) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(MediaChannelTraceHelperDefaults); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark (helpers) + #pragma mark + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaChannelTraceHelperDefaults + #pragma mark + + class MediaChannelTraceHelperDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~MediaChannelTraceHelperDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static MediaChannelTraceHelperDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static MediaChannelTraceHelperDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + ISettings::setUInt(ORTC_SETTING_MEDIA_CHANNEL_TRACE_HELPER_USAGE_INACTIVITY_AGE_PURGE_TIME_IN_SECONDS, 30); + ISettings::setInt(ORTC_SETTING_MEDIA_CHANNEL_TRACE_HELPER_USAGE_INACTIVITY_AGE_CHECK_MODULAS_VALUE, 512); + } + }; + + //------------------------------------------------------------------------- + void installMediaChannelTraceHelperDefaults() + { + MediaChannelTraceHelperDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaChannelTraceHelper + #pragma mark + + //------------------------------------------------------------------------- + MediaChannelTraceHelper::MediaChannelTraceHelper(MediaChannelID mediaChannelID) : + SharedRecursiveLock(SharedRecursiveLock::create()), + selfChannelID_(mediaChannelID), + lastAgeCountTimeAt_(zsLib::now()), + agePurge_(SafeInt(ISettings::getUInt(ORTC_SETTING_MEDIA_CHANNEL_TRACE_HELPER_USAGE_INACTIVITY_AGE_PURGE_TIME_IN_SECONDS))), + ageCheck_(SafeInt(ISettings::getInt(ORTC_SETTING_MEDIA_CHANNEL_TRACE_HELPER_USAGE_INACTIVITY_AGE_CHECK_MODULAS_VALUE))) + { + ASSERT(ageCheck_ > 1); // assert value is set properly + if (ageCheck_ < 1) ageCheck_ = 1; + } + + //------------------------------------------------------------------------- + MediaChannelTraceHelper::ImmutableMediaChannelTracePtr MediaChannelTraceHelper::trace(ImmutableMediaChannelTracePtr sourceTrace) + { + ASSERT((bool)sourceTrace); + uintptr_t handle = reinterpret_cast(sourceTrace.get()); + + int checkCount = (++lastUsageCount_); + bool shouldCheck = (0 == (checkCount % ageCheck_)); + + { + AutoRecursiveLock lock(*this); + auto found = traceSources_.find(handle); + if (found != traceSources_.end()) { + auto &info = (*found).second; + info.lastUsageAt_ = checkCount; + if (shouldCheck) { + ImmutableMediaChannelTracePtr result = info.trace_; + doPurge(); + return result; + } + return info.trace_; + } + + TraceSourceInfo info; + info.lastUsageAt_ = checkCount; + info.trace_ = IMediaStreamTrackTypes::MediaChannelTrace::create(*sourceTrace, selfChannelID_); + traceSources_[handle] = info; + + if (shouldCheck) { + ImmutableMediaChannelTracePtr result = info.trace_; + doPurge(); + return result; + } + return info.trace_; + } + } + + //------------------------------------------------------------------------- + void MediaChannelTraceHelper::doPurge() + { + auto tick = zsLib::now(); + + if (lastAgeCountTimeAt_ + agePurge_ > tick) return; // not time to purge yet + + if (lastUsageCount_ < 0) lastUsageCount_ = 0; // count roll over prevention + + // setup values to check for next time + lastAgeCountTimeAt_ = tick; + int lastAgeCountValueAtTime = lastAgeCountValueAtTime_; + lastAgeCountValueAtTime_ = lastUsageCount_; + + for (auto iter_doNotUse = traceSources_.begin(); iter_doNotUse != traceSources_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto &info = (*current).second; + if (info.lastUsageAt_ > lastAgeCountValueAtTime) continue; + + traceSources_.erase(current); + } + } + + } // namespace internal +} // namespace ortc diff --git a/ortc/cpp/ortc_MediaDevice.cpp b/ortc/cpp/ortc_MediaDevice.cpp new file mode 100644 index 00000000..6a144fbe --- /dev/null +++ b/ortc/cpp/ortc_MediaDevice.cpp @@ -0,0 +1,364 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include + +//#include + +//#include +//#include +//#include +////#include +////#include +////#include +////#include +//#include +//#include +//#include +//#include +//#include +//#include +// +//#include +// +//#include +//#include +// +//#include +//#include +//#include +//#include +//#include +// +//#include +// +//#include + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark (helpers) + #pragma mark + + //------------------------------------------------------------------------- + IMediaStreamTrackTypes::SettingsPtr obtainBestMode( + const std::list &allConstraints, + const std::list &availableModes + ) + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::StringList, StringList); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraintsPtr, UseTrackConstraints); + ZS_DECLARE_TYPEDEF_PTR(std::list, UseTrackConstraintsList); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Settings, UseSettings); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ConstraintSet, UseConstraintSet); + + //----------------------------------------------------------------------- + struct ModeInfo + { + UseSettingsPtr settings_; + bool rejected{}; + size_t idealCount_{}; + + static bool containsString( + const StringList &strs, + const String &str + ) + { + for (auto iter = strs.begin(); iter != strs.end(); ++iter) { auto &value = (*iter); if (value == str) return true; } + return false; + } + + //--------------------------------------------------------------------- + bool innerProcessConstrain( + const IMediaStreamTrackTypes::ConstrainString &constrain, + const Optional &value + ) + { + StringList exacts; + StringList ideals; + constrain.ideal(ideals); + constrain.exact(exacts); + if (!value.hasValue()) { + return (exacts.size() < 1); + } + if (exacts.size() > 0) { + if (!containsString(exacts, value.value())) return false; + } + if (ideals.size() < 1) return true; + if (!containsString(ideals, value.value())) return true; + ++idealCount_; + return true; + } + + //--------------------------------------------------------------------- + bool processConstrain( + const IMediaStreamTrackTypes::ConstrainString &constrain, + const Optional &value + ) + { + if (!innerProcessConstrain(constrain, value)) { + rejected = true; + return false; + } + return true; + } + + //--------------------------------------------------------------------- + bool innerProcessConstrain( + const IMediaStreamTrackTypes::ConstrainDouble &constrain, + const Optional &value + ) + { + if (constrain.mValue.hasValue()) { + if (!value.hasValue()) return false; + return constrain.mValue.value() == value.value(); + } + if (!constrain.mRange.hasValue()) return true; + + auto &values = constrain.mRange.value(); + if (values.mMin.hasValue()) { + if (!value.hasValue()) return false; + if (value.value() < values.mMin.value()) return false; + } + if (values.mMax.hasValue()) { + if (!value.hasValue()) return false; + if (value.value() > values.mMax.value()) return false; + } + if (values.mExact.hasValue()) { + if (!value.hasValue()) return false; + if (value.value() != values.mExact.value()) return false; + } + if (!values.mIdeal.hasValue()) return true; + if (!value.hasValue()) return true; + if (values.mIdeal.value() != value.value()) return true; + ++idealCount_; + return true; + } + + //--------------------------------------------------------------------- + bool processConstrain( + const IMediaStreamTrackTypes::ConstrainDouble &constrain, + const Optional &value + ) + { + if (!innerProcessConstrain(constrain, value)) { + rejected = true; + return false; + } + return true; + } + + //--------------------------------------------------------------------- + bool innerProcessConstrain( + const IMediaStreamTrackTypes::ConstrainLong &constrain, + const Optional &value + ) + { + if (constrain.mValue.hasValue()) { + if (!value.hasValue()) return false; + return constrain.mValue.value() == value.value(); + } + if (!constrain.mRange.hasValue()) return true; + + auto &values = constrain.mRange.value(); + if (values.mMin.hasValue()) { + if (!value.hasValue()) return false; + if (value.value() < values.mMin.value()) return false; + } + if (values.mMax.hasValue()) { + if (!value.hasValue()) return false; + if (value.value() > values.mMax.value()) return false; + } + if (values.mExact.hasValue()) { + if (!value.hasValue()) return false; + if (value.value() != values.mExact.value()) return false; + } + if (!values.mIdeal.hasValue()) return true; + if (!value.hasValue()) return true; + if (values.mIdeal.value() != value.value()) return true; + ++idealCount_; + return true; + } + + //--------------------------------------------------------------------- + bool processConstrain( + const IMediaStreamTrackTypes::ConstrainLong &constrain, + const Optional &value + ) + { + if (!innerProcessConstrain(constrain, value)) { + rejected = true; + return false; + } + return true; + } + + + //--------------------------------------------------------------------- + bool innerProcessConstrain( + const IMediaStreamTrackTypes::ConstrainBoolean &constrain, + const Optional &value + ) + { + if (constrain.mValue.hasValue()) { + if (!value.hasValue()) return false; + return constrain.mValue.value() == value.value(); + } + if (!constrain.mParameters.hasValue()) return true; + + auto &values = constrain.mParameters.value(); + if (values.mExact.hasValue()) { + if (!value.hasValue()) return false; + if (value.value() != values.mExact.value()) return false; + } + if (!values.mIdeal.hasValue()) return true; + if (!value.hasValue()) return true; + if (values.mIdeal.value() != value.value()) return true; + ++idealCount_; + return true; + } + + //--------------------------------------------------------------------- + bool processConstrain( + const IMediaStreamTrackTypes::ConstrainBoolean &constrain, + const Optional &value + ) + { + if (!innerProcessConstrain(constrain, value)) { + rejected = true; + return false; + } + return true; + } + //--------------------------------------------------------------------- + bool checkConstrainSet(const UseConstraintSet &constrain) + { + auto &settings = (*settings_); + + if (!processConstrain(constrain.mWidth, settings.mWidth)) return false; + if (!processConstrain(constrain.mHeight, settings.mHeight)) return false; + if (!processConstrain(constrain.mAspectRatio, settings.mAspectRatio)) return false; + if (!processConstrain(constrain.mFrameRate, settings.mFrameRate)) return false; + if (!processConstrain(constrain.mFacingMode, settings.mFacingMode)) return false; + if (!processConstrain(constrain.mOrientation, settings.mOrientation)) return false; + if (!processConstrain(constrain.mVolume, settings.mVolume)) return false; + if (!processConstrain(constrain.mSampleRate, settings.mSampleRate)) return false; + if (!processConstrain(constrain.mSampleSize, settings.mSampleSize)) return false; + if (!processConstrain(constrain.mEchoCancellation, settings.mEchoCancellation)) return false; + if (!processConstrain(constrain.mLatency, settings.mLatency)) return false; + if (!processConstrain(constrain.mChannelCount, settings.mChannelCount)) return false; + if (!processConstrain(constrain.mDeviceID, settings.mDeviceID)) return false; + if (!processConstrain(constrain.mGroupID, settings.mGroupID)) return false; + if (!processConstrain(constrain.mEncodingFormat, settings.mEncodingFormat)) return false; + + return true; + } + }; + + ZS_DECLARE_TYPEDEF_PTR(std::list, ModeInfoList); + + ModeInfoList outputModes; + for (auto iter = availableModes.begin(); iter != availableModes.end(); ++iter) + { + ModeInfo info; + info.settings_ = (*iter); + outputModes.push_back(info); + } + + for (auto iter = allConstraints.begin(); iter != allConstraints.end(); ++iter) { + auto &constraints = *(*iter); + + for (auto iterMode = outputModes.begin(); iterMode != outputModes.end(); ++iterMode) { + auto &mode = (*iterMode); + if (mode.rejected) continue; + + if (!mode.checkConstrainSet(constraints)) continue; + + for (auto iterAdv = constraints.mAdvanced.begin(); iterAdv != constraints.mAdvanced.end(); ++iterAdv) { + auto &advancedConstraints = *(*iter); + if (!mode.checkConstrainSet(constraints)) break; + } + } + } + + UseSettingsPtr foundSettings; + size_t mostIdeal {}; + + for (auto iterMode = outputModes.begin(); iterMode != outputModes.end(); ++iterMode) { + auto &mode = (*iterMode); + if (mode.rejected) continue; + + if ((foundSettings) || + (mode.idealCount_ <= mostIdeal)) continue; + + foundSettings = mode.settings_; + mostIdeal = mode.idealCount_; + } + + return foundSettings; + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDevice + #pragma mark + + //------------------------------------------------------------------------- + const char *IMediaDevice::toString(States state) + { + switch (state) + { + case State_Pending: return "pending"; + case State_Active: return "active"; + case State_Reinitializing: return "reinitialzing"; + case State_ShuttingDown: return "shutting down"; + case State_Shutdown: return "shutdown"; + } + return "UNKNOWN"; + } + + } // internal namespace +} diff --git a/ortc/cpp/ortc_RTPSenderChannelMediaBase.cpp b/ortc/cpp/ortc_MediaDeviceCapture.cpp similarity index 52% rename from ortc/cpp/ortc_RTPSenderChannelMediaBase.cpp rename to ortc/cpp/ortc_MediaDeviceCapture.cpp index 53f16a86..f60b2bc0 100644 --- a/ortc/cpp/ortc_RTPSenderChannelMediaBase.cpp +++ b/ortc/cpp/ortc_MediaDeviceCapture.cpp @@ -29,42 +29,45 @@ */ -#include -#include -#include -#include -#include -#include -#include -#include - -//#include -//#include +#include + +#include + +//#include +//#include +//#include +////#include +////#include +////#include +////#include +//#include +//#include +//#include +//#include +//#include +//#include +// +//#include +// +//#include //#include // -//#include +//#include +//#include //#include //#include +//#include // //#include +// +//#include - -#ifdef _DEBUG -#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) -#else -#define ASSERT(x) -#endif //_DEBUG - - -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } namespace ortc { -// ZS_DECLARE_TYPEDEF_PTR(ortc::services::ISettings, UseSettings) -// ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHelper, UseServicesHelper) -// ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP) -// -// typedef ortc::services::Hasher SHA1Hasher; + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); namespace internal { @@ -76,56 +79,26 @@ namespace ortc #pragma mark (helpers) #pragma mark - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelMediaBaseForRTPSenderChannel - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr IRTPSenderChannelMediaBaseForRTPSenderChannel::toDebug(ForRTPSenderChannelPtr object) - { - if (!object) return ElementPtr(); - - { - auto pThis = RTPSenderChannelAudio::convert(object); - if (pThis) return pThis->toDebug(); - } - { - auto pThis = RTPSenderChannelVideo::convert(object); - if (pThis) return pThis->toDebug(); - } - - return ElementPtr(); - } //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark IRTPSenderChannelMediaBaseForMediaStreamTrack + #pragma mark IMediaDeviceCapture #pragma mark //------------------------------------------------------------------------- - ElementPtr IRTPSenderChannelMediaBaseForMediaStreamTrack::toDebug(ForMediaStreamTrackPtr object) + IMediaDeviceCapture::MediaDeviceCapturePromisePtr IMediaDeviceCapture::create( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) { - if (!object) return ElementPtr(); - - { - auto pThis = RTPSenderChannelAudio::convert(object); - if (pThis) return pThis->toDebug(); - } - { - auto pThis = RTPSenderChannelVideo::convert(object); - if (pThis) return pThis->toDebug(); - } - - return ElementPtr(); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceCapture, UseEngine); + return UseEngine::createMediaDeviceCapture(repaceExistingDeviceObjectID, kind, constraints, delegate); } } // internal namespace - } diff --git a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp new file mode 100644 index 00000000..a35c5890 --- /dev/null +++ b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp @@ -0,0 +1,1283 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +//#include +//#include +//#include +//#include +////#include +////#include +////#include +////#include +//#include +//#include +#include +#include +#include +#include + +#include +// +//#include +#include +// +#include +//#include +//#include +//#include +//#include +// +//#include +// +//#include + +#if 0 +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef WINRT +#include +#endif +#endif //0 + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(MediaDeviceCaptureAudioSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudioSettingsDefaults + #pragma mark + + class MediaDeviceCaptureAudioSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~MediaDeviceCaptureAudioSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static MediaDeviceCaptureAudioSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static MediaDeviceCaptureAudioSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + } + + }; + + //------------------------------------------------------------------------- + void installMediaDeviceCaptureAudioSettingsDefaults() + { + MediaDeviceCaptureAudioSettingsDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureAudioForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + IMediaDeviceCaptureAudioForMediaEngine::ForMediaEnginePtr IMediaDeviceCaptureAudioForMediaEngine::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + return internal::IMediaDeviceCaptureAudioFactory::singleton().create(mediaEngine, deviceID); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudio::MediaDeviceCaptureAudio( + const make_private &, + IMessageQueuePtr queue, + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + mediaEngine_(mediaEngine), + deviceID_(deviceID), + subscribers_(make_shared()) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceCaptureAudioCreate, ol, MediaEngine, Start, puid, id, id_, string, deviceID, deviceID_); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::init() + { + AutoRecursiveLock lock(*this); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudio::~MediaDeviceCaptureAudio() + { + if (isNoop()) return; + + thisWeak_.reset(); + + cancel(); + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureAudioDestroy, ol, MediaEngine, Stop, puid, id, id_); + } + + //----------------------------------------------------------------------- + MediaDeviceCaptureAudioPtr MediaDeviceCaptureAudio::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + auto pThis(make_shared(make_private{}, IORTCForInternal::queueMediaDevices(), mediaEngine, deviceID)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudioPtr MediaDeviceCaptureAudio::convert(ForMediaEnginePtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaDeviceCaptureAudio, object); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => (for Media) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::notifyMediaStateChanged() + { + ZS_EVENTING_1(x, i, Debug, MediaDeviceCaptureAudioNotifyMediaStateChanged, ol, MediaEngine, Event, puid, id, id_); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::notifyMediaFailure( + MediaPtr media, + WORD errorCode, + const char *inReason + ) + { + ZS_EVENTING_2(x, e, Debug, MediaDeviceCaptureAudioNotifyMediaFailure, ol, MediaEngine, Event, puid, id, id_, puid, mediaId, media->getID()); + + auto pThis = thisWeak_.lock(); + String reason(inReason); + postClosure([pThis, media, errorCode, reason] { + AutoRecursiveLock lock(*pThis); + + if (media != pThis->media_) return; + + pThis->setError(errorCode, reason); + pThis->cancel(); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => (for MediaSubscribers) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::notifySusbcriberGone() + { + ZS_EVENTING_1(x, i, Debug, MediaDeviceCaptureAudioNotifySubscriberGone, ol, MediaEngine, Event, puid, id, id_); + + recheckMode_ = true; + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IMediaDeviceForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::isDeviceIdle() + { + AutoRecursiveLock lock(*this); + + if (isShutdown()) return true; + + if (pendingSubscribers_.size() > 0) return false; + if (subscribers_->size() > 0) return false; + + return true; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureAudioShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudio::States MediaDeviceCaptureAudio::getState() const + { + AutoRecursiveLock lock(*this); + return currentState_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IMediaDeviceCaptureForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::mediaDeviceCaptureSubscribe( + MediaDeviceCapturePromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingSubscriber info; + info.promise_ = promise; + info.repaceExistingDeviceObjectID_ = repaceExistingDeviceObjectID; + info.constraints_ = constraints; + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingSubscribers_.push_back(info); + pThis->step(); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IMediaDeviceCaptureAudioForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::onWake() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureAudioOnWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IPromiseSettledDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::onPromiseSettled(PromisePtr promise) + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioOnPromiseSettled, ol, MediaEngine, Event, puid, id, id_, puid, promiseId, promise->getID()); + + AutoRecursiveLock lock(*this); + + if (deviceModesPromise_) { + if (deviceModesPromise_->getID() == promise->getID()) { + if (promise->isRejected()) { + setError(promise); + cancel(); + return; + } + } + } + + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::cancel() + { + //....................................................................... + // try to gracefully shutdown + + if (isShutdown()) return; + + setState(IMediaDevice::State_ShuttingDown); + + deviceModesPromise_.reset(); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { + ZS_EVENTING_2(x, i, Debug, MediaDeviceCaptureAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "graceful"); + + // perform any graceful asynchronous shutdown processes needed and + // re-attempt shutdown again later if needed. + + if (!stepShutdownPendingRequests()) return; + if (!stepShutdownSubscribers()) return; + if (!stepShutdownMedia()) return; + } + + //....................................................................... + // final cleanup (hard shutdown) + + setState(IMediaDevice::State_Shutdown); + + stepShutdownPendingRequests(); + stepShutdownSubscribers(); + stepShutdownMedia(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyDeviceIsIdleOrShutdownStateChanged(); + } + + // make sure to cleanup any final reference to self + gracefulShutdownReference_.reset(); + + mediaEngine_.reset(); + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::stepShutdownPendingRequests() + { + ZS_EVENTING_2(x, i, Debug, MediaDeviceCaptureAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "pending requests"); + + for (auto iter_doNotUse = pendingSubscribers_.begin(); iter_doNotUse != pendingSubscribers_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingSubscribers_.erase(current); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::stepShutdownSubscribers() + { + if (subscribers_->size() < 1) return true; + + ZS_EVENTING_2(x, i, Debug, MediaDeviceCaptureAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "subscribers"); + + for (auto iter_doNotUse = subscribers_->begin(); iter_doNotUse != subscribers_->end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto subscriber = (*current).second; + + subscriber->shutdown(); + } + + // empty the subscriber list + subscribers_ = make_shared(); + + if (media_) { + media_->notifySubscribersChanged(subscribers_); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::stepShutdownMedia() + { + ZS_EVENTING_2(x, i, Debug, MediaDeviceCaptureAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media"); + + if (!media_) return true; + + media_->shutdown(); + bool shutdown = media_->isShutdown(); + if (shutdown) { + media_.reset(); + } + return shutdown; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::step() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureAudioStep, ol, MediaEngine, Step, puid, id, id_); + + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureAudioStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + if (!stepMediaReinitializationShutdown()) goto reinitializing; + if (!stepDiscoverModes()) goto not_ready; + if (!stepFigureOutMode()) goto not_ready; + if (!stepWaitForMediaDevice()) goto not_ready; + + goto ready; + + not_ready: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); + return; + } + + reinitializing: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "reinitializing"); + setState(IMediaDevice::State_Reinitializing); + return; + } + + ready: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); + setState(IMediaDevice::State_Active); + return; + } + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::stepMediaReinitializationShutdown() + { + if (!media_) goto no_media_to_shutdown; + + if (media_->isShuttingDown()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "waiting for media shutdown to reinialize"); + return false; + } + + if (media_->isShutdown()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media shutdown"); + media_.reset(); + return true; + } + + no_media_to_shutdown: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no media to shutdown"); + } + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::stepDiscoverModes() + { + if (!deviceModesPromise_) { + deviceModesPromise_ = IMediaDevices::enumerateDefaultModes(deviceID_); + + if (!deviceModesPromise_) { + setError(UseHTTP::HTTPStatusCode_ExpectationFailed, (String("unable to discover modes for an audio media device: ") + deviceID_).c_str()); + cancel(); + return false; + } + deviceModesPromise_->thenWeak(thisWeak_.lock()); + } + + if (!deviceModesPromise_->isSettled()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "waiting for device modes to be known"); + return false; + } + + if (deviceModesPromise_->isRejected()) { + setError(deviceModesPromise_); + cancel(); + return false; + } + + auto settingsList = deviceModesPromise_->value(); + + if (!settingsList) { + setError(UseHTTP::HTTPStatusCode_ExpectationFailed, (String("no modes found for audio media device: ") + deviceID_).c_str()); + cancel(); + return false; + } + + ZS_EVENTING_3(x, i, Debug, MediaDeviceCaptureAudioStepModesFound, ol, MediaEngine, Step, + puid, id, id_, + string, deviceId, deviceID_, + size_t, totalModes, settingsList->size()); + + // copy modes to shared pointer list of settings + for (auto iter = settingsList->begin(); iter != settingsList->end(); ++iter) + { + deviceModes_.push_back(make_shared(*iter)); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::stepFigureOutMode() + { + { + if (recheckMode_) goto mode_needed; + if (!media_) goto mode_needed; + if (pendingSubscribers_.size() > 0) goto mode_needed; + return true; + } + + mode_needed: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "figure out mode"); + + recheckMode_ = false; + + TrackConstraintsList allConstraints; + + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) + { + auto &info = (*iter); + allConstraints.push_back(info.constraints_); + } + + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + allConstraints.push_back(subscriber->getConstraints()); + } + + auto found = obtainBestMode(allConstraints, deviceModes_); + + bool changed = false; + + MediaSubscriberMapPtr replacement(make_shared()); + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + if (subscriber->isShutdown()) { + changed = true; + continue; + } + (*replacement)[(*iter).first] = subscriber; + } + + if (found) { + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) { + auto &info = (*iter); + auto subscriber = MediaSubscriber::create(getAssociatedMessageQueue(), thisWeak_.lock(), info.constraints_, info.delegate_); + info.promise_->resolve(IMediaDeviceCapturePtr(subscriber)); + subscriber->notifyStateChanged(currentState_); + changed = true; + (*replacement)[subscriber->getID()] = subscriber; + } + } else { + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) { + auto &info = (*iter); + info.promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Conflict, "over constrained")); + } + } + pendingSubscribers_.clear(); + + if (changed) { + subscribers_ = replacement; + if (media_) { + media_->notifySubscribersChanged(subscribers_); + } + } + + if (subscribers_->size() < 1) { + found = UseSettingsPtr(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyDeviceIsIdleOrShutdownStateChanged(); + } + } + + if (found) { + if (found == requiredSettings_) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "optimal device mode has not changed"); + return true; + } + } + + if (isReady()) { + setState(IMediaDevice::State_Reinitializing); + } + + requiredSettings_ = found; + if (media_) { + media_->shutdown(); + } + } + return false; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::stepWaitForMediaDevice() + { + if (media_->isShutdown()) { + media_.reset(); + } + + if (!media_) { + if (!requiredSettings_) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no media device mode required"); + return false; + } + media_ = Media::create(getAssociatedMessageQueue(), thisWeak_.lock(), deviceID_, requiredSettings_); + media_->notifySubscribersChanged(subscribers_); + } + + if (!media_->isReady()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media device is not ready"); + return false; + } + + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media device is ready"); + return true; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::setState(States state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceCaptureAudioSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IMediaDevice::toString(state), string, oldState, IMediaDevice::toString(currentState_)); + + currentState_ = state; + + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + subscriber->notifyStateChanged(currentState_); + } + +// MediaEnginePtr pThis = mThisWeak.lock(); +// if (pThis) { +// mSubscriptions.delegate()->onMediaEngineStateChanged(pThis, currentState_); +// } + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, MediaDeviceCaptureAudioSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, MediaDeviceCaptureAudioSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media + #pragma mark + + //------------------------------------------------------------------------- + const char *MediaDeviceCaptureAudio::Media::toString(MediaStates state) + { + switch (state) + { + case MediaState_Pending: return "pending"; + case MediaState_Ready: return "ready"; + case MediaState_ShuttingDown: return "shutting down"; + case MediaState_Shutdown: return "shutdown"; + } + return "UNKNOWN"; + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudio::Media::Media( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + outer_(outer), + deviceID_(deviceID), + settings_(settings), + trace_(MediaChannelTrace::create(id_)) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceCaptureAudioMediaCreate, ol, MediaEngine, Start, puid, id, id_, string, deviceID, deviceID_); + + trace_->mKind = IMediaStreamTrackTypes::Kind_Audio; + trace_->mSettings = settings; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::init() + { + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudio::Media::~Media() + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceCaptureAudioMediaDestroy, ol, MediaEngine, Stop, puid, id, id_, string, deviceID, deviceID_); + + thisWeak_.reset(); + cancel(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudio::MediaPtr MediaDeviceCaptureAudio::Media::create( + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ) + { + auto pThis(make_shared(make_private{}, queue, outer, deviceID, settings)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media => (for MediaDeviceCaptureAudio) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureAudioMediaShutdown, ol, MediaEngine, Close, puid, id, id_); + + auto pThis = thisWeak_.lock(); + postClosure([pThis] { + AutoRecursiveLock lock(*pThis); + pThis->cancel(); + }); + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::Media::isReady() const + { + AutoRecursiveLock lock(*this); + return MediaState_Ready == currentState_; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::Media::isShuttingDown() const + { + AutoRecursiveLock lock(*this); + return MediaState_ShuttingDown == currentState_; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::Media::isShutdown() const + { + AutoRecursiveLock lock(*this); + return MediaState_Shutdown == currentState_; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::notifySubscribersChanged(MediaSubscriberMapPtr subscribers) + { + AutoRecursiveLock lock(*this); + subscribers_ = subscribers; + } + + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::onWake() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureAudioMediaWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::cancel() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureAudioMediaCancel, ol, MediaEngine, Cancel, puid, id, id_); + + if (isShutdown()) return; + + setState(MediaState_ShuttingDown); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { +#define TODO 1 +#define TODO 2 + } + + setState(MediaState_Shutdown); + +#define TODO 1 +#define TODO 2 + + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaStateChanged(); + } + + gracefulShutdownReference_.reset(); + outer_.reset(); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::step() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureAudioMediaStep, ol, MediaEngine, Step, puid, id, id_); + +#define TODO 1 +#define TODO 2 + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureAudioMediaStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + // if (!stepDoSomething()) goto not_ready; + + goto ready; + + not_ready: + { + return; + } + + ready: + { + setState(MediaState_Ready); + } + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::setState(MediaStates state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceCaptureAudioMediaSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, toString(state), string, oldState, toString(currentState_)); + + currentState_ = state; + + if (MediaState_Ready == state) { + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaStateChanged(); + } + } + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, MediaDeviceCaptureAudioMediaSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, MediaDeviceCaptureAudioMediaSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + + auto pThis = thisWeak_.lock(); + if (pThis) { + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaFailure(pThis, lastError_, lastErrorReason_); + } + } + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::Media::internalNotifySubscribersOfFrame(AudioFramePtr frame) + { + MediaSubscriberMapPtr subscribers; + + ZS_EVENTING_1(x, e, Insane, MediaDeviceCaptureAudioMediaNotifySubscribersOfFrame, ol, MediaEngine, InternalEvent, puid, id, id_); + + { + AutoRecursiveLock lock(*this); + subscribers = subscribers_; + } + + if (!subscribers) return; + + for (auto iter = subscribers->begin(); iter != subscribers->end(); ++iter) + { + auto &subscriber = (*iter).second; + subscriber->notifyFrame(trace_, frame); + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber + #pragma mark + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudio::MediaSubscriber::MediaSubscriber( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + outer_(outer), + constraints_(constraints), + notifyDelegate_(delegate_), + delegate_(IMediaDeviceCaptureDelegateProxy::createWeak(delegate)), + traceHelper_(id_) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceCaptureAudioMediaSubscriberCreate, ol, MediaEngine, Start, puid, id, id_, puid, outerId, outer->getID()); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::MediaSubscriber::init() + { + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudio::MediaSubscriber::~MediaSubscriber() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureAudioMediaSubscriberDestroy, ol, MediaEngine, Stop, puid, id, id_); + + thisWeak_.reset(); + cancel(); + } + + MediaDeviceCaptureAudio::MediaSubscriberPtr MediaDeviceCaptureAudio::MediaSubscriber::create( + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) + { + auto pThis(make_shared(make_private{}, queue, outer, constraints, delegate)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => (for MediaDeviceCaptureAudio) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::MediaSubscriber::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureAudioMediaSubscriberShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + outer_.reset(); + cancel(); + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureAudio::MediaSubscriber::isShutdown() const + { + return IMediaDevice::State_Shutdown == getState(); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::MediaSubscriber::notifyStateChanged(States state) + { + auto pThis = thisWeak_.lock(); + + postClosure([pThis, state] { + AutoRecursiveLock lock(*pThis); + pThis->setState(state); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => (for Media) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::MediaSubscriber::notifyFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) + { + IMediaDeviceCaptureDelegatePtr delegate; + + { + AutoRecursiveLock lock(*this); + delegate = notifyDelegate_.lock(); + } + + if (!delegate) return; + delegate->notifyMediaDeviceCaptureAudioFrame(traceHelper_.trace(trace), frame); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => IMediaDevice + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::MediaSubscriber::cancel() + { + AutoRecursiveLock lock(*this); + + setState(IMediaDevice::State_ShuttingDown); + + setState(IMediaDevice::State_Shutdown); + + auto outer = outer_.lock(); + if (outer) { + outer->notifySusbcriberGone(); + } + outer_.reset(); + + delegate_.reset(); + notifyDelegate_.reset(); + } + + //------------------------------------------------------------------------- + IMediaDevice::States MediaDeviceCaptureAudio::MediaSubscriber::getState() const + { + AutoRecursiveLock lock(*this); + return lastReportedState_; + } + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => IMediaDeviceCapture + #pragma mark + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => IMediaDeviceCaptureAudio + #pragma mark + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureAudio::MediaSubscriber::setState(States state) + { + if (state == lastReportedState_) return; + if (IMediaDevice::State_Shutdown == lastReportedState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceCaptureAudioMediaSubscriberSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IMediaDevice::toString(state), string, oldState, IMediaDevice::toString(lastReportedState_)); + + lastReportedState_ = state; + + auto pThis = thisWeak_.lock(); + if (!pThis) return; + if (!delegate_) return; + + try { + delegate_->onMediaDeviceCaptureStateChanged(pThis, state); + } catch (const IMediaDeviceCaptureDelegateProxy::Exceptions::DelegateGone &) { + delegate_.reset(); + } + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureAudioFactory + #pragma mark + + //------------------------------------------------------------------------- + IMediaDeviceCaptureAudioFactory &IMediaDeviceCaptureAudioFactory::singleton() + { + return MediaDeviceCaptureAudioFactory::singleton(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureAudioPtr IMediaDeviceCaptureAudioFactory::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + if (this) {} + return internal::MediaDeviceCaptureAudio::create(mediaEngine, deviceID); + } + + } // internal namespace +} diff --git a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp new file mode 100644 index 00000000..743ee905 --- /dev/null +++ b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp @@ -0,0 +1,1288 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +//#include +//#include +//#include +//#include +////#include +////#include +////#include +////#include +//#include +//#include +#include +#include +#include +#include + +#include +// +//#include +#include +// +#include +//#include +//#include +//#include +//#include +// +//#include +// +//#include + +#if 0 +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef WINRT +#include +#endif +#endif //0 + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(MediaDeviceCaptureVideoSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo (helpers) + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideoSettingsDefaults + #pragma mark + + class MediaDeviceCaptureVideoSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~MediaDeviceCaptureVideoSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static MediaDeviceCaptureVideoSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static MediaDeviceCaptureVideoSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + } + + }; + + //------------------------------------------------------------------------- + void installMediaDeviceCaptureVideoSettingsDefaults() + { + MediaDeviceCaptureVideoSettingsDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureVideoForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + IMediaDeviceCaptureVideoForMediaEngine::ForMediaEnginePtr IMediaDeviceCaptureVideoForMediaEngine::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + return internal::IMediaDeviceCaptureVideoFactory::singleton().create(mediaEngine, deviceID); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideo::MediaDeviceCaptureVideo( + const make_private &, + IMessageQueuePtr queue, + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + mediaEngine_(mediaEngine), + deviceID_(deviceID), + subscribers_(make_shared()) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceCaptureVideoCreate, ol, MediaEngine, Start, puid, id, id_, string, deviceID, deviceID_); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::init() + { + AutoRecursiveLock lock(*this); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideo::~MediaDeviceCaptureVideo() + { + if (isNoop()) return; + + thisWeak_.reset(); + + cancel(); + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureVideoDestroy, ol, MediaEngine, Stop, puid, id, id_); + } + + //----------------------------------------------------------------------- + MediaDeviceCaptureVideoPtr MediaDeviceCaptureVideo::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + auto pThis(make_shared(make_private{}, IORTCForInternal::queueMediaDevices(), mediaEngine, deviceID)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideoPtr MediaDeviceCaptureVideo::convert(ForMediaEnginePtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaDeviceCaptureVideo, object); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => (for Media) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::notifyMediaStateChanged() + { + ZS_EVENTING_1(x, i, Debug, MediaDeviceCaptureVideoNotifyMediaStateChanged, ol, MediaEngine, Event, puid, id, id_); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::notifyMediaFailure( + MediaPtr media, + WORD errorCode, + const char *inReason + ) + { + ZS_EVENTING_2(x, e, Debug, MediaDeviceCaptureVideoNotifyMediaFailure, ol, MediaEngine, Event, puid, id, id_, puid, mediaId, media->getID()); + + auto pThis = thisWeak_.lock(); + String reason(inReason); + postClosure([pThis, media, errorCode, reason] { + AutoRecursiveLock lock(*pThis); + + if (media != pThis->media_) return; + + pThis->setError(errorCode, reason); + pThis->cancel(); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => (for MediaSubscribers) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::notifySusbcriberGone() + { + ZS_EVENTING_1(x, i, Debug, MediaDeviceCaptureVideoNotifySubscriberGone, ol, MediaEngine, Event, puid, id, id_); + + recheckMode_ = true; + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IMediaDeviceForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::isDeviceIdle() + { + AutoRecursiveLock lock(*this); + + if (isShutdown()) return true; + + if (pendingSubscribers_.size() > 0) return false; + if (subscribers_->size() > 0) return false; + + return true; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureVideoShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideo::States MediaDeviceCaptureVideo::getState() const + { + AutoRecursiveLock lock(*this); + return currentState_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IMediaDeviceCaptureForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::mediaDeviceCaptureSubscribe( + MediaDeviceCapturePromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingSubscriber info; + info.promise_ = promise; + info.repaceExistingDeviceObjectID_ = repaceExistingDeviceObjectID; + info.constraints_ = constraints; + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingSubscribers_.push_back(info); + pThis->step(); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IMediaDeviceCaptureVideoForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::onWake() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureVideoOnWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IPromiseSettledDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::onPromiseSettled(PromisePtr promise) + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoOnPromiseSettled, ol, MediaEngine, Event, puid, id, id_, puid, promiseId, promise->getID()); + + AutoRecursiveLock lock(*this); + + if (deviceModesPromise_) { + if (deviceModesPromise_->getID() == promise->getID()) { + if (promise->isRejected()) { + setError(promise); + cancel(); + return; + } + } + } + + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::cancel() + { + //....................................................................... + // try to gracefully shutdown + + if (isShutdown()) return; + + setState(IMediaDevice::State_ShuttingDown); + + deviceModesPromise_.reset(); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { + ZS_EVENTING_2(x, i, Debug, MediaDeviceCaptureVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "graceful"); + + // perform any graceful asynchronous shutdown processes needed and + // re-attempt shutdown again later if needed. + + if (!stepShutdownPendingRequests()) return; + if (!stepShutdownSubscribers()) return; + if (!stepShutdownMedia()) return; + } + + //....................................................................... + // final cleanup (hard shutdown) + + setState(IMediaDevice::State_Shutdown); + + stepShutdownPendingRequests(); + stepShutdownSubscribers(); + stepShutdownMedia(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyDeviceIsIdleOrShutdownStateChanged(); + } + + // make sure to cleanup any final reference to self + gracefulShutdownReference_.reset(); + + mediaEngine_.reset(); + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::stepShutdownPendingRequests() + { + ZS_EVENTING_2(x, i, Debug, MediaDeviceCaptureVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "pending requests"); + + for (auto iter_doNotUse = pendingSubscribers_.begin(); iter_doNotUse != pendingSubscribers_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingSubscribers_.erase(current); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::stepShutdownSubscribers() + { + if (subscribers_->size() < 1) return true; + + ZS_EVENTING_2(x, i, Debug, MediaDeviceCaptureVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "subscribers"); + + for (auto iter_doNotUse = subscribers_->begin(); iter_doNotUse != subscribers_->end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto subscriber = (*current).second; + + subscriber->shutdown(); + } + + // empty the subscriber list + subscribers_ = make_shared(); + + if (media_) { + media_->notifySubscribersChanged(subscribers_); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::stepShutdownMedia() + { + ZS_EVENTING_2(x, i, Debug, MediaDeviceCaptureVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media"); + + if (!media_) return true; + + media_->shutdown(); + bool shutdown = media_->isShutdown(); + if (shutdown) { + media_.reset(); + } + return shutdown; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::step() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureVideoStep, ol, MediaEngine, Step, puid, id, id_); + + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureVideoStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + if (!stepMediaReinitializationShutdown()) goto reinitializing; + if (!stepDiscoverModes()) goto not_ready; + if (!stepFigureOutMode()) goto not_ready; + if (!stepWaitForMediaDevice()) goto not_ready; + + goto ready; + + not_ready: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); + return; + } + + reinitializing: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "reinitializing"); + setState(IMediaDevice::State_Reinitializing); + return; + } + + ready: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); + setState(IMediaDevice::State_Active); + return; + } + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::stepMediaReinitializationShutdown() + { + if (!media_) goto no_media_to_shutdown; + + if (media_->isShuttingDown()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "waiting for media shutdown to reinialize"); + return false; + } + + if (media_->isShutdown()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media shutdown"); + media_.reset(); + return true; + } + + no_media_to_shutdown: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no media to shutdown"); + } + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::stepDiscoverModes() + { + if (!deviceModesPromise_) { + deviceModesPromise_ = IMediaDevices::enumerateDefaultModes(deviceID_); + + if (!deviceModesPromise_) { + setError(UseHTTP::HTTPStatusCode_ExpectationFailed, (String("unable to discover modes for an video media device: ") + deviceID_).c_str()); + cancel(); + return false; + } + deviceModesPromise_->thenWeak(thisWeak_.lock()); + } + + if (!deviceModesPromise_->isSettled()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "waiting for device modes to be known"); + return false; + } + + if (deviceModesPromise_->isRejected()) { + setError(deviceModesPromise_); + cancel(); + return false; + } + + auto settingsList = deviceModesPromise_->value(); + + if (!settingsList) { + setError(UseHTTP::HTTPStatusCode_ExpectationFailed, (String("no modes found for video media device: ") + deviceID_).c_str()); + cancel(); + return false; + } + + ZS_EVENTING_3(x, i, Debug, MediaDeviceCaptureVideoStepModesFound, ol, MediaEngine, Step, + puid, id, id_, + string, deviceId, deviceID_, + size_t, totalModes, settingsList->size()); + + // copy modes to shared pointer list of settings + for (auto iter = settingsList->begin(); iter != settingsList->end(); ++iter) + { + deviceModes_.push_back(make_shared(*iter)); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::stepFigureOutMode() + { + { + if (recheckMode_) goto mode_needed; + if (!media_) goto mode_needed; + if (pendingSubscribers_.size() > 0) goto mode_needed; + return true; + } + + mode_needed: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "figure out mode"); + + recheckMode_ = false; + + TrackConstraintsList allConstraints; + + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) + { + auto &info = (*iter); + allConstraints.push_back(info.constraints_); + } + + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + allConstraints.push_back(subscriber->getConstraints()); + } + + auto found = obtainBestMode(allConstraints, deviceModes_); + + bool changed = false; + + MediaSubscriberMapPtr replacement(make_shared()); + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + if (subscriber->isShutdown()) { + changed = true; + continue; + } + (*replacement)[(*iter).first] = subscriber; + } + + if (found) { + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) { + auto &info = (*iter); + auto subscriber = MediaSubscriber::create(getAssociatedMessageQueue(), thisWeak_.lock(), info.constraints_, info.delegate_); + info.promise_->resolve(IMediaDeviceCapturePtr(subscriber)); + subscriber->notifyStateChanged(currentState_); + changed = true; + (*replacement)[subscriber->getID()] = subscriber; + } + } else { + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) { + auto &info = (*iter); + info.promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Conflict, "over constrained")); + } + } + pendingSubscribers_.clear(); + + if (changed) { + subscribers_ = replacement; + if (media_) { + media_->notifySubscribersChanged(subscribers_); + } + } + + if (subscribers_->size() < 1) { + found = UseSettingsPtr(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyDeviceIsIdleOrShutdownStateChanged(); + } + } + + if (found) { + if (found == requiredSettings_) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "optimal device mode has not changed"); + return true; + } + } + + if (isReady()) { + setState(IMediaDevice::State_Reinitializing); + } + + requiredSettings_ = found; + if (media_) { + media_->shutdown(); + } + } + return false; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::stepWaitForMediaDevice() + { + if (media_->isShutdown()) { + media_.reset(); + } + + if (!media_) { + if (!requiredSettings_) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no media device mode required"); + return false; + } + media_ = Media::create(getAssociatedMessageQueue(), thisWeak_.lock(), deviceID_, requiredSettings_); + media_->notifySubscribersChanged(subscribers_); + } + + if (!media_->isReady()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media device is not ready"); + return false; + } + + ZS_EVENTING_2(x, i, Trace, MediaDeviceCaptureVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media device is ready"); + return true; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::setState(States state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceCaptureVideoSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IMediaDevice::toString(state), string, oldState, IMediaDevice::toString(currentState_)); + + currentState_ = state; + + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + subscriber->notifyStateChanged(currentState_); + } + +// MediaEnginePtr pThis = mThisWeak.lock(); +// if (pThis) { +// mSubscriptions.delegate()->onMediaEngineStateChanged(pThis, currentState_); +// } + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, MediaDeviceCaptureVideoSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, MediaDeviceCaptureVideoSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media + #pragma mark + + //------------------------------------------------------------------------- + const char *MediaDeviceCaptureVideo::Media::toString(MediaStates state) + { + switch (state) + { + case MediaState_Pending: return "pending"; + case MediaState_Ready: return "ready"; + case MediaState_ShuttingDown: return "shutting down"; + case MediaState_Shutdown: return "shutdown"; + } + return "UNKNOWN"; + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideo::Media::Media( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + outer_(outer), + deviceID_(deviceID), + settings_(settings), + trace_(MediaChannelTrace::create(id_)) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceCaptureVideoMediaCreate, ol, MediaEngine, Start, puid, id, id_, string, deviceID, deviceID_); + + trace_->mKind = IMediaStreamTrackTypes::Kind_Video; + trace_->mSettings = settings_; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::init() + { + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideo::Media::~Media() + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceCaptureVideoMediaDestroy, ol, MediaEngine, Stop, puid, id, id_, string, deviceID, deviceID_); + + thisWeak_.reset(); + cancel(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideo::MediaPtr MediaDeviceCaptureVideo::Media::create( + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ) + { + auto pThis(make_shared(make_private{}, queue, outer, deviceID, settings)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media => (for MediaDeviceCaptureVideo) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureVideoMediaShutdown, ol, MediaEngine, Close, puid, id, id_); + + auto pThis = thisWeak_.lock(); + postClosure([pThis] { + AutoRecursiveLock lock(*pThis); + pThis->cancel(); + }); + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::Media::isReady() const + { + AutoRecursiveLock lock(*this); + return MediaState_Ready == currentState_; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::Media::isShuttingDown() const + { + AutoRecursiveLock lock(*this); + return MediaState_ShuttingDown == currentState_; + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::Media::isShutdown() const + { + AutoRecursiveLock lock(*this); + return MediaState_Shutdown == currentState_; + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::notifySubscribersChanged(MediaSubscriberMapPtr subscribers) + { + AutoRecursiveLock lock(*this); + subscribers_ = subscribers; + } + + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::onWake() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureVideoMediaWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::cancel() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureVideoMediaCancel, ol, MediaEngine, Cancel, puid, id, id_); + + if (isShutdown()) return; + + setState(MediaState_ShuttingDown); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { +#define TODO 1 +#define TODO 2 + } + + setState(MediaState_Shutdown); + +#define TODO 1 +#define TODO 2 + + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaStateChanged(); + } + + gracefulShutdownReference_.reset(); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::step() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureVideoMediaStep, ol, MediaEngine, Step, puid, id, id_); + +#define TODO 1 +#define TODO 2 + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, MediaDeviceCaptureVideoMediaStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + // if (!stepDoSomething()) goto not_ready; + + goto ready; + + not_ready: + { + return; + } + + ready: + { + setState(MediaState_Ready); + } + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::setState(MediaStates state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceCaptureVideoMediaSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, toString(state), string, oldState, toString(currentState_)); + + currentState_ = state; + + if (MediaState_Ready == state) { + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaStateChanged(); + } + } + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, MediaDeviceCaptureVideoMediaSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, MediaDeviceCaptureVideoMediaSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + + auto pThis = thisWeak_.lock(); + if (pThis) { + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaFailure(pThis, lastError_, lastErrorReason_); + } + } + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::Media::internalNotifySubscribersOfFrame(VideoFramePtr frame) + { + MediaSubscriberMapPtr subscribers; + + ZS_EVENTING_1(x, e, Insane, MediaDeviceCaptureVideoMediaNotifySubscribersOfFrame, ol, MediaEngine, InternalEvent, puid, id, id_); + + { + AutoRecursiveLock lock(*this); + subscribers = subscribers_; + } + + if (!subscribers) return; + + for (auto iter = subscribers->begin(); iter != subscribers->end(); ++iter) + { + auto &subscriber = (*iter).second; + subscriber->notifyFrame(trace_, frame); + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber + #pragma mark + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideo::MediaSubscriber::MediaSubscriber( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + outer_(outer), + constraints_(constraints), + notifyDelegate_(delegate_), + delegate_(IMediaDeviceCaptureDelegateProxy::createWeak(delegate)), + traceHelper_(id_) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceCaptureVideoMediaSubscriberCreate, ol, MediaEngine, Start, puid, id, id_, puid, outerId, outer->getID()); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::MediaSubscriber::init() + { + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideo::MediaSubscriber::~MediaSubscriber() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureVideoMediaSubscriberDestroy, ol, MediaEngine, Stop, puid, id, id_); + + thisWeak_.reset(); + cancel(); + } + + MediaDeviceCaptureVideo::MediaSubscriberPtr MediaDeviceCaptureVideo::MediaSubscriber::create( + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) + { + auto pThis(make_shared(make_private{}, queue, outer, constraints, delegate)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => (for MediaDeviceCaptureVideo) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::MediaSubscriber::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceCaptureVideoMediaSubscriberShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + //------------------------------------------------------------------------- + bool MediaDeviceCaptureVideo::MediaSubscriber::isShutdown() const + { + return IMediaDevice::State_Shutdown == getState(); + } + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::MediaSubscriber::notifyStateChanged(States state) + { + auto pThis = thisWeak_.lock(); + + postClosure([pThis, state] { + AutoRecursiveLock lock(*pThis); + pThis->setState(state); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => (for Media) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::MediaSubscriber::notifyFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) + { + IMediaDeviceCaptureDelegatePtr delegate; + + { + AutoRecursiveLock lock(*this); + delegate = notifyDelegate_.lock(); + } + + if (!delegate) return; + delegate->notifyMediaDeviceCaptureVideoFrame(traceHelper_.trace(trace), frame); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => IMediaDevice + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::MediaSubscriber::cancel() + { + AutoRecursiveLock lock(*this); + + setState(IMediaDevice::State_ShuttingDown); + + setState(IMediaDevice::State_Shutdown); + + auto outer = outer_.lock(); + if (outer) { + outer->notifySusbcriberGone(); + } + + delegate_.reset(); + notifyDelegate_.reset(); + } + + //------------------------------------------------------------------------- + IMediaDevice::States MediaDeviceCaptureVideo::MediaSubscriber::getState() const + { + AutoRecursiveLock lock(*this); + return lastReportedState_; + } + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => IMediaDeviceCapture + #pragma mark + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => IMediaDeviceCaptureVideo + #pragma mark + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceCaptureVideo::MediaSubscriber::setState(States state) + { + if (state == lastReportedState_) return; + if (IMediaDevice::State_Shutdown == lastReportedState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceCaptureVideoMediaSubscriberSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IMediaDevice::toString(state), string, oldState, IMediaDevice::toString(lastReportedState_)); + + lastReportedState_ = state; + + auto pThis = thisWeak_.lock(); + if (!pThis) return; + if (!delegate_) return; + + try { + delegate_->onMediaDeviceCaptureStateChanged(pThis, state); + } catch (const IMediaDeviceCaptureDelegateProxy::Exceptions::DelegateGone &) { + delegate_.reset(); + } + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureVideoFactory + #pragma mark + + //------------------------------------------------------------------------- + IMediaDeviceCaptureVideoFactory &IMediaDeviceCaptureVideoFactory::singleton() + { + return MediaDeviceCaptureVideoFactory::singleton(); + } + + //------------------------------------------------------------------------- + MediaDeviceCaptureVideoPtr IMediaDeviceCaptureVideoFactory::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + if (this) {} + return internal::MediaDeviceCaptureVideo::create(mediaEngine, deviceID); + } + + } // internal namespace +} diff --git a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp new file mode 100644 index 00000000..fa940a4e --- /dev/null +++ b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp @@ -0,0 +1,1255 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(MediaDeviceRenderAudioSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudioSettingsDefaults + #pragma mark + + class MediaDeviceRenderAudioSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~MediaDeviceRenderAudioSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static MediaDeviceRenderAudioSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static MediaDeviceRenderAudioSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + } + + }; + + //------------------------------------------------------------------------- + void installMediaDeviceRenderAudioSettingsDefaults() + { + MediaDeviceRenderAudioSettingsDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRenderAudioForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + IMediaDeviceRenderAudioForMediaEngine::ForMediaEnginePtr IMediaDeviceRenderAudioForMediaEngine::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + return internal::IMediaDeviceRenderAudioFactory::singleton().create(mediaEngine, deviceID); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::MediaDeviceRenderAudio( + const make_private &, + IMessageQueuePtr queue, + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + mediaEngine_(mediaEngine), + deviceID_(deviceID), + subscribers_(make_shared()) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceRenderAudioCreate, ol, MediaEngine, Start, puid, id, id_, string, deviceID, deviceID_); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::init() + { + AutoRecursiveLock lock(*this); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::~MediaDeviceRenderAudio() + { + if (isNoop()) return; + + thisWeak_.reset(); + + cancel(); + ZS_EVENTING_1(x, i, Detail, MediaDeviceRenderAudioDestroy, ol, MediaEngine, Stop, puid, id, id_); + } + + //----------------------------------------------------------------------- + MediaDeviceRenderAudioPtr MediaDeviceRenderAudio::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + auto pThis(make_shared(make_private{}, IORTCForInternal::queueMediaDevices(), mediaEngine, deviceID)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudioPtr MediaDeviceRenderAudio::convert(ForMediaEnginePtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaDeviceRenderAudio, object); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => (for Media) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::notifyMediaStateChanged() + { + ZS_EVENTING_1(x, i, Debug, MediaDeviceRenderAudioNotifyMediaStateChanged, ol, MediaEngine, Event, puid, id, id_); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::notifyMediaFailure( + MediaPtr media, + WORD errorCode, + const char *inReason + ) + { + ZS_EVENTING_2(x, e, Debug, MediaDeviceRenderAudioNotifyMediaFailure, ol, MediaEngine, Event, puid, id, id_, puid, mediaId, media->getID()); + + auto pThis = thisWeak_.lock(); + String reason(inReason); + postClosure([pThis, media, errorCode, reason] { + AutoRecursiveLock lock(*pThis); + + if (media != pThis->media_) return; + + pThis->setError(errorCode, reason); + pThis->cancel(); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => (for MediaSubscribers) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::notifySusbcriberGone() + { + ZS_EVENTING_1(x, i, Debug, MediaDeviceRenderAudioNotifySubscriberGone, ol, MediaEngine, Event, puid, id, id_); + + recheckMode_ = true; + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) + { + MediaPtr media; + + { + AutoRecursiveLock lock(*this); + media = media_; + } + + if (!media) return; + + media->notifyAudioFrame(trace, frame); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IMediaDeviceForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::isDeviceIdle() + { + AutoRecursiveLock lock(*this); + + if (isShutdown()) return true; + + if (pendingSubscribers_.size() > 0) return false; + if (subscribers_->size() > 0) return false; + + return true; + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceRenderAudioShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::States MediaDeviceRenderAudio::getState() const + { + AutoRecursiveLock lock(*this); + return currentState_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IMediaDeviceRenderForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::mediaDeviceRenderSubscribe( + MediaDeviceRenderPromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceRenderDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingSubscriber info; + info.promise_ = promise; + info.repaceExistingDeviceObjectID_ = repaceExistingDeviceObjectID; + info.constraints_ = constraints; + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingSubscribers_.push_back(info); + pThis->step(); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IMediaDeviceRenderAudioForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::onWake() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceRenderAudioOnWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IPromiseSettledDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::onPromiseSettled(PromisePtr promise) + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioOnPromiseSettled, ol, MediaEngine, Event, puid, id, id_, puid, promiseId, promise->getID()); + + AutoRecursiveLock lock(*this); + + if (deviceModesPromise_) { + if (deviceModesPromise_->getID() == promise->getID()) { + if (promise->isRejected()) { + setError(promise); + cancel(); + return; + } + } + } + + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::cancel() + { + //....................................................................... + // try to gracefully shutdown + + if (isShutdown()) return; + + setState(IMediaDevice::State_ShuttingDown); + + deviceModesPromise_.reset(); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { + ZS_EVENTING_2(x, i, Debug, MediaDeviceRenderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "graceful"); + + // perform any graceful asynchronous shutdown processes needed and + // re-attempt shutdown again later if needed. + + if (!stepShutdownPendingRequests()) return; + if (!stepShutdownSubscribers()) return; + if (!stepShutdownMedia()) return; + } + + //....................................................................... + // final cleanup (hard shutdown) + + setState(IMediaDevice::State_Shutdown); + + stepShutdownPendingRequests(); + stepShutdownSubscribers(); + stepShutdownMedia(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyDeviceIsIdleOrShutdownStateChanged(); + } + + // make sure to cleanup any final reference to self + gracefulShutdownReference_.reset(); + + mediaEngine_.reset(); + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::stepShutdownPendingRequests() + { + ZS_EVENTING_2(x, i, Debug, MediaDeviceRenderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "pending requests"); + + for (auto iter_doNotUse = pendingSubscribers_.begin(); iter_doNotUse != pendingSubscribers_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingSubscribers_.erase(current); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::stepShutdownSubscribers() + { + if (subscribers_->size() < 1) return true; + + ZS_EVENTING_2(x, i, Debug, MediaDeviceRenderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "subscribers"); + + for (auto iter_doNotUse = subscribers_->begin(); iter_doNotUse != subscribers_->end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto subscriber = (*current).second; + + subscriber->shutdown(); + } + + // empty the subscriber list + subscribers_ = make_shared(); + + if (media_) { + media_->notifySubscribersChanged(subscribers_); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::stepShutdownMedia() + { + ZS_EVENTING_2(x, i, Debug, MediaDeviceRenderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media"); + + if (!media_) return true; + + media_->shutdown(); + bool shutdown = media_->isShutdown(); + if (shutdown) { + media_.reset(); + } + return shutdown; + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::step() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceRenderAudioStep, ol, MediaEngine, Step, puid, id, id_); + + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, MediaDeviceRenderAudioStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + if (!stepMediaReinitializationShutdown()) goto reinitializing; + if (!stepDiscoverModes()) goto not_ready; + if (!stepFigureOutMode()) goto not_ready; + if (!stepWaitForMediaDevice()) goto not_ready; + + goto ready; + + not_ready: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); + return; + } + + reinitializing: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "reinitializing"); + setState(IMediaDevice::State_Reinitializing); + return; + } + + ready: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); + setState(IMediaDevice::State_Active); + return; + } + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::stepMediaReinitializationShutdown() + { + if (!media_) goto no_media_to_shutdown; + + if (media_->isShuttingDown()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "waiting for media shutdown to reinialize"); + return false; + } + + if (media_->isShutdown()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media shutdown"); + media_.reset(); + return true; + } + + no_media_to_shutdown: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no media to shutdown"); + } + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::stepDiscoverModes() + { + if (!deviceModesPromise_) { + deviceModesPromise_ = IMediaDevices::enumerateDefaultModes(deviceID_); + + if (!deviceModesPromise_) { + setError(UseHTTP::HTTPStatusCode_ExpectationFailed, (String("unable to discover modes for an audio media device: ") + deviceID_).c_str()); + cancel(); + return false; + } + deviceModesPromise_->thenWeak(thisWeak_.lock()); + } + + if (!deviceModesPromise_->isSettled()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "waiting for device modes to be known"); + return false; + } + + if (deviceModesPromise_->isRejected()) { + setError(deviceModesPromise_); + cancel(); + return false; + } + + auto settingsList = deviceModesPromise_->value(); + + if (!settingsList) { + setError(UseHTTP::HTTPStatusCode_ExpectationFailed, (String("no modes found for audio media device: ") + deviceID_).c_str()); + cancel(); + return false; + } + + ZS_EVENTING_3(x, i, Debug, MediaDeviceRenderAudioStepModesFound, ol, MediaEngine, Step, + puid, id, id_, + string, deviceId, deviceID_, + size_t, totalModes, settingsList->size()); + + // copy modes to shared pointer list of settings + for (auto iter = settingsList->begin(); iter != settingsList->end(); ++iter) + { + deviceModes_.push_back(make_shared(*iter)); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::stepFigureOutMode() + { + { + if (recheckMode_) goto mode_needed; + if (!media_) goto mode_needed; + if (pendingSubscribers_.size() > 0) goto mode_needed; + return true; + } + + mode_needed: + { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "figure out mode"); + + recheckMode_ = false; + + TrackConstraintsList allConstraints; + + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) + { + auto &info = (*iter); + allConstraints.push_back(info.constraints_); + } + + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + allConstraints.push_back(subscriber->getConstraints()); + } + + auto found = obtainBestMode(allConstraints, deviceModes_); + + bool changed = false; + + MediaSubscriberMapPtr replacement(make_shared()); + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + if (subscriber->isShutdown()) { + changed = true; + continue; + } + (*replacement)[(*iter).first] = subscriber; + } + + if (found) { + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) { + auto &info = (*iter); + auto subscriber = MediaSubscriber::create(getAssociatedMessageQueue(), thisWeak_.lock(), info.constraints_, info.delegate_); + info.promise_->resolve(IMediaDeviceRenderPtr(subscriber)); + subscriber->notifyStateChanged(currentState_); + changed = true; + (*replacement)[subscriber->getID()] = subscriber; + } + } else { + for (auto iter = pendingSubscribers_.begin(); iter != pendingSubscribers_.end(); ++iter) { + auto &info = (*iter); + info.promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Conflict, "over constrained")); + } + } + pendingSubscribers_.clear(); + + if (changed) { + subscribers_ = replacement; + if (media_) { + media_->notifySubscribersChanged(subscribers_); + } + } + + if (subscribers_->size() < 1) { + found = UseSettingsPtr(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyDeviceIsIdleOrShutdownStateChanged(); + } + } + + if (found) { + if (found == requiredSettings_) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "optimal device mode has not changed"); + return true; + } + } + + if (isReady()) { + setState(IMediaDevice::State_Reinitializing); + } + + requiredSettings_ = found; + if (media_) { + media_->shutdown(); + } + } + return false; + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::stepWaitForMediaDevice() + { + if (media_->isShutdown()) { + media_.reset(); + } + + if (!media_) { + if (!requiredSettings_) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no media device mode required"); + return false; + } + media_ = Media::create(getAssociatedMessageQueue(), thisWeak_.lock(), deviceID_, requiredSettings_); + media_->notifySubscribersChanged(subscribers_); + } + + if (!media_->isReady()) { + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media device is not ready"); + return false; + } + + ZS_EVENTING_2(x, i, Trace, MediaDeviceRenderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "media device is ready"); + return true; + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::setState(States state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceRenderAudioSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IMediaDevice::toString(state), string, oldState, IMediaDevice::toString(currentState_)); + + currentState_ = state; + + for (auto iter = subscribers_->begin(); iter != subscribers_->end(); ++iter) { + auto &subscriber = (*iter).second; + subscriber->notifyStateChanged(currentState_); + } + +// MediaEnginePtr pThis = mThisWeak.lock(); +// if (pThis) { +// mSubscriptions.delegate()->onMediaEngineStateChanged(pThis, currentState_); +// } + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, MediaDeviceRenderAudioSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, MediaDeviceRenderAudioSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media + #pragma mark + + //------------------------------------------------------------------------- + const char *MediaDeviceRenderAudio::Media::toString(MediaStates state) + { + switch (state) + { + case MediaState_Pending: return "pending"; + case MediaState_Ready: return "ready"; + case MediaState_ShuttingDown: return "shutting down"; + case MediaState_Shutdown: return "shutdown"; + } + return "UNKNOWN"; + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::Media::Media( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + outer_(outer), + deviceID_(deviceID), + settings_(settings) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceRenderAudioMediaCreate, ol, MediaEngine, Start, puid, id, id_, string, deviceID, deviceID_); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::init() + { + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::Media::~Media() + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceRenderAudioMediaDestroy, ol, MediaEngine, Stop, puid, id, id_, string, deviceID, deviceID_); + + thisWeak_.reset(); + cancel(); + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::MediaPtr MediaDeviceRenderAudio::Media::create( + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ) + { + auto pThis(make_shared(make_private{}, queue, outer, deviceID, settings)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media => (for MediaDeviceRenderAudio) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceRenderAudioMediaShutdown, ol, MediaEngine, Close, puid, id, id_); + + auto pThis = thisWeak_.lock(); + postClosure([pThis] { + AutoRecursiveLock lock(*pThis); + pThis->cancel(); + }); + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::Media::isReady() const + { + AutoRecursiveLock lock(*this); + return MediaState_Ready == currentState_; + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::Media::isShuttingDown() const + { + AutoRecursiveLock lock(*this); + return MediaState_ShuttingDown == currentState_; + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::Media::isShutdown() const + { + AutoRecursiveLock lock(*this); + return MediaState_Shutdown == currentState_; + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::notifySubscribersChanged(MediaSubscriberMapPtr subscribers) + { + AutoRecursiveLock lock(*this); + subscribers_ = subscribers; + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) + { +#define TODO 1 +#define TODO 2 + } + + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::onWake() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceRenderAudioMediaWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::cancel() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceRenderAudioMediaCancel, ol, MediaEngine, Cancel, puid, id, id_); + + if (isShutdown()) return; + + setState(MediaState_ShuttingDown); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { +#define TODO 1 +#define TODO 2 + } + + setState(MediaState_Shutdown); + +#define TODO 1 +#define TODO 2 + + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaStateChanged(); + } + + gracefulShutdownReference_.reset(); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::step() + { + ZS_EVENTING_1(x, i, Trace, MediaDeviceRenderAudioMediaStep, ol, MediaEngine, Step, puid, id, id_); + +#define TODO 1 +#define TODO 2 + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, MediaDeviceRenderAudioMediaStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + // if (!stepDoSomething()) goto not_ready; + + goto ready; + + not_ready: + { + return; + } + + ready: + { + setState(MediaState_Ready); + } + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::setState(MediaStates state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceRenderAudioMediaSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, toString(state), string, oldState, toString(currentState_)); + + currentState_ = state; + + if (MediaState_Ready == state) { + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaStateChanged(); + } + } + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::Media::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, MediaDeviceRenderAudioMediaSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, MediaDeviceRenderAudioMediaSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + + auto pThis = thisWeak_.lock(); + if (pThis) { + auto outer = outer_.lock(); + if (outer) { + outer->notifyMediaFailure(pThis, lastError_, lastErrorReason_); + } + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber + #pragma mark + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::MediaSubscriber::MediaSubscriber( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceRenderDelegatePtr delegate + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + outer_(outer), + constraints_(constraints), + notifyDelegate_(delegate_), + delegate_(IMediaDeviceRenderDelegateProxy::createWeak(delegate)), + traceHelper_(id_) + { + ZS_EVENTING_2(x, i, Detail, MediaDeviceRenderAudioMediaSubscriberCreate, ol, MediaEngine, Start, puid, id, id_, puid, outerId, outer->getID()); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::MediaSubscriber::init() + { + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::MediaSubscriber::~MediaSubscriber() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceRenderAudioMediaSubscriberDestroy, ol, MediaEngine, Stop, puid, id, id_); + + thisWeak_.reset(); + cancel(); + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudio::MediaSubscriberPtr MediaDeviceRenderAudio::MediaSubscriber::create( + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceRenderDelegatePtr delegate + ) + { + auto pThis(make_shared(make_private{}, queue, outer, constraints, delegate)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => (for MediaDeviceRenderAudio) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::MediaSubscriber::shutdown() + { + ZS_EVENTING_1(x, i, Detail, MediaDeviceRenderAudioMediaSubscriberShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + //------------------------------------------------------------------------- + bool MediaDeviceRenderAudio::MediaSubscriber::isShutdown() const + { + return IMediaDevice::State_Shutdown == getState(); + } + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::MediaSubscriber::notifyStateChanged(States state) + { + auto pThis = thisWeak_.lock(); + + postClosure([pThis, state] { + AutoRecursiveLock lock(*pThis); + pThis->setState(state); + }); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => (for Media) + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => IMediaDeviceRender + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => IMediaDeviceRenderAudio + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::MediaSubscriber::notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) + { + auto outer = outer_.lock(); + if (!outer) return; + + outer->notifyAudioFrame(traceHelper_.trace(trace), frame); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => IMediaDevice + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::MediaSubscriber::cancel() + { + AutoRecursiveLock lock(*this); + + setState(IMediaDevice::State_ShuttingDown); + + setState(IMediaDevice::State_Shutdown); + + auto outer = outer_.lock(); + if (outer) { + outer->notifySusbcriberGone(); + } + + delegate_.reset(); + notifyDelegate_.reset(); + } + + //------------------------------------------------------------------------- + IMediaDevice::States MediaDeviceRenderAudio::MediaSubscriber::getState() const + { + AutoRecursiveLock lock(*this); + return lastReportedState_; + } + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => IMediaDeviceRender + #pragma mark + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => IMediaDeviceRenderAudio + #pragma mark + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void MediaDeviceRenderAudio::MediaSubscriber::setState(States state) + { + if (state == lastReportedState_) return; + if (IMediaDevice::State_Shutdown == lastReportedState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaDeviceRenderAudioMediaSubscriberSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IMediaDevice::toString(state), string, oldState, IMediaDevice::toString(lastReportedState_)); + + lastReportedState_ = state; + + auto pThis = thisWeak_.lock(); + if (!pThis) return; + if (!delegate_) return; + + try { + delegate_->onMediaDeviceRenderStateChanged(pThis, state); + } catch (const IMediaDeviceRenderDelegateProxy::Exceptions::DelegateGone &) { + delegate_.reset(); + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRenderAudioFactory + #pragma mark + + //------------------------------------------------------------------------- + IMediaDeviceRenderAudioFactory &IMediaDeviceRenderAudioFactory::singleton() + { + return MediaDeviceRenderAudioFactory::singleton(); + } + + //------------------------------------------------------------------------- + MediaDeviceRenderAudioPtr IMediaDeviceRenderAudioFactory::create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ) + { + if (this) {} + return internal::MediaDeviceRenderAudio::create(mediaEngine, deviceID); + } + + } // internal namespace +} diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index e8c86980..253f7192 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -263,11 +263,27 @@ namespace ortc } IMediaDevicesAsyncDelegateProxy::create(pThis)->onEnumerateDevices(promise); - return promise; } + //------------------------------------------------------------------------- + IMediaDevicesTypes::PromiseWithSettingsListPtr MediaDevices::enumerateDefaultModes(const char *deviceID) + { + PromiseWithSettingsListPtr promise = PromiseWithSettingsList::create(IORTCForInternal::queueDelegate()); + + MediaDevicesPtr pThis(MediaDevices::singleton()); + + if (!pThis) { + ZS_LOG_WARNING(Basic, slog("media devices singleton is gone")) + promise->reject(); + return promise; + } + + IMediaDevicesAsyncDelegateProxy::create(pThis)->onEnumerateDefaultModes(promise, deviceID); + return promise; + } + //------------------------------------------------------------------------- IMediaDevicesTypes::PromiseWithMediaStreamTrackListPtr MediaDevices::getUserMedia(const Constraints &constraints) { @@ -445,6 +461,18 @@ namespace ortc promise->resolve(value); } + //------------------------------------------------------------------------- + void MediaDevices::onEnumerateDefaultModes( + PromiseWithSettingsListPtr promise, + const char *deviceID + ) + { + AutoRecursiveLock lock(*this); +#define TODO_ENUMERATE_MODES 1 +#define TODO_ENUMERATE_MODES 2 + promise->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_NotImplemented, "method not implemented")); + } + //------------------------------------------------------------------------- void MediaDevices::onGetUserMedia(PromiseWithMediaStreamTrackListPtr promise, ConstraintsPtr constraints) { @@ -1027,7 +1055,7 @@ namespace ortc for (auto iter = begin(); iter != end(); ++iter) { auto &track = (*iter); - IHelper::debugAppend(resultEl, IMediaStreamTrack::toDebug(track)); + IMediaStreamTrack::trace(track); } return resultEl; diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp new file mode 100644 index 00000000..27d10ff6 --- /dev/null +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -0,0 +1,2050 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include + +#if 0 +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef WINRT +#include +#endif +#endif //0 + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(MediaEngineSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark (helpers) + #pragma mark + + // foreward declaration + void webrtcTrace(Log::Severity severity, Log::Level level, const char *message); + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngineSettingsDefaults + #pragma mark + + class MediaEngineSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~MediaEngineSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static MediaEngineSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static MediaEngineSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + } + + }; + + //------------------------------------------------------------------------- + void installMediaEngineSettingsDefaults() + { + MediaEngineSettingsDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForORTC + #pragma mark + + //------------------------------------------------------------------------- + void IMediaEngineForORTC::setLogLevel(Log::Level level) + { + IMediaEngineFactory::singleton().setLogLevel(level); + } + + //------------------------------------------------------------------------- + void IMediaEngineForORTC::ntpServerTime(const Milliseconds &value) + { + IMediaEngineFactory::singleton().ntpServerTime(value); + } + + //------------------------------------------------------------------------- + void IMediaEngineForORTC::startMediaTracing() + { + IMediaEngineFactory::singleton().startMediaTracing(); + } + + //------------------------------------------------------------------------- + void IMediaEngineForORTC::stopMediaTracing() + { + IMediaEngineFactory::singleton().stopMediaTracing(); + } + + //------------------------------------------------------------------------- + bool IMediaEngineForORTC::isMediaTracing() + { + return IMediaEngineFactory::singleton().isMediaTracing(); + } + + //------------------------------------------------------------------------- + bool IMediaEngineForORTC::saveMediaTrace(String filename) + { + return IMediaEngineFactory::singleton().saveMediaTrace(filename); + } + + //------------------------------------------------------------------------- + bool IMediaEngineForORTC::saveMediaTrace(String host, int port) + { + return IMediaEngineFactory::singleton().saveMediaTrace(host, port); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDeviceCapture + #pragma mark + + //------------------------------------------------------------------------- + IMediaDeviceCapture::MediaDeviceCapturePromisePtr IMediaEngineForMediaDeviceCapture::createMediaDeviceCapture( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) + { + return internal::IMediaEngineFactory::singleton().createMediaDeviceCapture(repaceExistingDeviceObjectID, kind, constraints, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDeviceRender + #pragma mark + + //------------------------------------------------------------------------- + IMediaEngineForMediaDeviceRender::MediaDeviceRenderPromisePtr IMediaEngineForMediaDeviceRender::createMediaDeviceRender( + MediaDeviceObjectID repaceExistingDeviceObjectID, + const TrackConstraints &constraints, + IMediaDeviceRenderDelegatePtr delegate + ) + { + return internal::IMediaEngineFactory::singleton().createMediaDeviceRender(repaceExistingDeviceObjectID, constraints, delegate); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDeviceRenderAudio + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTP + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPDecode + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPDecoderAudio + #pragma mark + + //------------------------------------------------------------------------- + IMediaEngineForRTPDecoderAudio::PromiseWithRTPDecoderAudioPtr IMediaEngineForRTPDecoderAudio::createRTPDecoderAudio( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) + { + return internal::IMediaEngineFactory::singleton().createRTPDecoderAudio(parameters, delegate); + } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPDecoderVideo + #pragma mark + + //------------------------------------------------------------------------- + IMediaEngineForRTPDecoderVideo::PromiseWithRTPDecoderVideoPtr IMediaEngineForRTPDecoderVideo::createRTPDecoderVideo( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) + { + return internal::IMediaEngineFactory::singleton().createRTPDecoderVideo(parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPEncoderAudio + #pragma mark + + //------------------------------------------------------------------------- + IMediaEngineForRTPEncoderAudio::PromiseWithRTPEncoderAudioPtr IMediaEngineForRTPEncoderAudio::createRTPEncoderAudio( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) + { + return internal::IMediaEngineFactory::singleton().createRTPEncoderAudio(parameters, delegate); + } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPEncoderVideo + #pragma mark + + //------------------------------------------------------------------------- + IMediaEngineForRTPEncoderVideo::PromiseWithRTPEncoderVideoPtr IMediaEngineForRTPEncoderVideo::createRTPEncoderVideo( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) + { + return internal::IMediaEngineFactory::singleton().createRTPEncoderVideo(parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + //--------------------------------------------------------------------------- + const char *MediaEngine::toString(States state) + { + switch (state) { + case State_Pending: return "pending"; + case State_WakingUp: return "waking up"; + case State_Ready: return "ready"; + case State_GoingToSleep: return "going to sleep"; + case State_Sleeping: return "sleeping"; + case State_ShuttingDown: return "shutting down"; + case State_Shutdown: return "shutdown"; + } + return "UNDEFINED"; + } + + //------------------------------------------------------------------------- + MediaEngine::MediaEngine( + const make_private &, + IMessageQueuePtr queue + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + traceCallback_(new WebRtcTraceCallback()), + logSink_(new WebRtcLogSink()) + { + ZS_EVENTING_1(x, i, Detail, MediaEngineCreate, ol, MediaEngine, Start, puid, id, id_); + } + + //------------------------------------------------------------------------- + void MediaEngine::init() + { + webrtc::Trace::CreateTrace(); + webrtc::Trace::SetTraceCallback(traceCallback_.get()); + + auto level = IORTCForInternal::webrtcLogLevel(); + if (level.hasValue()) { + internalSetLogLevel(level); + } + +#if defined(WINRT) + webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent); +#endif + + AutoRecursiveLock lock(*this); + + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + MediaEngine::~MediaEngine() + { + if (isNoop()) return; + + webrtc::Trace::SetTraceCallback(nullptr); + webrtc::Trace::ReturnTrace(); + + thisWeak_.reset(); + + cancel(); + ZS_EVENTING_1(x, i, Detail, MediaEngineDestroy, ol, MediaEngine, Stop, puid, id, id_); + } + + //----------------------------------------------------------------------- + MediaEnginePtr MediaEngine::singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + MediaEnginePtr MediaEngine::create() + { + auto pThis(make_shared(make_private{}, IORTCForInternal::queueBlockingMediaStartStopThread())); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForORTCPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForMediaDeviceCapturePtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForMediaDeviceCaptureAudioPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForMediaDeviceCaptureVideoPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForMediaDeviceRenderPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForMediaDeviceRenderAudioPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForRTPPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForRTPDecodePtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForRTPDecodeAudioPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForRTPDecodeVideoPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForRTPEncodePtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForRTPEncodeAudioPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + MediaEnginePtr MediaEngine::convert(ForRTPEncodeVideoPtr object) + { + return ZS_DYNAMIC_PTR_CAST(MediaEngine, object); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForORTC + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::internalSetLogLevel(Log::Level level) + { + webrtc::TraceLevel traceLevel{ webrtc::kTraceAll }; + rtc::LoggingSeverity rtcLevel{ rtc::LS_INFO }; + + switch (level) + { + case Log::Level::None: rtcLevel = rtc::LS_NONE; traceLevel = static_cast(webrtc::kTraceNone); break; + case Log::Level::Basic: rtcLevel = rtc::LS_ERROR; traceLevel = static_cast(webrtc::kTraceCritical | webrtc::kTraceError); break; + case Log::Level::Detail: rtcLevel = rtc::LS_WARNING; traceLevel = static_cast(webrtc::kTraceWarning | webrtc::kTraceError | webrtc::kTraceCritical); break; + case Log::Level::Debug: rtcLevel = rtc::LS_INFO; traceLevel = static_cast(webrtc::kTraceDefault); break; + case Log::Level::Trace: rtcLevel = rtc::LS_VERBOSE; traceLevel = static_cast(webrtc::kTraceDefault | webrtc::kTraceModuleCall | webrtc::kTraceTimer | webrtc::kTraceDebug); break; + case Log::Level::Insane: rtcLevel = rtc::LS_SENSITIVE; traceLevel = static_cast(webrtc::kTraceAll); break; + } + + rtc::LogMessage::RemoveLogToStream(logSink_.get()); + rtc::LogMessage::AddLogToStream(logSink_.get(), rtcLevel); + + webrtc::Trace::set_level_filter(traceLevel); + } + + //------------------------------------------------------------------------- + void MediaEngine::internalNTPServerTime(const Milliseconds &value) + { +#define TODO 1 +#define TODO 2 +#if 0 + rtc::SyncWithNtp(value.count()); +#endif //0 + } + + //------------------------------------------------------------------------- + void MediaEngine::internalStartMediaTracing() + { + traceLog_.EnableTraceInternalStorage(); + traceLog_.StartTracing(); + } + + //------------------------------------------------------------------------- + void MediaEngine::internalStopMediaTracing() + { + traceLog_.StopTracing(); + } + + //------------------------------------------------------------------------- + bool MediaEngine::internalIsMediaTracing() + { + return traceLog_.IsTracing(); + } + + //------------------------------------------------------------------------- + bool MediaEngine::internalSaveMediaTrace(String filename) + { + return traceLog_.Save(filename); + } + + //------------------------------------------------------------------------- + bool MediaEngine::internalSaveMediaTrace(String host, int port) + { + return traceLog_.Save(host, port); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDevice + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::notifyDeviceIsIdleOrShutdownStateChanged() + { + checkForIdleDevices_ = true; + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceCapture + #pragma mark + + //------------------------------------------------------------------------- + MediaEngine::MediaDeviceCapturePromisePtr MediaEngine::innerCreateMediaDeviceCapture( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingForMediaDeviceCapture info; + info.repaceExistingDeviceObjectID_ = repaceExistingDeviceObjectID; + info.kind_ = kind; + info.promise_ = MediaDeviceCapturePromise::create(IORTCForInternal::queueDelegate()); + info.constraints_ = TrackConstraints::create(constraints); + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingForMediaDeviceCaptures_.push_back(info); + pThis->step(); + }); + + return info.promise_; + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceCaptureAudio + #pragma mark + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceCaptureVideo + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceRender + #pragma mark + + //------------------------------------------------------------------------- + MediaEngine::MediaDeviceRenderPromisePtr MediaEngine::innerCreateMediaDeviceRender( + MediaDeviceObjectID repaceExistingDeviceObjectID, + const TrackConstraints &constraints, + IMediaDeviceRenderDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingForMediaDeviceRenderInfo info; + info.repaceExistingDeviceObjectID_ = repaceExistingDeviceObjectID; + info.promise_ = MediaDeviceRenderPromise::create(IORTCForInternal::queueDelegate()); + info.constraints_ = TrackConstraints::create(constraints); + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingForMediaDeviceRenders_.push_back(info); + pThis->step(); + }); + + return info.promise_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceRenderAudio + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTP + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::notifyRTPShutdownStateChanged() + { + checkForShutdownRTP_ = true; + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPDecoder + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPDecoderAudio + #pragma mark + + //------------------------------------------------------------------------- + MediaEngine::PromiseWithRTPDecoderAudioPtr MediaEngine::innerCreateRTPDecoderAudio( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingForRTPDecodeAudio info; + info.promise_ = PromiseWithRTPDecoderAudio::create(IORTCForInternal::queueDelegate()); + info.parameters_ = make_shared(parameters); + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingForRTPDecodeAudios_.push_back(info); + pThis->step(); + }); + + return info.promise_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPDecoderVideo + #pragma mark + + //------------------------------------------------------------------------- + MediaEngine::PromiseWithRTPDecoderVideoPtr MediaEngine::innerCreateRTPDecoderVideo( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingForRTPDecodeVideo info; + info.promise_ = PromiseWithRTPDecoderVideo::create(IORTCForInternal::queueDelegate()); + info.parameters_ = make_shared(parameters); + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingForRTPDecodeVideos_.push_back(info); + pThis->step(); + }); + + return info.promise_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPEncoder + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPEncoderAudio + #pragma mark + + //------------------------------------------------------------------------- + MediaEngine::PromiseWithRTPEncoderAudioPtr MediaEngine::innerCreateRTPEncoderAudio( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingForRTPEncodeAudio info; + info.promise_ = PromiseWithRTPEncoderAudio::create(IORTCForInternal::queueDelegate()); + info.parameters_ = make_shared(parameters); + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingForRTPEncodeAudios_.push_back(info); + pThis->step(); + }); + + return info.promise_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPEncoderVideo + #pragma mark + + //------------------------------------------------------------------------- + MediaEngine::PromiseWithRTPEncoderVideoPtr MediaEngine::innerCreateRTPEncoderVideo( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) + { + auto pThis = thisWeak_.lock(); + + PendingForRTPEncodeVideo info; + info.promise_ = PromiseWithRTPEncoderVideo::create(IORTCForInternal::queueDelegate()); + info.parameters_ = make_shared(parameters); + info.delegate_ = delegate; + + postClosure([pThis, info] { + AutoRecursiveLock lock(*pThis); + pThis->pendingForRTPEncodeVideos_.push_back(info); + pThis->step(); + }); + + return info.promise_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaDevicesDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::onMediaDevicesChanged() + { + ZS_EVENTING_1(x, i, Trace, MediaEngineOnMediaDevicesChanged, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + refreshDevicesList_ = true; + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::onWake() + { + ZS_EVENTING_1(x, i, Trace, MediaEngineOnWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => ITimerDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::onTimer(ITimerPtr timer) + { + ZS_EVENTING_2(x, i, Trace, MediaEngineOnTimer, ol, MediaEngine, Event, puid, id, id_, puid, timerId, timer->getID()); + + AutoRecursiveLock lock(*this); + // NOTE: ADD IF NEEDED... + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IPromiseSettledDelegate + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::onPromiseSettled(PromisePtr promise) + { + ZS_EVENTING_2(x, i, Trace, MediaEngineOnPromiseSettled, ol, MediaEngine, Event, puid, id, id_, puid, promiseId, promise->getID()); + + AutoRecursiveLock lock(*this); + auto found = pendingPromises_.find(promise->getID()); + if (found != pendingPromises_.end()) { + pendingPromises_.erase(found); + + if (promise->isRejected()) { + setError(promise); + cancel(); + return; + } + } + + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => webrtc::SetupEventTracer + #pragma mark + +#if defined(WINRT) + //------------------------------------------------------------------------- + const unsigned char *MediaEngine::GetCategoryGroupEnabled(const char *categoryGroup) + { + return reinterpret_cast("webrtc"); + } + + //------------------------------------------------------------------------- + void __cdecl MediaEngine::AddTraceEvent( + char phase, + const unsigned char *categoryGroupEnabled, + const char *name, + uint64_t id, + int numArgs, + const char **argNames, + const unsigned char *argTypes, + const uint64_t *argValues, + unsigned char flags + ) + { + auto engine = MediaEngine::singleton(); + if (engine) { + engine->internalAddTraceEvent(phase, categoryGroupEnabled, name, id, + numArgs, argNames, argTypes, argValues, flags); + } + } +#endif //defined(WINRT) + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => (internal) + #pragma mark + +#if defined(WINRT) + //------------------------------------------------------------------------- + void MediaEngine::internalAddTraceEvent( + char phase, + const unsigned char *categoryGroupEnabled, + const char *name, + uint64_t id, + int numArgs, + const char **argNames, + const unsigned char *argTypes, + const uint64_t *argValues, + unsigned char flags + ) + { + traceLog_.Add(phase, categoryGroupEnabled, name, id, numArgs, argNames, argTypes, argValues, flags); + } +#endif //defined(WINRT) + + //------------------------------------------------------------------------- + void MediaEngine::cancel() + { + //....................................................................... + // try to gracefully shutdown + + if (isShutdown()) return; + + setState(State_ShuttingDown); + + if (devicesSubscription_) { + devicesSubscription_->cancel(); + devicesSubscription_.reset(); + } + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { + // perform any graceful asynchronous shutdown processes needed and + // re-attempt shutdown again later if needed. + + if (!stepPendingPromises()) return; + + if (!stepShutdownPendingRequests()) return; + if (!stepShutdownDevicesAndRTP()) return; + +#define TODO_IMPLEMENT_MEDIA_GRACEFUL_SHUTDOWN 1 +#define TODO_IMPLEMENT_MEDIA_GRACEFUL_SHUTDOWN 2 + // return; + } + + //....................................................................... + // final cleanup (hard shutdown) + + setState(State_Shutdown); + stepShutdownDevicesAndRTP(); + +#define TODO_IMPLEMENT_MEDIA_HARD_SHUTDOWN 1 +#define TODO_IMPLEMENT_MEDIA_HARD_SHUTDOWN 2 + + // make sure to cleanup any final reference to self + gracefulShutdownReference_.reset(); + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepShutdownPendingRequests() + { + for (auto iter_doNotUse = pendingForMediaDeviceCaptures_.begin(); iter_doNotUse != pendingForMediaDeviceCaptures_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingForMediaDeviceCaptures_.erase(current); + } + + for (auto iter_doNotUse = pendingForMediaDeviceRenders_.begin(); iter_doNotUse != pendingForMediaDeviceRenders_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingForMediaDeviceRenders_.erase(current); + } + + for (auto iter_doNotUse = pendingForRTPDecodeAudios_.begin(); iter_doNotUse != pendingForRTPDecodeAudios_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingForRTPDecodeAudios_.erase(current); + } + + for (auto iter_doNotUse = pendingForRTPDecodeVideos_.begin(); iter_doNotUse != pendingForRTPDecodeVideos_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingForRTPDecodeVideos_.erase(current); + } + + for (auto iter_doNotUse = pendingForRTPEncodeAudios_.begin(); iter_doNotUse != pendingForRTPEncodeAudios_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingForRTPEncodeAudios_.erase(current); + } + + for (auto iter_doNotUse = pendingForRTPEncodeVideos_.begin(); iter_doNotUse != pendingForRTPEncodeVideos_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto pending = (*current).promise_; + + pending->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + pendingForRTPEncodeVideos_.erase(current); + } + + if (pendingForMediaDeviceCaptures_.size() > 0) return false; + if (pendingForMediaDeviceRenders_.size() > 0) return false; + if (pendingForRTPDecodeAudios_.size() > 0) return false; + if (pendingForRTPDecodeVideos_.size() > 0) return false; + if (pendingForRTPEncodeAudios_.size() > 0) return false; + if (pendingForRTPEncodeVideos_.size() > 0) return false; + + return true; + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepShutdownDevicesAndRTP() + { + for (auto iter_doNotUse = captureDevices_.begin(); iter_doNotUse != captureDevices_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto device = (*current).second; + + device->shutdown(); + if (!device->isShutdown()) continue; + + captureDevices_.erase(current); + } + + for (auto iter_doNotUse = renderDevices_.begin(); iter_doNotUse != renderDevices_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto device = (*current).second; + + device->shutdown(); + if (!device->isShutdown()) continue; + + renderDevices_.erase(current); + } + + for (auto iter_doNotUse = rtpEncoders_.begin(); iter_doNotUse != rtpEncoders_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto encoder = (*current).second; + + encoder->shutdown(); + if (!encoder->isShutdown()) continue; + + rtpEncoders_.erase(current); + } + + for (auto iter_doNotUse = rtpDecoders_.begin(); iter_doNotUse != rtpDecoders_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto decoder = (*current).second; + + decoder->shutdown(); + if (!decoder->isShutdown()) continue; + + rtpDecoders_.erase(current); + } + + if (captureDevices_.size() > 0) return false; + if (renderDevices_.size() > 0) return false; + + if (rtpEncoders_.size() > 0) return false; + if (rtpDecoders_.size() > 0) return false; + + return true; + } + + //------------------------------------------------------------------------- + void MediaEngine::step() + { + ZS_EVENTING_1(x, i, Trace, MediaEngineStep, ol, MediaEngine, Step, puid, id, id_); + + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, MediaEngineStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + if (!stepPendingPromises()) return; + if (!stepRefreshDeviceList()) goto not_ready; + + if ((isPending()) || + (isReady()) || + (isSleeping())) { + stepFixState(); + } + + if (isGoingToSleep()) { + if (!stepGoingToSleep1()) goto not_ready; + } + + if (isSleeping()) { + goto sleeping; + } + + if (isWakingUp()) { + if (!stepWakeUp1()) goto not_ready; + } + + if (!stepReady1()) return; + + if (!stepShutdownDevices()) return; + if (!stepShutdownRTP()) return; + if (!stepStartPendingDevices()) return; + if (!stepStartPendingRTP()) return; + + goto ready; + + not_ready: + { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); + return; + } + + sleeping: + { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "sleeping"); + setState(State_Sleeping); + return; + } + + ready: + { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); + setState(State_Ready); + return; + } + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepPendingPromises() + { + if (pendingPromises_.size() > 0) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "promises are still pending"); + return false; + } + + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no promises are pending"); + return true; + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepRefreshDeviceList() + { + if (!devicesSubscription_) { + devicesSubscription_ = UseMediaDevices::subscribe(thisWeak_.lock()); + } + + if ((!refreshDevicesList_) && + (!devicesListPromise_)) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "refresh device list skipped (no change notified)"); + return true; + } + + if (devicesListPromise_) { + if (!devicesListPromise_->isSettled()) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "refresh device list still pending"); + return true; + } + + if (devicesListPromise_->isRejected()) { + devicesListPromise_.reset(); + ZS_EVENTING_2(x, w, Debug, MediaEngineStepWarningMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "refresh device list failed"); + return true; + } + + auto deviceList = devicesListPromise_->value(); + mediaDevices_ = deviceList; + } + + if (!refreshDevicesList_) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "refresh device list completed"); + return true; + } + + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "refresh device list"); + + refreshDevicesList_ = false; + + devicesListPromise_ = UseMediaDevices::enumerateDevices(); + if (!devicesListPromise_) { + ZS_EVENTING_2(x, w, Debug, MediaEngineStepWarningMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "failed to enumerate devices"); + return true; + } + + devicesListPromise_->thenWeak(thisWeak_.lock()); + return true; + } + + //------------------------------------------------------------------------- + void MediaEngine::stepFixState() + { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "fix state"); + + { + if (pendingForMediaDeviceCaptures_.size() > 0) goto need_media; + if (pendingForMediaDeviceRenders_.size() > 0) goto need_media; + if (pendingForRTPDecodeAudios_.size() > 0) goto need_media; + if (pendingForRTPDecodeVideos_.size() > 0) goto need_media; + if (pendingForRTPEncodeAudios_.size() > 0) goto need_media; + if (pendingForRTPEncodeVideos_.size() > 0) goto need_media; + + if (captureDevices_.size() > 0) goto need_media; + if (renderDevices_.size() > 0) goto need_media; + + if (rtpEncoders_.size() > 0) goto need_media; + if (rtpDecoders_.size() > 0) goto need_media; + + goto sleep_now; + } + + need_media: + { + setState(State_WakingUp); + return; + } + + sleep_now: + { + setState(State_GoingToSleep); + return; + } + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepWakeUp1() + { + if (completedWakeUp1_) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "wake up 1 already completed"); + return true; + } + + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "wake up 1"); + + performAsync(std::bind(&MediaEngine::onStepWakeUp1, this, std::placeholders::_1)); + return false; + } + + //------------------------------------------------------------------------- + void MediaEngine::onStepWakeUp1(PromisePtr promise) + { + // NOT in a lock + + completedWakeUp1_ = true; + promise->resolve(); + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepGoingToSleep1() + { + if (completedGoingToSleep1_) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "going to sleep 1 already completed"); + return false; + } + + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "going to sleep 1"); + + performAsync(std::bind(&MediaEngine::onStepGoingToSleep1, this, std::placeholders::_1)); + return true; + } + + //------------------------------------------------------------------------- + void MediaEngine::onStepGoingToSleep1(PromisePtr promise) + { + // NOT in a lock + completedGoingToSleep1_ = true; + promise->resolve(); + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepShutdownDevices() + { + if (!((checkForIdleDevices_) || (shuttingDownIdleDevices_))) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no devices have reported being idle and no devices are in the middle of shutting down"); + return true; + } + + checkForIdleDevices_ = false; + shuttingDownIdleDevices_ = false; + + for (auto iter_doNotUse = captureDevices_.begin(); iter_doNotUse != captureDevices_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto &deviceID = (*current).first; + auto &device = (*current).second; + if (device->isShutdown()) { + ZS_EVENTING_3(x, i, Debug, MediaEngineStepShutdownDevice, ol, MediaEngine, Step, puid, id, id_, string, deviceId, deviceID, string, message, "capture device is reported shutdown"); + captureDevices_.erase(current); + continue; + } + + if (device->isDeviceIdle()) { + ZS_EVENTING_3(x, i, Debug, MediaEngineStepShutdownDevice, ol, MediaEngine, Step, puid, id, id_, string, deviceId, deviceID, string, message, "capture device is idle (requesting shutdown)"); + device->shutdown(); + shuttingDownIdleDevices_ = true; + } + } + + for (auto iter_doNotUse = renderDevices_.begin(); iter_doNotUse != renderDevices_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto &deviceID = (*current).first; + auto &device = (*current).second; + if (device->isShutdown()) { + ZS_EVENTING_3(x, i, Debug, MediaEngineStepShutdownDevice, ol, MediaEngine, Step, puid, id, id_, string, deviceId, deviceID, string, message, "render device is reported shutdown"); + renderDevices_.erase(current); + continue; + } + + if (device->isDeviceIdle()) { + ZS_EVENTING_3(x, i, Debug, MediaEngineStepShutdownDevice, ol, MediaEngine, Step, puid, id, id_, string, deviceId, deviceID, string, message, "render device is idle (requesting shutdown)"); + device->shutdown(); + shuttingDownIdleDevices_ = true; + } + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepShutdownRTP() + { + if (!checkForShutdownRTP_) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no rtp notified being shutting down"); + return true; + } + + checkForShutdownRTP_ = false; + + for (auto iter_doNotUse = rtpDecoders_.begin(); iter_doNotUse != rtpDecoders_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto decoder = (*current).second; + + if (!decoder->isShutdown()) continue; + rtpDecoders_.erase(current); + } + + for (auto iter_doNotUse = rtpEncoders_.begin(); iter_doNotUse != rtpEncoders_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto encoder = (*current).second; + + if (!encoder->isShutdown()) continue; + rtpEncoders_.erase(current); + } + + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "rtp shutting down"); + return true; + } + + //------------------------------------------------------------------------- + static void getExactDeviceIDs( + const MediaEngine::TrackConstraints &constraints, + MediaEngine::StringList &outValues + ) + { + constraints.mDeviceID.exact(outValues); + for (auto iter = constraints.mAdvanced.begin(); iter != constraints.mAdvanced.end(); ++iter) { + (*iter)->mDeviceID.exact(outValues); + } + } + + //------------------------------------------------------------------------- + static void getIdealDeviceIDs( + const MediaEngine::TrackConstraints &constraints, + MediaEngine::StringList &outValues + ) + { + constraints.mDeviceID.ideal(outValues); + for (auto iter = constraints.mAdvanced.begin(); iter != constraints.mAdvanced.end(); ++iter) { + (*iter)->mDeviceID.ideal(outValues); + } + } + + //------------------------------------------------------------------------- + static void getExactGroupIDs( + const MediaEngine::TrackConstraints &constraints, + MediaEngine::StringList &outValues + ) + { + constraints.mGroupID.exact(outValues); + for (auto iter = constraints.mAdvanced.begin(); iter != constraints.mAdvanced.end(); ++iter) { + (*iter)->mGroupID.exact(outValues); + } + } + + //------------------------------------------------------------------------- + static void getIdealGroupIDs( + const MediaEngine::TrackConstraints &constraints, + MediaEngine::StringList &outValues + ) + { + constraints.mGroupID.ideal(outValues); + for (auto iter = constraints.mAdvanced.begin(); iter != constraints.mAdvanced.end(); ++iter) { + (*iter)->mGroupID.ideal(outValues); + } + } + + //------------------------------------------------------------------------- + static bool doesListContain(const MediaEngine::StringList &values, const String &value) + { + for (auto iter = values.begin(); iter != values.end(); ++iter) { + if (value == (*iter)) return true; + } + return false; + } + + //------------------------------------------------------------------------- + static bool findDevice( + bool capture, + MediaEngine::Kinds kind, + const MediaEngine::DeviceList &devices, + const MediaEngine::TrackConstraints &constraints, + String &outUseDeviceID, + String &outUseGroupID + ) + { + MediaEngine::StringList exactDeviceIDs; + MediaEngine::StringList idealDeviceIDs; + + MediaEngine::StringList exactGroupIDs; + MediaEngine::StringList idealGroupIDs; + + getExactDeviceIDs(constraints, exactDeviceIDs); + getIdealDeviceIDs(constraints, idealDeviceIDs); + + getExactGroupIDs(constraints, exactGroupIDs); + getIdealGroupIDs(constraints, idealGroupIDs); + + for (auto iterDeviceList = devices.begin(); iterDeviceList != devices.end(); ++iterDeviceList) { + auto &device = (*iterDeviceList); + + if (capture) { + switch (kind) { + case IMediaStreamTrackTypes::Kind_Audio: if (IMediaDevicesTypes::DeviceKind_AudioInput != device.mKind) continue; + case IMediaStreamTrackTypes::Kind_Video: if (IMediaDevicesTypes::DeviceKind_VideoInput != device.mKind) continue; + } + } + if (device.mKind != kind) continue; + + if (exactDeviceIDs.size() > 0) { + if (!doesListContain(exactDeviceIDs, device.mDeviceID)) continue; + if (exactGroupIDs.size() > 0) { + if (!doesListContain(exactGroupIDs, device.mGroupID)) continue; + } + outUseDeviceID = device.mDeviceID; + outUseGroupID = device.mGroupID; + return true; + } + + if (exactGroupIDs.size() > 0) { + if (!doesListContain(exactGroupIDs, device.mGroupID)) continue; + outUseDeviceID = device.mDeviceID; + outUseGroupID = device.mGroupID; + return true; + } + + if (outUseDeviceID.hasData()) continue; + + if (idealDeviceIDs.size() > 0) { + if (!doesListContain(idealDeviceIDs, device.mDeviceID)) continue; + if (idealGroupIDs.size() > 0) { + if (!doesListContain(idealGroupIDs, device.mGroupID)) continue; + } + outUseDeviceID = device.mDeviceID; + outUseGroupID = device.mGroupID; + continue; + } + + if (idealGroupIDs.size() > 0) { + if (!doesListContain(idealGroupIDs, device.mGroupID)) continue; + outUseDeviceID = device.mDeviceID; + outUseGroupID = device.mGroupID; + continue; + } + + outUseDeviceID = device.mDeviceID; + outUseGroupID = device.mGroupID; + } + return outUseDeviceID.hasData(); + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepStartPendingDevices() + { + if ((checkForIdleDevices_) || (shuttingDownIdleDevices_) || (devicesListPromise_)) { + ZS_EVENTING_2(x, i, Trace, MediaEngineStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "start pending devices step skipped (cannot start devices while device list is being obtained or when shutting down existing devices)"); + return true; + } + + for (auto iter_doNotUse = pendingForMediaDeviceCaptures_.begin(); iter_doNotUse != pendingForMediaDeviceCaptures_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto &info = (*current); + + if (!mediaDevices_) { + info.promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_NoContent, "no media devices were found connected")); + pendingForMediaDeviceCaptures_.erase(current); + continue; + } + + String useDeviceID; + String useGroupID; + + if (!findDevice(true, info.kind_, *mediaDevices_, *info.constraints_, useDeviceID, useGroupID)) { + info.promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_NotFound, "media capture device was not found")); + pendingForMediaDeviceCaptures_.erase(current); + continue; + } + + UseMediaDeviceCapturePtr useDevice; + + auto found = captureDevices_.find(useDeviceID); + if (found == captureDevices_.end()) { + switch (info.kind_) { + case IMediaStreamTrackTypes::Kind_Audio: useDevice = UseMediaDeviceCaptureAudio::create(thisWeak_.lock(), useDeviceID); break; + case IMediaStreamTrackTypes::Kind_Video: useDevice = UseMediaDeviceCaptureVideo::create(thisWeak_.lock(), useDeviceID); break; + } + captureDevices_[useDeviceID] = useDevice; + } else { + useDevice = (*found).second; + } + + useDevice->mediaDeviceCaptureSubscribe(info.promise_, info.repaceExistingDeviceObjectID_, info.constraints_, info.delegate_); + pendingForMediaDeviceCaptures_.erase(current); + } + + for (auto iter_doNotUse = pendingForMediaDeviceRenders_.begin(); iter_doNotUse != pendingForMediaDeviceRenders_.end(); ) + { + auto current = iter_doNotUse; + ++iter_doNotUse; + + auto &info = (*current); + + if (!mediaDevices_) { + info.promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_NoContent, "no media devices were found connected")); + pendingForMediaDeviceRenders_.erase(current); + continue; + } + + String useDeviceID; + String useGroupID; + + if (!findDevice(false, IMediaStreamTrackTypes::Kind_Audio, *mediaDevices_, *info.constraints_, useDeviceID, useGroupID)) { + info.promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_NotFound, "media render device was not found")); + pendingForMediaDeviceRenders_.erase(current); + continue; + } + + UseMediaDeviceRenderPtr useDevice; + + auto found = renderDevices_.find(useDeviceID); + if (found == renderDevices_.end()) { + useDevice = UseMediaDeviceRenderAudio::create(thisWeak_.lock(), useDeviceID); + renderDevices_[useDeviceID] = useDevice; + } else { + useDevice = (*found).second; + } + + useDevice->mediaDeviceRenderSubscribe(info.promise_, info.repaceExistingDeviceObjectID_, info.constraints_, info.delegate_); + pendingForMediaDeviceRenders_.erase(current); + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepReady1() + { + //............................... + + bool shouldDoThis = false; + if (shouldDoThis) { + performAsync(std::bind(&MediaEngine::onReady1, this, std::placeholders::_1)); + } + + //............................... + + bool shouldDoThisOtherThing = false; + if (shouldDoThisOtherThing) { + auto pThis = thisWeak_.lock(); + performAsyncClosure([pThis] { /* pThis->doSomethingThatCantFail(); */ }); + } + + //............................... + + bool shouldDoSomethingElseToo = false; + if (shouldDoSomethingElseToo) { + + struct SomeResult : public Any + { + int someResult_ {}; + }; + + auto pThis = thisWeak_.lock(); + auto promise = Promise::create(getAssociatedMessageQueue()); + + /* perform some step that should not be in a lock */ + performAsyncClosure(promise, [pThis, promise] { + /* not in a lock */ + + bool didFail = false; + if (didFail) + { + promise->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Conflict, "I didn't like this value")); + } + + auto result = make_shared(); + result->someResult_ = -1; + promise->resolve(result); + }); + + /* complete the step here */ + promise->thenClosure([promise, pThis] { + /* because this is locked no other step will be performed at this time */ + AutoRecursiveLock lock(*pThis); + + if (pThis->isShuttingDown() || pThis->isShutdown()) { + ZS_EVENTING_2(x, w, Debug, MediaEngineStepWarningMessage, ol, MediaEngine, Step, puid, id, pThis->id_, string, message, "will not perform this additional step if shutting down"); + return; + } + + /* ... continue here ... */ + + if (promise->isRejected()) { + pThis->setError(promise); + pThis->cancel(); + return; + } + + auto result = promise->value(); + if (!result) { + } + }); + + } + + return true; + } + + //------------------------------------------------------------------------- + bool MediaEngine::stepStartPendingRTP() + { + { + for (auto iter = pendingForRTPDecodeAudios_.begin(); iter != pendingForRTPDecodeAudios_.end(); ++iter) + { + auto &info = (*iter); + + auto result = UseRTPDecoderAudio::create(info.promise_, thisWeak_.lock(), info.parameters_, info.delegate_); + rtpDecoders_[result->getID()] = result; + } + pendingForRTPDecodeAudios_.clear(); + } + { + for (auto iter = pendingForRTPDecodeVideos_.begin(); iter != pendingForRTPDecodeVideos_.end(); ++iter) + { + auto &info = (*iter); + + auto result = UseRTPDecoderVideo::create(info.promise_, thisWeak_.lock(), info.parameters_, info.delegate_); + rtpDecoders_[result->getID()] = result; + } + pendingForRTPDecodeVideos_.clear(); + } + { + for (auto iter = pendingForRTPEncodeAudios_.begin(); iter != pendingForRTPEncodeAudios_.end(); ++iter) + { + auto &info = (*iter); + + auto result = UseRTPEncoderAudio::create(info.promise_, thisWeak_.lock(), info.parameters_, info.delegate_); + rtpEncoders_[result->getID()] = result; + } + pendingForRTPEncodeAudios_.clear(); + } + { + for (auto iter = pendingForRTPEncodeVideos_.begin(); iter != pendingForRTPEncodeVideos_.end(); ++iter) + { + auto &info = (*iter); + + auto result = UseRTPEncoderVideo::create(info.promise_, thisWeak_.lock(), info.parameters_, info.delegate_); + rtpEncoders_[result->getID()] = result; + } + pendingForRTPEncodeVideos_.clear(); + } + return true; + } + + //------------------------------------------------------------------------- + void MediaEngine::onReady1(PromisePtr promise) + { + // NOT in a lock + promise->resolve(); + } + + //------------------------------------------------------------------------- + void MediaEngine::performAsync(std::function func) + { + auto pThis = thisWeak_.lock(); + + auto promise = Promise::create(getAssociatedMessageQueue()); + promise->thenWeak(pThis); + + pendingPromises_[promise->getID()] = promise; + postClosure([func, promise] { func(promise); }); + } + + //------------------------------------------------------------------------- + void MediaEngine::setState(States state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, MediaEngineSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, toString(state), string, oldState, toString(currentState_)); + + currentState_ = state; + + // reset wakup states + completedWakeUp1_ = false; + + // reset going to sleep states + completedGoingToSleep1_ = false; + +// MediaEnginePtr pThis = mThisWeak.lock(); +// if (pThis) { +// mSubscriptions.delegate()->onMediaEngineStateChanged(pThis, currentState_); +// } + } + + //------------------------------------------------------------------------- + void MediaEngine::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void MediaEngine::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, MediaEngineSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, MediaEngineSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine::WebRtcTraceCallback + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::WebRtcTraceCallback::Print(webrtc::TraceLevel trace, const char* message, int length) + { + static const size_t stripLength = 34; + + Log::Severity severity {Log::Severity::Informational}; + Log::Level level {Log::Level::Basic}; + + switch (trace) + { + case webrtc::kTraceNone: level = Log::Level::None; break; + case webrtc::kTraceStateInfo: level = Log::Level::Debug; break; + case webrtc::kTraceCritical: severity = Log::Severity::Fatal; level = Log::Level::Basic; break; + case webrtc::kTraceError: severity = Log::Severity::Error; level = Log::Level::Basic; break; + case webrtc::kTraceWarning: severity = Log::Severity::Warning; level = Log::Level::Detail; break; + case webrtc::kTraceApiCall: level = Log::Level::Debug; break; + case webrtc::kTraceDefault: level = Log::Level::Debug; break; + case webrtc::kTraceModuleCall: level = Log::Level::Trace; break; + case webrtc::kTraceMemory: level = Log::Level::Trace; break; + case webrtc::kTraceTimer: level = Log::Level::Trace; break; + case webrtc::kTraceStream: level = Log::Level::Insane; break; + case webrtc::kTraceDebug: level = Log::Level::Insane; break; + case webrtc::kTraceInfo: level = Log::Level::Insane; break; + case webrtc::kTraceTerseInfo: level = Log::Level::Insane; break; + case webrtc::kTraceAll: level = Log::Level::Insane; break; + } + + // Skip past boilerplate prefix text + if (length < stripLength) { + std::string msg(message, length); + webrtcTrace(Log::Severity::Error, Log::Level::Basic, (std::string("Malformed webrtc log message: ") + msg).c_str()); + } else { + std::string msg(message + (stripLength-1), length - stripLength); + webrtcTrace(severity, level, msg.c_str()); + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine::WebRtcTraceCallback + #pragma mark + + //------------------------------------------------------------------------- + void MediaEngine::WebRtcLogSink::OnLogMessage(const std::string& message) + { + if (message.length() < 1) return; + + bool hasEOL = ('\n' == message[message.length() - 1]); + + std::string msg(message.c_str(), message.length() - (hasEOL ? 1 : 0)); + + webrtcTrace(Log::Severity::Informational, Log::Level::Basic, msg.c_str()); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineFactory + #pragma mark + + //------------------------------------------------------------------------- + IMediaEngineFactory &IMediaEngineFactory::singleton() + { + return MediaEngineFactory::singleton(); + } + + //------------------------------------------------------------------------- + MediaEnginePtr IMediaEngineFactory::create() + { + if (this) {} + return internal::MediaEngine::create(); + } + + //------------------------------------------------------------------------- + void IMediaEngineFactory::setLogLevel(Log::Level level) + { + if (this) {} + internal::MediaEngine::setLogLevel(level); + } + + //------------------------------------------------------------------------- + void IMediaEngineFactory::ntpServerTime(const Milliseconds &value) + { + if (this) {} + internal::MediaEngine::ntpServerTime(value); + } + + //------------------------------------------------------------------------- + void IMediaEngineFactory::startMediaTracing() + { + if (this) {} + return internal::MediaEngine::startMediaTracing(); + } + + //------------------------------------------------------------------------- + void IMediaEngineFactory::stopMediaTracing() + { + if (this) {} + internal::MediaEngine::stopMediaTracing(); + } + + //------------------------------------------------------------------------- + bool IMediaEngineFactory::isMediaTracing() + { + if (this) {} + return internal::MediaEngine::isMediaTracing(); + } + + //------------------------------------------------------------------------- + bool IMediaEngineFactory::saveMediaTrace(String filename) + { + if (this) {} + return internal::MediaEngine::saveMediaTrace(filename); + } + + //------------------------------------------------------------------------- + bool IMediaEngineFactory::saveMediaTrace(String host, int port) + { + if (this) {} + return internal::MediaEngine::saveMediaTrace(host, port); + } + + //------------------------------------------------------------------------- + IMediaEngineFactory::MediaDeviceCapturePromisePtr IMediaEngineFactory::createMediaDeviceCapture( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) + { + if (this) {} + return internal::MediaEngine::createMediaDeviceCapture(repaceExistingDeviceObjectID, kind, constraints, delegate); + } + + //------------------------------------------------------------------------- + IMediaEngineFactory::MediaDeviceRenderPromisePtr IMediaEngineFactory::createMediaDeviceRender( + MediaDeviceObjectID repaceExistingDeviceObjectID, + const TrackConstraints &constraints, + IMediaDeviceRenderDelegatePtr delegate + ) + { + if (this) {} + return internal::MediaEngine::createMediaDeviceRender(repaceExistingDeviceObjectID, constraints, delegate); + } + + //------------------------------------------------------------------------- + IMediaEngineFactory::PromiseWithRTPDecoderAudioPtr IMediaEngineFactory::createRTPDecoderAudio( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) + { + if (this) {} + return internal::MediaEngine::createRTPDecoderAudio(parameters, delegate); + } + + //------------------------------------------------------------------------- + IMediaEngineFactory::PromiseWithRTPDecoderVideoPtr IMediaEngineFactory::createRTPDecoderVideo( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) + { + if (this) {} + return internal::MediaEngine::createRTPDecoderVideo(parameters, delegate); + } + + //------------------------------------------------------------------------- + IMediaEngineFactory::PromiseWithRTPEncoderAudioPtr IMediaEngineFactory::createRTPEncoderAudio( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) + { + if (this) {} + return internal::MediaEngine::createRTPEncoderAudio(parameters, delegate); + } + + //------------------------------------------------------------------------- + IMediaEngineFactory::PromiseWithRTPEncoderVideoPtr IMediaEngineFactory::createRTPEncoderVideo( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) + { + if (this) {} + return internal::MediaEngine::createRTPEncoderVideo(parameters, delegate); + } + + + } // internal namespace +} diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index 96329246..f849edf6 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -31,19 +32,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include #include +#include + #include #include @@ -143,6 +138,7 @@ namespace ortc MediaStreamTrackSettingsDefaults::singleton(); } +#if 0 //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -461,8 +457,6 @@ namespace ortc void MediaStreamTrack::stop() { AutoRecursiveLock lock(*this); - if (mDeviceResource) - mDeviceResource->stop(); } //------------------------------------------------------------------------- @@ -498,29 +492,11 @@ namespace ortc } //------------------------------------------------------------------------- - void MediaStreamTrack::setVideoRenderCallback(IMediaStreamTrackRenderCallbackPtr callback) - { - AutoRecursiveLock lock(*this); - - mVideoRendererCallback = callback; - if (mDeviceResource) - mDeviceResource->setVideoRenderCallback(callback); - } - - //------------------------------------------------------------------------- - void MediaStreamTrack::setH264Rendering(bool h264Rendering) + IMediaStreamTrackMediaSubscriptionPtr MediaStreamTrack::installMediaDelegate(IMediaStreamTrackMediaDelegatePtr delegate) { - AutoRecursiveLock lock(*this); - - mH264Rendering = h264Rendering; - } - - //------------------------------------------------------------------------- - bool MediaStreamTrack::isH264Rendering() - { - AutoRecursiveLock lock(*this); - - return mH264Rendering; +#define TODO 1 +#define TODO 2 + return IMediaStreamTrackMediaSubscriptionPtr(); } //------------------------------------------------------------------------- @@ -647,8 +623,6 @@ namespace ortc void MediaStreamTrack::renderVideoFrame(VideoFramePtr videoFrame) { AutoRecursiveLock lock(*this); - - if (mDeviceResource) mDeviceResource->renderVideoFrame(videoFrame); } //------------------------------------------------------------------------- @@ -675,14 +649,6 @@ namespace ortc channel->sendVideoFrame(videoFrame); } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaDevices - #pragma mark - //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -739,9 +705,6 @@ namespace ortc AutoRecursiveLock lock(*this); if (mStatsTimer) { - if (mDeviceResource && timer->getID() == mStatsTimer->getID()) { - mDeviceResource->setFrameCount(); - } } } @@ -774,9 +737,6 @@ namespace ortc void MediaStreamTrack::onResolveStatsPromise(IStatsProvider::PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) { AutoRecursiveLock lock(*this); - - if (mDeviceResource) - mDeviceResource->requestStats(promise, stats); } //------------------------------------------------------------------------- @@ -786,9 +746,6 @@ namespace ortc ) { AutoRecursiveLock lock(*this); - - if (mDeviceResource) - mDeviceResource->updateConstraints(promise, constraints); } //------------------------------------------------------------------------- @@ -935,50 +892,12 @@ namespace ortc //------------------------------------------------------------------------- bool MediaStreamTrack::stepDevicePromise() { - if (mDeviceResourceLifetimeHolderPromise) { - ZS_LOG_TRACE(log("already setup device promise")) - return true; - } - - mDeviceResourceLifetimeHolderPromise = UseMediaEngine::setupDevice(mThisWeak.lock()); - - mDeviceResourceLifetimeHolderPromise->thenWeak(mThisWeak.lock()); - return true; } //------------------------------------------------------------------------- bool MediaStreamTrack::stepSetupDevice() { - if (mDeviceResource) { - ZS_LOG_TRACE(log("already setup device resource")) - return true; - } - - if (!mDeviceResourceLifetimeHolderPromise->isSettled()) { - ZS_LOG_TRACE(log("waiting for setup device promise to be set up")) - return false; - } - - if (mDeviceResourceLifetimeHolderPromise->isRejected()) { - ZS_LOG_WARNING(Debug, log("media engine rejected device setup")) - cancel(); - return false; - } - - mDeviceResource = ZS_DYNAMIC_PTR_CAST(UseDeviceResource, mDeviceResourceLifetimeHolderPromise->value()); - - if (!mDeviceResource) { - ZS_LOG_WARNING(Detail, log("failed to initialize device resource")) - cancel(); - return false; - } - - if (mVideoRendererCallback) - mDeviceResource->setVideoRenderCallback(mVideoRendererCallback); - - ZS_LOG_DEBUG(log("media device is setup") + ZS_PARAM("device", mDeviceResource->getID())) - return true; } @@ -992,22 +911,6 @@ namespace ortc if (!mGracefulShutdownReference) mGracefulShutdownReference = mThisWeak.lock(); - if (!mCloseDevicePromise) { - if (mDeviceResource) { - mCloseDevicePromise = mDeviceResource->shutdown(); - mCloseDevicePromise->thenWeak(mGracefulShutdownReference); - } - } - - if (mGracefulShutdownReference) { - if (mCloseDevicePromise) { - if (!mCloseDevicePromise->isSettled()) { - ZS_LOG_DEBUG(log("waiting for close device promise")) - return; - } - } - } - //....................................................................... // final cleanup @@ -1020,11 +923,6 @@ namespace ortc mStatsTimer.reset(); } - mDeviceResourceLifetimeHolderPromise.reset(); - - mDeviceResource.reset(); - mCloseDevicePromise.reset(); - // make sure to cleanup any final reference to self mGracefulShutdownReference.reset(); } @@ -1095,6 +993,7 @@ namespace ortc return internal::MediaStreamTrack::create(kind); } +#endif //0 } // internal namespace @@ -1344,6 +1243,7 @@ namespace ortc IHelper::debugAppend(resultEl, "channel acount", mChannelCount.hasValue() ? mChannelCount.value().toDebug() : ElementPtr()); IHelper::debugAppend(resultEl, "device id", mDeviceID); IHelper::debugAppend(resultEl, "group id", mGroupID); + IHelper::debugAppend(resultEl, "encodingFormat", mEncodingFormat.hasValue() ? mEncodingFormat.value().toDebug() : ElementPtr()); return resultEl; } @@ -1377,6 +1277,8 @@ namespace ortc hasher->update(mDeviceID); hasher->update(":"); hasher->update(mGroupID); + hasher->update(":"); + hasher->update(mEncodingFormat.hasValue() ? mEncodingFormat.value().hash() : String()); return hasher->finalizeAsString(); } @@ -1408,6 +1310,7 @@ namespace ortc IHelper::getElementValue(elem, "ortc::IMediaStreamTrackTypes::Settings", "channelCount", mChannelCount); IHelper::getElementValue(elem, "ortc::IMediaStreamTrackTypes::Settings", "deviceId", mDeviceID); IHelper::getElementValue(elem, "ortc::IMediaStreamTrackTypes::Settings", "groupId", mGroupID); + IHelper::getElementValue(elem, "ortc::IMediaStreamTrackTypes::Settings", "encodingFormat", mEncodingFormat); } //--------------------------------------------------------------------------- @@ -1429,6 +1332,7 @@ namespace ortc IHelper::adoptElementValue(elem, "channelCount", mChannelCount); IHelper::adoptElementValue(elem, "deviceId", mDeviceID); IHelper::adoptElementValue(elem, "groupId", mGroupID); + IHelper::adoptElementValue(elem, "encodingFormat", mEncodingFormat); if (!elem->hasChildren()) return ElementPtr(); @@ -1479,6 +1383,7 @@ namespace ortc IHelper::debugAppend(resultEl, "channel count", mChannelCount); IHelper::debugAppend(resultEl, "device id", mDeviceID); IHelper::debugAppend(resultEl, "group id", mGroupID); + IHelper::debugAppend(resultEl, "encoding format", mEncodingFormat); return resultEl; } @@ -1517,6 +1422,8 @@ namespace ortc hasher->update(mDeviceID, "bogus99255cc407eaf6f82b33a94ab86f588581df9000"); hasher->update(":"); hasher->update(mGroupID, "bogus99255cc407eaf6f82b33a94ab86f588581df9000"); + hasher->update(":"); + hasher->update(mEncodingFormat, "bogus99255cc407eaf6f82b33a94ab86f588581df9000"); return hasher->finalizeAsString(); } @@ -1618,6 +1525,12 @@ namespace ortc mGroupID = ConstrainString(entryEl); } } + { + ElementPtr entryEl = elem->findFirstChildElement("encodingFormat"); + if (entryEl) { + mEncodingFormat = ConstrainString(entryEl); + } + } } //--------------------------------------------------------------------------- @@ -1639,6 +1552,7 @@ namespace ortc elem->adoptAsLastChild(mChannelCount.createElement("channelCount")); elem->adoptAsLastChild(mDeviceID.createElement("deviceId")); elem->adoptAsLastChild(mGroupID.createElement("groupId")); + elem->adoptAsLastChild(mEncodingFormat.createElement("encodingFormat")); if (!elem->hasChildren()) return ElementPtr(); @@ -1681,6 +1595,7 @@ namespace ortc IHelper::debugAppend(resultEl, "channel count", mChannelCount.toDebug()); IHelper::debugAppend(resultEl, "device id", mDeviceID.toDebug()); IHelper::debugAppend(resultEl, "group id", mGroupID.toDebug()); + IHelper::debugAppend(resultEl, "encoding format", mEncodingFormat.toDebug()); return resultEl; } @@ -1715,6 +1630,8 @@ namespace ortc hasher->update(mDeviceID.hash()); hasher->update(":"); hasher->update(mGroupID.hash()); + hasher->update(":"); + hasher->update(mEncodingFormat.hash()); return hasher->finalizeAsString(); } @@ -1930,9 +1847,12 @@ namespace ortc #pragma mark //--------------------------------------------------------------------------- - ElementPtr IMediaStreamTrack::toDebug(IMediaStreamTrackPtr object) + void IMediaStreamTrack::trace( + IMediaStreamTrackPtr object, + const char *message + ) { - return internal::MediaStreamTrack::toDebug(internal::MediaStreamTrack::convert(object)); + internal::MediaStreamTrack::trace(internal::MediaStreamTrack::convert(object), message); } //--------------------------------------------------------------------------- diff --git a/ortc/cpp/ortc_ORTC.cpp b/ortc/cpp/ortc_ORTC.cpp index aa1d39eb..99a57996 100644 --- a/ortc/cpp/ortc_ORTC.cpp +++ b/ortc/cpp/ortc_ORTC.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -52,9 +52,11 @@ namespace ortc namespace internal { - ZS_DECLARE_TYPEDEF_PTR(zsLib::IMessageQueueManager, UseMessageQueueManager) + ZS_DECLARE_CLASS_PTR(ORTCSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(zsLib::IMessageQueueManager, UseMessageQueueManager); void initSubsystems(); + void installORTCSettingsDefaults(); void installCertificateSettingsDefaults(); void installDataChannelSettingsDefaults(); void installDTMFSenderSettingsDefaults(); @@ -65,7 +67,14 @@ namespace ortc void installMediaDevicesSettingsDefaults(); void installMediaStreamTrackSettingsDefaults(); void installRTPListenerSettingsDefaults(); - void installRTPMediaEngineSettingsDefaults(); + void installMediaChannelTraceHelperDefaults(); + void installMediaDeviceCaptureAudioSettingsDefaults(); + void installMediaDeviceCaptureVideoSettingsDefaults(); + void installRTPDecoderAudioSettingsDefaults(); + void installRTPDecoderVideoSettingsDefaults(); + void installRTPEncoderAudioSettingsDefaults(); + void installRTPEncoderVideoSettingsDefaults(); + void installMediaEngineSettingsDefaults(); void installRTPReceiverSettingsDefaults(); void installRTPReceiverChannelAudioSettingsDefaults(); void installRTPReceiverChannelSettingsDefaults(); @@ -83,6 +92,7 @@ namespace ortc //------------------------------------------------------------------------- static void installAllDefaults() { + installORTCSettingsDefaults(); installCertificateSettingsDefaults(); installDataChannelSettingsDefaults(); installDTMFSenderSettingsDefaults(); @@ -91,9 +101,16 @@ namespace ortc installICETransportSettingsDefaults(); installIdentitySettingsDefaults(); installMediaDevicesSettingsDefaults(); + installMediaChannelTraceHelperDefaults(); installMediaStreamTrackSettingsDefaults(); installRTPListenerSettingsDefaults(); - installRTPMediaEngineSettingsDefaults(); + installMediaDeviceCaptureAudioSettingsDefaults(); + installMediaDeviceCaptureVideoSettingsDefaults(); + installRTPDecoderAudioSettingsDefaults(); + installRTPDecoderVideoSettingsDefaults(); + installRTPEncoderAudioSettingsDefaults(); + installRTPEncoderVideoSettingsDefaults(); + installMediaEngineSettingsDefaults(); installRTPReceiverSettingsDefaults(); installRTPReceiverChannelAudioSettingsDefaults(); installRTPReceiverChannelSettingsDefaults(); @@ -109,6 +126,61 @@ namespace ortc installSRTPSDESTransportSettingsDefaults(); } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark ORTCSettingsDefaults + #pragma mark + + class ORTCSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~ORTCSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static ORTCSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static ORTCSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + ISettings::setString(ORTC_SETTING_ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME, "normal"); + ISettings::setString(ORTC_SETTING_ORTC_QUEUE_CERTIFICATE_GENERATION_NAME, "low"); + + for (size_t index = 0; index < ORTC_QUEUE_TOTAL_MEDIA_DEVICE_THREADS; ++index) { + ISettings::setString((String(ORTC_SETTING_ORTC_QUEUE_MEDIA_DEVICE_THREAD_NAME) + string(index)).c_str(), "higest"); + } + for (size_t index = 0; index < ORTC_QUEUE_TOTAL_RTP_THREADS; ++index) { + ISettings::setString((String(ORTC_SETTING_ORTC_QUEUE_RTP_THREAD_NAME) + string(index)).c_str(), "higest"); + } + } + + }; + + //------------------------------------------------------------------------- + void installORTCSettingsDefaults() + { + ORTCSettingsDefaults::singleton(); + } + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -136,15 +208,21 @@ namespace ortc } //------------------------------------------------------------------------- - IMessageQueuePtr IORTCForInternal::queuePacket() + IMessageQueuePtr IORTCForInternal::queueBlockingMediaStartStopThread() { - return (ORTC::singleton())->queuePacket(); + return (ORTC::singleton())->queueBlockingMediaStartStopThread(); } //------------------------------------------------------------------------- - IMessageQueuePtr IORTCForInternal::queueBlockingMediaStartStopThread() + IMessageQueuePtr IORTCForInternal::queueMediaDevices() { - return (ORTC::singleton())->queueBlockingMediaStartStopThread(); + return (ORTC::singleton())->queueMediaDevices(); + } + + //------------------------------------------------------------------------- + IMessageQueuePtr IORTCForInternal::queueRTP() + { + return (ORTC::singleton())->queueRTP(); } //------------------------------------------------------------------------- @@ -263,8 +341,7 @@ namespace ortc } UseServicesHelper::setup(); - installAllDefaults(); - ISettings::applyDefaults(); + internalSetup(); } #ifdef WINRT @@ -272,8 +349,7 @@ namespace ortc void ORTC::setup(Windows::UI::Core::CoreDispatcher ^dispatcher) { UseServicesHelper::setup(dispatcher); - installAllDefaults(); - ISettings::applyDefaults(); + internalSetup(); } #endif //WINRT @@ -291,7 +367,7 @@ namespace ortc AutoRecursiveLock(*this); mNTPServerTime = value; } - IRTPMediaEngineForORTC::ntpServerTime(value); + IMediaEngineForORTC::ntpServerTime(value); } //------------------------------------------------------------------------- @@ -311,31 +387,31 @@ namespace ortc //------------------------------------------------------------------------- void ORTC::startMediaTracing() { - IRTPMediaEngineForORTC::startMediaTracing(); + IMediaEngineForORTC::startMediaTracing(); } //------------------------------------------------------------------------- void ORTC::stopMediaTracing() { - IRTPMediaEngineForORTC::stopMediaTracing(); + IMediaEngineForORTC::stopMediaTracing(); } //------------------------------------------------------------------------- bool ORTC::isMediaTracing() { - return IRTPMediaEngineForORTC::isMediaTracing(); + return IMediaEngineForORTC::isMediaTracing(); } //------------------------------------------------------------------------- bool ORTC::saveMediaTrace(String filename) { - return IRTPMediaEngineForORTC::saveMediaTrace(filename); + return IMediaEngineForORTC::saveMediaTrace(filename); } //------------------------------------------------------------------------- bool ORTC::saveMediaTrace(String host, int port) { - return IRTPMediaEngineForORTC::saveMediaTrace(host, port); + return IMediaEngineForORTC::saveMediaTrace(host, port); } //------------------------------------------------------------------------- @@ -374,28 +450,43 @@ namespace ortc } //------------------------------------------------------------------------- - IMessageQueuePtr ORTC::queuePacket() const + IMessageQueuePtr ORTC::queueBlockingMediaStartStopThread() const + { + AutoRecursiveLock lock(*this); + if (!mBlockingMediaStartStopThread) { + mBlockingMediaStartStopThread = UseMessageQueueManager::getMessageQueue(ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME); + } + return mBlockingMediaStartStopThread; + } + + //------------------------------------------------------------------------- + IMessageQueuePtr ORTC::queueMediaDevices() const { AutoRecursiveLock lock(*this); - size_t index = mNextPacketQueueThread % ORTC_QUEUE_TOTAL_PACKET_THREADS; + size_t index = mNextMediaQueueThread % ORTC_QUEUE_TOTAL_MEDIA_DEVICE_THREADS; - if (!mPacketQueues[index]) { - mPacketQueues[index] = UseMessageQueueManager::getMessageQueue((String(ORTC_QUEUE_PACKET_THREAD_NAME) + string(index)).c_str()); + if (!mMediaDeviceQueues[index]) { + mMediaDeviceQueues[index] = UseMessageQueueManager::getMessageQueue((String(ORTC_QUEUE_MEDIA_DEVICE_THREAD_NAME) + string(index)).c_str()); } - ++mNextPacketQueueThread; - return mPacketQueues[index]; + ++mNextMediaQueueThread; + return mMediaDeviceQueues[index]; } //------------------------------------------------------------------------- - IMessageQueuePtr ORTC::queueBlockingMediaStartStopThread() const + IMessageQueuePtr ORTC::queueRTP() const { AutoRecursiveLock lock(*this); - if (!mBlockingMediaStartStopThread) { - mBlockingMediaStartStopThread = UseMessageQueueManager::getMessageQueue(ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME); + + size_t index = mNextRTPQueueThread % ORTC_QUEUE_TOTAL_RTP_THREADS; + + if (!mRTPQueues[index]) { + mRTPQueues[index] = UseMessageQueueManager::getMessageQueue((String(ORTC_QUEUE_RTP_THREAD_NAME) + string(index)).c_str()); } - return mBlockingMediaStartStopThread; + + ++mNextRTPQueueThread; + return mRTPQueues[index]; } //------------------------------------------------------------------------- @@ -439,6 +530,29 @@ namespace ortc return Log::Params(message, objectEl); } + //------------------------------------------------------------------------- + void ORTC::internalSetup() + { + installAllDefaults(); + ISettings::applyDefaults(); + + UseMessageQueueManager::registerMessageQueueThreadPriority(ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME, zsLib::threadPriorityFromString(ISettings::getString(ORTC_SETTING_ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME))); + UseMessageQueueManager::registerMessageQueueThreadPriority(ORTC_QUEUE_CERTIFICATE_GENERATION_NAME, zsLib::threadPriorityFromString(ISettings::getString(ORTC_SETTING_ORTC_QUEUE_CERTIFICATE_GENERATION_NAME))); + + for (size_t index = 0; index < ORTC_QUEUE_TOTAL_MEDIA_DEVICE_THREADS; ++index) { + UseMessageQueueManager::registerMessageQueueThreadPriority( + (String(ORTC_QUEUE_MEDIA_DEVICE_THREAD_NAME) + string(index)).c_str(), + zsLib::threadPriorityFromString(ISettings::getString((String(ORTC_SETTING_ORTC_QUEUE_MEDIA_DEVICE_THREAD_NAME) + string(index)).c_str())) + ); + } + for (size_t index = 0; index < ORTC_QUEUE_TOTAL_RTP_THREADS; ++index) { + UseMessageQueueManager::registerMessageQueueThreadPriority( + (String(ORTC_QUEUE_RTP_THREAD_NAME) + string(index)).c_str(), + zsLib::threadPriorityFromString(ISettings::getString((String(ORTC_SETTING_ORTC_QUEUE_RTP_THREAD_NAME) + string(index)).c_str())) + ); + } + } + } // namespace internal //--------------------------------------------------------------------------- diff --git a/ortc/cpp/ortc_RTCPPacket.cpp b/ortc/cpp/ortc_RTCPPacket.cpp index 01936d2a..36411c4e 100644 --- a/ortc/cpp/ortc_RTCPPacket.cpp +++ b/ortc/cpp/ortc_RTCPPacket.cpp @@ -29,7 +29,9 @@ */ -#include +#include +#include + #include #include #include @@ -48,7 +50,6 @@ #define ASSERT(x) #endif //_DEBUG - #define RTCP_IS_FLAG_SET(xByte, xBitPos) (0 != ((xByte) & (1 << xBitPos))) #define RTCP_GET_BITS(xByte, xBitPattern, xLowestBit) (((xByte) >> (xLowestBit)) & (xBitPattern)) #define RTCP_PACK_BITS(xByte, xBitPattern, xLowestBit) (((xByte) & (xBitPattern)) << (xLowestBit)) @@ -57,14 +58,18 @@ namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtp_rtcp_packet) } namespace ortc { - ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHelper, UseServicesHelper) + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHelper, UseServicesHelper); + ZS_DECLARE_TYPEDEF_PTR(ortc::internal::Helper, UseHelper); + ZS_DECLARE_TYPEDEF_PTR(ortc::internal::RTPUtils, UseRTPUtils); + + using zsLib::PTRNUMBER; + // ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP) // // typedef ortc::services::Hasher SHA1Hasher; namespace internal { - ZS_DECLARE_TYPEDEF_PTR(ortc::internal::Helper, UseHelper) //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -157,5841 +162,6075 @@ namespace ortc return true; } - //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark RTCPPacket::SenderReport + #pragma mark RTCPPacket (writing sizing routines) #pragma mark //------------------------------------------------------------------------- - const char *RTCPPacket::Report::ptToString(BYTE pt) + static size_t getPacketSizeSenderReport(const RTCPPacket::SenderReport *report) { - switch (pt) { - case SenderReport::kPayloadType: return "SenderReport"; - case ReceiverReport::kPayloadType: return "ReceiverReport"; - case SDES::kPayloadType: return "SDES"; - case Bye::kPayloadType: return "Bye"; - case App::kPayloadType: return "App"; - case TransportLayerFeedbackMessage::kPayloadType: return "TransportLayerFeedbackMessage"; - case PayloadSpecificFeedbackMessage::kPayloadType: return "PayloadSpecificFeedbackMessage"; - case XR::kPayloadType: return "XR"; - default: { - } - } - return "Uknown"; + auto rc = report->rc(); + throwIfGreaterThanBitsAllow(rc, 5); + return (sizeof(DWORD)*2) + (sizeof(DWORD)*5) + ((sizeof(DWORD)*6)*rc) + boundarySize(report->extensionSize()); } //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SenderReport - #pragma mark - - //------------------------------------------------------------------------- - Time RTCPPacket::SenderReport::ntpTimestamp() const + static size_t getPacketSizeReceiverReport(const RTCPPacket::ReceiverReport *report) { - return RTPUtils::ntpToTime(mNTPTimestampMS, mNTPTimestampLS); + auto rc = report->rc(); + throwIfGreaterThanBitsAllow(rc, 5); + return (sizeof(DWORD)*2) + ((sizeof(DWORD)*6)*rc) + boundarySize(report->extensionSize()); } //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::StringItem - #pragma mark - - //------------------------------------------------------------------------- - const char *RTCPPacket::SDES::Chunk::StringItem::typeToString(BYTE type) + static size_t getPacketSizeSDES(const RTCPPacket::SDES *report) { - switch (type) { - case CName::kItemType: return "CName"; - case Name::kItemType: return "Name"; - case Email::kItemType: return "Email"; - case Phone::kItemType: return "Phone"; - case Loc::kItemType: return "Loc"; - case Tool::kItemType: return "Tool"; - case Note::kItemType: return "Note"; - case Priv::kItemType: return "Priv"; - case Mid::kItemType: return "Mid"; - case Rid::kItemType: return "Rid"; - default: { - break; - } - } - return "Unknown"; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk - #pragma mark + typedef RTCPPacket::SDES::Chunk Chunk; - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::CName *RTCPPacket::SDES::Chunk::cNameAtIndex(size_t index) const - { - ASSERT(index < mCNameCount) - return &(mFirstCName[index]); - } + size_t result = (sizeof(DWORD)); - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Name *RTCPPacket::SDES::Chunk::nameAtIndex(size_t index) const - { - ASSERT(index < mNameCount) - return &(mFirstName[index]); - } + size_t chunkCount = 0; - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Email *RTCPPacket::SDES::Chunk::emailAtIndex(size_t index) const - { - ASSERT(index < mEmailCount) - return &(mFirstEmail[index]); - } + for (Chunk *chunk = report->firstChunk(); NULL != chunk; chunk = chunk->next(), ++chunkCount) + { + size_t chunkSize = sizeof(DWORD); - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Phone *RTCPPacket::SDES::Chunk::phoneAtIndex(size_t index) const - { - ASSERT(index < mPhoneCount) - return &(mFirstPhone[index]); - } + for (auto *item = chunk->firstCName(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES CName size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Loc *RTCPPacket::SDES::Chunk::locAtIndex(size_t index) const - { - ASSERT(index < mLocCount) - return &(mFirstLoc[index]); - } + for (auto *item = chunk->firstName(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Name size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Tool *RTCPPacket::SDES::Chunk::toolAtIndex(size_t index) const - { - ASSERT(index < mToolCount) - return &(mFirstTool[index]); - } + for (auto *item = chunk->firstEmail(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Email size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Note *RTCPPacket::SDES::Chunk::noteAtIndex(size_t index) const - { - ASSERT(index < mNoteCount) - return &(mFirstNote[index]); - } + for (auto *item = chunk->firstPhone(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Phone size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Priv *RTCPPacket::SDES::Chunk::privAtIndex(size_t index) const - { - ASSERT(index < mPrivCount) - return &(mFirstPriv[index]); - } + for (auto *item = chunk->firstLoc(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Loc size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Mid *RTCPPacket::SDES::Chunk::midAtIndex(size_t index) const - { - ASSERT(index < mMidCount) - return &(mFirstMid[index]); - } + for (auto *item = chunk->firstTool(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Tool size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Rid *RTCPPacket::SDES::Chunk::ridAtIndex(size_t index) const - { - ASSERT(index < mRidCount) - return &(mFirstRid[index]); - } + for (auto *item = chunk->firstNote(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Note size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - RTCPPacket::SDES::Chunk::Unknown *RTCPPacket::SDES::Chunk::unknownAtIndex(size_t index) const - { - ASSERT(index < mUnknownCount) - return &(mFirstUnknown[index]); - } + for (auto *item = chunk->firstPriv(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len1 = (NULL != item->mValue ? strlen(item->mValue) : 0); + size_t len2 = (NULL != item->mPrefix ? strlen(item->mPrefix) : 0); - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::Bye - #pragma mark + size_t totalLen = len1 + len2; + if (0 != totalLen) ++totalLen; - //------------------------------------------------------------------------- - DWORD RTCPPacket::Bye::ssrc(size_t index) const - { - ASSERT(index < sc()) - return mSSRCs[index]; - } + throwIfGreaterThanBitsAllow(totalLen, 8); + chunkSize += ((sizeof(BYTE))*totalLen); + ZS_LOG_INSANE(packet_slog("get packet SDES Priv size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("prefix len", len2) + ZS_PARAM("prefix", (NULL != item->mPrefix ? item->mPrefix : NULL)) + ZS_PARAM("len", len1) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::FeedbackMessage - #pragma mark + for (auto *item = chunk->firstMid(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Mid size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - //------------------------------------------------------------------------- - const char *RTCPPacket::FeedbackMessage::fmtToString(BYTE pt, BYTE fmt, DWORD subFmt) - { - switch (pt) { - case TransportLayerFeedbackMessage::kPayloadType: { - switch (fmt) { - case TransportLayerFeedbackMessage::GenericNACK::kFmt: return "GenericNACK"; - case TransportLayerFeedbackMessage::TMMBR::kFmt: return "TMMBR"; - case TransportLayerFeedbackMessage::TMMBN::kFmt: return "TMMBN"; - default: break; - } - break; + for (auto *item = chunk->firstRid(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Rid size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) } - case PayloadSpecificFeedbackMessage::kPayloadType: { - switch (fmt) { - case PayloadSpecificFeedbackMessage::PLI::kFmt: return "PLI"; - case PayloadSpecificFeedbackMessage::SLI::kFmt: return "SLI"; - case PayloadSpecificFeedbackMessage::RPSI::kFmt: return "RPSI"; - case PayloadSpecificFeedbackMessage::FIR::kFmt: return "FIR"; - case PayloadSpecificFeedbackMessage::TSTR::kFmt: return "TSTR"; - case PayloadSpecificFeedbackMessage::TSTN::kFmt: return "TSTN"; - case PayloadSpecificFeedbackMessage::VBCM::kFmt: return "VBCM"; - case PayloadSpecificFeedbackMessage::AFB::kFmt: { - const char *tmp = "REMB"; - if (subFmt == *(reinterpret_cast(tmp))) return "REMB"; - return "AFB"; - } - default: break; - } - break; + for (auto *item = chunk->firstUnknown(); NULL != item; item = item->next()) + { + chunkSize += (sizeof(BYTE)*2); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + throwIfGreaterThanBitsAllow(len, 8); + chunkSize += ((sizeof(BYTE))*len); + ZS_LOG_INSANE(packet_slog("get packet SDES Unknown size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) } - default: { - break; + + size_t modulas = chunkSize % sizeof(DWORD); + + if ((chunkSize == sizeof(DWORD)) || + (0 == modulas)) { + chunkSize += sizeof(DWORD); } + + result += boundarySize(chunkSize); } - return "Unknown"; + + throwIfGreaterThanBitsAllow(chunkCount, 5); + return result; } //------------------------------------------------------------------------- - const char *RTCPPacket::FeedbackMessage::fmtToString() const + static size_t getPacketSizeBye(const RTCPPacket::Bye *report) { - if (PayloadSpecificFeedbackMessage::kPayloadType == mPT) { - if (PayloadSpecificFeedbackMessage::AFB::kFmt == mReportSpecific) { - auto result = reinterpret_cast(this); - const char tmp1[sizeof(DWORD)] {}; - const char *tmp2 = "REMB"; - const char *usingTmp = (result->mHasREMB ? tmp2 : (&(tmp1[0]))); + auto sc = report->sc(); + throwIfGreaterThanBitsAllow(sc, 5); - return fmtToString(mPT, mReportSpecific, *(reinterpret_cast(usingTmp))); + size_t result = (sizeof(DWORD)) + (sizeof(DWORD)*sc); + + if (NULL != report->reasonForLeaving()) { + size_t len = strlen(report->reasonForLeaving()); + if (len > 0) { + throwIfGreaterThanBitsAllow(len, 8); + result += sizeof(BYTE)+(sizeof(BYTE)*len); } } - return fmtToString(mPT, mReportSpecific); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::TransportLayerFeedbackMessage - #pragma mark - - //------------------------------------------------------------------------- - RTCPPacket::TransportLayerFeedbackMessage::GenericNACK *RTCPPacket::TransportLayerFeedbackMessage::genericNACKAtIndex(size_t index) const - { - ASSERT(index < mGenericNACKCount) - return &(mFirstGenericNACK[index]); - } - //------------------------------------------------------------------------- - RTCPPacket::TransportLayerFeedbackMessage::TMMBR *RTCPPacket::TransportLayerFeedbackMessage::tmmbrAtIndex(size_t index) const - { - ASSERT(index < mTMMBRCount) - return &(mFirstTMMBR[index]); + return boundarySize(result); } //------------------------------------------------------------------------- - RTCPPacket::TransportLayerFeedbackMessage::TMMBN *RTCPPacket::TransportLayerFeedbackMessage::tmmbnAtIndex(size_t index) const + static size_t getPacketSizeApp(const RTCPPacket::App *report) { - ASSERT(index < mTMMBNCount) - return &(mFirstTMMBN[index]); - } + size_t result = (sizeof(DWORD)*3); - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::VBCM - #pragma mark + auto dataSize = report->dataSize(); + if (0 != dataSize) { + ORTC_THROW_INVALID_PARAMETERS_IF(NULL == report->mData) + result += dataSize; + } - //------------------------------------------------------------------------- - BYTE RTCPPacket::PayloadSpecificFeedbackMessage::VBCM::zeroBit() const - { - return RTCP_GET_BITS(mControlSpecific, 0x1, 23); + return boundarySize(result); } - + //------------------------------------------------------------------------- - BYTE RTCPPacket::PayloadSpecificFeedbackMessage::VBCM::payloadType() const + static size_t getPacketSizeTransportLayerFeedbackMessage(const RTCPPacket::TransportLayerFeedbackMessage *fm) { - return RTCP_GET_BITS(mControlSpecific, 0x7F, 16); - } + typedef RTCPPacket::TransportLayerFeedbackMessage TransportLayerFeedbackMessage; + typedef RTCPPacket::TransportLayerFeedbackMessage::GenericNACK GenericNACK; + typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBR TMMBR; + typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBN TMMBN; - //------------------------------------------------------------------------- - size_t RTCPPacket::PayloadSpecificFeedbackMessage::VBCM::vbcmOctetStringSize() const - { - return RTCP_GET_BITS(mControlSpecific, 0xFFFF, 0); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::REMB - #pragma mark - - //------------------------------------------------------------------------- - DWORD RTCPPacket::PayloadSpecificFeedbackMessage::REMB::ssrcAtIndex(size_t index) const - { - ASSERT(index < numSSRC()) - return mSSRCs[index]; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage - #pragma mark - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::PLI *RTCPPacket::PayloadSpecificFeedbackMessage::pli() const - { - if (PLI::kFmt != fmt()) return NULL; - return const_cast(&mPLI); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::SLI *RTCPPacket::PayloadSpecificFeedbackMessage::sliAtIndex(size_t index) const - { - ASSERT(index < mSLICount) - return &(mFirstSLI[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::FIR *RTCPPacket::PayloadSpecificFeedbackMessage::firAtIndex(size_t index) const - { - ASSERT(index < mFIRCount) - return &(mFirstFIR[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::TSTR *RTCPPacket::PayloadSpecificFeedbackMessage::tstrAtIndex(size_t index) const - { - ASSERT(index < mTSTRCount) - return &(mFirstTSTR[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::TSTN *RTCPPacket::PayloadSpecificFeedbackMessage::tstnAtIndex(size_t index) const - { - ASSERT(index < mTSTNCount) - return &(mFirstTSTN[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::VBCM *RTCPPacket::PayloadSpecificFeedbackMessage::vbcmAtIndex(size_t index) const - { - ASSERT(index < mVBCMCount) - return &(mFirstVBCM[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::RPSI *RTCPPacket::PayloadSpecificFeedbackMessage::rpsi() const - { - if (RPSI::kFmt != fmt()) return NULL; - return const_cast(&mRPSI); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::AFB *RTCPPacket::PayloadSpecificFeedbackMessage::afb() const - { - if (AFB::kFmt != fmt()) return NULL; - if (mHasREMB) return NULL; - return const_cast(&mAFB); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage::REMB *RTCPPacket::PayloadSpecificFeedbackMessage::remb() const - { - if (REMB::kFmt != fmt()) return NULL; - if (!mHasREMB) return NULL; - return const_cast(&mREMB); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::ReportBlock - #pragma mark + size_t result = (sizeof(DWORD)*3); - //------------------------------------------------------------------------- - const char *RTCPPacket::XR::ReportBlock::blockTypeToString(BYTE blockType) - { - switch (blockType) { - case LossRLEReportBlock::kBlockType: return "LossRLEReportBlock"; - case DuplicateRLEReportBlock::kBlockType: return "DuplicateRLEReportBlock"; - case PacketReceiptTimesReportBlock::kBlockType: return "PacketReceiptTimesReportBlock"; - case ReceiverReferenceTimeReportBlock::kBlockType: return "ReceiverReferenceTimeReportBlock"; - case DLRRReportBlock::kBlockType: return "DLRRReportBlock"; - case StatisticsSummaryReportBlock::kBlockType: return "StatisticsSummaryReportBlock"; - case VoIPMetricsReportBlock::kBlockType: return "VoIPMetricsReportBlock"; - default: { + switch (fm->fmt()) { + case GenericNACK::kFmt: + { + auto count = fm->genericNACKCount(); + throwIfLessThan(count, 1); + result += ((sizeof(DWORD))*(count)); break; } - } - - return "UnknownReportBlock"; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::ReportBlockRange - #pragma mark - - //------------------------------------------------------------------------- - BYTE RTCPPacket::XR::ReportBlockRange::reserved() const - { - return RTCP_GET_BITS(mTypeSpecific, 0xF, 4); - } - - //------------------------------------------------------------------------- - BYTE RTCPPacket::XR::ReportBlockRange::thinning() const - { - return RTCP_GET_BITS(mTypeSpecific, 0xF, 0); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::RLEReportBlock - #pragma mark - - //------------------------------------------------------------------------- - RTCPPacket::XR::RLEChunk RTCPPacket::XR::RLEReportBlock::chunkAtIndex(size_t index) const - { - ASSERT(index < chunkCount()) - return mChunks[index]; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::PacketReceiptTimesReportBlock - #pragma mark - - //------------------------------------------------------------------------- - DWORD RTCPPacket::XR::PacketReceiptTimesReportBlock::receiptTimeAtIndex(size_t index) const - { - ASSERT(index < receiptTimeCount()) - return mReceiptTimes[index]; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::ReceiverReferenceTimeReportBlock - #pragma mark - - //------------------------------------------------------------------------- - Time RTCPPacket::XR::ReceiverReferenceTimeReportBlock::ntpTimestamp() const - { - return RTPUtils::ntpToTime(mNTPTimestampMS, mNTPTimestampLS); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::DLRRReportBlock - #pragma mark - - //------------------------------------------------------------------------- - RTCPPacket::XR::DLRRReportBlock::SubBlock *RTCPPacket::XR::DLRRReportBlock::subBlockAtIndex(size_t index) const - { - ASSERT(index < subBlockCount()) - return &(mSubBlocks[index]); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::StatisticsSummaryReportBlock - #pragma mark - - //------------------------------------------------------------------------- - bool RTCPPacket::XR::StatisticsSummaryReportBlock::lossReportFlag() const - { - return RTCP_IS_FLAG_SET(mTypeSpecific, 7); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::XR::StatisticsSummaryReportBlock::duplicateReportFlag() const - { - return RTCP_IS_FLAG_SET(mTypeSpecific, 6); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::XR::StatisticsSummaryReportBlock::jitterFlag() const - { - return RTCP_IS_FLAG_SET(mTypeSpecific, 5); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::XR::StatisticsSummaryReportBlock::ttlFlag() const - { - return (1 == RTCP_GET_BITS(mTypeSpecific, 0x3, 3)); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::XR::StatisticsSummaryReportBlock::hopLimitFlag() const - { - return (2 == RTCP_GET_BITS(mTypeSpecific, 0x3, 3)); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::VoIPMetricsReportBlock - #pragma mark - - //------------------------------------------------------------------------- - BYTE RTCPPacket::XR::VoIPMetricsReportBlock::plc() const - { - return RTCP_GET_BITS(mRXConfig, 0x3, 6); - } - - //------------------------------------------------------------------------- - BYTE RTCPPacket::XR::VoIPMetricsReportBlock::jba() const - { - return RTCP_GET_BITS(mRXConfig, 0x3, 4); - } - - //------------------------------------------------------------------------- - BYTE RTCPPacket::XR::VoIPMetricsReportBlock::jbRate() const - { - return RTCP_GET_BITS(mRXConfig, 0xF, 0); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::RunLength - #pragma mark - - //------------------------------------------------------------------------- - RTCPPacket::XR::RunLength::RunLength(RLEChunk chunk) : - mRunType(RTCP_GET_BITS(chunk, 0x1, 14)), - mRunLength(RTCP_GET_BITS(chunk, 0x3FFF, 0)) - { - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::BitVector - #pragma mark - - //------------------------------------------------------------------------- - RTCPPacket::XR::BitVector::BitVector(RLEChunk chunk) : - mBitVector(RTCP_GET_BITS(chunk, 0x7FFF, 0)) - { - } - - //------------------------------------------------------------------------- - BYTE RTCPPacket::XR::BitVector::bitAtIndex(size_t index) const - { - ASSERT(index < (sizeof(WORD)*8)) - return (mBitVector >> ((sizeof(WORD)*8)-index-1)) & 0x1; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR - #pragma mark - - //------------------------------------------------------------------------- - RTCPPacket::XR::LossRLEReportBlock *RTCPPacket::XR::lossRLEReportBlockAtIndex(size_t index) const - { - ASSERT(index < mLossRLEReportBlockCount) - return &(mFirstLossRLEReportBlock[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::XR::DuplicateRLEReportBlock *RTCPPacket::XR::duplicateRLEReportBlockAtIndex(size_t index) const - { - ASSERT(index < mDuplicateRLEReportBlockCount) - return &(mFirstDuplicateRLEReportBlock[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::XR::PacketReceiptTimesReportBlock *RTCPPacket::XR::packetReceiptTimesReportBlockAtIndex(size_t index) const - { - ASSERT(index < mPacketReceiptTimesReportBlockCount) - return &(mFirstPacketReceiptTimesReportBlock[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::XR::ReceiverReferenceTimeReportBlock *RTCPPacket::XR::receiverReferenceTimeReportBlockAtIndex(size_t index) const - { - ASSERT(index < mReceiverReferenceTimeReportBlockCount) - return &(mFirstReceiverReferenceTimeReportBlock[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::XR::DLRRReportBlock *RTCPPacket::XR::dlrrReportBlockAtIndex(size_t index) const - { - ASSERT(index < mDLRRReportBlockCount) - return &(mFirstDLRRReportBlock[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::XR::StatisticsSummaryReportBlock *RTCPPacket::XR::statisticsSummaryReportBlockAtIndex(size_t index) const - { - ASSERT(index < mStatisticsSummaryReportBlockCount) - return &(mFirstStatisticsSummaryReportBlock[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::XR::VoIPMetricsReportBlock *RTCPPacket::XR::voIPMetricsReportBlockAtIndex(size_t index) const - { - ASSERT(index < mVoIPMetricsReportBlockCount) - return &(mFirstVoIPMetricsReportBlock[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::XR::UnknownReportBlock *RTCPPacket::XR::unknownReportBlockAtIndex(size_t index) const - { - ASSERT(index < mUnknownReportBlockCount) - return &(mFirstUnknownReportBlock[index]); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::XR::isRunLengthChunk(RLEChunk chunk) - { - return !RTCP_IS_FLAG_SET(chunk, 15); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::XR::isBitVectorChunk(RLEChunk chunk) - { - return RTCP_IS_FLAG_SET(chunk, 15); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket (public) - #pragma mark - - //------------------------------------------------------------------------- - RTCPPacket::RTCPPacket(const make_private &) - { - } - - //------------------------------------------------------------------------- - RTCPPacket::~RTCPPacket() - { - } - - //------------------------------------------------------------------------- - RTCPPacketPtr RTCPPacket::create(const BYTE *buffer, size_t bufferLengthInBytes) - { - ORTC_THROW_INVALID_PARAMETERS_IF(!buffer) - ORTC_THROW_INVALID_PARAMETERS_IF(0 == bufferLengthInBytes) - return RTCPPacket::create(UseServicesHelper::convertToBuffer(buffer, bufferLengthInBytes)); - } - - //------------------------------------------------------------------------- - RTCPPacketPtr RTCPPacket::create(const SecureByteBlock &buffer) - { - return RTCPPacket::create(buffer.BytePtr(), buffer.SizeInBytes()); - } - - //------------------------------------------------------------------------- - RTCPPacketPtr RTCPPacket::create(SecureByteBlockPtr buffer) - { - RTCPPacketPtr pThis(make_shared(make_private{})); - pThis->mBuffer = buffer; - if (!pThis->parse()) { - ZS_LOG_WARNING(Debug, pThis->log("packet could not be parsed")) - return RTCPPacketPtr(); - } - return pThis; - } - - //------------------------------------------------------------------------- - RTCPPacketPtr RTCPPacket::create(const Report *first) - { - size_t allocationSize = getPacketSize(first); - SecureByteBlockPtr temp(make_shared(allocationSize)); - - BYTE *buffer = temp->BytePtr(); - BYTE *pos = buffer; - writePacket(first, pos, allocationSize); - - return create(temp); - } - - //------------------------------------------------------------------------- - SecureByteBlockPtr RTCPPacket::generateFrom(const Report *first) - { - size_t allocationSize = getPacketSize(first); - SecureByteBlockPtr temp(make_shared(allocationSize)); - - BYTE *buffer = temp->BytePtr(); - BYTE *pos = buffer; - writePacket(first, pos, allocationSize); - - return temp; - } - - //------------------------------------------------------------------------- - const BYTE *RTCPPacket::ptr() const - { - return mBuffer->BytePtr(); - } - - //------------------------------------------------------------------------- - size_t RTCPPacket::size() const - { - return mBuffer->SizeInBytes(); - } - - //------------------------------------------------------------------------- - SecureByteBlockPtr RTCPPacket::buffer() const - { - return mBuffer; - } - - //------------------------------------------------------------------------- - RTCPPacket::SenderReport *RTCPPacket::senderReportAtIndex(size_t index) const - { - ASSERT(index < mSenderReportCount) - return &(mFirstSenderReport[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::ReceiverReport *RTCPPacket::receiverReportAtIndex(size_t index) const - { - ASSERT(index < mReceiverReportCount) - return &(mFirstReceiverReport[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::SDES *RTCPPacket::sdesAtIndex(size_t index) const - { - ASSERT(index < mSDESCount) - return &(mFirstSDES[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::Bye *RTCPPacket::byeAtIndex(size_t index) const - { - ASSERT(index < mByeCount) - return &(mFirstBye[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::App *RTCPPacket::appAtIndex(size_t index) const - { - ASSERT(index < mAppCount) - return &(mFirstApp[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::TransportLayerFeedbackMessage *RTCPPacket::transportLayerFeedbackReportAtIndex(size_t index) const - { - ASSERT(index < mTransportLayerFeedbackMessageCount) - return &(mFirstTransportLayerFeedbackMessage[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::PayloadSpecificFeedbackMessage *RTCPPacket::payloadSpecificFeedbackReportAtIndex(size_t index) const - { - ASSERT(index < mPayloadSpecificFeedbackMessageCount) - return &(mFirstPayloadSpecificFeedbackMessage[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::XR *RTCPPacket::xrAtIndex(size_t index) const - { - ASSERT(index < mXRCount) - return &(mFirstXR[index]); - } - - //------------------------------------------------------------------------- - RTCPPacket::UnknownReport *RTCPPacket::unknownAtIndex(size_t index) const - { - ASSERT(index < mUnknownReportCount) - return &(mFirstUnknownReport[index]); - } - - //------------------------------------------------------------------------- - static void toDebug( - ElementPtr &subEl, - RTCPPacket::Report *common - ) - { - UseServicesHelper::debugAppend(subEl, "next", NULL != common->next()); - UseServicesHelper::debugAppend(subEl, "ptr", NULL != common->ptr()); - UseServicesHelper::debugAppend(subEl, "size", common->size()); - UseServicesHelper::debugAppend(subEl, "version", common->version()); - UseServicesHelper::debugAppend(subEl, "padding", common->padding()); - UseServicesHelper::debugAppend(subEl, "report specific", common->reportSpecific()); - UseServicesHelper::debugAppend(subEl, "pt", common->pt()); - } - - //------------------------------------------------------------------------- - static void toDebugSenderReceiverCommonReport( - ElementPtr &subEl, - RTCPPacket::SenderReceiverCommonReport *common - ) - { - internal::toDebug(subEl, common); - UseServicesHelper::debugAppend(subEl, "rc", common->rc()); - UseServicesHelper::debugAppend(subEl, (RTCPPacket::ReceiverReport::kPayloadType != common->pt() ? "ssrc of sender" : "ssrc of packet sender"), common->ssrcOfSender()); - UseServicesHelper::debugAppend(subEl, "extension", (NULL != common->extension())); - UseServicesHelper::debugAppend(subEl, "extension size", common->extensionSize()); - } - - //------------------------------------------------------------------------- - static ElementPtr toDebug(RTCPPacket::SenderReceiverCommonReport *common) - { - RTCPPacket::SenderReceiverCommonReport::ReportBlock *block = common->firstReportBlock(); - if (NULL == block) return ElementPtr(); - - ElementPtr outerEl = Element::create("ReportBlocks"); - - for (; NULL != block; block = block->next()) { - ElementPtr subEl = Element::create("ReportBlocks"); - UseServicesHelper::debugAppend(subEl, "ssrc", block->ssrc()); - UseServicesHelper::debugAppend(subEl, "fraction lost", block->fractionLost()); - UseServicesHelper::debugAppend(subEl, "cumulative number of packets lost", block->cumulativeNumberOfPacketsLost()); - UseServicesHelper::debugAppend(subEl, "extended highest sequence number received", block->extendedHighestSequenceNumberReceived()); - UseServicesHelper::debugAppend(subEl, "interarrival jitter", block->interarrivalJitter()); - UseServicesHelper::debugAppend(subEl, "lsr", block->lsr()); - UseServicesHelper::debugAppend(subEl, "dlsr", block->dlsr()); - UseServicesHelper::debugAppend(outerEl, subEl); - } - return outerEl; - } - - //------------------------------------------------------------------------- - static void toDebug( - ElementPtr &subEl, - RTCPPacket::SDES::Chunk::StringItem *common - ) - { - auto type = common->type(); - UseServicesHelper::debugAppend(subEl, "type", type); - if (RTCPPacket::SDES::Chunk::Priv::kItemType == type) { - RTCPPacket::SDES::Chunk::Priv *priv = reinterpret_cast(common); - UseServicesHelper::debugAppend(subEl, "prefix length", priv->prefixLength()); - UseServicesHelper::debugAppend(subEl, "prefix", priv->prefix()); - } - UseServicesHelper::debugAppend(subEl, "length", common->length()); - UseServicesHelper::debugAppend(subEl, "value", common->value()); - } - - //------------------------------------------------------------------------- - static ElementPtr toDebug( - const char *typeNames, - const char *typeName, - RTCPPacket::SDES::Chunk::StringItem *first - ) - { - if (NULL == first) return ElementPtr(); - - RTCPPacket::SDES::Chunk::StringItem *item = first; - bool hasMoreThanOne = (NULL != item ? (NULL != item->mNext) : false); - - ElementPtr outerEl; - - if (hasMoreThanOne) { - outerEl = Element::create(typeNames); - } - - for (; NULL != item; item = item->mNext) { - ElementPtr subEl = Element::create(typeName); - internal::toDebug(subEl, item); - - if (!hasMoreThanOne) { - return subEl; + case TMMBR::kFmt: + { + auto count = fm->tmmbrCount(); + throwIfLessThan(count, 1); + result += ((sizeof(DWORD)*2)*(count)); + break; } - UseServicesHelper::debugAppend(outerEl, subEl); - } - - return outerEl; - } - - //------------------------------------------------------------------------- - static ElementPtr toDebug( - const char *typeNamse, - const char *typeName, - DWORD *ssrcs, - size_t count - ) - { - if (0 == count) return ElementPtr(); - - ElementPtr outerEl = Element::create(typeNamse); - - for (size_t index = 0; index < count; ++index) { - UseServicesHelper::debugAppend(outerEl, typeName, ssrcs[index]); - } - - return outerEl; - } - - //------------------------------------------------------------------------- - static void toDebugFeedbackMessage( - ElementPtr &subEl, - RTCPPacket::FeedbackMessage *common - ) - { - internal::toDebug(subEl, common); - - UseServicesHelper::debugAppend(subEl, "fmt", common->fmt()); - UseServicesHelper::debugAppend(subEl, "ssrc of packet sender", common->ssrcOfPacketSender()); - UseServicesHelper::debugAppend(subEl, "ssrc of media source", common->ssrcOfMediaSource()); - UseServicesHelper::debugAppend(subEl, "fci", (NULL != common->fci())); - UseServicesHelper::debugAppend(subEl, "fci size", common->fciSize()); - } - - //------------------------------------------------------------------------- - static void toDebug( - ElementPtr &subEl, - RTCPPacket::TransportLayerFeedbackMessage::TMMBRCommon *common - ) - { - UseServicesHelper::debugAppend(subEl, "ssrc", common->ssrc()); - UseServicesHelper::debugAppend(subEl, "mx tbr exp", common->mxTBRExp()); - UseServicesHelper::debugAppend(subEl, "mx tbr mantissa", common->mxTBRMantissa()); - UseServicesHelper::debugAppend(subEl, "measured overhead", common->measuredOverhead()); - } - - //------------------------------------------------------------------------- - static void toDebug( - ElementPtr &subEl, - RTCPPacket::PayloadSpecificFeedbackMessage::CodecControlCommon *common - ) - { - UseServicesHelper::debugAppend(subEl, "ssrc", common->ssrc()); - UseServicesHelper::debugAppend(subEl, "seq nr", common->seqNr()); - UseServicesHelper::debugAppend(subEl, "reserved", common->reserved()); - } - - //------------------------------------------------------------------------- - static void toDebugReportBlock( - ElementPtr &subEl, - RTCPPacket::XR::ReportBlock *common - ) - { - UseServicesHelper::debugAppend(subEl, "next", (NULL != common->next())); - UseServicesHelper::debugAppend(subEl, "block type", common->blockType()); - UseServicesHelper::debugAppend(subEl, "type specific", common->typeSpecific()); - UseServicesHelper::debugAppend(subEl, "type specific contents", (NULL != common->typeSpecificContents())); - UseServicesHelper::debugAppend(subEl, "type specific contents size", common->typeSpecificContentSize()); - } - - //------------------------------------------------------------------------- - static void toDebugReportBlockRange( - ElementPtr &subEl, - RTCPPacket::XR::ReportBlockRange *common - ) - { - internal::toDebugReportBlock(subEl, common); - UseServicesHelper::debugAppend(subEl, "reserved", common->reserved()); - UseServicesHelper::debugAppend(subEl, "thinning", common->thinning()); - UseServicesHelper::debugAppend(subEl, "ssrc", common->ssrcOfSource()); - UseServicesHelper::debugAppend(subEl, "begin seq", common->beginSeq()); - UseServicesHelper::debugAppend(subEl, "end seq", common->endSeq()); - } - - //------------------------------------------------------------------------- - static void toDebugRLEReportBlock( - ElementPtr &subEl, - RTCPPacket::XR::RLEReportBlock *common - ) - { - internal::toDebugReportBlockRange(subEl, common); - auto count = common->chunkCount(); - - if (count < 1) return; - - ElementPtr outerEl = Element::create("chunks"); - - for (size_t index = 0; index < count; ++index) { - RTCPPacket::XR::RLEChunk chunk = common->chunkAtIndex(index); - - ElementPtr chunkEl; - - if (RTCPPacket::XR::isRunLengthChunk(chunk)) { - chunkEl = Element::create("run length"); - - RTCPPacket::XR::RunLength rl(chunk); - UseServicesHelper::debugAppend(chunkEl, "run type", string(rl.runType())); - UseServicesHelper::debugAppend(chunkEl, "run length", rl.runLength()); - - } else if (RTCPPacket::XR::isBitVectorChunk(chunk)) { - chunkEl = Element::create("bit vector"); - - String bits; - RTCPPacket::XR::BitVector bv(chunk); - for (int bitPos = 0; bitPos < sizeof(RTCPPacket::XR::RLEChunk); ++bitPos) { - bits += string(bv.bitAtIndex(bitPos)); - } - UseServicesHelper::debugAppend(chunkEl, "bit vector", bits); - } else { - chunkEl = Element::create("unknown"); - UseServicesHelper::debugAppend(chunkEl, "value", chunk); + case TMMBN::kFmt: + { + auto count = fm->tmmbnCount(); + result += ((sizeof(DWORD)*2)*(count)); + break; + } + default: + { + auto fciSize = fm->fciSize(); + if (0 != fciSize) { + ORTC_THROW_INVALID_PARAMETERS_IF(NULL == fm->fci()) + result += fciSize; + } + break; } - - UseServicesHelper::debugAppend(outerEl, chunkEl); - } - UseServicesHelper::debugAppend(subEl, outerEl); - - } - - //------------------------------------------------------------------------- - static ElementPtr toDebugSenderReport(RTCPPacket::SenderReport *sr) - { - ElementPtr subEl = Element::create("SenderReport"); - - internal::toDebugSenderReceiverCommonReport(subEl, sr); - UseServicesHelper::debugAppend(subEl, "ntp timestamp ms", sr->ntpTimestampMS()); - UseServicesHelper::debugAppend(subEl, "ntp timestamp ls", sr->ntpTimestampLS()); - UseServicesHelper::debugAppend(subEl, "ntp timestamp", sr->ntpTimestamp()); - UseServicesHelper::debugAppend(subEl, "sender packet count", sr->senderPacketCount()); - UseServicesHelper::debugAppend(subEl, "sender octet count", sr->senderOctetCount()); - - UseServicesHelper::debugAppend(subEl, internal::toDebug(sr)); - - UseServicesHelper::debugAppend(subEl, "next sender report", NULL != sr->nextSenderReport()); - return subEl; - } - - //------------------------------------------------------------------------- - static ElementPtr toDebugReceiverReport(RTCPPacket::ReceiverReport *rr) - { - ElementPtr subEl = Element::create("ReceiverReport"); - internal::toDebugSenderReceiverCommonReport(subEl, rr); - UseServicesHelper::debugAppend(subEl, internal::toDebug(rr)); - UseServicesHelper::debugAppend(subEl, "next receiver report", NULL != rr->nextReceiverReport()); - return subEl; - } - - //------------------------------------------------------------------------- - static ElementPtr toDebugSDES(RTCPPacket::SDES *sdes) - { - ElementPtr subEl = Element::create("SDES"); - internal::toDebug(subEl, sdes); - UseServicesHelper::debugAppend(subEl, "sc", sdes->sc()); - - RTCPPacket::SDES::Chunk *chunk = sdes->firstChunk(); - if (NULL != chunk) { - ElementPtr chunksEl = Element::create("Chunks"); - - for (; NULL != chunk; chunk = chunk->next()) { - ElementPtr chunkEl = Element::create("Chunk"); - UseServicesHelper::debugAppend(chunkEl, "ssrc", chunk->ssrc()); - UseServicesHelper::debugAppend(chunkEl, "count", chunk->count()); - UseServicesHelper::debugAppend(chunkEl, "cname count", chunk->cNameCount()); - UseServicesHelper::debugAppend(chunkEl, "name count", chunk->nameCount()); - UseServicesHelper::debugAppend(chunkEl, "email count", chunk->emailCount()); - UseServicesHelper::debugAppend(chunkEl, "phone count", chunk->phoneCount()); - UseServicesHelper::debugAppend(chunkEl, "loc count", chunk->locCount()); - UseServicesHelper::debugAppend(chunkEl, "tool count", chunk->toolCount()); - UseServicesHelper::debugAppend(chunkEl, "note count", chunk->noteCount()); - UseServicesHelper::debugAppend(chunkEl, "priv count", chunk->privCount()); - UseServicesHelper::debugAppend(chunkEl, "mid count", chunk->midCount()); - UseServicesHelper::debugAppend(chunkEl, "rid count", chunk->ridCount()); - UseServicesHelper::debugAppend(chunkEl, "unknown count", chunk->unknownCount()); - - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("cnames", "cname", chunk->firstCName())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("names", "name", chunk->firstName())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("emails", "email", chunk->firstEmail())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("phones", "phone", chunk->firstPhone())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("locs", "loc", chunk->firstLoc())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("tools", "tool", chunk->firstTool())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("notes", "note", chunk->firstNote())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("privs", "priv", chunk->firstPriv())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("mid", "mid", chunk->firstMid())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("rid", "rid", chunk->firstRid())); - UseServicesHelper::debugAppend(chunkEl, internal::toDebug("unknowns", "unknown", chunk->firstUnknown())); - - UseServicesHelper::debugAppend(chunksEl, chunkEl); - } - - UseServicesHelper::debugAppend(subEl, chunksEl); } - UseServicesHelper::debugAppend(subEl, "next sdes", NULL != sdes->nextSDES()); - return subEl; - } - - //------------------------------------------------------------------------- - static ElementPtr toDebugBye(RTCPPacket::Bye *bye) - { - ElementPtr subEl = Element::create("Bye"); - internal::toDebug(subEl, bye); - - UseServicesHelper::debugAppend(subEl, internal::toDebug("ssrcs", "ssrc", bye->mSSRCs, bye->sc())); - - UseServicesHelper::debugAppend(subEl, "reason for leaving", bye->reasonForLeaving()); - UseServicesHelper::debugAppend(subEl, "next bye", NULL != bye->nextBye()); - return subEl; - } - - //------------------------------------------------------------------------- - static ElementPtr toDebugApp(RTCPPacket::App *app) - { - ElementPtr subEl = Element::create("App"); - internal::toDebug(subEl, app); - - UseServicesHelper::debugAppend(subEl, "subtype", app->subtype()); - UseServicesHelper::debugAppend(subEl, "ssrc", app->ssrc()); - UseServicesHelper::debugAppend(subEl, "name", app->name()); - - UseServicesHelper::debugAppend(subEl, "data", (NULL != app->data())); - UseServicesHelper::debugAppend(subEl, "name size", app->dataSize()); + ZS_LOG_INSANE(packet_slog("getting transport layer feedback message packet size") + ZS_PARAM("fmt", fm->fmtToString()) + ZS_PARAM("fmt (number)", fm->reportSpecific()) + ZS_PARAM("size", result)) - UseServicesHelper::debugAppend(subEl, "next app", NULL != app->nextApp()); - return subEl; + return boundarySize(result); } //------------------------------------------------------------------------- - static ElementPtr toDebugTransportLayerFeedbackMessage(RTCPPacket::TransportLayerFeedbackMessage *fm) + static size_t getPacketSizePayloadSpecificFeedbackMessage(const RTCPPacket::PayloadSpecificFeedbackMessage *fm) { - ElementPtr subEl = Element::create("TransportLayerFeedbackMessage"); - internal::toDebugFeedbackMessage(subEl, fm); - - { - auto count = fm->genericNACKCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("GenericNACKs"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("GenericNACK"); + typedef RTCPPacket::PayloadSpecificFeedbackMessage PayloadSpecificFeedbackMessage; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::PLI PLI; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::SLI SLI; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::RPSI RPSI; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::FIR FIR; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTR TSTR; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTN TSTN; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::VBCM VBCM; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::AFB AFB; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::REMB REMB; - auto format = fm->genericNACKAtIndex(index); + size_t result = (sizeof(DWORD)*3); - UseServicesHelper::debugAppend(formatEl, "pid", format->pid()); - UseServicesHelper::debugAppend(formatEl, "blp", format->blp()); + switch (fm->fmt()) { + case PLI::kFmt: + { + break; + } + case SLI::kFmt: + { + auto count = fm->sliCount(); + throwIfLessThan(count, 1); + result += (sizeof(DWORD)*(count)); + break; + } + case RPSI::kFmt: + { + auto rpsi = fm->rpsi(); + ORTC_THROW_INVALID_PARAMETERS_IF(NULL == rpsi) + result += sizeof(WORD) + (rpsi->nativeRPSIBitStringSizeInBits()/8); + if (0 != (rpsi->nativeRPSIBitStringSizeInBits()%8)) ++result; + break; + } + case FIR::kFmt: + { + auto count = fm->firCount(); + throwIfLessThan(count, 1); + result += ((sizeof(DWORD)*2)*(count)); + break; + } + case TSTR::kFmt: + { + auto count = fm->tstrCount(); + throwIfLessThan(count, 1); + result += ((sizeof(DWORD)*2)*(count)); + break; + } + case TSTN::kFmt: + { + auto count = fm->tstnCount(); + throwIfLessThan(count, 1); + result += ((sizeof(DWORD)*2)*(count)); + break; + } + case VBCM::kFmt: + { + auto count = fm->vbcmCount(); + throwIfLessThan(count, 1); + for (size_t index = 0; index < count; ++index) + { + auto vbcm = fm->vbcmAtIndex(index); + ORTC_THROW_INVALID_PARAMETERS_IF(NULL == vbcm) - UseServicesHelper::debugAppend(formatsEl, formatEl); + size_t size = (sizeof(DWORD)*2) + (vbcm->vbcmOctetStringSize()*sizeof(BYTE)); + result += boundarySize(size); } - UseServicesHelper::debugAppend(subEl, formatsEl); + break; } - } - - { - auto count = fm->tmmbrCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("TMMBRs"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("TMMBR"); - - auto format = fm->tmmbrAtIndex(index); - internal::toDebug(formatEl, format); + case AFB::kFmt: + { + auto remb = fm->remb(); + if (NULL == remb) { + auto afb = fm->afb(); + ORTC_THROW_INVALID_PARAMETERS_IF(NULL == afb) - UseServicesHelper::debugAppend(formatsEl, formatEl); + result += afb->dataSize(); + } else { + result += (sizeof(DWORD)*2); + size_t numSSRCs = remb->numSSRC(); + throwIfGreaterThanBitsAllow(numSSRCs, 8); + throwIfLessThan(numSSRCs, 1); + result += ((sizeof(DWORD))*numSSRCs); } - UseServicesHelper::debugAppend(subEl, formatsEl); + break; } - } - - { - auto count = fm->tmmbrCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("TMMBNs"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("TMMBN"); - - auto format = fm->tmmbrAtIndex(index); - internal::toDebug(formatEl, format); - - UseServicesHelper::debugAppend(formatsEl, formatEl); + default: + { + auto fciSize = fm->fciSize(); + if (0 != fciSize) { + ORTC_THROW_INVALID_PARAMETERS_IF(NULL == fm->fci()) + result += fciSize; } - UseServicesHelper::debugAppend(subEl, formatsEl); + break; } } - UseServicesHelper::debugAppend(subEl, "unknown", NULL != fm->unknown()); - - UseServicesHelper::debugAppend(subEl, "next transport layer feedback message", (NULL != fm->nextTransportLayerFeedbackMessage())); + ZS_LOG_INSANE(packet_slog("getting payload specific feedback message packet size") + ZS_PARAM("fmt", fm->fmtToString()) + ZS_PARAM("fmt (number)", fm->reportSpecific()) + ZS_PARAM("size", result)) - return subEl; + return boundarySize(result); } //------------------------------------------------------------------------- - static ElementPtr toDebugPayloadSpecificFeedbackMessage(RTCPPacket::PayloadSpecificFeedbackMessage *fm) + static size_t getPacketSizeXR(const RTCPPacket::XR *report) { - ElementPtr subEl = Element::create("PayloadSpecificFeedbackMessage"); - internal::toDebugFeedbackMessage(subEl, fm); - - { - auto format = fm->pli(); - if (NULL != format) { - ElementPtr formatEl = Element::create("PLI"); + typedef RTCPPacket::XR XR; + typedef RTCPPacket::XR::ReportBlock ReportBlock; + typedef RTCPPacket::XR::LossRLEReportBlock LossRLEReportBlock; + typedef RTCPPacket::XR::DuplicateRLEReportBlock DuplicateRLEReportBlock; + typedef RTCPPacket::XR::PacketReceiptTimesReportBlock PacketReceiptTimesReportBlock; + typedef RTCPPacket::XR::ReceiverReferenceTimeReportBlock ReceiverReferenceTimeReportBlock; + typedef RTCPPacket::XR::DLRRReportBlock DLRRReportBlock; + typedef RTCPPacket::XR::StatisticsSummaryReportBlock StatisticsSummaryReportBlock; + typedef RTCPPacket::XR::VoIPMetricsReportBlock VoIPMetricsReportBlock; + typedef RTCPPacket::XR::UnknownReportBlock UnknownReportBlock; - UseServicesHelper::debugAppend(subEl, formatEl); - } - } + size_t result = (sizeof(DWORD)*2); + for (const ReportBlock *reportBlock = report->firstReportBlock(); NULL != reportBlock; reportBlock = reportBlock->next()) { - auto count = fm->sliCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("SLIs"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("SLI"); - - auto format = fm->sliAtIndex(index); - - UseServicesHelper::debugAppend(formatEl, "first", format->first()); - UseServicesHelper::debugAppend(formatEl, "number", format->number()); - UseServicesHelper::debugAppend(formatEl, "picture id", format->pictureID()); + size_t preSize = result; - UseServicesHelper::debugAppend(formatsEl, formatEl); + switch (reportBlock->mBlockType) { + case LossRLEReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); + result += (sizeof(DWORD)*3); + result += boundarySize(sizeof(WORD)*(block->chunkCount())); + break; } - UseServicesHelper::debugAppend(subEl, formatsEl); - } - } - - { - auto format = fm->rpsi(); - if (NULL != format) { - ElementPtr formatEl = Element::create("RPSI"); - - UseServicesHelper::debugAppend(formatEl, "zero bit", format->zeroBit()); - UseServicesHelper::debugAppend(formatEl, "payload type", format->payloadType()); - - UseServicesHelper::debugAppend(formatEl, "native rpsi bit string", (NULL != format->nativeRPSIBitString())); - UseServicesHelper::debugAppend(formatEl, "native rpsi bit string size (bits)", format->nativeRPSIBitStringSizeInBits()); - - UseServicesHelper::debugAppend(subEl, formatEl); - } - } - - { - auto count = fm->firCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("FIRs"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("FIR"); - - auto format = fm->firAtIndex(index); - internal::toDebug(formatEl, format); - - UseServicesHelper::debugAppend(formatsEl, formatEl); + case DuplicateRLEReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); + result += (sizeof(DWORD)*3); + result += boundarySize(sizeof(WORD)*(block->chunkCount())); + break; } - UseServicesHelper::debugAppend(subEl, formatsEl); - } - } - - { - auto count = fm->tstrCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("TSTRs"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("TSTR"); - - auto format = fm->tstrAtIndex(index); - internal::toDebug(formatEl, format); - - UseServicesHelper::debugAppend(formatEl, "index", format->index()); - - UseServicesHelper::debugAppend(formatsEl, formatEl); + case PacketReceiptTimesReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); + result += (sizeof(DWORD)*3); + result += (sizeof(DWORD)*(block->receiptTimeCount())); + break; + } + case ReceiverReferenceTimeReportBlock::kBlockType: + { + result += (sizeof(DWORD)*3); + break; + } + case DLRRReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); + result += (sizeof(DWORD)); + result += ((sizeof(DWORD)*3)*(block->subBlockCount())); + break; + } + case StatisticsSummaryReportBlock::kBlockType: + { + result += (sizeof(DWORD)*10); + break; + } + case VoIPMetricsReportBlock::kBlockType: + { + result += (sizeof(DWORD)*9); + break; + } + default: + { + result += (sizeof(DWORD)) + boundarySize(reportBlock->mTypeSpecificContentSize); } - UseServicesHelper::debugAppend(subEl, formatsEl); } - } - { - auto count = fm->tstnCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("TSTNs"); + ZS_LOG_INSANE(packet_slog("XR block packet size") + ZS_PARAM("block type", reportBlock->blockTypeToString()) + ZS_PARAM("block type (number)", reportBlock->blockType()) + ZS_PARAM("size", result - preSize)) + } - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("TSTN"); + return boundarySize(result); + } - auto format = fm->tstnAtIndex(index); - internal::toDebug(formatEl, format); + //------------------------------------------------------------------------- + static void writePacketUnknown(const RTCPPacket::UnknownReport *report, BYTE * &pos, size_t &remaining) + { + typedef RTCPPacket::UnknownReport UnknownReport; + pos[1] = report->pt(); - UseServicesHelper::debugAppend(formatEl, "index", format->index()); + advancePos(pos, remaining, sizeof(DWORD)); - UseServicesHelper::debugAppend(formatsEl, formatEl); - } - UseServicesHelper::debugAppend(subEl, formatsEl); - } - } + auto size = report->size(); + if (0 == size) return; - { - auto count = fm->vbcmCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("VBCMs"); + ASSERT(NULL != report->ptr()); - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("VBCM"); + memcpy(pos, report->ptr(), size); - auto format = fm->vbcmAtIndex(index); - internal::toDebug(formatEl, format); + advancePos(pos, remaining, size); + } - UseServicesHelper::debugAppend(formatEl, "zero bit", format->zeroBit()); - UseServicesHelper::debugAppend(formatEl, "payload type", format->payloadType()); + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket (packet writing routines) + #pragma mark - UseServicesHelper::debugAppend(formatEl, "vbcm octet string", (NULL != format->vbcmOctetString())); - UseServicesHelper::debugAppend(formatEl, "vbcm octet string size", format->vbcmOctetStringSize()); + //------------------------------------------------------------------------- + static void writePacketHeader(const RTCPPacket::Report *report, BYTE * &pos, size_t &remaining) + { + ASSERT(remaining >= sizeof(DWORD)) + ASSERT(2 == report->version()) - UseServicesHelper::debugAppend(formatsEl, formatEl); - } - UseServicesHelper::debugAppend(subEl, formatsEl); - } + auto padding = report->padding(); + if (0 != padding) { + ASSERT(NULL == report->next()) + ASSERT(throwIfGreaterThanBitsAllow(padding, 8)) } - { - auto format = fm->afb(); - auto remb = fm->remb(); - - if ((NULL != format) && - (NULL == remb)) { - ElementPtr formatEl = Element::create("AFB"); + ASSERT(throwIfGreaterThanBitsAllow(report->reportSpecific(), 5)) - UseServicesHelper::debugAppend(formatEl, "data", (NULL != format->data())); - UseServicesHelper::debugAppend(formatEl, "data size", format->dataSize()); + pos[0] = RTCP_PACK_BITS(report->version(), 0x3, 6) | + ((0 != padding) ? RTCP_PACK_BITS(1, 0x1, 5) : 0) | + RTCP_PACK_BITS(report->reportSpecific(), 0x1F, 0); + pos[1] = report->pt(); + } - UseServicesHelper::debugAppend(subEl, formatEl); - } - } + //------------------------------------------------------------------------- + static void writePacketSenderReceiverCommonReport(const RTCPPacket::SenderReceiverCommonReport *report, BYTE * &pos, size_t &remaining) + { + typedef RTCPPacket::SenderReceiverCommonReport SenderReceiverCommonReport; + typedef RTCPPacket::SenderReceiverCommonReport::ReportBlock ReportBlock; + size_t count = 0; + for (const ReportBlock *block = report->firstReportBlock(); NULL != block; block = block->next(), ++count) { - auto format = fm->remb(); - if (NULL != format) { - ElementPtr formatEl = Element::create("REMB"); + ASSERT(count < report->rc()); + + UseRTPUtils::setBE32(&(pos[0]), block->ssrc()); + ASSERT(throwIfGreaterThanBitsAllow(block->cumulativeNumberOfPacketsLost(), 24)); + UseRTPUtils::setBE32(&(pos[4]), block->cumulativeNumberOfPacketsLost()); + pos[4] = block->fractionLost(); + UseRTPUtils::setBE32(&(pos[8]), block->extendedHighestSequenceNumberReceived()); + UseRTPUtils::setBE32(&(pos[12]), block->interarrivalJitter()); + UseRTPUtils::setBE32(&(pos[16]), block->lsr()); + UseRTPUtils::setBE32(&(pos[20]), block->dlsr()); - UseServicesHelper::debugAppend(formatEl, "num ssrc", format->numSSRC()); - UseServicesHelper::debugAppend(formatEl, "br exp", format->brExp()); - UseServicesHelper::debugAppend(formatEl, "br mantissa", format->brMantissa()); + advancePos(pos, remaining, sizeof(DWORD)*6); + } - UseServicesHelper::debugAppend(formatEl, internal::toDebug("ssrcs", "ssrc", format->mSSRCs, format->numSSRC())); + ASSERT(count == report->rc()) - UseServicesHelper::debugAppend(subEl, formatEl); - } + if (report->extensionSize() > 0) { + ASSERT(NULL != report->extension()) + memcpy(pos, report->extension(), report->extensionSize()); + advancePos(pos, remaining, boundarySize(report->extensionSize())); } + } + + //------------------------------------------------------------------------- + static void writePacketSenderReport(const RTCPPacket::SenderReport *report, BYTE * &pos, size_t &remaining) + { + typedef RTCPPacket::SenderReport SenderReport; + pos[1] = SenderReport::kPayloadType; - UseServicesHelper::debugAppend(subEl, "unknown", NULL != fm->unknown()); + UseRTPUtils::setBE32(&(pos[4]), report->ssrcOfSender()); + UseRTPUtils::setBE32(&(pos[8]), report->ntpTimestampMS()); + UseRTPUtils::setBE32(&(pos[12]), report->ntpTimestampLS()); + UseRTPUtils::setBE32(&(pos[16]), report->rtpTimestamp()); + UseRTPUtils::setBE32(&(pos[20]), report->senderPacketCount()); + UseRTPUtils::setBE32(&(pos[24]), report->senderOctetCount()); - UseServicesHelper::debugAppend(subEl, "next payload specific feedback message", (NULL != fm->nextPayloadSpecificFeedbackMessage())); - return subEl; + advancePos(pos, remaining, sizeof(DWORD)*7); + + writePacketSenderReceiverCommonReport(report, pos, remaining); } //------------------------------------------------------------------------- - static ElementPtr toDebugXR(RTCPPacket::XR *xr) + static void writePacketReceiverReport(const RTCPPacket::ReceiverReport *report, BYTE * &pos, size_t &remaining) { - ElementPtr subEl = Element::create("XR"); - internal::toDebug(subEl, xr); - - UseServicesHelper::debugAppend(subEl, "reserved", xr->reserved()); - UseServicesHelper::debugAppend(subEl, "ssrc", xr->ssrc()); - UseServicesHelper::debugAppend(subEl, "report block count", xr->reportBlockCount()); + typedef RTCPPacket::ReceiverReport ReceiverReport; + pos[1] = ReceiverReport::kPayloadType; - { - auto count = xr->lossRLEReportBlockCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("LossRLEReportBlocks"); + UseRTPUtils::setBE32(&(pos[4]), report->ssrcOfPacketSender()); - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("LossRLEReportBlock"); + advancePos(pos, remaining, sizeof(DWORD)*2); - auto format = xr->lossRLEReportBlockAtIndex(index); + writePacketSenderReceiverCommonReport(report, pos, remaining); + } + + //------------------------------------------------------------------------- + static void writePacketSDES(const RTCPPacket::SDES *report, BYTE * &pos, size_t &remaining) + { + typedef RTCPPacket::SDES SDES; + typedef RTCPPacket::SDES::Chunk Chunk; - internal::toDebugRLEReportBlock(formatEl, format); + pos[1] = SDES::kPayloadType; - UseServicesHelper::debugAppend(formatEl, "next loss rle report block", (NULL != format->nextLossRLE())); + advancePos(pos, remaining, sizeof(DWORD)); - UseServicesHelper::debugAppend(formatsEl, formatEl); - } - UseServicesHelper::debugAppend(subEl, formatsEl); - } - } + size_t chunkCount = 0; + for (Chunk *chunk = report->firstChunk(); NULL != chunk; chunk = chunk->next(), ++chunkCount) { - auto count = xr->duplicateRLEReportBlockCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("DuplicateRLEReportBlocks"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("DuplicateRLEReportBlock"); + UseRTPUtils::setBE32(pos, chunk->ssrc()); + advancePos(pos, remaining, sizeof(DWORD)); - auto format = xr->duplicateRLEReportBlockAtIndex(index); + BYTE *startPos = pos; - internal::toDebugRLEReportBlock(formatEl, format); + for (auto *item = chunk->firstCName(); NULL != item; item = item->next()) + { + pos[0] = Chunk::CName::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)) - UseServicesHelper::debugAppend(formatEl, "next duplicate rle report block", (NULL != format->nextDuplicateRLE())); + advancePos(pos, remaining, sizeof(WORD)); - UseServicesHelper::debugAppend(formatsEl, formatEl); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); } - UseServicesHelper::debugAppend(subEl, formatsEl); + ZS_LOG_INSANE(packet_slog("writing SDES CName") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) } - } - - { - auto count = xr->packetReceiptTimesReportBlockCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("PacketReceiptTimesReportBlocks"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("PacketReceiptTimesReportBlock"); - - auto format = xr->packetReceiptTimesReportBlockAtIndex(index); - internal::toDebugReportBlockRange(formatEl, format); + for (auto *item = chunk->firstName(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Name::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)) - UseServicesHelper::debugAppend(formatEl, internal::toDebug("receipt times", "receipt time", format->mReceiptTimes, format->receiptTimeCount())); - UseServicesHelper::debugAppend(formatEl, "next packet receipt times report block", (NULL != format->nextPacketReceiptTimesReportBlock())); + advancePos(pos, remaining, sizeof(WORD)); - UseServicesHelper::debugAppend(formatsEl, formatEl); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); } - UseServicesHelper::debugAppend(subEl, formatsEl); + ZS_LOG_INSANE(packet_slog("writing SDES Name") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) } - } - { - auto count = xr->receiverReferenceTimeReportBlockCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("ReceiverReferenceTimeReportBlocks"); + for (auto *item = chunk->firstEmail(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Email::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("ReceiverReferenceTimeReportBlock"); + advancePos(pos, remaining, sizeof(WORD)); - auto format = xr->receiverReferenceTimeReportBlockAtIndex(index); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); + } + ZS_LOG_INSANE(packet_slog("writing SDES Email") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - internal::toDebugReportBlock(formatEl, format); + for (auto *item = chunk->firstPhone(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Phone::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - UseServicesHelper::debugAppend(formatEl, "ntp timestamp ms", format->ntpTimestampMS()); - UseServicesHelper::debugAppend(formatEl, "ntp timestamp ls", format->ntpTimestampLS()); - UseServicesHelper::debugAppend(formatEl, "ntp timestamp", format->ntpTimestamp()); - UseServicesHelper::debugAppend(formatEl, "next receiver reference time report block", (NULL != format->nextReceiverReferenceTimeReportBlock())); + advancePos(pos, remaining, sizeof(WORD)); - UseServicesHelper::debugAppend(formatsEl, formatEl); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); } - UseServicesHelper::debugAppend(subEl, formatsEl); + ZS_LOG_INSANE(packet_slog("writing SDES Phone") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) } - } - - { - auto count = xr->dlrrReportBlockCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("DLRRReportBlocks"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("DLRRReportBlock"); - auto format = xr->dlrrReportBlockAtIndex(index); + for (auto *item = chunk->firstLoc(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Loc::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - internal::toDebugReportBlock(formatEl, format); + advancePos(pos, remaining, sizeof(WORD)); - UseServicesHelper::debugAppend(formatEl, "subblock count", format->subBlockCount()); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); + } + ZS_LOG_INSANE(packet_slog("writing SDES Loc") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - size_t subBlockCount = format->subBlockCount(); - if (subBlockCount > 0) { - ElementPtr subblocksEl = Element::create("SubBlocks"); - for (size_t indexSubBlock = 0; indexSubBlock < subBlockCount; ++indexSubBlock) - { - ElementPtr subblockEl = Element::create("SubBlock"); - auto subBlock = format->subBlockAtIndex(indexSubBlock); - UseServicesHelper::debugAppend(subblockEl, "ssrc", subBlock->ssrc()); - UseServicesHelper::debugAppend(subblockEl, "lrr", subBlock->lrr()); - UseServicesHelper::debugAppend(subblockEl, "dlrr", subBlock->dlrr()); - UseServicesHelper::debugAppend(subblocksEl, subblockEl); - } - UseServicesHelper::debugAppend(formatEl, subblocksEl); - } + for (auto *item = chunk->firstTool(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Tool::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - UseServicesHelper::debugAppend(formatEl, "next dlrr report block", (NULL != format->nextDLRRReportBlock())); + advancePos(pos, remaining, sizeof(WORD)); - UseServicesHelper::debugAppend(formatsEl, formatEl); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); } - UseServicesHelper::debugAppend(subEl, formatsEl); + ZS_LOG_INSANE(packet_slog("writing SDES Tool") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) } - } - - { - auto count = xr->statisticsSummaryReportBlockCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("StatisticsSummaryReportBlocks"); - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("StatisticsSummaryReportBlock"); - - auto format = xr->statisticsSummaryReportBlockAtIndex(index); + for (auto *item = chunk->firstNote(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Note::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - internal::toDebugReportBlockRange(formatEl, format); + advancePos(pos, remaining, sizeof(WORD)); - UseServicesHelper::debugAppend(formatEl, "loss report flag", format->lossReportFlag()); - UseServicesHelper::debugAppend(formatEl, "duplicate report flag", format->duplicateReportFlag()); - UseServicesHelper::debugAppend(formatEl, "jitter report flag", format->jitterFlag()); - UseServicesHelper::debugAppend(formatEl, "ttl flag", format->ttlFlag()); - UseServicesHelper::debugAppend(formatEl, "hop limit flag", format->hopLimitFlag()); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); + } + ZS_LOG_INSANE(packet_slog("writing SDES Note") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - if (format->lossReportFlag()) { - UseServicesHelper::debugAppend(formatEl, "lost packets", format->lostPackets()); - } - if (format->duplicateReportFlag()) { - UseServicesHelper::debugAppend(formatEl, "dup packets", format->dupPackets()); - } + for (auto *item = chunk->firstPriv(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Priv::kItemType; + size_t len1 = (NULL != item->mPrefix ? strlen(item->mPrefix) : 0); + size_t len2 = (NULL != item->mValue ? strlen(item->mValue) : 0); + size_t len = len1 + len2; + if (len > 0) ++len; + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - if (format->jitterFlag()) { - UseServicesHelper::debugAppend(formatEl, "min jitter", format->minJitter()); - UseServicesHelper::debugAppend(formatEl, "max jitter", format->maxJitter()); - UseServicesHelper::debugAppend(formatEl, "mean jitter", format->meanJitter()); - UseServicesHelper::debugAppend(formatEl, "dev jitter", format->devJitter()); - } + advancePos(pos, remaining, sizeof(WORD)); - if (format->ttlFlag()) { - UseServicesHelper::debugAppend(formatEl, "min ttl", format->minTTL()); - UseServicesHelper::debugAppend(formatEl, "max ttl", format->maxTTL()); - UseServicesHelper::debugAppend(formatEl, "mean ttl", format->meanTTL()); - UseServicesHelper::debugAppend(formatEl, "dev ttl", format->devTTL()); + if (len > 0) { + pos[0] = static_cast(len1); + advancePos(pos, remaining); + if (len1 > 0) { + memcpy(pos, item->prefix(), len1*sizeof(BYTE)); + advancePos(pos, remaining, len1*sizeof(BYTE)); } - - if (format->hopLimitFlag()) { - UseServicesHelper::debugAppend(formatEl, "min hop limit", format->minHopLimit()); - UseServicesHelper::debugAppend(formatEl, "max hop limit", format->maxHopLimit()); - UseServicesHelper::debugAppend(formatEl, "mean hop limit", format->meanHopLimit()); - UseServicesHelper::debugAppend(formatEl, "dev hop limit", format->devHopLimit()); + if (len2 > 0) { + memcpy(pos, item->value(), len2*sizeof(BYTE)); + advancePos(pos, remaining, len2*sizeof(BYTE)); } - - UseServicesHelper::debugAppend(formatEl, "next statistics summary report block", (NULL != format->nextStatisticsSummaryReportBlock())); - - UseServicesHelper::debugAppend(formatsEl, formatEl); } - UseServicesHelper::debugAppend(subEl, formatsEl); + ZS_LOG_INSANE(packet_slog("writing SDES Priv") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("prefix len", len1) + ZS_PARAM("prefix", (NULL != item->mPrefix ? item->mPrefix : NULL)) + ZS_PARAM("len", len2) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) } - } - - { - auto count = xr->voIPMetricsReportBlockCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("VoIPMetricsReportBlocks"); - - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("VoIPMetricsReportBlock"); - - auto format = xr->voIPMetricsReportBlockAtIndex(index); - - internal::toDebugReportBlock(formatEl, format); - - UseServicesHelper::debugAppend(formatEl, "ssrc of source", format->ssrcOfSource()); - - UseServicesHelper::debugAppend(formatEl, "loss rate", format->lossRate()); - UseServicesHelper::debugAppend(formatEl, "discard rate", format->discardRate()); - UseServicesHelper::debugAppend(formatEl, "burst density", format->burstDensity()); - UseServicesHelper::debugAppend(formatEl, "gap densitity", format->gapDensity()); - UseServicesHelper::debugAppend(formatEl, "burst duration", format->burstDuration()); - UseServicesHelper::debugAppend(formatEl, "gap duration", format->gapDuration()); - - UseServicesHelper::debugAppend(formatEl, "round trip delay", format->roundTripDelay()); - UseServicesHelper::debugAppend(formatEl, "end system delay", format->endSystemDelay()); - - UseServicesHelper::debugAppend(formatEl, "signal level", format->signalLevel()); - UseServicesHelper::debugAppend(formatEl, "noise level", format->noiseLevel()); - UseServicesHelper::debugAppend(formatEl, "rerl", format->rerl()); - UseServicesHelper::debugAppend(formatEl, "Gmin", format->Gmin()); + for (auto *item = chunk->firstMid(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Mid::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - UseServicesHelper::debugAppend(formatEl, "r factor", format->rFactor()); - UseServicesHelper::debugAppend(formatEl, "ext r factor", format->extRFactor()); - UseServicesHelper::debugAppend(formatEl, "moslq", format->mosLQ()); - UseServicesHelper::debugAppend(formatEl, "moscq", format->mosCQ()); + advancePos(pos, remaining, sizeof(WORD)); - UseServicesHelper::debugAppend(formatEl, "rx config", format->rxConfig()); - UseServicesHelper::debugAppend(formatEl, "plc", format->plc()); - UseServicesHelper::debugAppend(formatEl, "jba", format->jba()); - UseServicesHelper::debugAppend(formatEl, "jb rate", format->jbRate()); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); + } + ZS_LOG_INSANE(packet_slog("writing SDES Mid report") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - UseServicesHelper::debugAppend(formatEl, "jb nominal", format->jbNominal()); - UseServicesHelper::debugAppend(formatEl, "jb maximum", format->jbMaximum()); - UseServicesHelper::debugAppend(formatEl, "jb abs max", format->jbAbsMax()); + for (auto *item = chunk->firstRid(); NULL != item; item = item->next()) + { + pos[0] = Chunk::Rid::kItemType; + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - UseServicesHelper::debugAppend(formatEl, "next voip metrics report block", (NULL != format->nextVoIPMetricsReportBlock())); + advancePos(pos, remaining, sizeof(WORD)); - UseServicesHelper::debugAppend(formatsEl, formatEl); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); } - UseServicesHelper::debugAppend(subEl, formatsEl); + ZS_LOG_INSANE(packet_slog("writing SDES Rid report") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) } - } - { - auto count = xr->unknownReportBlockCount(); - if (count > 0) { - ElementPtr formatsEl = Element::create("UnknownReportBlocks"); + for (auto *item = chunk->firstUnknown(); NULL != item; item = item->next()) + { + pos[0] = item->type(); + size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); + pos[1] = static_cast(len); + ASSERT(throwIfGreaterThanBitsAllow(len, 8)); - for (size_t index = 0; index < count; ++index) { - ElementPtr formatEl = Element::create("UnknownReportBlock"); + advancePos(pos, remaining, sizeof(WORD)); - auto format = xr->unknownReportBlockAtIndex(index); + if (len > 0) { + memcpy(pos, item->value(), len*sizeof(BYTE)); + advancePos(pos, remaining, len*sizeof(BYTE)); + } + ZS_LOG_INSANE(packet_slog("writing SDES Unknown") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("type", item->mType) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + } - internal::toDebugReportBlock(formatEl, format); + BYTE *endPos = pos; - UseServicesHelper::debugAppend(formatEl, "next unknown report block", (NULL != format->nextUnknownReportBlock())); + PTRNUMBER diff = reinterpret_cast(endPos) - reinterpret_cast(startPos); + auto modulas = (diff % sizeof(DWORD)); + if (0 != modulas) { + advancePos(pos, remaining, sizeof(DWORD)-modulas); + } - UseServicesHelper::debugAppend(formatsEl, formatEl); - } - UseServicesHelper::debugAppend(subEl, formatsEl); + if ((0 == diff) || + (0 == modulas)) { + // write "empty" chunk + UseRTPUtils::setBE32(pos, 0); + advancePos(pos, remaining, sizeof(DWORD)); } } - UseServicesHelper::debugAppend(subEl, "next xr", (NULL != xr->nextXR())); - return subEl; + throwIfGreaterThanBitsAllow(chunkCount, 5); } - + //------------------------------------------------------------------------- - ElementPtr RTCPPacket::toDebug() const + static void writePacketBye(const RTCPPacket::Bye *report, BYTE * &pos, size_t &remaining) { - ElementPtr objectEl = Element::create("ortc::RTCPPacket"); - - UseServicesHelper::debugAppend(objectEl, "buffer", mBuffer ? mBuffer->SizeInBytes() : 0); - UseServicesHelper::debugAppend(objectEl, "allocate buffer", mAllocationBuffer ? mAllocationBuffer->SizeInBytes() : 0); + typedef RTCPPacket::Bye Bye; + pos[1] = Bye::kPayloadType; - UseServicesHelper::debugAppend(objectEl, "allocation pos", (NULL != mAllocationPos ? (mAllocationBuffer ? (reinterpret_cast(mAllocationPos) - reinterpret_cast(mAllocationBuffer->BytePtr())) : reinterpret_cast(mAllocationPos)) : 0)); - UseServicesHelper::debugAppend(objectEl, "buffer", mAllocationSize); + advancePos(pos, remaining, sizeof(DWORD)); - for (Report *report = mFirst; NULL != report; report = report->next()) + for (size_t index = 0; index < report->sc(); ++index) { - switch (report->pt()) { - case SenderReport::kPayloadType: - { - SenderReport *sr = static_cast(report); - UseServicesHelper::debugAppend(objectEl, toDebugSenderReport(sr)); - break; - } - case ReceiverReport::kPayloadType: - { - ReceiverReport *rr = static_cast(report); - UseServicesHelper::debugAppend(objectEl, toDebugReceiverReport(rr)); - break; - } - case SDES::kPayloadType: - { - SDES *sdes = static_cast(report); - UseServicesHelper::debugAppend(objectEl, toDebugSDES(sdes)); - break; - } - case Bye::kPayloadType: - { - Bye *bye = static_cast(report); - UseServicesHelper::debugAppend(objectEl, toDebugBye(bye)); - break; - } - case App::kPayloadType: - { - App *app = static_cast(report); - UseServicesHelper::debugAppend(objectEl, toDebugApp(app)); - break; - } - case TransportLayerFeedbackMessage::kPayloadType: - { - TransportLayerFeedbackMessage *fm = static_cast(report); - UseServicesHelper::debugAppend(objectEl, toDebugTransportLayerFeedbackMessage(fm)); - break; - } - case PayloadSpecificFeedbackMessage::kPayloadType: - { - PayloadSpecificFeedbackMessage *fm = static_cast(report); - UseServicesHelper::debugAppend(objectEl, toDebugPayloadSpecificFeedbackMessage(fm)); - break; - } - case XR::kPayloadType: - { - XR *xr = static_cast(report); - UseServicesHelper::debugAppend(objectEl, toDebugXR(xr)); - break; - } - default: - { - UnknownReport *unknown = static_cast(report); - - ElementPtr subEl = Element::create("UnknownReport"); - internal::toDebug(subEl, unknown); - - UseServicesHelper::debugAppend(subEl, "next unknown", (NULL != unknown->nextUnknown())); + UseRTPUtils::setBE32(pos, report->ssrc(index)); + advancePos(pos, remaining, sizeof(DWORD)); + } - UseServicesHelper::debugAppend(objectEl, subEl); - break; - } + if (NULL != report->reasonForLeaving()) { + size_t len = strlen(report->reasonForLeaving()); + if (len > 0) { + pos[0] = static_cast(len); + memcpy(&(pos[1]), report->reasonForLeaving(), len*sizeof(BYTE)); + advancePos(pos, remaining, (len*sizeof(BYTE))+sizeof(BYTE)); } } - - return objectEl; } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket (internal) - #pragma mark - //------------------------------------------------------------------------- - Log::Params RTCPPacket::slog(const char *message) + static void writePacketApp(const RTCPPacket::App *report, BYTE * &pos, size_t &remaining) { - return packet_slog(message); - } + typedef RTCPPacket::App App; + pos[1] = App::kPayloadType; - //------------------------------------------------------------------------- - Log::Params RTCPPacket::log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::RTCPPacket"); - return Log::Params(message, objectEl); - } + UseRTPUtils::setBE32(&(pos[4]), report->ssrc()); + memcpy(&(pos[8]), report->name(), sizeof(DWORD)); - //------------------------------------------------------------------------- - Log::Params RTCPPacket::debug(const char *message) const - { - return Log::Params(message, toDebug()); + advancePos(pos, remaining, sizeof(DWORD)*3); + + size_t dataSize = report->dataSize(); + if (0 != dataSize) { + memcpy(pos, report->data(), dataSize); + advancePos(pos, remaining, dataSize); + } } //------------------------------------------------------------------------- - bool RTCPPacket::parse() + static void writePacketTransportLayerFeedbackMessage(const RTCPPacket::TransportLayerFeedbackMessage *report, BYTE * &pos, size_t &remaining) { - const BYTE *buffer = mBuffer->BytePtr(); - size_t size = mBuffer->SizeInBytes(); + typedef RTCPPacket::TransportLayerFeedbackMessage TransportLayerFeedbackMessage; + typedef RTCPPacket::TransportLayerFeedbackMessage::GenericNACK GenericNACK; + typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBR TMMBR; + typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBN TMMBN; - if (size < kMinRtcpPacketLen) { - ZS_LOG_WARNING(Trace, log("packet length is too short") + ZS_PARAM("length", size)) - return false; - } + pos[1] = TransportLayerFeedbackMessage::kPayloadType; - bool foundPaddingBit = false; + UseRTPUtils::setBE32(&(pos[4]), report->ssrcOfPacketSender()); + UseRTPUtils::setBE32(&(pos[8]), report->ssrcOfMediaSource()); - // scope: calculate total memory allocation size needed to parse entire RTCP packet - { - size_t remaining = size; - const BYTE *pos = buffer; + advancePos(pos, remaining, sizeof(DWORD)*3); - while (remaining >= kMinRtcpPacketLen) { - auto version = RTCP_GET_BITS(*pos, 0x3, 6); - if (kRtpVersion != version) { - ZS_LOG_WARNING(Trace, debug("illegal version found") + ZS_PARAM("version", version)) - return false; + switch (report->fmt()) { + case GenericNACK::kFmt: + { + auto count = report->genericNACKCount(); + + for (size_t index = 0; index < count; ++index) + { + auto item = report->genericNACKAtIndex(index); + UseRTPUtils::setBE16(&(pos[0]), item->pid()); + UseRTPUtils::setBE16(&(pos[2]), item->blp()); + advancePos(pos, remaining, sizeof(DWORD)); } + break; + } + case TMMBR::kFmt: + { + auto count = report->tmmbrCount(); - size_t length = sizeof(DWORD) + (static_cast(RTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD)); + for (size_t index = 0; index < count; ++index) + { + auto item = report->tmmbrAtIndex(index); + UseRTPUtils::setBE32(&(pos[0]), item->ssrc()); - size_t padding = 0; + DWORD merged = RTCP_PACK_BITS(static_cast(item->mxTBRExp()), 0x3F, 26) | + RTCP_PACK_BITS(static_cast(item->mxTBRMantissa()), 0x1FFFF, 9) | + RTCP_PACK_BITS(static_cast(item->measuredOverhead()), 0x1FF, 0); - if (RTCP_IS_FLAG_SET(*pos, 5)) { - if (foundPaddingBit) { - ZS_LOG_WARNING(Trace, debug("found illegal second padding bit set in compound RTCP block")) - return false; - } + UseRTPUtils::setBE32(&(pos[4]), merged); - padding = buffer[size-1]; + advancePos(pos, remaining, sizeof(DWORD)*2); } + break; + } + case TMMBN::kFmt: + { + auto count = report->tmmbnCount(); - if ((sizeof(DWORD) + padding) > length) { - ZS_LOG_WARNING(Trace, debug("malformed padding size in RTCP packet")) - return false; - } + for (size_t index = 0; index < count; ++index) + { + auto item = report->tmmbnAtIndex(index); + UseRTPUtils::setBE32(&(pos[0]), item->ssrc()); + + DWORD merged = RTCP_PACK_BITS(static_cast(item->mxTBRExp()), 0x3F, 26) | + RTCP_PACK_BITS(static_cast(item->mxTBRMantissa()), 0x1FFFF, 9) | + RTCP_PACK_BITS(static_cast(item->measuredOverhead()), 0x1FF, 0); - length -= padding; + UseRTPUtils::setBE32(&(pos[4]), merged); - if (remaining < length) { - ZS_LOG_WARNING(Trace, debug("insufficient length remaining for RTCP block") + ZS_PARAM("length", length) + ZS_PARAM("remaining", remaining)) - return false; + advancePos(pos, remaining, sizeof(DWORD)*2); + } + break; + } + default: + { + auto fciSize = report->fciSize(); + if (0 != fciSize) { + memcpy(pos, report->fci(), report->fciSize()); + advancePos(pos, remaining, report->fciSize()); } + break; + } + } - BYTE reportSpecific = RTCP_GET_BITS(*pos, 0x1F, 0); + ZS_LOG_INSANE(packet_slog("writing transport layer feedback message") + ZS_PARAM("fmt", report->fmtToString()) + ZS_PARAM("fmt (number)", report->reportSpecific())) + } + + //------------------------------------------------------------------------- + static void writePacketPayloadSpecificFeedbackMessage(const RTCPPacket::PayloadSpecificFeedbackMessage *report, BYTE * &pos, size_t &remaining) + { + typedef RTCPPacket::PayloadSpecificFeedbackMessage PayloadSpecificFeedbackMessage; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::PLI PLI; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::SLI SLI; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::RPSI RPSI; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::FIR FIR; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTR TSTR; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTN TSTN; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::VBCM VBCM; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::AFB AFB; + typedef RTCPPacket::PayloadSpecificFeedbackMessage::REMB REMB; - const BYTE *prePos = pos; - BYTE pt = pos[1]; + pos[1] = PayloadSpecificFeedbackMessage::kPayloadType; - advancePos(pos, remaining, sizeof(DWORD)); + UseRTPUtils::setBE32(&(pos[4]), report->ssrcOfPacketSender()); + UseRTPUtils::setBE32(&(pos[8]), report->ssrcOfMediaSource()); - size_t preAllocationSize = mAllocationSize; + advancePos(pos, remaining, sizeof(DWORD)*3); - if (!getAllocationSize(static_cast(version), static_cast(padding), reportSpecific, pt, pos, static_cast(length - sizeof(DWORD)))) return false; + switch (report->fmt()) { + case PLI::kFmt: + { + break; + } + case SLI::kFmt: + { + auto count = report->sliCount(); - advancePos(pos, remaining, length - sizeof(DWORD)); + for (size_t index = 0; index < count; ++index) + { + auto item = report->sliAtIndex(index); - if (0 != padding) { - advancePos(pos, remaining, padding); - } + DWORD merged = RTCP_PACK_BITS(static_cast(item->first()), 0x1FFF, 19) | + RTCP_PACK_BITS(static_cast(item->number()), 0x1FFF, 6) | + RTCP_PACK_BITS(static_cast(item->pictureID()), 0x3F, 0); - if (ZS_IS_LOGGING(Insane)) { - ZS_LOG_TRACE(log("report allocation size") + ZS_PARAM("pt", Report::ptToString(pt)) + ZS_PARAM("pt (number)", pt) + ZS_PARAM("consumed", (reinterpret_cast(pos) - reinterpret_cast(prePos))) + ZS_PARAM("allocation size", mAllocationSize - preAllocationSize)) + UseRTPUtils::setBE32(&(pos[0]), merged); + advancePos(pos, remaining, sizeof(DWORD)); } - - ++mCount; + break; } - } + case RPSI::kFmt: + { + auto rpsi = report->rpsi(); - if (0 == mAllocationSize) { - ZS_LOG_TRACE(debug("no RTCP packets were processed")) - return true; - } + pos[1] = RTCP_PACK_BITS(static_cast(rpsi->zeroBit()), 0x1, 7) | + RTCP_PACK_BITS(static_cast(rpsi->payloadType()), 0x7F, 0); - mAllocationBuffer = make_shared(alignedSize(mAllocationSize)); + auto totalBits = static_cast(rpsi->nativeRPSIBitStringSizeInBits()); - mAllocationPos = mAllocationBuffer->BytePtr(); + size_t byteModulas = (totalBits%8); - // scope: allocation size is now established; begin parsing all reports contained in RTCP packet - { - size_t remaining = size; - const BYTE *pos = buffer; + size_t totalBytes = (totalBits/8) + ((0 != byteModulas) ? 1 : 0); + if (0 != totalBytes) { + memcpy(&(pos[2]), rpsi->nativeRPSIBitString(), totalBytes); + if (0 != byteModulas) { + BYTE &by = (pos[2+totalBytes-1]); + by = by & static_cast(((1 << byteModulas)-1) << (8-byteModulas)); + } + } + size_t totalSizeInBits = (sizeof(WORD)*8)+(totalBits); + auto boundaryModulas = totalSizeInBits % (sizeof(DWORD)*8); - if (0 != mSenderReportCount) { - mFirstSenderReport = new (allocateBuffer(alignedSize(sizeof(SenderReport)) * mSenderReportCount)) SenderReport[mSenderReportCount]; - } - if (0 != mReceiverReportCount) { - mFirstReceiverReport = new (allocateBuffer(alignedSize(sizeof(ReceiverReport)) * mReceiverReportCount)) ReceiverReport[mReceiverReportCount]; - } - if (0 != mSDESCount) { - mFirstSDES = new (allocateBuffer(alignedSize(sizeof(SDES)) * mSDESCount)) SDES[mSDESCount]; - } - if (0 != mByeCount) { - mFirstBye = new (allocateBuffer(alignedSize(sizeof(Bye)) * mByeCount)) Bye[mByeCount]; - } - if (0 != mAppCount) { - mFirstApp = new (allocateBuffer(alignedSize(sizeof(App)) * mAppCount)) App[mAppCount]; - } - if (0 != mTransportLayerFeedbackMessageCount) { - mFirstTransportLayerFeedbackMessage = new (allocateBuffer(alignedSize(sizeof(TransportLayerFeedbackMessage)) * mTransportLayerFeedbackMessageCount)) TransportLayerFeedbackMessage[mTransportLayerFeedbackMessageCount]; - } - if (0 != mPayloadSpecificFeedbackMessageCount) { - mFirstPayloadSpecificFeedbackMessage = new (allocateBuffer(alignedSize(sizeof(PayloadSpecificFeedbackMessage)) * mPayloadSpecificFeedbackMessageCount)) PayloadSpecificFeedbackMessage[mPayloadSpecificFeedbackMessageCount]; - } - if (0 != mXRCount) { - mFirstXR = new (allocateBuffer(alignedSize(sizeof(XR)) * mXRCount)) XR[mXRCount]; - } - if (0 != mUnknownReportCount) { - mFirstUnknownReport = new (allocateBuffer(alignedSize(sizeof(UnknownReport)) * mUnknownReportCount)) UnknownReport[mUnknownReportCount]; - } + if (0 != boundaryModulas) { + pos[0] = static_cast((sizeof(DWORD)*8)-boundaryModulas); + } else { + pos[0] = 0; + } - mSenderReportCount = 0; - mReceiverReportCount = 0; - mSDESCount = 0; - mByeCount = 0; - mAppCount = 0; - mTransportLayerFeedbackMessageCount = 0; - mPayloadSpecificFeedbackMessageCount = 0; - mXRCount = 0; - mUnknownReportCount = 0; + advancePos(pos, remaining, sizeof(WORD)+(sizeof(BYTE)*totalBytes)); + break; + } + case FIR::kFmt: + { + auto count = report->firCount(); - Report *lastReport = NULL; - size_t count = 0; + for (size_t index = 0; index < count; ++index) + { + auto item = report->firAtIndex(index); + UseRTPUtils::setBE32(&(pos[0]), item->ssrc()); + UseRTPUtils::setBE32(&(pos[4]), item->reserved()); + pos[4] = item->seqNr(); + advancePos(pos, remaining, sizeof(DWORD)*2); + } + break; + } + case TSTR::kFmt: + { + auto count = report->tstrCount(); - while (remaining >= kMinRtcpPacketLen) { - auto version = RTCP_GET_BITS(*pos, 0x3, 6); - size_t length = sizeof(DWORD) + (static_cast(RTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD)); + for (size_t index = 0; index < count; ++index) + { + auto item = report->tstrAtIndex(index); + UseRTPUtils::setBE32(&(pos[0]), item->ssrc()); - size_t padding = 0; + DWORD merged = RTCP_PACK_BITS(static_cast(item->seqNr()), 0xFF, 24) | + RTCP_PACK_BITS(static_cast(item->reserved()), 0x7FFFF, 5) | + RTCP_PACK_BITS(static_cast(item->index()), 0x1F, 0); - if (RTCP_IS_FLAG_SET(*pos, 5)) { - padding = buffer[size-1]; - length -= padding; // already protected during pre-parse against malformed padding length + UseRTPUtils::setBE32(&(pos[4]), merged); + advancePos(pos, remaining, sizeof(DWORD)*2); } + break; + } + case TSTN::kFmt: + { + auto count = report->tstnCount(); - BYTE reportSpecific = RTCP_GET_BITS(*pos, 0x1F, 0); - - const BYTE *prePos = pos; - BYTE pt = pos[1]; + for (size_t index = 0; index < count; ++index) + { + auto item = report->tstnAtIndex(index); + UseRTPUtils::setBE32(&(pos[0]), item->ssrc()); - advancePos(pos, remaining, sizeof(DWORD)); + DWORD merged = RTCP_PACK_BITS(static_cast(item->seqNr()), 0xFF, 24) | + RTCP_PACK_BITS(static_cast(item->reserved()), 0x7FFFF, 5) | + RTCP_PACK_BITS(static_cast(item->index()), 0x1F, 0); - size_t preAllocationSize = mAllocationSize; + UseRTPUtils::setBE32(&(pos[4]), merged); + advancePos(pos, remaining, sizeof(DWORD)*2); + } + break; + } + case VBCM::kFmt: + { + auto count = report->vbcmCount(); - if (!parse(lastReport, version, static_cast(padding), reportSpecific, pt, pos, length - sizeof(DWORD))) return false; + for (size_t index = 0; index < count; ++index) + { + auto item = report->vbcmAtIndex(index); - if (NULL == mFirst) { - mFirst = lastReport; - } + UseRTPUtils::setBE32(&(pos[0]), item->ssrc()); - advancePos(pos, remaining, length - sizeof(DWORD)); + pos[4] = item->seqNr(); + pos[5] = RTCP_PACK_BITS(static_cast(item->zeroBit()), 0x1, 7) | + RTCP_PACK_BITS(static_cast(item->payloadType()), 0x7F, 0); - if (0 != padding) { - advancePos(pos, remaining, padding); - } + auto size = item->vbcmOctetStringSize(); + if (0 != size) { + UseRTPUtils::setBE16(&(pos[6]), static_cast(size)); + memcpy(&(pos[8]), item->vbcmOctetString(), size*sizeof(BYTE)); + } - if (ZS_IS_LOGGING(Insane)) { - ZS_LOG_TRACE(log("report parsed") + ZS_PARAM("pt", Report::ptToString(pt)) + ZS_PARAM("pt (number)", pt) + ZS_PARAM("consumed", (reinterpret_cast(pos) - reinterpret_cast(prePos))) + ZS_PARAM("consumed allocation", preAllocationSize - mAllocationSize)) + advancePos(pos, remaining, boundarySize((sizeof(DWORD)*2)+(size*sizeof(BYTE)))); } - - ++count; - ASSERT(count <= mCount) + break; } - } - - ZS_LOG_INSANE(debug("parsed")) + case AFB::kFmt: + { - return true; - } + auto remb = report->remb(); + if (NULL == remb) { + auto afb = report->afb(); - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket (parse allocation sizing routines) - #pragma mark + size_t size = afb->dataSize(); + if (0 != size) { + memcpy(pos, afb->data(), size*sizeof(BYTE)); + advancePos(pos, remaining, boundarySize(size*sizeof(BYTE))); + } + } else { + memcpy(pos, "REMB", sizeof(DWORD)); - //------------------------------------------------------------------------- - bool RTCPPacket::getAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - BYTE pt, - const BYTE *contents, - size_t contentSize - ) - { - bool result = false; + DWORD merged = RTCP_PACK_BITS(static_cast(remb->brExp()), 0x3F, 18) | + RTCP_PACK_BITS(static_cast(remb->brMantissa()), 0x3FFFF, 0); + UseRTPUtils::setBE32(&(pos[4]), merged); + pos[4] = static_cast(remb->numSSRC()); + advancePos(pos, remaining, sizeof(DWORD)*2); - switch (pt) { - case SenderReport::kPayloadType: result = getSenderReportAllocationSize(version, padding, reportSpecific, contents, contentSize); break; - case ReceiverReport::kPayloadType: result = getReceiverReportAllocationSize(version, padding, reportSpecific, contents, contentSize); break; - case SDES::kPayloadType: result = getSDESAllocationSize(version, padding, reportSpecific, contents, contentSize); break; - case Bye::kPayloadType: result = getByeAllocationSize(version, padding, reportSpecific, contents, contentSize); break; - case App::kPayloadType: result = getAppAllocationSize(version, padding, reportSpecific, contents, contentSize); break; - case TransportLayerFeedbackMessage::kPayloadType: result = getTransportLayerFeedbackMessageAllocationSize(version, padding, reportSpecific, contents, contentSize); break; - case PayloadSpecificFeedbackMessage::kPayloadType: result = getPayloadSpecificFeedbackMessageAllocationSize(version, padding, reportSpecific, contents, contentSize); break; - case XR::kPayloadType: result = getXRAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + auto count = remb->numSSRC(); + for (size_t index = 0; index < count; ++index) + { + auto ssrc = remb->ssrcAtIndex(index); + UseRTPUtils::setBE32(pos, ssrc); + advancePos(pos, remaining, sizeof(DWORD)); + } + } + break; + } default: { - result = getUnknownReportAllocationSize(version, padding, reportSpecific, contents, contentSize); + auto fciSize = report->fciSize(); + if (0 != fciSize) { + memcpy(pos, report->fci(), fciSize); + advancePos(pos, remaining, fciSize); + } break; } } - return result; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getSenderReportAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) - { - ++mSenderReportCount; - - mAllocationSize += alignedSize(sizeof(SenderReport)) + (alignedSize(sizeof(SenderReport::ReportBlock)) * static_cast(reportSpecific)); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getReceiverReportAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) - { - ++mReceiverReportCount; - - mAllocationSize += alignedSize(sizeof(ReceiverReport)) + (alignedSize(sizeof(ReceiverReport::ReportBlock)) * static_cast(reportSpecific)); - return true; + ZS_LOG_INSANE(packet_slog("writing payload specific feedback message") + ZS_PARAM("fmt", report->fmtToString()) + ZS_PARAM("fmt (number)", report->reportSpecific())) } //------------------------------------------------------------------------- - bool RTCPPacket::getSDESAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) + static void writePacketXR(const RTCPPacket::XR *report, BYTE * &pos, size_t &remaining) { - ++mSDESCount; - - size_t chunksCount = static_cast(reportSpecific); - - mAllocationSize += alignedSize(sizeof(SDES)) + (alignedSize(sizeof(SDES::Chunk)) * chunksCount); + typedef RTCPPacket::XR XR; + typedef RTCPPacket::XR::ReportBlock ReportBlock; + typedef RTCPPacket::XR::LossRLEReportBlock LossRLEReportBlock; + typedef RTCPPacket::XR::DuplicateRLEReportBlock DuplicateRLEReportBlock; + typedef RTCPPacket::XR::PacketReceiptTimesReportBlock PacketReceiptTimesReportBlock; + typedef RTCPPacket::XR::ReceiverReferenceTimeReportBlock ReceiverReferenceTimeReportBlock; + typedef RTCPPacket::XR::DLRRReportBlock DLRRReportBlock; + typedef RTCPPacket::XR::StatisticsSummaryReportBlock StatisticsSummaryReportBlock; + typedef RTCPPacket::XR::VoIPMetricsReportBlock VoIPMetricsReportBlock; + typedef RTCPPacket::XR::UnknownReportBlock UnknownReportBlock; + typedef RTCPPacket::XR::RLEChunk RLEChunk; - size_t remaining = contentSize; + pos[1] = XR::kPayloadType; + UseRTPUtils::setBE32(&(pos[4]), report->mSSRC); - const BYTE *pos = contents; + advancePos(pos, remaining, sizeof(DWORD)*2); - while ((remaining > sizeof(DWORD)) && - (chunksCount > 0)) + for (const ReportBlock *reportBlock = report->firstReportBlock(); NULL != reportBlock; reportBlock = reportBlock->next()) { - advancePos(pos, remaining, sizeof(DWORD)); - - ZS_LOG_INSANE(log("getting SDES chunk allocation size") + ZS_PARAM("chunk number", static_cast(reportSpecific) - chunksCount)) + BYTE *blockStart = pos; - --chunksCount; + pos[0] = reportBlock->blockType(); + pos[1] = reportBlock->typeSpecific(); - while (remaining >= sizeof(BYTE)) { + advancePos(pos, remaining, sizeof(DWORD)); - size_t preAllocationSize = mAllocationSize; + switch (reportBlock->mBlockType) { + case LossRLEReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); - BYTE type = *pos; - advancePos(pos, remaining); + UseRTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); + UseRTPUtils::setBE16(&(pos[4]), block->beginSeq()); + UseRTPUtils::setBE16(&(pos[6]), block->endSeq()); - if (SDES::Chunk::kEndOfItemsType == type) { - // skip NUL item (no length octet is present) + advancePos(pos, remaining, sizeof(DWORD)*2); - // skip to next DWORD alignment - auto diff = reinterpret_cast(pos) - reinterpret_cast(contents); - while ((0 != (diff % sizeof(DWORD))) && - (remaining > 0)) + size_t chunkCount = block->chunkCount(); + for (size_t index = 0; index < chunkCount; ++index) { - // only NUL chunks are allowed - if (SDES::Chunk::kEndOfItemsType != (*pos)) { - ZS_LOG_WARNING(Insane, log("SDES item type is not understood") + ZS_PARAM("type", *pos)) - return false; - } - - advancePos(pos, remaining); - ++diff; + RLEChunk chunk = block->chunkAtIndex(index); + UseRTPUtils::setBE16(pos, chunk); + advancePos(pos, remaining, sizeof(WORD)); } break; } + case DuplicateRLEReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); - if (remaining < sizeof(BYTE)) { - ZS_LOG_WARNING(Trace, log("no length of SDES entry present") + ZS_PARAM("remaining", remaining)) - return false; - } - - size_t prefixLength = 0; - size_t length = static_cast(*pos); - advancePos(pos, remaining); + UseRTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); + UseRTPUtils::setBE16(&(pos[4]), block->beginSeq()); + UseRTPUtils::setBE16(&(pos[6]), block->endSeq()); - if (remaining < length) { - ZS_LOG_WARNING(Trace, debug("malformed SDES length found") + ZS_PARAM("length", length) + ZS_PARAM("remaining", remaining)) - return false; - } + advancePos(pos, remaining, sizeof(DWORD)*2); - switch (type) { - case SDES::Chunk::CName::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::CName)); break; - case SDES::Chunk::Name::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::Name)); break; - case SDES::Chunk::Email::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::Email)); break; - case SDES::Chunk::Phone::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::Phone)); break; - case SDES::Chunk::Loc::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::Loc)); break; - case SDES::Chunk::Tool::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::Tool)); break; - case SDES::Chunk::Note::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::Note)); break; - case SDES::Chunk::Priv::kItemType: + size_t count = block->chunkCount(); + for (size_t index = 0; index < count; ++index) { - { - mAllocationSize += alignedSize(sizeof(SDES::Chunk::Priv)); + RLEChunk chunk = block->chunkAtIndex(index); + UseRTPUtils::setBE16(pos, chunk); + advancePos(pos, remaining, sizeof(WORD)); + } + break; + } + case PacketReceiptTimesReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); - if (length > 0) { - prefixLength = static_cast(*pos); + UseRTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); + UseRTPUtils::setBE16(&(pos[4]), block->beginSeq()); + UseRTPUtils::setBE16(&(pos[6]), block->endSeq()); - if (prefixLength > (length-1)) goto illegal_priv_prefix; + advancePos(pos, remaining, sizeof(DWORD)*2); - if (0 != prefixLength) { - mAllocationSize += alignedSize(sizeof(char)*(prefixLength+1)); - } - } - break; - } - illegal_priv_prefix: - { - ZS_LOG_WARNING(Trace, debug("malformed SDES Priv prefix found")) - return false; - } - break; - } - case SDES::Chunk::Mid::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::Mid)); break; - case SDES::Chunk::Rid::kItemType: mAllocationSize += alignedSize(sizeof(SDES::Chunk::Rid)); break; - default: + size_t count = block->receiptTimeCount(); + for (size_t index = 0; index < count; ++index) { - mAllocationSize += alignedSize(sizeof(SDES::Chunk::Unknown)); - ZS_LOG_WARNING(Insane, log("SDES item type is not understood") + ZS_PARAM("type", type)) - break; + DWORD receiptTime = block->receiptTimeAtIndex(index); + UseRTPUtils::setBE32(pos, receiptTime); + advancePos(pos, remaining, sizeof(DWORD)); } + break; } - - if (0 != length) { - mAllocationSize += alignedSize((sizeof(char)*length)+sizeof(char)); + case ReceiverReferenceTimeReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); + UseRTPUtils::setBE32(&(pos[0]), block->ntpTimestampMS()); + UseRTPUtils::setBE32(&(pos[4]), block->ntpTimestampLS()); + advancePos(pos, remaining, sizeof(DWORD)*2); + break; } + case DLRRReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); - ZS_LOG_INSANE(log("get SDES item allocation size") + ZS_PARAM("type", SDES::Chunk::StringItem::typeToString(type)) + ZS_PARAM("type (number)", type) + ZS_PARAM("prefix length", prefixLength) + ZS_PARAM("length", length) + ZS_PARAM("allocation size", (mAllocationSize - preAllocationSize))) - - advancePos(pos, remaining, length); - } - - } - - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getByeAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) - { - ++mByeCount; - - size_t ssrcCount = static_cast(reportSpecific); - - mAllocationSize += alignedSize(sizeof(Bye)) + (alignedSize(sizeof(DWORD)) * ssrcCount); + size_t count = block->subBlockCount(); + for (size_t index = 0; index < count; ++index) + { + DLRRReportBlock::SubBlock *subBlock = block->subBlockAtIndex(index); + UseRTPUtils::setBE32(&(pos[0]), subBlock->ssrc()); + UseRTPUtils::setBE32(&(pos[4]), subBlock->lrr()); + UseRTPUtils::setBE32(&(pos[8]), subBlock->dlrr()); + advancePos(pos, remaining, sizeof(DWORD)*3); + } + break; + } + case StatisticsSummaryReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); + UseRTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); + UseRTPUtils::setBE16(&(pos[4]), block->beginSeq()); + UseRTPUtils::setBE16(&(pos[6]), block->endSeq()); + UseRTPUtils::setBE32(&(pos[8]), block->lostPackets()); + UseRTPUtils::setBE32(&(pos[12]), block->dupPackets()); + UseRTPUtils::setBE32(&(pos[16]), block->minJitter()); + UseRTPUtils::setBE32(&(pos[20]), block->maxJitter()); + UseRTPUtils::setBE32(&(pos[24]), block->meanJitter()); + UseRTPUtils::setBE32(&(pos[28]), block->devJitter()); + pos[32] = block->mMinTTLOrHL; + pos[33] = block->mMaxTTLOrHL; + pos[34] = block->mMeanTTLOrHL; + pos[35] = block->mDevTTLOrHL; + advancePos(pos, remaining, sizeof(DWORD)*9); + break; + } + case VoIPMetricsReportBlock::kBlockType: + { + auto block = reinterpret_cast(reportBlock); + UseRTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); + pos[4] = block->lossRate(); + pos[5] = block->discardRate(); + pos[6] = block->burstDensity(); + pos[7] = block->gapDensity(); + UseRTPUtils::setBE16(&(pos[8]), block->burstDuration()); + UseRTPUtils::setBE16(&(pos[10]), block->gapDuration()); + UseRTPUtils::setBE16(&(pos[12]), block->roundTripDelay()); + UseRTPUtils::setBE16(&(pos[14]), block->endSystemDelay()); + pos[16] = block->signalLevel(); + pos[17] = block->noiseLevel(); + pos[18] = block->rerl(); + pos[19] = block->Gmin(); - const BYTE *pos = contents; - size_t remaining = contentSize; + pos[20] = block->rFactor(); + pos[21] = block->extRFactor(); + pos[22] = block->mosLQ(); + pos[23] = block->mosCQ(); - if (remaining < (ssrcCount * sizeof(DWORD))) { - ZS_LOG_WARNING(Trace, debug("malformed BYE SSRC size")) - return false; - } + pos[24] = block->rxConfig(); + pos[25] = block->mReservedVoIP; + UseRTPUtils::setBE16(&(pos[26]), block->jbNominal()); + UseRTPUtils::setBE16(&(pos[28]), block->jbMaximum()); + UseRTPUtils::setBE16(&(pos[30]), block->jbAbsMax()); + advancePos(pos, remaining, sizeof(DWORD)*8); + break; + } + default: + { + auto block = reinterpret_cast(reportBlock); - advancePos(pos, remaining, sizeof(DWORD) * ssrcCount); + auto size = block->typeSpecificContentSize(); + if (0 != size) { + memcpy(pos, block->typeSpecificContents(), size*sizeof(BYTE)); + advancePos(pos, remaining, boundarySize(size*sizeof(BYTE))); + } + } + } - if (remaining < sizeof(BYTE)) return true; + BYTE *blockEnd = pos; - size_t length = static_cast(*pos); + size_t diff = static_cast(reinterpret_cast(blockEnd) - reinterpret_cast(blockStart)); + auto modulas = diff % sizeof(DWORD); + if (0 != modulas) { + advancePos(pos, remaining, sizeof(DWORD)-modulas); + } - if (length < 1) return true; + diff = boundarySize(diff); + ZS_LOG_INSANE(packet_slog("writing XR block") + ZS_PARAM("block type", reportBlock->blockTypeToString()) + ZS_PARAM("block type (number)", reportBlock->blockType()) + ZS_PARAM("block size", diff)) - if (length > remaining) { - ZS_LOG_WARNING(Trace, debug("malformed BYE reason length") + ZS_PARAM("length", length) + ZS_PARAM("remaining", remaining)) - return false; + UseRTPUtils::setBE16(&(blockStart[2]), static_cast((diff/sizeof(DWORD))-1)); } - - mAllocationSize += alignedSize((sizeof(char)*(length+1))); - return true; } //------------------------------------------------------------------------- - bool RTCPPacket::getAppAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) + static void traceReport( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::Report *common + ) { - ++mAppCount; - - mAllocationSize += alignedSize(sizeof(App)); + ZS_EVENTING_8(x, i, Insane, RTCPPacketTraceReport, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + bool, next, NULL != common->next(), + buffer, buffer, common->ptr(), + size, size, common->size(), + byte, version, common->version(), + size_t, padding, common->padding(), + byte, reportSpecific, common->reportSpecific(), + byte, payloadType, common->pt() + ); + } - size_t remaining = contentSize; + //------------------------------------------------------------------------- + static void traceReportBlocks( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::SenderReceiverCommonReport *common + ) + { + RTCPPacket::SenderReceiverCommonReport::ReportBlock *block = common->firstReportBlock(); + if (NULL == block) return; - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Detail, log("malformed APP length") + ZS_PARAM("remaining", remaining)) - return false; + for (; NULL != block; block = block->next()) { + ZS_EVENTING_8(x, i, Insane, RTCPPacketTraceSenderReceiverCommonReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + dword, ssrc, block->ssrc(), + byte, fractionLost, block->fractionLost(), + dword, cumulativeNumberOfPacketsLost, block->cumulativeNumberOfPacketsLost(), + dword, extendedHighestSequenceNumberReceived, block->extendedHighestSequenceNumberReceived(), + dword, interarrivalJitter, block->interarrivalJitter(), + dword, lsr, block->lsr(), + dword, dlsr, block->dlsr() + ); } - - return true; } - + //------------------------------------------------------------------------- - bool RTCPPacket::getTransportLayerFeedbackMessageAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) + static void traceSenderReceiverCommonReport( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::SenderReceiverCommonReport *common + ) { - ++mTransportLayerFeedbackMessageCount; + traceReport(mediaChannelID, common); + ZS_EVENTING_5(x, i, Insane, RTCPPacketTraceSenderReceiverCommonReport, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, ssrcType, (RTCPPacket::ReceiverReport::kPayloadType != common->pt() ? "ssrc of sender" : "ssrc of packet sender"), + dword, ssrc, common->ssrcOfSender(), + buffer, extension, common->extension(), + size, extensionSize, common->extensionSize() + ); + traceReportBlocks(mediaChannelID, common); + } - mAllocationSize += alignedSize(sizeof(TransportLayerFeedbackMessage)); + //------------------------------------------------------------------------- + static void traceStringItem( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::SDES::Chunk::StringItem *common + ) + { + auto type = common->type(); - const BYTE *pos = contents; - size_t remaining = contentSize; + if (RTCPPacket::SDES::Chunk::Priv::kItemType == type) { + RTCPPacket::SDES::Chunk::Priv *priv = reinterpret_cast(common); + ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceChunkStringItemPriv, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, type, common->type(), + size_t, prefixLength, priv->prefixLength(), + string, prefix, priv->prefix(), + size_t, length, common->length(), + string, value, common->value() + ); + } else { + ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceChunkStringItem, ol, RtcpPacket, Parse, + puid, mediaChannelID, mediaChannelID, + byte, type, common->type(), + size_t, length, common->length(), + string, value, common->value() + ); + } + } + + //------------------------------------------------------------------------- + static void traceStringItemList( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::SDES::Chunk::StringItem *first + ) + { + if (NULL == first) return; - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Detail, log("malformed transport layer feedback message length") + ZS_PARAM("remaining", remaining)) - return false; + RTCPPacket::SDES::Chunk::StringItem *item = first; + for (; NULL != item; item = item->mNext) { + traceStringItem(mediaChannelID, item); } + } - advancePos(pos, remaining, sizeof(DWORD)*2); - - bool result = false; + //------------------------------------------------------------------------- + static void traceDWORDs( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + const char *type, + DWORD *values, + size_t count + ) + { + if (NULL == values) return; - switch (reportSpecific) { - case TransportLayerFeedbackMessage::GenericNACK::kFmt: result = getTransportLayerFeedbackMessageGenericNACKAllocationSize(reportSpecific, pos, remaining); break; - case TransportLayerFeedbackMessage::TMMBR::kFmt: result = getTransportLayerFeedbackMessageTMMBRAllocationSize(reportSpecific, pos, remaining); break; - case TransportLayerFeedbackMessage::TMMBN::kFmt: result = getTransportLayerFeedbackMessageTMMBNAllocationSize(reportSpecific, pos, remaining); break; - default: { - break; - } + for (size_t index = 0; index < count; ++index) { + ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceDWORDs, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, type, type, + size_t, index, index, + dword, value, values[index] + ); } - - ZS_LOG_INSANE(packet_slog("getting transport layer feedback message size") + ZS_PARAM("fmt", FeedbackMessage::fmtToString(TransportLayerFeedbackMessage::kPayloadType, reportSpecific)) + ZS_PARAM("fmt (number)", reportSpecific)) - - return true; + } + + //------------------------------------------------------------------------- + static void traceFeedbackMessage( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::FeedbackMessage *common + ) + { + traceReport(mediaChannelID, common); + ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceFeedbackMessage, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, fmt, common->fmt(), + dword, ssrcOfPacketSender, common->ssrcOfPacketSender(), + dword, ssrcOfMediaSource, common->ssrcOfMediaSource(), + buffer, fci, common->fci(), + size, fciSize, common->fciSize() + ); } //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) + static void traceTMMBRCommon( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + BYTE fmt, + RTCPPacket::TransportLayerFeedbackMessage::TMMBRCommon *common + ) + { + ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceFeedbackMessageTMMBRCommon, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, fmt, fmt, + dword, ssrc, common->ssrc(), + byte, mxTBRExp, common->mxTBRExp(), + dword, mxTBRMantissa, common->mxTBRMantissa(), + word, measuredOverhead, common->measuredOverhead() + ); + } + + //------------------------------------------------------------------------- + static void traceCodecControlCommon( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + BYTE fmt, + RTCPPacket::PayloadSpecificFeedbackMessage::CodecControlCommon *common + ) { - ++mPayloadSpecificFeedbackMessageCount; + ZS_EVENTING_5(x, i, Insane, RTCPPacketTraceFeedbackMessageCodecControlCommon, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, fmt, fmt, + dword, ssrc, common->ssrc(), + byte, seqNr, common->seqNr(), + dword, reserved, common->reserved() + ); + } - mAllocationSize += alignedSize(sizeof(PayloadSpecificFeedbackMessage)); + //------------------------------------------------------------------------- + static void traceXRReportBlock( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::XR::ReportBlock *common + ) + { + ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceXRReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + bool, next, (NULL != common->next()), + byte, blockType, common->blockType(), + byte, typeSpecific, common->typeSpecific(), + buffer, typeSpecificContents, common->typeSpecificContents(), + size, typeSpecificContentSize, common->typeSpecificContentSize() + ); + } - const BYTE *pos = contents; - size_t remaining = contentSize; + //------------------------------------------------------------------------- + static void traceReportBlockRange( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::XR::ReportBlockRange *common + ) + { + traceXRReportBlock(mediaChannelID, common); + ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceXRReportBlockRange, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, reserved, common->reserved(), + byte, thinning, common->thinning(), + dword, ssrcOfSource, common->ssrcOfSource(), + word, beginSeq, common->beginSeq(), + word, endSeq, common->endSeq() + ); + } - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Detail, log("malformed transport layer feedback message length") + ZS_PARAM("remaining", remaining)) - return false; - } + //------------------------------------------------------------------------- + static void traceRLEReportBlock( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::XR::RLEReportBlock *common + ) + { + traceReportBlockRange(mediaChannelID, common); + auto count = common->chunkCount(); - advancePos(pos, remaining, sizeof(DWORD)*2); + if (count < 1) return; - bool result = false; + ElementPtr outerEl = Element::create("chunks"); - char bogus[sizeof(DWORD)] {}; - const DWORD *usingSubType = reinterpret_cast(&(bogus[0])); - - switch (reportSpecific) { - case PayloadSpecificFeedbackMessage::PLI::kFmt: result = getPayloadSpecificFeedbackMessagePLIAllocationSize(reportSpecific, pos, remaining); break; - case PayloadSpecificFeedbackMessage::SLI::kFmt: result = getPayloadSpecificFeedbackMessageSLIAllocationSize(reportSpecific, pos, remaining); break; - case PayloadSpecificFeedbackMessage::RPSI::kFmt: result = getPayloadSpecificFeedbackMessageRPSIAllocationSize(reportSpecific, pos, remaining); break; - case PayloadSpecificFeedbackMessage::FIR::kFmt: result = getPayloadSpecificFeedbackMessageFIRAllocationSize(reportSpecific, pos, remaining); break; - case PayloadSpecificFeedbackMessage::TSTR::kFmt: result = getPayloadSpecificFeedbackMessageTSTRAllocationSize(reportSpecific, pos, remaining); break; - case PayloadSpecificFeedbackMessage::TSTN::kFmt: result = getPayloadSpecificFeedbackMessageTSTNAllocationSize(reportSpecific, pos, remaining); break; - case PayloadSpecificFeedbackMessage::VBCM::kFmt: result = getPayloadSpecificFeedbackMessageVBCMAllocationSize(reportSpecific, pos, remaining); break; - case PayloadSpecificFeedbackMessage::AFB::kFmt: { - { - if (remaining < sizeof(DWORD)) goto generic_afb; - if (0 != memcmp(pos, reinterpret_cast("REMB"), sizeof(DWORD))) goto generic_afb; + for (size_t index = 0; index < count; ++index) { + RTCPPacket::XR::RLEChunk chunk = common->chunkAtIndex(index); - usingSubType = reinterpret_cast(pos); + ElementPtr chunkEl; - result = getPayloadSpecificFeedbackMessageREMBAllocationSize(reportSpecific, pos, remaining); - break; - } - generic_afb: - { - result = getPayloadSpecificFeedbackMessageAFBAllocationSize(reportSpecific, pos, remaining); - break; - } - } - default: { - break; + if (RTCPPacket::XR::isRunLengthChunk(chunk)) { + RTCPPacket::XR::RunLength rl(chunk); + ZS_EVENTING_3(x, i, Insane, RTCPPacketTraceXRRLEReportBlockChunkRunLength, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, runType, rl.runType(), + size_t, runLength, rl.runLength() + ); + } else if (RTCPPacket::XR::isBitVectorChunk(chunk)) { + RTCPPacket::XR::BitVector bv(chunk); + ZS_EVENTING_2(x, i, Insane, RTCPPacketTraceXRRLEReportBlockChunkBitVector, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + word, bitVector, bv.bitVector() + ); + } else { + ZS_EVENTING_2(x, i, Insane, RTCPPacketTraceXRRLEReportBlockChunkUnknown, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + word, chunk, chunk + ); } } + } - ZS_LOG_INSANE(packet_slog("getting payload specific feedback message size") + ZS_PARAM("fmt", FeedbackMessage::fmtToString(TransportLayerFeedbackMessage::kPayloadType, reportSpecific, *usingSubType)) + ZS_PARAM("fmt (number)", reportSpecific)) + //------------------------------------------------------------------------- + static void traceSenderReport( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::SenderReport *sr + ) + { + traceSenderReceiverCommonReport(mediaChannelID, sr); + ZS_EVENTING_7(x, i, Insane, RTCPPacketTraceSenderReport, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + dword, ntpTimestampMS, sr->ntpTimestampMS(), + dword, ntpTimestampLS, sr->ntpTimestampLS(), + string, ntpTimestamp, string(sr->ntpTimestamp()), + dword, senderPacketCount, sr->senderPacketCount(), + dword, senderOctetCount, sr->senderOctetCount(), + bool, nextSenderReport, (NULL != sr->nextSenderReport()) + ); + } - return true; + //------------------------------------------------------------------------- + static void traceReceiverReport( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::ReceiverReport *rr + ) + { + ElementPtr subEl = Element::create("ReceiverReport"); + traceSenderReceiverCommonReport(mediaChannelID, rr); + ZS_EVENTING_2(x, i, Insane, RTCPPacketTraceReceiverReport, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + bool, nextReceiverReport, (NULL != rr->nextReceiverReport()) + ); } //------------------------------------------------------------------------- - bool RTCPPacket::getXRAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) + static void traceSDES( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::SDES *sdes + ) { - ++mXRCount; + traceReport(mediaChannelID, sdes); - mAllocationSize += alignedSize(sizeof(XR)); + ZS_EVENTING_3(x, i, Insane, RTCPPacketTraceSDES, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, sc, sdes->sc(), + bool, nextSDES, (NULL != sdes->nextSDES()) + ); - const BYTE *pos = contents; - size_t remaining = contentSize; + RTCPPacket::SDES::Chunk *chunk = sdes->firstChunk(); + if (NULL != chunk) { + for (; NULL != chunk; chunk = chunk->next()) { + ZS_EVENTING_14(x, i, Insane, RTCPPacketTraceSDESChunk, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + dword, ssrc, chunk->ssrc(), + size_t, count, chunk->count(), + size_t, cNameCount, chunk->cNameCount(), + size_t, nameCount, chunk->nameCount(), + size_t, emailCount, chunk->emailCount(), + size_t, phoneCount, chunk->phoneCount(), + size_t, locCount, chunk->locCount(), + size_t, toolCount, chunk->toolCount(), + size_t, noteCount, chunk->noteCount(), + size_t, privCount, chunk->privCount(), + size_t, midCount, chunk->midCount(), + size_t, ridCount, chunk->ridCount(), + size_t, unknownCount, chunk->unknownCount() + ); + + traceStringItemList(mediaChannelID, chunk->firstCName()); + traceStringItemList(mediaChannelID, chunk->firstName()); + traceStringItemList(mediaChannelID, chunk->firstEmail()); + traceStringItemList(mediaChannelID, chunk->firstPhone()); + traceStringItemList(mediaChannelID, chunk->firstLoc()); + traceStringItemList(mediaChannelID, chunk->firstTool()); + traceStringItemList(mediaChannelID, chunk->firstNote()); + traceStringItemList(mediaChannelID, chunk->firstPriv()); + traceStringItemList(mediaChannelID, chunk->firstMid()); + traceStringItemList(mediaChannelID, chunk->firstRid()); + traceStringItemList(mediaChannelID, chunk->firstUnknown()); + } + } + } + + //------------------------------------------------------------------------- + static void traceBye( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::Bye *bye + ) + { + traceReport(mediaChannelID, bye); + ZS_EVENTING_3(x, i, Insane, RTCPPacketTraceBye, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, reasonForLeaving, bye->reasonForLeaving(), + bool, nextBye, (NULL != bye->nextBye()) + ); + traceDWORDs(mediaChannelID, "ssrc", bye->mSSRCs, bye->sc()); + } + + //------------------------------------------------------------------------- + static void traceApp( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::App *app + ) + { + traceReport(mediaChannelID, app); + ZS_EVENTING_7(x, i, Insane, RTCPPacketTraceApp, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, subtype, app->subtype(), + dword, ssrc, app->ssrc(), + string, name, app->name(), + buffer, data, app->data(), + size, dataSize, app->dataSize(), + bool, nextApp, (NULL != app->nextApp()) + ); + } + + //------------------------------------------------------------------------- + static void traceTransportLayerFeedbackMessage( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::TransportLayerFeedbackMessage *fm + ) + { + traceFeedbackMessage(mediaChannelID, fm); - if (remaining < sizeof(DWORD)) { - ZS_LOG_WARNING(Trace, debug("XR is not a valid length") + ZS_PARAM("remaining", remaining)) - return false; - } + ZS_EVENTING_3(x, i, Insane, RTCPPacketTraceTransportLayerFeedbackMessage, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + bool, unknown, (NULL != fm->unknown()), + bool, nextTransportLayerFeedbackMessage, (NULL != fm->nextTransportLayerFeedbackMessage()) + ); - advancePos(pos, remaining, sizeof(DWORD)); + { + auto count = fm->genericNACKCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = fm->genericNACKAtIndex(index); - while (remaining >= sizeof(DWORD)) { - const BYTE *prePos = pos; - size_t preAllocationSize = mAllocationSize; + ZS_EVENTING_3(x, i, Insane, RTCPPacketTransportLayerFeedbackMessageGenericNACK, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + word, pid, format->pid(), + word, blp, format->blp() + ); + } + } + } - BYTE bt = pos[0]; - BYTE typeSpecific = pos[1]; - size_t blockLength = static_cast(RTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD); + { + auto count = fm->tmmbrCount(); + if (count > 0) { + ElementPtr formatsEl = Element::create("TMMBRs"); - advancePos(pos, remaining, sizeof(DWORD)); + for (size_t index = 0; index < count; ++index) { + ElementPtr formatEl = Element::create("TMMBR"); - if (remaining < blockLength) { - ZS_LOG_WARNING(Trace, debug("malformed XR block length found") + ZS_PARAM("block length", blockLength) + ZS_PARAM("remaining", remaining)) - return false; + auto format = fm->tmmbrAtIndex(index); + traceTMMBRCommon(mediaChannelID, RTCPPacket::TransportLayerFeedbackMessage::TMMBR::kFmt, format); + } } + } - bool result = false; - - switch (bt) { - case XR::LossRLEReportBlock::kBlockType: result = getXRLossRLEReportBlockAllocationSize(typeSpecific, pos, blockLength); break; - case XR::DuplicateRLEReportBlock::kBlockType: result = getXRDuplicateRLEReportBlockAllocationSize(typeSpecific, pos, blockLength); break; - case XR::PacketReceiptTimesReportBlock::kBlockType: result = getXRPacketReceiptTimesReportBlockAllocationSize(typeSpecific, pos, blockLength); break; - case XR::ReceiverReferenceTimeReportBlock::kBlockType: result = getXRReceiverReferenceTimeReportBlockAllocationSize(typeSpecific, pos, blockLength); break; - case XR::DLRRReportBlock::kBlockType: result = getXRDLRRReportBlockAllocationSize(typeSpecific, pos, blockLength); break; - case XR::StatisticsSummaryReportBlock::kBlockType: result = getXRStatisticsSummaryReportBlockAllocationSize(typeSpecific, pos, blockLength); break; - case XR::VoIPMetricsReportBlock::kBlockType: result = getXRVoIPMetricsReportBlockAllocationSize(typeSpecific, pos, blockLength); break; - default: - { - result = getXRUnknownReportBlockAllocationSize(typeSpecific, pos, blockLength); break; - break; + { + auto count = fm->tmmbrCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = fm->tmmbnAtIndex(index); + traceTMMBRCommon(mediaChannelID, RTCPPacket::TransportLayerFeedbackMessage::TMMBN::kFmt, format); } } - - if (!result) return false; - - advancePos(pos, remaining, blockLength); - - ZS_LOG_INSANE(log("get XR allocation size for block") + ZS_PARAM("block type", XR::ReportBlock::blockTypeToString(bt)) + ZS_PARAM("block type (number)", bt) + ZS_PARAM("block size", blockLength) + ZS_PARAM("consumed", (reinterpret_cast(pos) - reinterpret_cast(prePos))) + ZS_PARAM("allocation size", mAllocationSize - preAllocationSize)) } - - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getUnknownReportAllocationSize( - BYTE version, - BYTE padding, - BYTE reportSpecific, - const BYTE *contents, - size_t contentSize - ) - { - ++mUnknownReportCount; - - mAllocationSize += alignedSize(sizeof(UnknownReport)); - return true; } //------------------------------------------------------------------------- - bool RTCPPacket::getTransportLayerFeedbackMessageGenericNACKAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) + static void tracePayloadSpecificFeedbackMessage( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::PayloadSpecificFeedbackMessage *fm + ) { - size_t remaining = contentSize; + traceFeedbackMessage(mediaChannelID, fm); - if (remaining < sizeof(DWORD)) { - ZS_LOG_WARNING(Trace, debug("malformed generic NACK transport layer feedback message") + ZS_PARAM("remaining", remaining)) - return false; + { + auto format = fm->pli(); + if (NULL != format) { + ZS_EVENTING_1(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessagePLI, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID); + } } - size_t possibleNACKs = remaining / sizeof(DWORD); - - mAllocationSize += (alignedSize(sizeof(TransportLayerFeedbackMessage::GenericNACK)) * possibleNACKs); - return true; - } + { + auto count = fm->sliCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = fm->sliAtIndex(index); - //------------------------------------------------------------------------- - bool RTCPPacket::getTransportLayerFeedbackMessageTMMBRAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - size_t remaining = contentSize; + ZS_EVENTING_5(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageSLI, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, index, index, + word, first, format->first(), + word, number, format->number(), + byte, pictureID, format->pictureID() + ); + } + } + } - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed TMMBR transport layer feedback message") + ZS_PARAM("remaining", remaining)) - return false; + { + auto format = fm->rpsi(); + if (NULL != format) { + ZS_EVENTING_5(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageRPSI, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, zeroBit, format->zeroBit(), + byte, payloadType, format->payloadType(), + buffer, nativeRPSIBitString, format->nativeRPSIBitString(), + size, nativeRPSIBitStringSizeInBits, (format->nativeRPSIBitStringSizeInBits()/8)+(0 == format->nativeRPSIBitStringSizeInBits()%8 ? 0 : 1) + ); + } } - size_t possibleTMMBRs = remaining / (sizeof(DWORD)*2); + { + auto count = fm->firCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = fm->firAtIndex(index); + traceCodecControlCommon(mediaChannelID, RTCPPacket::PayloadSpecificFeedbackMessage::FIR::kFmt, format); + } + } + } - mAllocationSize += (alignedSize(sizeof(TransportLayerFeedbackMessage::TMMBR)) * possibleTMMBRs); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getTransportLayerFeedbackMessageTMMBNAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - size_t remaining = contentSize; + { + auto count = fm->tstrCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = fm->tstrAtIndex(index); + traceCodecControlCommon(mediaChannelID, RTCPPacket::PayloadSpecificFeedbackMessage::TSTR::kFmt, format); + + ZS_EVENTING_4(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageTSTx, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, type, "TSTR", + size_t, index, index, + byte, formatIndex, format->index() + ); + } + } + } - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed TMMBN transport layer feedback message") + ZS_PARAM("remaining", remaining)) - return false; + { + auto count = fm->tstnCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = fm->tstnAtIndex(index); + traceCodecControlCommon(mediaChannelID, RTCPPacket::PayloadSpecificFeedbackMessage::TSTN::kFmt, format); + + ZS_EVENTING_4(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageTSTx, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, type, "TSTN", + size_t, index, index, + byte, formatIndex, format->index() + ); + } + } } - size_t possibleTMMBNs = remaining / (sizeof(DWORD)*2); + { + auto count = fm->vbcmCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = fm->vbcmAtIndex(index); + traceCodecControlCommon(mediaChannelID, RTCPPacket::PayloadSpecificFeedbackMessage::TSTN::kFmt, format); + + ZS_EVENTING_6(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageVBCM, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, index, index, + byte, zeroBit, format->zeroBit(), + byte, payloadType, format->payloadType(), + buffer, vbcmOctetString, format->vbcmOctetString(), + size, vbcmOctetStringSize, format->vbcmOctetStringSize() + ); + } + } + } - mAllocationSize += (alignedSize(sizeof(TransportLayerFeedbackMessage::TMMBN)) * possibleTMMBNs); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessagePLIAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageSLIAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - size_t remaining = contentSize; + { + auto format = fm->afb(); + auto remb = fm->remb(); - if (remaining < sizeof(DWORD)) { - ZS_LOG_WARNING(Trace, debug("malformed SLI payload specific feedback message") + ZS_PARAM("remaining", remaining)) - return false; + if ((NULL != format) && + (NULL == remb)) { + ZS_EVENTING_3(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageAFB, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + buffer, data, format->data(), + size, dataSize, format->dataSize() + ); + } } - size_t possibleSLIs = remaining / sizeof(DWORD); - - mAllocationSize += (alignedSize(sizeof(PayloadSpecificFeedbackMessage::SLI)) * possibleSLIs); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageRPSIAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - return true; + { + auto format = fm->remb(); + if (NULL != format) { + ZS_EVENTING_4(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageREMB, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, numSSRC, format->numSSRC(), + byte, brExp, format->brExp(), + dword, brMantissa, format->brMantissa() + ); + traceDWORDs(mediaChannelID, "ssrc", format->mSSRCs, format->numSSRC()); + } + } } - + //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageFIRAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) + static void traceXR( + IMediaStreamTrackTypes::MediaChannelID mediaChannelID, + RTCPPacket::XR *xr + ) { - size_t remaining = contentSize; + traceReport(mediaChannelID, xr); - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed FIR payload specific feedback message") + ZS_PARAM("remaining", remaining)) - return false; + ZS_EVENTING_5(x, i, Insane, RTCPPacketTraceXR, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + byte, numSSRC, xr->reserved(), + dword, ssrc, xr->ssrc(), + size_t, reportBlockCount, xr->reportBlockCount(), + bool, next, xr->nextXR() + ); + + { + auto count = xr->lossRLEReportBlockCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = xr->lossRLEReportBlockAtIndex(index); + ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, type, "LossRLE", + size_t, index, index, + bool, next, (NULL != format->nextLossRLE()) + ); + traceRLEReportBlock(mediaChannelID, format); + } + } } - size_t possibleFIRs = remaining / (sizeof(DWORD)*2); + { + auto count = xr->duplicateRLEReportBlockCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = xr->duplicateRLEReportBlockAtIndex(index); + ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, type, "DuplicateRLE", + size_t, index, index, + bool, next, (NULL != format->nextDuplicateRLE()) + ); + traceRLEReportBlock(mediaChannelID, format); + } + } + } - mAllocationSize += (alignedSize(sizeof(PayloadSpecificFeedbackMessage::FIR)) * possibleFIRs); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageTSTRAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - size_t remaining = contentSize; + { + auto count = xr->packetReceiptTimesReportBlockCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = xr->packetReceiptTimesReportBlockAtIndex(index); + ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, type, "PacketReceiptTimes", + size_t, index, index, + bool, next, (NULL != format->nextPacketReceiptTimesReportBlock()) + ); + traceDWORDs(mediaChannelID, "receipt time", format->mReceiptTimes, format->receiptTimeCount()); + traceReportBlockRange(mediaChannelID, format); + } + } + } - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed TSTR payload specific feedback message") + ZS_PARAM("remaining", remaining)) - return false; + { + auto count = xr->receiverReferenceTimeReportBlockCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = xr->receiverReferenceTimeReportBlockAtIndex(index); + ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceXRReceiverReferenceTimeReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, index, index, + dword, ntpTimestampMS, format->ntpTimestampMS(), + dword, ntpTimestampLS, format->ntpTimestampLS(), + string, ntpTimestamp, string(format->ntpTimestamp()), + bool, next, (NULL != format->nextReceiverReferenceTimeReportBlock()) + ); + traceXRReportBlock(mediaChannelID, format); + } + } } - size_t possibleTSTRs = remaining / (sizeof(DWORD)*2); + { + auto count = xr->dlrrReportBlockCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = xr->dlrrReportBlockAtIndex(index); + size_t subBlockCount = format->subBlockCount(); - mAllocationSize += (alignedSize(sizeof(PayloadSpecificFeedbackMessage::TSTR)) * possibleTSTRs); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageTSTNAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - size_t remaining = contentSize; + ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRDLRRReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, index, index, + size_t, subBlockCount, subBlockCount, + bool, next, (NULL != format->nextDLRRReportBlock()) + ); - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed TSTN payload specific feedback message") + ZS_PARAM("remaining", remaining)) - return false; + if (subBlockCount > 0) { + for (size_t indexSubBlock = 0; indexSubBlock < subBlockCount; ++indexSubBlock) + { + auto subBlock = format->subBlockAtIndex(indexSubBlock); + ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceXRDLRRReportBlockSubBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, index, indexSubBlock, + size_t, subBlockCount, subBlockCount, + dword, ssrc, subBlock->ssrc(), + dword, lrr, subBlock->lrr(), + dword, dlrr, subBlock->dlrr() + ); + } + } + traceXRReportBlock(mediaChannelID, format); + } + } + } + + { + auto count = xr->statisticsSummaryReportBlockCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = xr->statisticsSummaryReportBlockAtIndex(index); + ZS_EVENTING_22(x, i, Insane, RTCPPacketTraceXRStatisticsSummary, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, index, index, + bool, lossReportFlag, format->lossReportFlag(), + bool, lrr, format->duplicateReportFlag(), + bool, jitterFlag, format->jitterFlag(), + bool, ttlFlag, format->ttlFlag(), + bool, hopLimitFlag, format->hopLimitFlag(), + dword, lostPackets, format->lossReportFlag() ? format->lostPackets() : 0, + dword, dupPackets, format->duplicateReportFlag() ? format->dupPackets() : 0, + dword, minJitter, format->jitterFlag() ? format->minJitter() : 0, + dword, maxJitter, format->jitterFlag() ? format->maxJitter() : 0, + dword, meanJitter, format->jitterFlag() ? format->meanJitter() : 0, + dword, devJitter, format->jitterFlag() ? format->devJitter() : 0, + byte, minTTL, format->ttlFlag() ? format->minTTL() : static_cast(0), + byte, maxTTL, format->ttlFlag() ? format->maxTTL() : static_cast(0), + byte, meanTTL, format->ttlFlag() ? format->meanTTL() : static_cast(0), + byte, devTTL, format->ttlFlag() ? format->devTTL() : static_cast(0), + byte, minHopLimit, format->hopLimitFlag() ? format->minHopLimit() : static_cast(0), + byte, maxHopLimit, format->hopLimitFlag() ? format->maxHopLimit() : static_cast(0), + byte, meanHopLimit, format->hopLimitFlag() ? format->meanHopLimit() : static_cast(0), + byte, devHopLimit, format->hopLimitFlag() ? format->devHopLimit() : static_cast(0), + bool, next, (NULL != format->nextStatisticsSummaryReportBlock()) + ); + traceReportBlockRange(mediaChannelID, format); + } + } } - size_t possibleTSTNs = remaining / (sizeof(DWORD)*2); + { + auto count = xr->voIPMetricsReportBlockCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = xr->voIPMetricsReportBlockAtIndex(index); + ZS_EVENTING_27(x, i, Insane, RTCPPacketTraceXRVoIPMetricsReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + size_t, index, index, + dword, ssrcOfSource, format->ssrcOfSource(), + byte, lossRate, format->lossRate(), + byte, discardRate, format->discardRate(), + byte, burstDensity, format->burstDensity(), + byte, gapDensity, format->gapDensity(), + word, burstDuration, format->burstDuration(), + word, gapDuration, format->gapDuration(), + word, roundTripDelay, format->roundTripDelay(), + word, endSystemDelay, format->endSystemDelay(), + byte, signalLevel, format->signalLevel(), + byte, noiseLevel, format->noiseLevel(), + byte, rerl, format->rerl(), + byte, Gmin, format->Gmin(), + byte, rFactor, format->rFactor(), + byte, extRFactor, format->extRFactor(), + byte, mosLQ, format->mosLQ(), + byte, mosCQ, format->mosCQ(), + byte, rxConfig, format->rxConfig(), + byte, plc, format->plc(), + byte, jba, format->jba(), + byte, jbRate, format->jbRate(), + word, jbNominal, format->jbNominal(), + word, jbMaximum, format->jbMaximum(), + word, jbAbsMax, format->jbAbsMax(), + bool, next, (NULL != format->nextVoIPMetricsReportBlock()) + ); + + traceXRReportBlock(mediaChannelID, format); + } + } + } - mAllocationSize += (alignedSize(sizeof(PayloadSpecificFeedbackMessage::TSTN)) * possibleTSTNs); - return true; + { + auto count = xr->unknownReportBlockCount(); + if (count > 0) { + for (size_t index = 0; index < count; ++index) { + auto format = xr->unknownReportBlockAtIndex(index); + ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, + puid, mediaChannelID, mediaChannelID, + string, type, "UnknownReportBlock", + size_t, index, index, + bool, next, (NULL != format->nextUnknownReportBlock()) + ); + + traceXRReportBlock(mediaChannelID, format); + } + } + } } - - //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageVBCMAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - const BYTE *pos = contents; - size_t remaining = contentSize; - size_t possibleVBCMs = 0; + } // namespace internal - while (remaining >= (sizeof(DWORD)*2)) { - mAllocationSize += alignedSize(sizeof(PayloadSpecificFeedbackMessage::VBCM)); - ++possibleVBCMs; - - size_t length = RTPUtils::getBE16(&(pos[6])); - size_t modulas = length % sizeof(DWORD); - size_t padding = ((0 != modulas) ? (sizeof(DWORD)-modulas) : 0); + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SenderReport + #pragma mark - advancePos(pos, remaining, sizeof(DWORD)*2); + //------------------------------------------------------------------------- + const char *RTCPPacket::Report::ptToString(BYTE pt) + { + switch (pt) { + case SenderReport::kPayloadType: return "SenderReport"; + case ReceiverReport::kPayloadType: return "ReceiverReport"; + case SDES::kPayloadType: return "SDES"; + case Bye::kPayloadType: return "Bye"; + case App::kPayloadType: return "App"; + case TransportLayerFeedbackMessage::kPayloadType: return "TransportLayerFeedbackMessage"; + case PayloadSpecificFeedbackMessage::kPayloadType: return "PayloadSpecificFeedbackMessage"; + case XR::kPayloadType: return "XR"; + default: { + } + } + return "Uknown"; + } - if (remaining < length) { - ZS_LOG_WARNING(Trace, debug("malformed VBCM payload specific feedback message") + ZS_PARAM("remaining", remaining) + ZS_PARAM("length", length)) - return false; - } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SenderReport + #pragma mark - size_t skipLength = (((length + padding) > remaining) ? remaining : (length + padding)); + //------------------------------------------------------------------------- + Time RTCPPacket::SenderReport::ntpTimestamp() const + { + return UseRTPUtils::ntpToTime(mNTPTimestampMS, mNTPTimestampLS); + } - advancePos(pos, remaining, skipLength); - } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk::StringItem + #pragma mark - if (possibleVBCMs < 1) { - ZS_LOG_WARNING(Trace, debug("malformed VBCM payload specific feedback message") + ZS_PARAM("remaining", remaining) + ZS_PARAM("possible", possibleVBCMs)) - return false; - } + //------------------------------------------------------------------------- + const char *RTCPPacket::SDES::Chunk::StringItem::typeToString(BYTE type) + { + switch (type) { + case CName::kItemType: return "CName"; + case Name::kItemType: return "Name"; + case Email::kItemType: return "Email"; + case Phone::kItemType: return "Phone"; + case Loc::kItemType: return "Loc"; + case Tool::kItemType: return "Tool"; + case Note::kItemType: return "Note"; + case Priv::kItemType: return "Priv"; + case Mid::kItemType: return "Mid"; + case Rid::kItemType: return "Rid"; + default: { + break; + } + } + return "Unknown"; + } - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageAFBAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - return true; - } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::SDES::Chunk + #pragma mark - //------------------------------------------------------------------------- - bool RTCPPacket::getPayloadSpecificFeedbackMessageREMBAllocationSize( - BYTE fmt, - const BYTE *contents, - size_t contentSize - ) - { - size_t remaining = contentSize; + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::CName *RTCPPacket::SDES::Chunk::cNameAtIndex(size_t index) const + { + ASSERT(index < mCNameCount) + return &(mFirstCName[index]); + } - if (remaining < (sizeof(DWORD)*3)) { - ZS_LOG_WARNING(Trace, debug("malformed REMB payload specific feedback message") + ZS_PARAM("remaining", remaining)) - return false; - } + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Name *RTCPPacket::SDES::Chunk::nameAtIndex(size_t index) const + { + ASSERT(index < mNameCount) + return &(mFirstName[index]); + } - size_t possibleSSRCs = (remaining - (sizeof(DWORD)*2)) / sizeof(DWORD); + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Email *RTCPPacket::SDES::Chunk::emailAtIndex(size_t index) const + { + ASSERT(index < mEmailCount) + return &(mFirstEmail[index]); + } - mAllocationSize += (alignedSize(sizeof(DWORD)) * possibleSSRCs); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getXRLossRLEReportBlockAllocationSize( - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - mAllocationSize += alignedSize(sizeof(XR::LossRLEReportBlock)); + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Phone *RTCPPacket::SDES::Chunk::phoneAtIndex(size_t index) const + { + ASSERT(index < mPhoneCount) + return &(mFirstPhone[index]); + } - const BYTE *pos = contents; - size_t remaining = contentSize; + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Loc *RTCPPacket::SDES::Chunk::locAtIndex(size_t index) const + { + ASSERT(index < mLocCount) + return &(mFirstLoc[index]); + } - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed loss RLE report block")) - return false; - } + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Tool *RTCPPacket::SDES::Chunk::toolAtIndex(size_t index) const + { + ASSERT(index < mToolCount) + return &(mFirstTool[index]); + } - advancePos(pos, remaining, sizeof(DWORD)*2); + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Note *RTCPPacket::SDES::Chunk::noteAtIndex(size_t index) const + { + ASSERT(index < mNoteCount) + return &(mFirstNote[index]); + } - size_t possibleChunks = remaining / sizeof(WORD); + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Priv *RTCPPacket::SDES::Chunk::privAtIndex(size_t index) const + { + ASSERT(index < mPrivCount) + return &(mFirstPriv[index]); + } - if (0 != possibleChunks) { - mAllocationSize += alignedSize(sizeof(XR::RLEChunk)) * possibleChunks; - } + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Mid *RTCPPacket::SDES::Chunk::midAtIndex(size_t index) const + { + ASSERT(index < mMidCount) + return &(mFirstMid[index]); + } - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getXRDuplicateRLEReportBlockAllocationSize( - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - mAllocationSize += alignedSize(sizeof(XR::DuplicateRLEReportBlock)); + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Rid *RTCPPacket::SDES::Chunk::ridAtIndex(size_t index) const + { + ASSERT(index < mRidCount) + return &(mFirstRid[index]); + } - const BYTE *pos = contents; - size_t remaining = contentSize; + //------------------------------------------------------------------------- + RTCPPacket::SDES::Chunk::Unknown *RTCPPacket::SDES::Chunk::unknownAtIndex(size_t index) const + { + ASSERT(index < mUnknownCount) + return &(mFirstUnknown[index]); + } - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed duplicate RLE report block")) - return false; - } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::Bye + #pragma mark - advancePos(pos, remaining, sizeof(DWORD)*2); + //------------------------------------------------------------------------- + DWORD RTCPPacket::Bye::ssrc(size_t index) const + { + ASSERT(index < sc()) + return mSSRCs[index]; + } - size_t possibleChunks = remaining / sizeof(WORD); + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::FeedbackMessage + #pragma mark - if (0 != possibleChunks) { - mAllocationSize += alignedSize(sizeof(XR::RLEChunk)) * possibleChunks; + //------------------------------------------------------------------------- + const char *RTCPPacket::FeedbackMessage::fmtToString(BYTE pt, BYTE fmt, DWORD subFmt) + { + switch (pt) { + case TransportLayerFeedbackMessage::kPayloadType: { + switch (fmt) { + case TransportLayerFeedbackMessage::GenericNACK::kFmt: return "GenericNACK"; + case TransportLayerFeedbackMessage::TMMBR::kFmt: return "TMMBR"; + case TransportLayerFeedbackMessage::TMMBN::kFmt: return "TMMBN"; + default: break; + } + break; + } + case PayloadSpecificFeedbackMessage::kPayloadType: { + switch (fmt) { + case PayloadSpecificFeedbackMessage::PLI::kFmt: return "PLI"; + case PayloadSpecificFeedbackMessage::SLI::kFmt: return "SLI"; + case PayloadSpecificFeedbackMessage::RPSI::kFmt: return "RPSI"; + case PayloadSpecificFeedbackMessage::FIR::kFmt: return "FIR"; + case PayloadSpecificFeedbackMessage::TSTR::kFmt: return "TSTR"; + case PayloadSpecificFeedbackMessage::TSTN::kFmt: return "TSTN"; + case PayloadSpecificFeedbackMessage::VBCM::kFmt: return "VBCM"; + case PayloadSpecificFeedbackMessage::AFB::kFmt: { + const char *tmp = "REMB"; + if (subFmt == *(reinterpret_cast(tmp))) return "REMB"; + return "AFB"; + } + default: break; + } + break; + } + default: { + break; } - - return true; } - - //------------------------------------------------------------------------- - bool RTCPPacket::getXRPacketReceiptTimesReportBlockAllocationSize( - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - mAllocationSize += alignedSize(sizeof(XR::PacketReceiptTimesReportBlock)); + return "Unknown"; + } - const BYTE *pos = contents; - size_t remaining = contentSize; + //------------------------------------------------------------------------- + const char *RTCPPacket::FeedbackMessage::fmtToString() const + { + if (PayloadSpecificFeedbackMessage::kPayloadType == mPT) { + if (PayloadSpecificFeedbackMessage::AFB::kFmt == mReportSpecific) { + auto result = reinterpret_cast(this); + const char tmp1[sizeof(DWORD)] {}; + const char *tmp2 = "REMB"; + const char *usingTmp = (result->mHasREMB ? tmp2 : (&(tmp1[0]))); - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed packet receipt times report block")) - return false; + return fmtToString(mPT, mReportSpecific, *(reinterpret_cast(usingTmp))); } + } + return fmtToString(mPT, mReportSpecific); + } - advancePos(pos, remaining, sizeof(DWORD)*2); + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::TransportLayerFeedbackMessage + #pragma mark - size_t possibleReceiptTimes = remaining / sizeof(DWORD); + //------------------------------------------------------------------------- + RTCPPacket::TransportLayerFeedbackMessage::GenericNACK *RTCPPacket::TransportLayerFeedbackMessage::genericNACKAtIndex(size_t index) const + { + ASSERT(index < mGenericNACKCount) + return &(mFirstGenericNACK[index]); + } - if (0 != possibleReceiptTimes) { - mAllocationSize += alignedSize(sizeof(DWORD)) * possibleReceiptTimes; - } + //------------------------------------------------------------------------- + RTCPPacket::TransportLayerFeedbackMessage::TMMBR *RTCPPacket::TransportLayerFeedbackMessage::tmmbrAtIndex(size_t index) const + { + ASSERT(index < mTMMBRCount) + return &(mFirstTMMBR[index]); + } - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getXRReceiverReferenceTimeReportBlockAllocationSize( - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - mAllocationSize += alignedSize(sizeof(XR::ReceiverReferenceTimeReportBlock)); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::getXRDLRRReportBlockAllocationSize( - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - mAllocationSize += alignedSize(sizeof(XR::DLRRReportBlock)); + //------------------------------------------------------------------------- + RTCPPacket::TransportLayerFeedbackMessage::TMMBN *RTCPPacket::TransportLayerFeedbackMessage::tmmbnAtIndex(size_t index) const + { + ASSERT(index < mTMMBNCount) + return &(mFirstTMMBN[index]); + } - size_t possibleSubBlocks = contentSize / (sizeof(DWORD) + sizeof(DWORD) + sizeof(DWORD)); - if (0 != possibleSubBlocks) { - mAllocationSize += alignedSize(sizeof(XR::DLRRReportBlock::SubBlock)) * possibleSubBlocks; - } - return true; - } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::VBCM + #pragma mark - //------------------------------------------------------------------------- - bool RTCPPacket::getXRStatisticsSummaryReportBlockAllocationSize( - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - mAllocationSize += alignedSize(sizeof(XR::StatisticsSummaryReportBlock)); - return true; - } + //------------------------------------------------------------------------- + BYTE RTCPPacket::PayloadSpecificFeedbackMessage::VBCM::zeroBit() const + { + return RTCP_GET_BITS(mControlSpecific, 0x1, 23); + } - //------------------------------------------------------------------------- - bool RTCPPacket::getXRVoIPMetricsReportBlockAllocationSize( - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - mAllocationSize += alignedSize(sizeof(XR::VoIPMetricsReportBlock)); - return true; - } + //------------------------------------------------------------------------- + BYTE RTCPPacket::PayloadSpecificFeedbackMessage::VBCM::payloadType() const + { + return RTCP_GET_BITS(mControlSpecific, 0x7F, 16); + } - //------------------------------------------------------------------------- - bool RTCPPacket::getXRUnknownReportBlockAllocationSize( - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - mAllocationSize += alignedSize(sizeof(XR::UnknownReportBlock)); - return true; - } + //------------------------------------------------------------------------- + size_t RTCPPacket::PayloadSpecificFeedbackMessage::VBCM::vbcmOctetStringSize() const + { + return RTCP_GET_BITS(mControlSpecific, 0xFFFF, 0); + } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket (parsing routines) - #pragma mark + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::REMB + #pragma mark - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - Report * &ioLastReport, - BYTE version, - BYTE padding, - BYTE reportSpecific, - BYTE pt, - const BYTE *contents, - size_t contentSize - ) - { - Report *usingReport = NULL; - - switch (pt) { - case SenderReport::kPayloadType: { - auto temp = &(mFirstSenderReport[mSenderReportCount]);; - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - case ReceiverReport::kPayloadType: { - auto temp = &(mFirstReceiverReport[mReceiverReportCount]); - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - case SDES::kPayloadType: { - auto temp = &(mFirstSDES[mSDESCount]); - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - case Bye::kPayloadType: { - auto temp = &(mFirstBye[mByeCount]); - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - case App::kPayloadType: { - auto temp = &(mFirstApp[mAppCount]); - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - case TransportLayerFeedbackMessage::kPayloadType: { - auto temp = &(mFirstTransportLayerFeedbackMessage[mTransportLayerFeedbackMessageCount]); - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - case PayloadSpecificFeedbackMessage::kPayloadType: { - auto temp = &(mFirstPayloadSpecificFeedbackMessage[mPayloadSpecificFeedbackMessageCount]); - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - case XR::kPayloadType: { - auto temp = &(mFirstXR[mXRCount]); - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - default: - { - auto temp = &(mFirstUnknownReport[mUnknownReportCount]); - fill(temp, version, padding, reportSpecific, pt, contents, contentSize); - if (!parse(temp)) return false; - usingReport = temp; - break; - } - } + //------------------------------------------------------------------------- + DWORD RTCPPacket::PayloadSpecificFeedbackMessage::REMB::ssrcAtIndex(size_t index) const + { + ASSERT(index < numSSRC()) + return mSSRCs[index]; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage + #pragma mark + + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::PLI *RTCPPacket::PayloadSpecificFeedbackMessage::pli() const + { + if (PLI::kFmt != fmt()) return NULL; + return const_cast(&mPLI); + } + + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::SLI *RTCPPacket::PayloadSpecificFeedbackMessage::sliAtIndex(size_t index) const + { + ASSERT(index < mSLICount) + return &(mFirstSLI[index]); + } - if (NULL != ioLastReport) { - ioLastReport->mNext = usingReport; - } + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::FIR *RTCPPacket::PayloadSpecificFeedbackMessage::firAtIndex(size_t index) const + { + ASSERT(index < mFIRCount) + return &(mFirstFIR[index]); + } - ioLastReport = usingReport; - return true; - } + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::TSTR *RTCPPacket::PayloadSpecificFeedbackMessage::tstrAtIndex(size_t index) const + { + ASSERT(index < mTSTRCount) + return &(mFirstTSTR[index]); + } - //------------------------------------------------------------------------- - void RTCPPacket::fill( - Report *report, - BYTE version, - BYTE padding, - BYTE reportSpecific, - BYTE pt, - const BYTE *contents, - size_t contentSize - ) - { - if (contentSize > 0) { - report->mPtr = contents; - report->mSize = contentSize; + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::TSTN *RTCPPacket::PayloadSpecificFeedbackMessage::tstnAtIndex(size_t index) const + { + ASSERT(index < mTSTNCount) + return &(mFirstTSTN[index]); + } + + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::VBCM *RTCPPacket::PayloadSpecificFeedbackMessage::vbcmAtIndex(size_t index) const + { + ASSERT(index < mVBCMCount) + return &(mFirstVBCM[index]); + } + + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::RPSI *RTCPPacket::PayloadSpecificFeedbackMessage::rpsi() const + { + if (RPSI::kFmt != fmt()) return NULL; + return const_cast(&mRPSI); + } + + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::AFB *RTCPPacket::PayloadSpecificFeedbackMessage::afb() const + { + if (AFB::kFmt != fmt()) return NULL; + if (mHasREMB) return NULL; + return const_cast(&mAFB); + } + + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage::REMB *RTCPPacket::PayloadSpecificFeedbackMessage::remb() const + { + if (REMB::kFmt != fmt()) return NULL; + if (!mHasREMB) return NULL; + return const_cast(&mREMB); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::ReportBlock + #pragma mark + + //------------------------------------------------------------------------- + const char *RTCPPacket::XR::ReportBlock::blockTypeToString(BYTE blockType) + { + switch (blockType) { + case LossRLEReportBlock::kBlockType: return "LossRLEReportBlock"; + case DuplicateRLEReportBlock::kBlockType: return "DuplicateRLEReportBlock"; + case PacketReceiptTimesReportBlock::kBlockType: return "PacketReceiptTimesReportBlock"; + case ReceiverReferenceTimeReportBlock::kBlockType: return "ReceiverReferenceTimeReportBlock"; + case DLRRReportBlock::kBlockType: return "DLRRReportBlock"; + case StatisticsSummaryReportBlock::kBlockType: return "StatisticsSummaryReportBlock"; + case VoIPMetricsReportBlock::kBlockType: return "VoIPMetricsReportBlock"; + default: { + break; } - report->mVersion = version; - report->mPadding = padding; - report->mReportSpecific = reportSpecific; - report->mPT = pt; } - //------------------------------------------------------------------------- - bool RTCPPacket::parseCommon( - SenderReceiverCommonReport *report, - size_t detailedHeaderSize - ) - { - const BYTE *pos = report->ptr(); - size_t remaining = report->size(); + return "UnknownReportBlock"; + } - { - if (remaining < sizeof(DWORD)) goto illegal_size; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::ReportBlockRange + #pragma mark - report->mSSRCOfSender = RTPUtils::getBE32(pos); + //------------------------------------------------------------------------- + BYTE RTCPPacket::XR::ReportBlockRange::reserved() const + { + return RTCP_GET_BITS(mTypeSpecific, 0xF, 4); + } - advancePos(pos, remaining, sizeof(DWORD)); + //------------------------------------------------------------------------- + BYTE RTCPPacket::XR::ReportBlockRange::thinning() const + { + return RTCP_GET_BITS(mTypeSpecific, 0xF, 0); + } - if (remaining < detailedHeaderSize) goto illegal_size; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::RLEReportBlock + #pragma mark - advancePos(pos, remaining, detailedHeaderSize); + //------------------------------------------------------------------------- + RTCPPacket::XR::RLEChunk RTCPPacket::XR::RLEReportBlock::chunkAtIndex(size_t index) const + { + ASSERT(index < chunkCount()) + return mChunks[index]; + } - size_t count = 0; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::PacketReceiptTimesReportBlock + #pragma mark - if (report->rc() > 0) { - report->mFirstReportBlock = new (allocateBuffer(alignedSize(sizeof(SenderReceiverCommonReport::ReportBlock))*report->rc())) SenderReceiverCommonReport::ReportBlock[report->rc()]; + //------------------------------------------------------------------------- + DWORD RTCPPacket::XR::PacketReceiptTimesReportBlock::receiptTimeAtIndex(size_t index) const + { + ASSERT(index < receiptTimeCount()) + return mReceiptTimes[index]; + } - while ((remaining >= (sizeof(DWORD)*6)) && - (count < report->rc())) - { - SenderReceiverCommonReport::ReportBlock *block = &(report->mFirstReportBlock[count]); - if (0 != count) { - report->mFirstReportBlock[count-1].mNext = block; - } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::ReceiverReferenceTimeReportBlock + #pragma mark - block->mSSRC = RTPUtils::getBE32(&(pos[0])); - block->mFractionLost = pos[4]; - block->mCumulativeNumberOfPacketsLost = RTPUtils::getBE32(&(pos[4])); - block->mCumulativeNumberOfPacketsLost = block->mCumulativeNumberOfPacketsLost & 0x00FFFFFF; - block->mExtendedHighestSequenceNumberReceived = RTPUtils::getBE32(&(pos[8])); - block->mInterarrivalJitter = RTPUtils::getBE32(&(pos[12])); - block->mLSR = RTPUtils::getBE32(&(pos[16])); - block->mDLSR = RTPUtils::getBE32(&(pos[20])); + //------------------------------------------------------------------------- + Time RTCPPacket::XR::ReceiverReferenceTimeReportBlock::ntpTimestamp() const + { + return UseRTPUtils::ntpToTime(mNTPTimestampMS, mNTPTimestampLS); + } - advancePos(pos, remaining, sizeof(DWORD)*6); + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::DLRRReportBlock + #pragma mark - ++count; - } - } + //------------------------------------------------------------------------- + RTCPPacket::XR::DLRRReportBlock::SubBlock *RTCPPacket::XR::DLRRReportBlock::subBlockAtIndex(size_t index) const + { + ASSERT(index < subBlockCount()) + return &(mSubBlocks[index]); + } - if (count != report->rc()) goto illegal_size; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::StatisticsSummaryReportBlock + #pragma mark - if (0 != remaining) { - report->mExtension = pos; - report->mExtensionSize = remaining; - } + //------------------------------------------------------------------------- + bool RTCPPacket::XR::StatisticsSummaryReportBlock::lossReportFlag() const + { + return RTCP_IS_FLAG_SET(mTypeSpecific, 7); + } - return true; - } + //------------------------------------------------------------------------- + bool RTCPPacket::XR::StatisticsSummaryReportBlock::duplicateReportFlag() const + { + return RTCP_IS_FLAG_SET(mTypeSpecific, 6); + } - illegal_size: - { - ZS_LOG_WARNING(Trace, debug("unable to parse sender/receiver report (malformed packet)") + ZS_PARAM("remaining", remaining) + ZS_PARAM("detailed header size", detailedHeaderSize)) - } + //------------------------------------------------------------------------- + bool RTCPPacket::XR::StatisticsSummaryReportBlock::jitterFlag() const + { + return RTCP_IS_FLAG_SET(mTypeSpecific, 5); + } - return false; - } + //------------------------------------------------------------------------- + bool RTCPPacket::XR::StatisticsSummaryReportBlock::ttlFlag() const + { + return (1 == RTCP_GET_BITS(mTypeSpecific, 0x3, 3)); + } - //------------------------------------------------------------------------- - bool RTCPPacket::parse(SenderReport *report) - { - if (0 != mSenderReportCount) { - (&(mFirstSenderReport[mSenderReportCount-1]))->mNextSenderReport = report; - } - ++mSenderReportCount; + //------------------------------------------------------------------------- + bool RTCPPacket::XR::StatisticsSummaryReportBlock::hopLimitFlag() const + { + return (2 == RTCP_GET_BITS(mTypeSpecific, 0x3, 3)); + } - if (!parseCommon(report, sizeof(DWORD)*5)) return false; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::VoIPMetricsReportBlock + #pragma mark - const BYTE *pos = report->ptr(); + //------------------------------------------------------------------------- + BYTE RTCPPacket::XR::VoIPMetricsReportBlock::plc() const + { + return RTCP_GET_BITS(mRXConfig, 0x3, 6); + } - report->mNTPTimestampMS = RTPUtils::getBE32(&(pos[4])); - report->mNTPTimestampLS = RTPUtils::getBE32(&(pos[8])); - report->mRTPTimestamp = RTPUtils::getBE32(&(pos[12])); - report->mSenderPacketCount = RTPUtils::getBE32(&(pos[16])); - report->mSenderOctetCount = RTPUtils::getBE32(&(pos[20])); + //------------------------------------------------------------------------- + BYTE RTCPPacket::XR::VoIPMetricsReportBlock::jba() const + { + return RTCP_GET_BITS(mRXConfig, 0x3, 4); + } - return true; - } + //------------------------------------------------------------------------- + BYTE RTCPPacket::XR::VoIPMetricsReportBlock::jbRate() const + { + return RTCP_GET_BITS(mRXConfig, 0xF, 0); + } - //------------------------------------------------------------------------- - bool RTCPPacket::parse(ReceiverReport *report) - { - if (0 != mReceiverReportCount) { - (&(mFirstReceiverReport[mReceiverReportCount-1]))->mNextReceiverReport = report; - } - ++mReceiverReportCount; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::RunLength + #pragma mark + + //------------------------------------------------------------------------- + RTCPPacket::XR::RunLength::RunLength(RLEChunk chunk) : + mRunType(RTCP_GET_BITS(chunk, 0x1, 14)), + mRunLength(RTCP_GET_BITS(chunk, 0x3FFF, 0)) + { + } - if (!parseCommon(report, 0)) return false; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR::BitVector + #pragma mark + + //------------------------------------------------------------------------- + RTCPPacket::XR::BitVector::BitVector(RLEChunk chunk) : + mBitVector(RTCP_GET_BITS(chunk, 0x7FFF, 0)) + { + } - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse(SDES *report) - { - if (0 != mSDESCount) { - (&(mFirstSDES[mSDESCount-1]))->mNextSDES = report; - } - ++mSDESCount; + //------------------------------------------------------------------------- + BYTE RTCPPacket::XR::BitVector::bitAtIndex(size_t index) const + { + ASSERT(index < (sizeof(WORD)*8)) + return (mBitVector >> ((sizeof(WORD)*8)-index-1)) & 0x1; + } - if (0 == report->sc()) return true; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket::XR + #pragma mark - size_t chunkCount = 0; + //------------------------------------------------------------------------- + RTCPPacket::XR::LossRLEReportBlock *RTCPPacket::XR::lossRLEReportBlockAtIndex(size_t index) const + { + ASSERT(index < mLossRLEReportBlockCount) + return &(mFirstLossRLEReportBlock[index]); + } - const BYTE *pos = report->ptr(); - size_t remaining = report->size(); + //------------------------------------------------------------------------- + RTCPPacket::XR::DuplicateRLEReportBlock *RTCPPacket::XR::duplicateRLEReportBlockAtIndex(size_t index) const + { + ASSERT(index < mDuplicateRLEReportBlockCount) + return &(mFirstDuplicateRLEReportBlock[index]); + } - report->mFirstChunk = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk))*(report->sc()))) SDES::Chunk[report->sc()]; + //------------------------------------------------------------------------- + RTCPPacket::XR::PacketReceiptTimesReportBlock *RTCPPacket::XR::packetReceiptTimesReportBlockAtIndex(size_t index) const + { + ASSERT(index < mPacketReceiptTimesReportBlockCount) + return &(mFirstPacketReceiptTimesReportBlock[index]); + } - while ((remaining > sizeof(DWORD)) && - ((chunkCount < report->sc()))) - { - SDES::Chunk *chunk = &(report->mFirstChunk[chunkCount]); - if (0 != chunkCount) { - report->mFirstChunk[chunkCount-1].mNext = chunk; - } - ++chunkCount; + //------------------------------------------------------------------------- + RTCPPacket::XR::ReceiverReferenceTimeReportBlock *RTCPPacket::XR::receiverReferenceTimeReportBlockAtIndex(size_t index) const + { + ASSERT(index < mReceiverReferenceTimeReportBlockCount) + return &(mFirstReceiverReferenceTimeReportBlock[index]); + } - ZS_LOG_INSANE(log("parsing SDES chunk") + ZS_PARAM("chunk number", chunkCount-1)) + //------------------------------------------------------------------------- + RTCPPacket::XR::DLRRReportBlock *RTCPPacket::XR::dlrrReportBlockAtIndex(size_t index) const + { + ASSERT(index < mDLRRReportBlockCount) + return &(mFirstDLRRReportBlock[index]); + } - chunk->mSSRC = RTPUtils::getBE32(pos); - advancePos(pos, remaining, sizeof(DWORD)); + //------------------------------------------------------------------------- + RTCPPacket::XR::StatisticsSummaryReportBlock *RTCPPacket::XR::statisticsSummaryReportBlockAtIndex(size_t index) const + { + ASSERT(index < mStatisticsSummaryReportBlockCount) + return &(mFirstStatisticsSummaryReportBlock[index]); + } - const BYTE *startOfItems = pos; - size_t remainingAtStartOfItems = remaining; + //------------------------------------------------------------------------- + RTCPPacket::XR::VoIPMetricsReportBlock *RTCPPacket::XR::voIPMetricsReportBlockAtIndex(size_t index) const + { + ASSERT(index < mVoIPMetricsReportBlockCount) + return &(mFirstVoIPMetricsReportBlock[index]); + } - // first do an items count - while (remaining >= sizeof(BYTE)) { + //------------------------------------------------------------------------- + RTCPPacket::XR::UnknownReportBlock *RTCPPacket::XR::unknownReportBlockAtIndex(size_t index) const + { + ASSERT(index < mUnknownReportBlockCount) + return &(mFirstUnknownReportBlock[index]); + } - BYTE type = *pos; - advancePos(pos, remaining); + //------------------------------------------------------------------------- + bool RTCPPacket::XR::isRunLengthChunk(RLEChunk chunk) + { + return !RTCP_IS_FLAG_SET(chunk, 15); + } - if (SDES::Chunk::kEndOfItemsType == type) { - // stop now (going to retry parsing again anyway) - break; - } + //------------------------------------------------------------------------- + bool RTCPPacket::XR::isBitVectorChunk(RLEChunk chunk) + { + return RTCP_IS_FLAG_SET(chunk, 15); + } - ASSERT(remaining >= sizeof(BYTE)) - - size_t length = static_cast(*pos); - advancePos(pos, remaining); - - ASSERT(remaining >= length) - - switch (type) { - case SDES::Chunk::CName::kItemType: ++(chunk->mCNameCount); break; - case SDES::Chunk::Name::kItemType: ++(chunk->mNameCount); break; - case SDES::Chunk::Email::kItemType: ++(chunk->mEmailCount); break; - case SDES::Chunk::Phone::kItemType: ++(chunk->mPhoneCount); break; - case SDES::Chunk::Loc::kItemType: ++(chunk->mLocCount); break; - case SDES::Chunk::Tool::kItemType: ++(chunk->mToolCount); break; - case SDES::Chunk::Note::kItemType: ++(chunk->mNoteCount); break; - case SDES::Chunk::Priv::kItemType: ++(chunk->mPrivCount); break; - case SDES::Chunk::Mid::kItemType: ++(chunk->mMidCount); break; - case SDES::Chunk::Rid::kItemType: ++(chunk->mRidCount); break; - default: - { - ++(chunk->mUnknownCount); - ZS_LOG_WARNING(Insane, log("SDES item type is not understood") + ZS_PARAM("type", type)) - break; - } - } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket (public) + #pragma mark + + //------------------------------------------------------------------------- + RTCPPacket::RTCPPacket( + const make_private &, + MediaChannelID mediaChannelID + ) : + mMediaChannelID(mediaChannelID) + { + } - advancePos(pos, remaining, length); - } + //------------------------------------------------------------------------- + RTCPPacket::~RTCPPacket() + { + } - // allocate space for items + //------------------------------------------------------------------------- + RTCPPacketPtr RTCPPacket::create( + const BYTE *buffer, + size_t bufferLengthInBytes, + MediaChannelID mediaChannelID + ) + { + ORTC_THROW_INVALID_PARAMETERS_IF(!buffer) + ORTC_THROW_INVALID_PARAMETERS_IF(0 == bufferLengthInBytes) + return RTCPPacket::create(UseServicesHelper::convertToBuffer(buffer, bufferLengthInBytes), mediaChannelID); + } - if (0 != chunk->mCNameCount) { - chunk->mFirstCName = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::CName))*(chunk->mCNameCount))) SDES::Chunk::CName[chunk->mCNameCount]; - } - if (0 != chunk->mNameCount) { - chunk->mFirstName = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Name))*(chunk->mNameCount))) SDES::Chunk::Name[chunk->mNameCount]; - } - if (0 != chunk->mEmailCount) { - chunk->mFirstEmail = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Email))*(chunk->mEmailCount))) SDES::Chunk::Email[chunk->mEmailCount]; - } - if (0 != chunk->mPhoneCount) { - chunk->mFirstPhone = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Phone))*(chunk->mPhoneCount))) SDES::Chunk::Phone[chunk->mPhoneCount]; - } - if (0 != chunk->mLocCount) { - chunk->mFirstLoc = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Loc))*(chunk->mLocCount))) SDES::Chunk::Loc[chunk->mLocCount]; - } - if (0 != chunk->mToolCount) { - chunk->mFirstTool = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Tool))*(chunk->mToolCount))) SDES::Chunk::Tool[chunk->mToolCount]; - } - if (0 != chunk->mNoteCount) { - chunk->mFirstNote = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Note))*(chunk->mNoteCount))) SDES::Chunk::Note[chunk->mNoteCount]; - } - if (0 != chunk->mPrivCount) { - chunk->mFirstPriv = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Priv))*(chunk->mPrivCount))) SDES::Chunk::Priv[chunk->mPrivCount]; - } - if (0 != chunk->mMidCount) { - chunk->mFirstMid = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Mid))*(chunk->mMidCount))) SDES::Chunk::Mid[chunk->mMidCount]; - } - if (0 != chunk->mRidCount) { - chunk->mFirstRid = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Rid))*(chunk->mRidCount))) SDES::Chunk::Rid[chunk->mRidCount]; - } - if (0 != chunk->mUnknownCount) { - chunk->mFirstUnknown = new (allocateBuffer(alignedSize(sizeof(SDES::Chunk::Unknown))*(chunk->mUnknownCount))) SDES::Chunk::Unknown[chunk->mUnknownCount]; - } + //------------------------------------------------------------------------- + RTCPPacketPtr RTCPPacket::create( + const SecureByteBlock &buffer, + MediaChannelID mediaChannelID + ) + { + return RTCPPacket::create(buffer.BytePtr(), buffer.SizeInBytes(), mediaChannelID); + } - chunk->mCNameCount = 0; - chunk->mNameCount = 0; - chunk->mEmailCount = 0; - chunk->mPhoneCount = 0; - chunk->mLocCount = 0; - chunk->mToolCount = 0; - chunk->mNoteCount = 0; - chunk->mPrivCount = 0; - chunk->mMidCount = 0; - chunk->mRidCount = 0; - chunk->mUnknownCount = 0; + //------------------------------------------------------------------------- + RTCPPacketPtr RTCPPacket::create( + SecureByteBlockPtr buffer, + MediaChannelID mediaChannelID + ) + { + RTCPPacketPtr pThis(make_shared(make_private{}, mediaChannelID)); + pThis->mBuffer = buffer; + if (!pThis->parse()) { + ZS_EVENTING_4(x, w, Debug, RTCPPacketParseWarningNotParsed, ol, RtcpPacket, Parse, + string, message, "packet could not be parsed", + puid, mediaChannelID, mediaChannelID, + buffer, buffer, ((bool)buffer) ? buffer->BytePtr() : NULL, + size, size, ((bool)buffer) ? buffer->SizeInBytes() : 0 + ); + return RTCPPacketPtr(); + } + return pThis; + } - // start over and now parse - pos = startOfItems; - remaining = remainingAtStartOfItems; + //------------------------------------------------------------------------- + RTCPPacketPtr RTCPPacket::create( + const Report *first, + MediaChannelID mediaChannelID + ) + { + size_t allocationSize = getPacketSize(first); + SecureByteBlockPtr temp(make_shared(allocationSize)); - while (remaining >= sizeof(BYTE)) { + BYTE *buffer = temp->BytePtr(); + BYTE *pos = buffer; + writePacket(first, pos, allocationSize); - BYTE type = *pos; - advancePos(pos, remaining); + return create(temp, mediaChannelID); + } - if (SDES::Chunk::kEndOfItemsType == type) { - // skip NUL item (no length octet is present) + //------------------------------------------------------------------------- + SecureByteBlockPtr RTCPPacket::generateFrom(const Report *first) + { + size_t allocationSize = getPacketSize(first); + SecureByteBlockPtr temp(make_shared(allocationSize)); - // skip to next DWORD alignment - auto diff = reinterpret_cast(pos) - reinterpret_cast(ptr()); - while ((0 != (diff % sizeof(DWORD))) && - (remaining > 0)) - { - // only NUL chunks are allowed - ASSERT(SDES::Chunk::kEndOfItemsType == (*pos)) - advancePos(pos, remaining); - ++diff; - } - break; - } + BYTE *buffer = temp->BytePtr(); + BYTE *pos = buffer; + writePacket(first, pos, allocationSize); - ASSERT(remaining >= sizeof(BYTE)) + return temp; + } - size_t length = static_cast(*pos); - advancePos(pos, remaining); + //------------------------------------------------------------------------- + const BYTE *RTCPPacket::ptr() const + { + return mBuffer->BytePtr(); + } - ASSERT(remaining >= length) + //------------------------------------------------------------------------- + size_t RTCPPacket::size() const + { + return mBuffer->SizeInBytes(); + } - SDES::Chunk::StringItem *item {}; + //------------------------------------------------------------------------- + SecureByteBlockPtr RTCPPacket::buffer() const + { + return mBuffer; + } - const char *prefixStr = NULL; - size_t prefixLen = 0; + //------------------------------------------------------------------------- + RTCPPacket::SenderReport *RTCPPacket::senderReportAtIndex(size_t index) const + { + ASSERT(index < mSenderReportCount) + return &(mFirstSenderReport[index]); + } - switch (type) { - case SDES::Chunk::CName::kItemType: { - item = &(chunk->mFirstCName[chunk->mCNameCount]); - if (0 != chunk->mCNameCount) { - (&(chunk->mFirstCName[chunk->mCNameCount-1]))->mNext = item; - } - ++(chunk->mCNameCount); - break; - } - case SDES::Chunk::Name::kItemType: { - item = &(chunk->mFirstName[chunk->mNameCount]); - if (0 != chunk->mNameCount) { - (&(chunk->mFirstName[chunk->mNameCount-1]))->mNext = item; - } - ++(chunk->mNameCount); - break; - } - case SDES::Chunk::Email::kItemType: { - item = &(chunk->mFirstEmail[chunk->mEmailCount]); - if (0 != chunk->mEmailCount) { - (&(chunk->mFirstEmail[chunk->mEmailCount-1]))->mNext = item; - } - ++(chunk->mEmailCount); - break; - } - case SDES::Chunk::Phone::kItemType: { - item = &(chunk->mFirstPhone[chunk->mPhoneCount]); - if (0 != chunk->mPhoneCount) { - (&(chunk->mFirstPhone[chunk->mPhoneCount-1]))->mNext = item; - } - ++(chunk->mPhoneCount); - break; - } - case SDES::Chunk::Loc::kItemType: { - item = &(chunk->mFirstLoc[chunk->mLocCount]); - if (0 != chunk->mLocCount) { - (&(chunk->mFirstLoc[chunk->mLocCount-1]))->mNext = item; - } - ++(chunk->mLocCount); - break; - } - case SDES::Chunk::Tool::kItemType: { - item = &(chunk->mFirstTool[chunk->mToolCount]); - if (0 != chunk->mToolCount) { - (&(chunk->mFirstTool[chunk->mToolCount-1]))->mNext = item; - } - ++(chunk->mToolCount); - break; - } - case SDES::Chunk::Note::kItemType: { - item = &(chunk->mFirstNote[chunk->mNoteCount]); - if (0 != chunk->mNoteCount) { - (&(chunk->mFirstNote[chunk->mNoteCount-1]))->mNext = item; - } - ++(chunk->mNoteCount); - break; - } - case SDES::Chunk::Priv::kItemType: { - SDES::Chunk::Priv *priv = &(chunk->mFirstPriv[chunk->mPrivCount]); - if (0 != chunk->mPrivCount) { - (&(chunk->mFirstPriv[chunk->mPrivCount-1]))->mNext = priv; - } + //------------------------------------------------------------------------- + RTCPPacket::ReceiverReport *RTCPPacket::receiverReportAtIndex(size_t index) const + { + ASSERT(index < mReceiverReportCount) + return &(mFirstReceiverReport[index]); + } - if (length > 0) { - prefixLen = static_cast(*pos); - advancePos(pos, remaining); - --length; - if (0 != prefixLen) { - priv->mPrefix = new (allocateBuffer(sizeof(char)*(prefixLen+1))) char [prefixLen+1]; - priv->mPrefixLength = prefixLen; - memcpy(const_cast(priv->mPrefix), pos, prefixLen); - - advancePos(pos, remaining, prefixLen); - ASSERT(length >= prefixLen) - - length -= prefixLen; - } - } + //------------------------------------------------------------------------- + RTCPPacket::SDES *RTCPPacket::sdesAtIndex(size_t index) const + { + ASSERT(index < mSDESCount) + return &(mFirstSDES[index]); + } - item = priv; + //------------------------------------------------------------------------- + RTCPPacket::Bye *RTCPPacket::byeAtIndex(size_t index) const + { + ASSERT(index < mByeCount) + return &(mFirstBye[index]); + } - ++(chunk->mPrivCount); - break; - } - case SDES::Chunk::Mid::kItemType: { - item = &(chunk->mFirstMid[chunk->mMidCount]); - if (0 != chunk->mMidCount) { - (&(chunk->mFirstMid[chunk->mMidCount-1]))->mNext = item; - } - ++(chunk->mMidCount); - break; - } - case SDES::Chunk::Rid::kItemType: { - item = &(chunk->mFirstRid[chunk->mRidCount]); - if (0 != chunk->mRidCount) { - (&(chunk->mFirstRid[chunk->mRidCount-1]))->mNext = item; - } - ++(chunk->mRidCount); - break; - } - default: - { - item = &(chunk->mFirstUnknown[chunk->mUnknownCount]); - if (0 != chunk->mUnknownCount) { - (&(chunk->mFirstUnknown[chunk->mUnknownCount-1]))->mNext = item; - } - ++(chunk->mUnknownCount); - ZS_LOG_WARNING(Insane, log("SDES item type is not understood") + ZS_PARAM("type", type)) - break; - } - } + //------------------------------------------------------------------------- + RTCPPacket::App *RTCPPacket::appAtIndex(size_t index) const + { + ASSERT(index < mAppCount) + return &(mFirstApp[index]); + } + + //------------------------------------------------------------------------- + RTCPPacket::TransportLayerFeedbackMessage *RTCPPacket::transportLayerFeedbackReportAtIndex(size_t index) const + { + ASSERT(index < mTransportLayerFeedbackMessageCount) + return &(mFirstTransportLayerFeedbackMessage[index]); + } + + //------------------------------------------------------------------------- + RTCPPacket::PayloadSpecificFeedbackMessage *RTCPPacket::payloadSpecificFeedbackReportAtIndex(size_t index) const + { + ASSERT(index < mPayloadSpecificFeedbackMessageCount) + return &(mFirstPayloadSpecificFeedbackMessage[index]); + } + + //------------------------------------------------------------------------- + RTCPPacket::XR *RTCPPacket::xrAtIndex(size_t index) const + { + ASSERT(index < mXRCount) + return &(mFirstXR[index]); + } + + //------------------------------------------------------------------------- + RTCPPacket::UnknownReport *RTCPPacket::unknownAtIndex(size_t index) const + { + ASSERT(index < mUnknownReportCount) + return &(mFirstUnknownReport[index]); + } + + //------------------------------------------------------------------------- + void RTCPPacket::trace(const char *message) const + { + if (!ZS_EVENTING_IS_LOGGING(Insane)) return; + + ZS_EVENTING_7(x, i, Insane, RTCPPacketTrace, ol, RtcpPacket, Info, + puid, mediaChannelID, mMediaChannelID, + string, message, message, + buffer, buffer, ((bool)mBuffer) ? mBuffer->BytePtr() : NULL, + size, size, ((bool)mBuffer) ? mBuffer->SizeInBytes() : 0, + buffer, allocationBuffer, ((bool)mAllocationBuffer) ? mAllocationBuffer->BytePtr() : NULL, + size, allocationBuffersize, ((bool)mAllocationBuffer) ? mAllocationBuffer->SizeInBytes() : 0, + size_t, allocationPos, (NULL != mAllocationPos ? (mAllocationBuffer ? (reinterpret_cast(mAllocationPos) - reinterpret_cast(mAllocationBuffer->BytePtr())) : reinterpret_cast(mAllocationPos)) : 0) + ); + + for (Report *report = mFirst; NULL != report; report = report->next()) + { + switch (report->pt()) { + case SenderReport::kPayloadType: + { + SenderReport *sr = static_cast(report); + internal::traceSenderReport(mMediaChannelID, sr); + break; + } + case ReceiverReport::kPayloadType: + { + ReceiverReport *rr = static_cast(report); + internal::traceReceiverReport(mMediaChannelID, rr); + break; + } + case SDES::kPayloadType: + { + SDES *sdes = static_cast(report); + internal::traceSDES(mMediaChannelID, sdes); + break; + } + case Bye::kPayloadType: + { + Bye *bye = static_cast(report); + internal::traceBye(mMediaChannelID, bye); + break; + } + case App::kPayloadType: + { + App *app = static_cast(report); + internal::traceApp(mMediaChannelID, app); + break; + } + case TransportLayerFeedbackMessage::kPayloadType: + { + TransportLayerFeedbackMessage *fm = static_cast(report); + internal::traceTransportLayerFeedbackMessage(mMediaChannelID, fm); + break; + } + case PayloadSpecificFeedbackMessage::kPayloadType: + { + PayloadSpecificFeedbackMessage *fm = static_cast(report); + internal::tracePayloadSpecificFeedbackMessage(mMediaChannelID, fm); + break; + } + case XR::kPayloadType: + { + XR *xr = static_cast(report); + internal::traceXR(mMediaChannelID, xr); + break; + } + default: + { + UnknownReport *unknown = static_cast(report); + ZS_EVENTING_2(x, i, Insane, RTCPPacketTraceUnknownReport, ol, RtcpPacket, Info, + puid, mediaChannelID, mMediaChannelID, + bool, next, (NULL != unknown->nextUnknown()) + ); + break; + } + } + } + } - if (NULL != item) { - item->mType = type; - if (length > 0) { - item->mValue = new (allocateBuffer(length+1)) char [length+1]; - item->mLength = length; - memcpy(const_cast(item->mValue), pos, length); - } - if (ZS_IS_LOGGING(Insane)) { - if (NULL != prefixStr) { - ZS_LOG_INSANE(packet_slog("parsing SDES") + ZS_PARAM("type", item->typeToString()) + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("prefix len", prefixLen) + ZS_PARAM("prefix", prefixStr) + ZS_PARAM("len", length) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } else { - ZS_LOG_INSANE(packet_slog("parsing SDES") + ZS_PARAM("type", item->typeToString()) + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", length) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } - } - } - ++(chunk->mCount); + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket (internal) + #pragma mark + + //------------------------------------------------------------------------- + bool RTCPPacket::parse() + { + const BYTE *buffer = mBuffer->BytePtr(); + size_t size = mBuffer->SizeInBytes(); + + if (size < internal::kMinRtcpPacketLen) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "packet length is too short", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, 0, + size_t, length, size + ); + trace("packet length is too short"); + return false; + } + + bool foundPaddingBit = false; + + // scope: calculate total memory allocation size needed to parse entire RTCP packet + { + size_t remaining = size; + const BYTE *pos = buffer; - advancePos(pos, remaining, length); + while (remaining >= internal::kMinRtcpPacketLen) { + BYTE version = RTCP_GET_BITS(*pos, 0x3, 6); + if (internal::kRtpVersion != version) { + ZS_EVENTING_3(x, w, Trace, RTCPPacketParseWarningIllegalVersion, ol, RtcpPacket, Parse, + string, message, "illegal version found", + puid, mediaChannelID, mMediaChannelID, + byte, version, version + ); + trace("illegal version found"); + return false; } - } + size_t length = sizeof(DWORD) + (static_cast(UseRTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD)); - if (chunkCount != report->sc()) { - ZS_LOG_WARNING(Trace, debug("chunk count in SDES does not match packet count") + ZS_PARAM("chunk count", chunkCount) + ZS_PARAM("packet count", report->sc())) - return false; - } + size_t padding = 0; - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse(Bye *report) - { - if (0 != mByeCount) { - (&(mFirstBye[mByeCount-1]))->mNextBye = report; - } - ++mByeCount; + if (RTCP_IS_FLAG_SET(*pos, 5)) { + if (foundPaddingBit) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "found illegal second padding bit set in compound RTCP block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); + trace("found illegal second padding bit set in compound RTCP block"); + return false; + } - const BYTE *pos = report->ptr(); - size_t remaining = report->size(); + padding = buffer[size-1]; + } - if (NULL == pos) { - if (0 != report->sc()) { - ZS_LOG_WARNING(Trace, debug("BYE report count > 0 but does not contain SSRCs") + ZS_PARAM("sc", report->sc())) + if ((sizeof(DWORD) + padding) > length) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed padding size in RTCP packet", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); + trace("malformed padding size in RTCP packet"); return false; } - return true; - } + length -= padding; - if (0 != report->sc()) { - report->mSSRCs = new (allocateBuffer(alignedSize(sizeof(DWORD))*(report->sc()))) DWORD[report->sc()]; - } + if (remaining < length) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "insufficient length remaining for RTCP block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); + trace("insufficient length remaining for RTCP block"); + return false; + } - { - size_t index = 0; + BYTE reportSpecific = RTCP_GET_BITS(*pos, 0x1F, 0); - while (index < report->sc()) { - if (remaining < sizeof(DWORD)) goto illegal_remaining; + const BYTE *prePos = pos; + BYTE pt = pos[1]; - report->mSSRCs[index] = RTPUtils::getBE32(pos); - advancePos(pos, remaining, sizeof(DWORD)); - ++index; - } + internal::advancePos(pos, remaining, sizeof(DWORD)); - if (remaining > sizeof(BYTE)) { - size_t length = static_cast(*pos); - advancePos(pos, remaining); + size_t preAllocationSize = mAllocationSize; - if (remaining < length) goto illegal_remaining; + if (!getAllocationSize(static_cast(version), static_cast(padding), reportSpecific, pt, pos, static_cast(length - sizeof(DWORD)))) return false; - if (length > 0) { - report->mReasonForLeaving = new (allocateBuffer(alignedSize((sizeof(char)*length)+sizeof(char)))) char[length+1]; - memcpy(const_cast(report->mReasonForLeaving), pos, length); - } + internal::advancePos(pos, remaining, length - sizeof(DWORD)); + + if (0 != padding) { + internal::advancePos(pos, remaining, padding); } - return true; + ZS_EVENTING_6(x, i, Insane, RTCPPacketParseAllocationSize, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, pt, Report::ptToString(pt), + size_t, consumed, static_cast(reinterpret_cast(pos) - reinterpret_cast(prePos)), + size_t, allocationSize, mAllocationSize - preAllocationSize, + size_t, remaining, remaining, + size_t, length, length + ); + ++mCount; } + } - illegal_remaining: - { - ZS_LOG_WARNING(Trace, debug("malformed BYE") + ZS_PARAM("pos", reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ZS_PARAM("remaining", remaining)) - } - return false; + if (0 == mAllocationSize) { + trace("no RTCP packets were processed"); + return true; } - //------------------------------------------------------------------------- - bool RTCPPacket::parse(App *report) + mAllocationBuffer = make_shared(internal::alignedSize(mAllocationSize)); + + mAllocationPos = mAllocationBuffer->BytePtr(); + + // scope: allocation size is now established; begin parsing all reports contained in RTCP packet { + size_t remaining = size; + const BYTE *pos = buffer; + + + if (0 != mSenderReportCount) { + mFirstSenderReport = new (allocateBuffer(internal::alignedSize(sizeof(SenderReport)) * mSenderReportCount)) SenderReport[mSenderReportCount]; + } + if (0 != mReceiverReportCount) { + mFirstReceiverReport = new (allocateBuffer(internal::alignedSize(sizeof(ReceiverReport)) * mReceiverReportCount)) ReceiverReport[mReceiverReportCount]; + } + if (0 != mSDESCount) { + mFirstSDES = new (allocateBuffer(internal::alignedSize(sizeof(SDES)) * mSDESCount)) SDES[mSDESCount]; + } + if (0 != mByeCount) { + mFirstBye = new (allocateBuffer(internal::alignedSize(sizeof(Bye)) * mByeCount)) Bye[mByeCount]; + } if (0 != mAppCount) { - (&(mFirstApp[mAppCount-1]))->mNextApp = report; + mFirstApp = new (allocateBuffer(internal::alignedSize(sizeof(App)) * mAppCount)) App[mAppCount]; + } + if (0 != mTransportLayerFeedbackMessageCount) { + mFirstTransportLayerFeedbackMessage = new (allocateBuffer(internal::alignedSize(sizeof(TransportLayerFeedbackMessage)) * mTransportLayerFeedbackMessageCount)) TransportLayerFeedbackMessage[mTransportLayerFeedbackMessageCount]; + } + if (0 != mPayloadSpecificFeedbackMessageCount) { + mFirstPayloadSpecificFeedbackMessage = new (allocateBuffer(internal::alignedSize(sizeof(PayloadSpecificFeedbackMessage)) * mPayloadSpecificFeedbackMessageCount)) PayloadSpecificFeedbackMessage[mPayloadSpecificFeedbackMessageCount]; + } + if (0 != mXRCount) { + mFirstXR = new (allocateBuffer(internal::alignedSize(sizeof(XR)) * mXRCount)) XR[mXRCount]; + } + if (0 != mUnknownReportCount) { + mFirstUnknownReport = new (allocateBuffer(internal::alignedSize(sizeof(UnknownReport)) * mUnknownReportCount)) UnknownReport[mUnknownReportCount]; } - ++mAppCount; - const BYTE *pos = report->ptr(); - size_t remaining = report->size(); + mSenderReportCount = 0; + mReceiverReportCount = 0; + mSDESCount = 0; + mByeCount = 0; + mAppCount = 0; + mTransportLayerFeedbackMessageCount = 0; + mPayloadSpecificFeedbackMessageCount = 0; + mXRCount = 0; + mUnknownReportCount = 0; - { - if (remaining < sizeof(DWORD)) goto illegal_remaining; + Report *lastReport = NULL; + size_t count = 0; - report->mSSRC = RTPUtils::getBE32(pos); - advancePos(pos, remaining, sizeof(DWORD)); + while (remaining >= internal::kMinRtcpPacketLen) { + BYTE version = RTCP_GET_BITS(*pos, 0x3, 6); + size_t length = sizeof(DWORD) + (static_cast(UseRTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD)); - if (remaining < sizeof(DWORD)) goto illegal_remaining; + size_t padding = 0; - for (size_t index = 0; index < sizeof(DWORD); ++index) { - report->mName[index] = static_cast(pos[index]); + if (RTCP_IS_FLAG_SET(*pos, 5)) { + padding = buffer[size-1]; + length -= padding; // already protected during pre-parse against malformed padding length } - advancePos(pos, remaining, sizeof(DWORD)); - if (0 != remaining) { - report->mData = pos; - report->mDataSize = remaining; - } + BYTE reportSpecific = RTCP_GET_BITS(*pos, 0x1F, 0); - return true; - } + const BYTE *prePos = pos; + BYTE pt = pos[1]; - illegal_remaining: - { - ZS_LOG_WARNING(Trace, debug("malformed APP") + ZS_PARAM("pos", reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ZS_PARAM("remaining", remaining)) - } - return false; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse(TransportLayerFeedbackMessage *report) - { - if (0 != mTransportLayerFeedbackMessageCount) { - (&(mFirstTransportLayerFeedbackMessage[mTransportLayerFeedbackMessageCount-1]))->mNextTransportLayerFeedbackMessage = report; - } - ++mTransportLayerFeedbackMessageCount; + internal::advancePos(pos, remaining, sizeof(DWORD)); - const BYTE *pos = report->ptr(); - size_t remaining = report->size(); + size_t preAllocationSize = mAllocationSize; - { - if (remaining < (sizeof(DWORD)*2)) goto illegal_remaining; + if (!parse(lastReport, version, static_cast(padding), reportSpecific, pt, pos, length - sizeof(DWORD))) return false; - fill(report, pos, remaining); + if (NULL == mFirst) { + mFirst = lastReport; + } - bool result = false; + internal::advancePos(pos, remaining, length - sizeof(DWORD)); - switch (report->fmt()) { - case TransportLayerFeedbackMessage::GenericNACK::kFmt: result = parseGenericNACK(report); break; - case TransportLayerFeedbackMessage::TMMBR::kFmt: result = parseTMMBR(report); break; - case TransportLayerFeedbackMessage::TMMBN::kFmt: result = parseTMMBN(report); break; - default: { - result = parseUnknown(report); - break; - } + if (0 != padding) { + internal::advancePos(pos, remaining, padding); } - ZS_LOG_INSANE(packet_slog("parsed transport layer feedback message") + ZS_PARAM("fmt", report->fmtToString()) + ZS_PARAM("fmt (number)", report->reportSpecific())) + ZS_EVENTING_5(x, i, Insane, RTCPPacketParsedReport, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + byte, ptValue, pt, + string, pt, Report::ptToString(pt), + size_t, consumed, static_cast(reinterpret_cast(pos) - reinterpret_cast(prePos)), + size_t, consumedAllocation, preAllocationSize - mAllocationSize + ); - return true; + ++count; + ASSERT(count <= mCount); } + } + + trace("parsed"); + return true; + } - illegal_remaining: + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket (parse allocation sizing routines) + #pragma mark + + //------------------------------------------------------------------------- + bool RTCPPacket::getAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + BYTE pt, + const BYTE *contents, + size_t contentSize + ) + { + bool result = false; + + switch (pt) { + case SenderReport::kPayloadType: result = getSenderReportAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + case ReceiverReport::kPayloadType: result = getReceiverReportAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + case SDES::kPayloadType: result = getSDESAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + case Bye::kPayloadType: result = getByeAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + case App::kPayloadType: result = getAppAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + case TransportLayerFeedbackMessage::kPayloadType: result = getTransportLayerFeedbackMessageAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + case PayloadSpecificFeedbackMessage::kPayloadType: result = getPayloadSpecificFeedbackMessageAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + case XR::kPayloadType: result = getXRAllocationSize(version, padding, reportSpecific, contents, contentSize); break; + default: { - ZS_LOG_WARNING(Trace, debug("malformed transport layer feedback message") + ZS_PARAM("pos", reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ZS_PARAM("remaining", remaining)) + result = getUnknownReportAllocationSize(version, padding, reportSpecific, contents, contentSize); + break; } - return false; } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse(PayloadSpecificFeedbackMessage *report) - { - if (0 != mPayloadSpecificFeedbackMessageCount) { - (&(mFirstPayloadSpecificFeedbackMessage[mPayloadSpecificFeedbackMessageCount-1]))->mNextPayloadSpecificFeedbackMessage = report; - } - ++mPayloadSpecificFeedbackMessageCount; + return result; + } - const BYTE *pos = report->ptr(); - size_t remaining = report->size(); + //------------------------------------------------------------------------- + bool RTCPPacket::getSenderReportAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mSenderReportCount; - { - if (remaining < (sizeof(DWORD)*2)) goto illegal_remaining; - - fill(report, pos, remaining); - advancePos(pos, remaining, sizeof(DWORD)*2); - - bool result = false; - - switch (report->fmt()) { - case PayloadSpecificFeedbackMessage::PLI::kFmt: result = parsePLI(report); break; - case PayloadSpecificFeedbackMessage::SLI::kFmt: result = parseSLI(report); break; - case PayloadSpecificFeedbackMessage::RPSI::kFmt: result = parseRPSI(report); break; - case PayloadSpecificFeedbackMessage::FIR::kFmt: result = parseFIR(report); break; - case PayloadSpecificFeedbackMessage::TSTR::kFmt: result = parseTSTR(report); break; - case PayloadSpecificFeedbackMessage::TSTN::kFmt: result = parseTSTN(report); break; - case PayloadSpecificFeedbackMessage::VBCM::kFmt: result = parseVBCM(report); break; - case PayloadSpecificFeedbackMessage::AFB::kFmt: { - { - if (remaining < sizeof(DWORD)) goto generic_afb; - if (0 != memcmp(pos, reinterpret_cast("REMB"), sizeof(DWORD))) goto generic_afb; + mAllocationSize += internal::alignedSize(sizeof(SenderReport)) + (internal::alignedSize(sizeof(SenderReport::ReportBlock)) * static_cast(reportSpecific)); + return true; + } - result = parseREMB(report); - break; - } - generic_afb: - { - result = parseAFB(report); - break; - } - } - default: { - result = parseUnknown(report); - break; - } - } + //------------------------------------------------------------------------- + bool RTCPPacket::getReceiverReportAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mReceiverReportCount; + + mAllocationSize += internal::alignedSize(sizeof(ReceiverReport)) + (internal::alignedSize(sizeof(ReceiverReport::ReportBlock)) * static_cast(reportSpecific)); + return true; + } - ZS_LOG_INSANE(packet_slog("parsed payload specific feedback message") + ZS_PARAM("fmt", report->fmtToString()) + ZS_PARAM("fmt (number)", report->reportSpecific())) + //------------------------------------------------------------------------- + bool RTCPPacket::getSDESAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mSDESCount; - return true; - } + size_t chunksCount = static_cast(reportSpecific); - illegal_remaining: - { - ZS_LOG_WARNING(Trace, debug("malformed payload specific feedback message") + ZS_PARAM("pos", reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ZS_PARAM("remaining", remaining)) - } - return false; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse(XR *report) - { - if (0 != mXRCount) { - (&(mFirstXR[mXRCount-1]))->mNextXR = report; - } - ++mXRCount; + mAllocationSize += internal::alignedSize(sizeof(SDES)) + (internal::alignedSize(sizeof(SDES::Chunk)) * chunksCount); - const BYTE *pos = report->ptr(); - size_t remaining = report->size(); + size_t remaining = contentSize; - { - if (remaining < sizeof(DWORD)) goto illegal_remaining; + const BYTE *pos = contents; - report->mSSRC = RTPUtils::getBE32(pos); - advancePos(pos, remaining, sizeof(DWORD)); + while ((remaining > sizeof(DWORD)) && + (chunksCount > 0)) + { + internal::advancePos(pos, remaining, sizeof(DWORD)); - // first count the totals for each XR block type - while (remaining >= sizeof(DWORD)) { + ZS_EVENTING_3(x, i, Insane, RTCPPacketGetSDESAllocationSizeChunks, ol, RtcpPacket, Parse, + string, message, "getting SDES chunk allocation size", + puid, mediaChannelID, mMediaChannelID, + size_t, chunkNumber, static_cast(reportSpecific) - chunksCount + ); - BYTE bt = pos[0]; - size_t blockLength = static_cast(RTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD); + --chunksCount; - advancePos(pos, remaining, sizeof(DWORD)); + while (remaining >= sizeof(BYTE)) { - ++report->mReportBlockCount; + size_t preAllocationSize = mAllocationSize; - if (remaining < blockLength) { - ZS_LOG_WARNING(Trace, debug("illegal XR block length found") + ZS_PARAM("block length", blockLength) + ZS_PARAM("remaining", remaining)) - return false; - } + BYTE type = *pos; + internal::advancePos(pos, remaining); - switch (bt) { - case XR::LossRLEReportBlock::kBlockType: ++(report->mLossRLEReportBlockCount); break; - case XR::DuplicateRLEReportBlock::kBlockType: ++(report->mDuplicateRLEReportBlockCount); break; - case XR::PacketReceiptTimesReportBlock::kBlockType: ++(report->mPacketReceiptTimesReportBlockCount); break; - case XR::ReceiverReferenceTimeReportBlock::kBlockType: ++(report->mReceiverReferenceTimeReportBlockCount); break; - case XR::DLRRReportBlock::kBlockType: ++(report->mDLRRReportBlockCount); break; - case XR::StatisticsSummaryReportBlock::kBlockType: ++(report->mStatisticsSummaryReportBlockCount); break; - case XR::VoIPMetricsReportBlock::kBlockType: ++(report->mVoIPMetricsReportBlockCount); break; - default: - { - ++(report->mUnknownReportBlockCount); break; - break; + if (SDES::Chunk::kEndOfItemsType == type) { + // skip NUL item (no length octet is present) + + // skip to next DWORD alignment + auto diff = reinterpret_cast(pos) - reinterpret_cast(contents); + while ((0 != (diff % sizeof(DWORD))) && + (remaining > 0)) + { + // only NUL chunks are allowed + if (SDES::Chunk::kEndOfItemsType != (*pos)) { + ZS_EVENTING_3(x, w, Insane, RTCPPacketGetSDESAllocationSizeSDESTypeNotUnderstood, ol, RtcpPacket, Parse, + string, message, "SDES item type is not understood", + puid, mediaChannelID, mMediaChannelID, + byte, type, *pos + ); + return false; } + + internal::advancePos(pos, remaining); + ++diff; } - - advancePos(pos, remaining, blockLength); + break; } - if (0 != report->mLossRLEReportBlockCount) { - report->mFirstLossRLEReportBlock = new (allocateBuffer(alignedSize(sizeof(XR::LossRLEReportBlock))*(report->mLossRLEReportBlockCount))) XR::LossRLEReportBlock[report->mLossRLEReportBlockCount]; - } - if (0 != report->mDuplicateRLEReportBlockCount) { - report->mFirstDuplicateRLEReportBlock = new (allocateBuffer(alignedSize(sizeof(XR::DuplicateRLEReportBlock))*(report->mDuplicateRLEReportBlockCount))) XR::DuplicateRLEReportBlock[report->mDuplicateRLEReportBlockCount]; - } - if (0 != report->mPacketReceiptTimesReportBlockCount) { - report->mFirstPacketReceiptTimesReportBlock = new (allocateBuffer(alignedSize(sizeof(XR::PacketReceiptTimesReportBlock))*(report->mPacketReceiptTimesReportBlockCount))) XR::PacketReceiptTimesReportBlock[report->mPacketReceiptTimesReportBlockCount]; - } - if (0 != report->mReceiverReferenceTimeReportBlockCount) { - report->mFirstReceiverReferenceTimeReportBlock = new (allocateBuffer(alignedSize(sizeof(XR::ReceiverReferenceTimeReportBlock))*(report->mReceiverReferenceTimeReportBlockCount))) XR::ReceiverReferenceTimeReportBlock[report->mReceiverReferenceTimeReportBlockCount]; - } - if (0 != report->mDLRRReportBlockCount) { - report->mFirstDLRRReportBlock = new (allocateBuffer(alignedSize(sizeof(XR::DLRRReportBlock))*(report->mDLRRReportBlockCount))) XR::DLRRReportBlock[report->mDLRRReportBlockCount]; - } - if (0 != report->mStatisticsSummaryReportBlockCount) { - report->mFirstStatisticsSummaryReportBlock = new (allocateBuffer(alignedSize(sizeof(XR::StatisticsSummaryReportBlock))*(report->mStatisticsSummaryReportBlockCount))) XR::StatisticsSummaryReportBlock[report->mStatisticsSummaryReportBlockCount]; - } - if (0 != report->mVoIPMetricsReportBlockCount) { - report->mFirstVoIPMetricsReportBlock = new (allocateBuffer(alignedSize(sizeof(XR::VoIPMetricsReportBlock))*(report->mVoIPMetricsReportBlockCount))) XR::VoIPMetricsReportBlock[report->mVoIPMetricsReportBlockCount]; - } - if (0 != report->mUnknownReportBlockCount) { - report->mFirstUnknownReportBlock = new (allocateBuffer(alignedSize(sizeof(XR::UnknownReportBlock))*(report->mUnknownReportBlockCount))) XR::UnknownReportBlock[report->mUnknownReportBlockCount]; + if (remaining < sizeof(BYTE)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "no length of SDES entry present", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; } - report->mLossRLEReportBlockCount = 0; - report->mDuplicateRLEReportBlockCount = 0; - report->mPacketReceiptTimesReportBlockCount = 0; - report->mReceiverReferenceTimeReportBlockCount = 0; - report->mDLRRReportBlockCount = 0; - report->mStatisticsSummaryReportBlockCount = 0; - report->mVoIPMetricsReportBlockCount = 0; - report->mUnknownReportBlockCount = 0; - - XR::ReportBlock *previousReportBlock = NULL; - - // reset to start of buffer - pos = report->ptr(); - remaining = report->size(); - - advancePos(pos, remaining, sizeof(DWORD)); - - // parse each XR report block - while (remaining >= sizeof(DWORD)) { - const BYTE *prePos = pos; - size_t preAllocationSize = mAllocationSize; + size_t prefixLength = 0; + size_t length = static_cast(*pos); + internal::advancePos(pos, remaining); - BYTE bt = pos[0]; - BYTE typeSpecific = pos[1]; - size_t blockLength = static_cast(RTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD); + if (remaining < length) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed SDES length found", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); + return false; + } - advancePos(pos, remaining, sizeof(DWORD)); + switch (type) { + case SDES::Chunk::CName::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::CName)); break; + case SDES::Chunk::Name::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Name)); break; + case SDES::Chunk::Email::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Email)); break; + case SDES::Chunk::Phone::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Phone)); break; + case SDES::Chunk::Loc::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Loc)); break; + case SDES::Chunk::Tool::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Tool)); break; + case SDES::Chunk::Note::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Note)); break; + case SDES::Chunk::Priv::kItemType: + { + { + mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Priv)); - if (remaining < blockLength) { - ZS_LOG_WARNING(Trace, debug("malformed XR block length found") + ZS_PARAM("block length", blockLength) + ZS_PARAM("remaining", remaining)) - return false; - } + if (length > 0) { + prefixLength = static_cast(*pos); - XR::ReportBlock *usingBlock = NULL; + if (prefixLength > (length-1)) goto illegal_priv_prefix; - switch (bt) { - case XR::LossRLEReportBlock::kBlockType: { - auto reportBlock = &(report->mFirstLossRLEReportBlock[report->mLossRLEReportBlockCount]); - usingBlock = reportBlock; - if (0 != report->mLossRLEReportBlockCount) { - (&(report->mFirstLossRLEReportBlock[report->mLossRLEReportBlockCount-1]))->mNextLossRLE = reportBlock; - } - ++(report->mLossRLEReportBlockCount); - fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); - if (!parse(report, reportBlock)) return false; - break; - } - case XR::DuplicateRLEReportBlock::kBlockType: { - auto reportBlock = &(report->mFirstDuplicateRLEReportBlock[report->mDuplicateRLEReportBlockCount]); - usingBlock = reportBlock; - if (0 != report->mDuplicateRLEReportBlockCount) { - (&(report->mFirstDuplicateRLEReportBlock[report->mDuplicateRLEReportBlockCount-1]))->mNextDuplicateRLE = reportBlock; - } - ++(report->mDuplicateRLEReportBlockCount); - fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); - if (!parse(report, reportBlock)) return false; - break; - } - case XR::PacketReceiptTimesReportBlock::kBlockType: { - auto reportBlock = &(report->mFirstPacketReceiptTimesReportBlock[report->mPacketReceiptTimesReportBlockCount]); - usingBlock = reportBlock; - if (0 != report->mPacketReceiptTimesReportBlockCount) { - (&(report->mFirstPacketReceiptTimesReportBlock[report->mPacketReceiptTimesReportBlockCount-1]))->mNextPacketReceiptTimesReportBlock = reportBlock; - } - ++(report->mPacketReceiptTimesReportBlockCount); - fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); - if (!parse(report, reportBlock)) return false; - break; - } - case XR::ReceiverReferenceTimeReportBlock::kBlockType: { - auto reportBlock = &(report->mFirstReceiverReferenceTimeReportBlock[report->mReceiverReferenceTimeReportBlockCount]); - usingBlock = reportBlock; - if (0 != report->mReceiverReferenceTimeReportBlockCount) { - (&(report->mFirstReceiverReferenceTimeReportBlock[report->mReceiverReferenceTimeReportBlockCount-1]))->mNextReceiverReferenceTimeReportBlock = reportBlock; - } - ++(report->mReceiverReferenceTimeReportBlockCount); - fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); - if (!parse(report, reportBlock)) return false; - break; - } - case XR::DLRRReportBlock::kBlockType: { - auto reportBlock = &(report->mFirstDLRRReportBlock[report->mDLRRReportBlockCount]); - usingBlock = reportBlock; - if (0 != report->mDLRRReportBlockCount) { - (&(report->mFirstDLRRReportBlock[report->mDLRRReportBlockCount-1]))->mNextDLRRReportBlock = reportBlock; - } - ++(report->mDLRRReportBlockCount); - fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); - if (!parse(report, reportBlock)) return false; - break; - } - case XR::StatisticsSummaryReportBlock::kBlockType: { - auto reportBlock = &(report->mFirstStatisticsSummaryReportBlock[report->mStatisticsSummaryReportBlockCount]); - usingBlock = reportBlock; - if (0 != report->mStatisticsSummaryReportBlockCount) { - (&(report->mFirstStatisticsSummaryReportBlock[report->mStatisticsSummaryReportBlockCount-1]))->mNextStatisticsSummaryReportBlock = reportBlock; - } - ++(report->mStatisticsSummaryReportBlockCount); - fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); - if (!parse(report, reportBlock)) return false; - break; - } - case XR::VoIPMetricsReportBlock::kBlockType: { - auto reportBlock = &(report->mFirstVoIPMetricsReportBlock[report->mVoIPMetricsReportBlockCount]); - usingBlock = reportBlock; - if (0 != report->mVoIPMetricsReportBlockCount) { - (&(report->mFirstVoIPMetricsReportBlock[report->mVoIPMetricsReportBlockCount-1]))->mNextVoIPMetricsReportBlock = reportBlock; + if (0 != prefixLength) { + mAllocationSize += internal::alignedSize(sizeof(char)*(prefixLength+1)); + } } - ++(report->mVoIPMetricsReportBlockCount); - fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); - if (!parse(report, reportBlock)) return false; break; } - default: { - auto reportBlock = &(report->mFirstUnknownReportBlock[report->mUnknownReportBlockCount]); - usingBlock = reportBlock; - if (0 != report->mUnknownReportBlockCount) { - (&(report->mFirstUnknownReportBlock[report->mUnknownReportBlockCount-1]))->mNextUnknownReportBlock = reportBlock; - } - ++(report->mUnknownReportBlockCount); - fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); - if (!parse(report, reportBlock)) return false; - break; + illegal_priv_prefix: + { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed SDES Priv prefix found", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); + trace("malformed SDES Priv prefix found"); + return false; } + break; + } + case SDES::Chunk::Mid::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Mid)); break; + case SDES::Chunk::Rid::kItemType: mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Rid)); break; + default: + { + mAllocationSize += internal::alignedSize(sizeof(SDES::Chunk::Unknown)); + ZS_EVENTING_3(x, w, Insane, RTCPPacketGetSDESAllocationSizeSDESTypeNotUnderstood, ol, RtcpPacket, Parse, + string, message, "SDES item type is not understood", + puid, mediaChannelID, mMediaChannelID, + byte, type, type + ); + trace("SDES item type is not understood"); + break; } - - advancePos(pos, remaining, blockLength); - - ZS_LOG_INSANE(packet_slog("parsed XR block") + ZS_PARAM("block type", usingBlock->blockTypeToString()) + ZS_PARAM("block type (number)", usingBlock->blockType()) + ZS_PARAM("block size", blockLength) + ZS_PARAM("consumed", (reinterpret_cast(pos) - reinterpret_cast(prePos))) + ZS_PARAM("allocation consumed", preAllocationSize - mAllocationSize)) } - - - return true; - } - - illegal_remaining: - { - ZS_LOG_WARNING(Trace, debug("malformed XR when parsing") + ZS_PARAM("pos", reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ZS_PARAM("remaining", remaining)) - } - return false; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse(UnknownReport *report) - { - if (0 != mUnknownReportCount) { - (&(mFirstUnknownReport[mUnknownReportCount-1]))->mNextUnknown = report; - } - ++mUnknownReportCount; - - return true; - } - - //------------------------------------------------------------------------- - void RTCPPacket::fill(FeedbackMessage *report, const BYTE *contents, size_t contentSize) - { - const BYTE *pos = contents; - size_t remaining = contentSize; - - report->mSSRCOfPacketSender = RTPUtils::getBE32(&(pos[0])); - report->mSSRCOfMediaSource = RTPUtils::getBE32(&(pos[4])); - - advancePos(pos, remaining, sizeof(DWORD)*2); - - if (remaining > sizeof(BYTE)) { - report->mFCI = pos; - report->mFCISize = remaining; - } - } - - //------------------------------------------------------------------------- - void RTCPPacket::fill( - XR *report, - XR::ReportBlock *reportBlock, - XR::ReportBlock * &ioPreviousReportBlock, - BYTE blockType, - BYTE typeSpecific, - const BYTE *contents, - size_t contentSize - ) - { - reportBlock->mBlockType = blockType; - reportBlock->mTypeSpecific = typeSpecific; - if (0 != contentSize) { - reportBlock->mTypeSpecificContents = contents; - reportBlock->mTypeSpecificContentSize = contentSize; - } - if (NULL == report->mFirstReportBlock) { - report->mFirstReportBlock = reportBlock; - } - if (NULL != ioPreviousReportBlock) { - ioPreviousReportBlock->mNext = reportBlock; - } - ioPreviousReportBlock = reportBlock; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parseGenericNACK(TransportLayerFeedbackMessage *report) - { - typedef TransportLayerFeedbackMessage::GenericNACK GenericNACK; - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); - - size_t possibleNACKs = remaining / sizeof(DWORD); - - ASSERT(0 != possibleNACKs) - - report->mFirstGenericNACK = new (allocateBuffer(alignedSize(sizeof(GenericNACK))*possibleNACKs)) GenericNACK[possibleNACKs]; - - while (remaining >= sizeof(DWORD)) { - GenericNACK *nack = &(report->mFirstGenericNACK[report->mGenericNACKCount]); - - nack->mPID = RTPUtils::getBE16(&(pos[0])); - nack->mBLP = RTPUtils::getBE16(&(pos[2])); - - advancePos(pos, remaining, sizeof(DWORD)); + if (0 != length) { + mAllocationSize += internal::alignedSize((sizeof(char)*length)+sizeof(char)); + } - ++(report->mGenericNACKCount); + ZS_EVENTING_7(x, i, Insane, RTCPPacketGetSDESAllocationSizeSDES, ol, RtcpPacket, Parse, + string, message, "get SDES item allocation size", + puid, mediaChannelID, mMediaChannelID, + string, type, SDES::Chunk::StringItem::typeToString(type), + byte, typeValue, type, + size_t, prefixLength, prefixLength, + size_t, length, length, + size_t, allocationSize, (mAllocationSize - preAllocationSize) + ); + internal::advancePos(pos, remaining, length); } - ASSERT(possibleNACKs == report->mGenericNACKCount) - - return true; } - - //------------------------------------------------------------------------- - void RTCPPacket::fillTMMBRCommon( - TransportLayerFeedbackMessage *report, - TransportLayerFeedbackMessage::TMMBRCommon *common, - const BYTE *pos - ) - { - typedef TransportLayerFeedbackMessage::TMMBRCommon TMMBRCommon; - common->mSSRC = RTPUtils::getBE32(&(pos[0])); - common->mMxTBRExp = RTCP_GET_BITS(pos[4], 0x3F, 2); - common->mMxTBRMantissa = RTCP_GET_BITS(RTPUtils::getBE32(&(pos[4])), 0x1FFFF, 9); - common->mMeasuredOverhead = RTCP_GET_BITS(RTPUtils::getBE32(&(pos[4])), 0x1FF, 0); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parseTMMBR(TransportLayerFeedbackMessage *report) - { - typedef TransportLayerFeedbackMessage::TMMBR TMMBR; + return true; + } - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + //------------------------------------------------------------------------- + bool RTCPPacket::getByeAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mByeCount; - size_t possibleTMMBRs = remaining / (sizeof(DWORD)*2); + size_t ssrcCount = static_cast(reportSpecific); - ASSERT(0 != possibleTMMBRs) + mAllocationSize += internal::alignedSize(sizeof(Bye)) + (internal::alignedSize(sizeof(DWORD)) * ssrcCount); - report->mFirstTMMBR = new (allocateBuffer(alignedSize(sizeof(TMMBR))*possibleTMMBRs)) TMMBR[possibleTMMBRs]; + const BYTE *pos = contents; + size_t remaining = contentSize; - while (remaining >= (sizeof(DWORD)*2)) { - TMMBR *tmmbr = &(report->mFirstTMMBR[report->mTMMBRCount]); + if (remaining < (ssrcCount * sizeof(DWORD))) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed BYE SSRC size", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - fillTMMBRCommon(report, tmmbr, pos); + internal::advancePos(pos, remaining, sizeof(DWORD) * ssrcCount); - advancePos(pos, remaining, sizeof(DWORD)*2); + if (remaining < sizeof(BYTE)) return true; - ++(report->mTMMBRCount); - } + size_t length = static_cast(*pos); - ASSERT(possibleTMMBRs == report->mTMMBRCount) + if (length < 1) return true; - return true; + if (length > remaining) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed BYE reason length", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); + return false; } - - //------------------------------------------------------------------------- - bool RTCPPacket::parseTMMBN(TransportLayerFeedbackMessage *report) - { - typedef TransportLayerFeedbackMessage::TMMBN TMMBN; - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + mAllocationSize += internal::alignedSize((sizeof(char)*(length+1))); + return true; + } - size_t possibleTMMBNs = remaining / (sizeof(DWORD)*2); + //------------------------------------------------------------------------- + bool RTCPPacket::getAppAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mAppCount; - if (possibleTMMBNs < 1) { - report->mFirstTMMBN = NULL; - report->mTMMBNCount = 0; - return true; - } + mAllocationSize += internal::alignedSize(sizeof(App)); - report->mFirstTMMBN = new (allocateBuffer(alignedSize(sizeof(TMMBN))*possibleTMMBNs)) TMMBN[possibleTMMBNs]; + size_t remaining = contentSize; - while (remaining >= (sizeof(DWORD)*2)) { - TMMBN *tmmbr = &(report->mFirstTMMBN[report->mTMMBNCount]); + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed APP length", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - fillTMMBRCommon(report, tmmbr, pos); + return true; + } - advancePos(pos, remaining, sizeof(DWORD)*2); + //------------------------------------------------------------------------- + bool RTCPPacket::getTransportLayerFeedbackMessageAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mTransportLayerFeedbackMessageCount; - ++(report->mTMMBNCount); - } + mAllocationSize += internal::alignedSize(sizeof(TransportLayerFeedbackMessage)); - ASSERT(possibleTMMBNs == report->mTMMBNCount) + const BYTE *pos = contents; + size_t remaining = contentSize; - return true; + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed transport layer feedback message length", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; } - //------------------------------------------------------------------------- - bool RTCPPacket::parseUnknown(TransportLayerFeedbackMessage *report) - { - report->mUnknown = report; - return true; - } + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - //------------------------------------------------------------------------- - bool RTCPPacket::parsePLI(PayloadSpecificFeedbackMessage *report) - { - return true; + bool result = false; + + switch (reportSpecific) { + case TransportLayerFeedbackMessage::GenericNACK::kFmt: result = getTransportLayerFeedbackMessageGenericNACKAllocationSize(reportSpecific, pos, remaining); break; + case TransportLayerFeedbackMessage::TMMBR::kFmt: result = getTransportLayerFeedbackMessageTMMBRAllocationSize(reportSpecific, pos, remaining); break; + case TransportLayerFeedbackMessage::TMMBN::kFmt: result = getTransportLayerFeedbackMessageTMMBNAllocationSize(reportSpecific, pos, remaining); break; + default: { + break; + } } - //------------------------------------------------------------------------- - bool RTCPPacket::parseSLI(PayloadSpecificFeedbackMessage *report) - { - typedef PayloadSpecificFeedbackMessage::SLI SLI; + ZS_EVENTING_3(x, i, Insane, RTCPPacketGetTransportLayerFeedbackMessageAllocationSize, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, fmt, FeedbackMessage::fmtToString(TransportLayerFeedbackMessage::kPayloadType, reportSpecific), + byte, fmtNumber, reportSpecific + ); + return true; + } - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mPayloadSpecificFeedbackMessageCount; - size_t possibleSLIs = remaining / (sizeof(DWORD)); + mAllocationSize += internal::alignedSize(sizeof(PayloadSpecificFeedbackMessage)); - ASSERT(0 != possibleSLIs) + const BYTE *pos = contents; + size_t remaining = contentSize; - report->mFirstSLI = new (allocateBuffer(alignedSize(sizeof(SLI))*possibleSLIs)) SLI[possibleSLIs]; + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed transport layer feedback message length", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - while (remaining >= (sizeof(DWORD))) { - SLI *sli = &(report->mFirstSLI[report->mSLICount]); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - sli->mFirst = RTCP_GET_BITS(RTPUtils::getBE16(&(pos[0])), 0x1FFF, 3); - sli->mNumber = static_cast(RTCP_GET_BITS(RTPUtils::getBE32(&(pos[0])), 0x1FFF, 6)); - sli->mPictureID = RTCP_GET_BITS(pos[3], 0x3F, 0); + bool result = false; - advancePos(pos, remaining, sizeof(DWORD)); + char bogus[sizeof(DWORD)] {}; + const DWORD *usingSubType = reinterpret_cast(&(bogus[0])); - ++(report->mSLICount); - } + switch (reportSpecific) { + case PayloadSpecificFeedbackMessage::PLI::kFmt: result = getPayloadSpecificFeedbackMessagePLIAllocationSize(reportSpecific, pos, remaining); break; + case PayloadSpecificFeedbackMessage::SLI::kFmt: result = getPayloadSpecificFeedbackMessageSLIAllocationSize(reportSpecific, pos, remaining); break; + case PayloadSpecificFeedbackMessage::RPSI::kFmt: result = getPayloadSpecificFeedbackMessageRPSIAllocationSize(reportSpecific, pos, remaining); break; + case PayloadSpecificFeedbackMessage::FIR::kFmt: result = getPayloadSpecificFeedbackMessageFIRAllocationSize(reportSpecific, pos, remaining); break; + case PayloadSpecificFeedbackMessage::TSTR::kFmt: result = getPayloadSpecificFeedbackMessageTSTRAllocationSize(reportSpecific, pos, remaining); break; + case PayloadSpecificFeedbackMessage::TSTN::kFmt: result = getPayloadSpecificFeedbackMessageTSTNAllocationSize(reportSpecific, pos, remaining); break; + case PayloadSpecificFeedbackMessage::VBCM::kFmt: result = getPayloadSpecificFeedbackMessageVBCMAllocationSize(reportSpecific, pos, remaining); break; + case PayloadSpecificFeedbackMessage::AFB::kFmt: { + { + if (remaining < sizeof(DWORD)) goto generic_afb; + if (0 != memcmp(pos, reinterpret_cast("REMB"), sizeof(DWORD))) goto generic_afb; - ASSERT(possibleSLIs == report->mSLICount) + usingSubType = reinterpret_cast(pos); - return true; + result = getPayloadSpecificFeedbackMessageREMBAllocationSize(reportSpecific, pos, remaining); + break; + } + generic_afb: + { + result = getPayloadSpecificFeedbackMessageAFBAllocationSize(reportSpecific, pos, remaining); + break; + } + } + default: { + break; + } } - - //------------------------------------------------------------------------- - bool RTCPPacket::parseRPSI(PayloadSpecificFeedbackMessage *report) - { - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); - - { - if (remaining < sizeof(WORD)) goto illegal_remaining; - - BYTE pb = pos[0]; - report->mRPSI.mZeroBit = RTCP_GET_BITS(pos[1], 0x1, 7); - report->mRPSI.mPayloadType = RTCP_GET_BITS(pos[1], 0x7F, 0); - advancePos(pos, remaining, sizeof(WORD)); + ZS_EVENTING_3(x, i, Insane, RTCPPacketGetPayloadSpecificFeedbackMessageAllocationSize, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, fmt, FeedbackMessage::fmtToString(TransportLayerFeedbackMessage::kPayloadType, reportSpecific, *usingSubType), + byte, fmtNumber, reportSpecific + ); + return true; + } - if (remaining > 0) { - report->mRPSI.mNativeRPSIBitString = pos; - report->mRPSI.mNativeRPSIBitStringSizeInBits = (remaining*8); - if (pb > report->mRPSI.mNativeRPSIBitStringSizeInBits) goto illegal_remaining; + //------------------------------------------------------------------------- + bool RTCPPacket::getXRAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mXRCount; - report->mRPSI.mNativeRPSIBitStringSizeInBits -= static_cast(pb); - if (0 == report->mRPSI.mNativeRPSIBitStringSizeInBits) { - report->mRPSI.mNativeRPSIBitString = NULL; - } - } + mAllocationSize += internal::alignedSize(sizeof(XR)); - return true; - } + const BYTE *pos = contents; + size_t remaining = contentSize; - illegal_remaining: - { - ZS_LOG_WARNING(Trace, debug("malformed RPSI payload specific feedback message") + ZS_PARAM("pos", reinterpret_cast(pos) - reinterpret_cast(report->fci())) + ZS_PARAM("remaining", remaining)) - } + if (remaining < sizeof(DWORD)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "XR is not a valid length", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); return false; } - - //------------------------------------------------------------------------- - void RTCPPacket::fillCodecControlCommon( - PayloadSpecificFeedbackMessage *report, - PayloadSpecificFeedbackMessage::CodecControlCommon *common, - const BYTE *pos - ) - { - common->mSSRC = RTPUtils::getBE32(&(pos[0])); - common->mSeqNr = pos[4]; - common->mReserved = RTCP_GET_BITS(RTPUtils::getBE32(&(pos[4])), 0xFFFFFF, 0); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parseFIR(PayloadSpecificFeedbackMessage *report) - { - typedef PayloadSpecificFeedbackMessage::FIR FIR; - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + internal::advancePos(pos, remaining, sizeof(DWORD)); - size_t possibleFIRs = remaining / (sizeof(DWORD)*2); + while (remaining >= sizeof(DWORD)) { + const BYTE *prePos = pos; + size_t preAllocationSize = mAllocationSize; - ASSERT(0 != possibleFIRs) + BYTE bt = pos[0]; + BYTE typeSpecific = pos[1]; + size_t blockLength = static_cast(UseRTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD); - report->mFirstFIR = new (allocateBuffer(alignedSize(sizeof(FIR))*possibleFIRs)) FIR[possibleFIRs]; + internal::advancePos(pos, remaining, sizeof(DWORD)); - while (remaining >= (sizeof(DWORD)*2)) { - FIR *fir = &(report->mFirstFIR[report->mFIRCount]); - fillCodecControlCommon(report, fir, pos); + if (remaining < blockLength) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed XR block length found", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, blockLength + ); + return false; + } - advancePos(pos, remaining, sizeof(DWORD)*2); + bool result = false; - ++(report->mFIRCount); + switch (bt) { + case XR::LossRLEReportBlock::kBlockType: result = getXRLossRLEReportBlockAllocationSize(typeSpecific, pos, blockLength); break; + case XR::DuplicateRLEReportBlock::kBlockType: result = getXRDuplicateRLEReportBlockAllocationSize(typeSpecific, pos, blockLength); break; + case XR::PacketReceiptTimesReportBlock::kBlockType: result = getXRPacketReceiptTimesReportBlockAllocationSize(typeSpecific, pos, blockLength); break; + case XR::ReceiverReferenceTimeReportBlock::kBlockType: result = getXRReceiverReferenceTimeReportBlockAllocationSize(typeSpecific, pos, blockLength); break; + case XR::DLRRReportBlock::kBlockType: result = getXRDLRRReportBlockAllocationSize(typeSpecific, pos, blockLength); break; + case XR::StatisticsSummaryReportBlock::kBlockType: result = getXRStatisticsSummaryReportBlockAllocationSize(typeSpecific, pos, blockLength); break; + case XR::VoIPMetricsReportBlock::kBlockType: result = getXRVoIPMetricsReportBlockAllocationSize(typeSpecific, pos, blockLength); break; + default: + { + result = getXRUnknownReportBlockAllocationSize(typeSpecific, pos, blockLength); break; + break; + } } - ASSERT(possibleFIRs == report->mFIRCount) + if (!result) return false; - return true; + internal::advancePos(pos, remaining, blockLength); + + ZS_EVENTING_5(x, i, Insane, RTCPPacketGetXRAllocationSize, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, blockType, XR::ReportBlock::blockTypeToString(bt), + size_t, blockLength, blockLength, + uint64, consumed, (reinterpret_cast(pos) - reinterpret_cast(prePos)), + size_t, allocationSize, mAllocationSize - preAllocationSize + ); } - - //------------------------------------------------------------------------- - bool RTCPPacket::parseTSTR(PayloadSpecificFeedbackMessage *report) - { - typedef PayloadSpecificFeedbackMessage::TSTR TSTR; - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + return true; + } - size_t possibleTSTRs = remaining / (sizeof(DWORD)*2); + //------------------------------------------------------------------------- + bool RTCPPacket::getUnknownReportAllocationSize( + BYTE version, + BYTE padding, + BYTE reportSpecific, + const BYTE *contents, + size_t contentSize + ) + { + ++mUnknownReportCount; - ASSERT(0 != possibleTSTRs) + mAllocationSize += internal::alignedSize(sizeof(UnknownReport)); + return true; + } - report->mFirstTSTR = new (allocateBuffer(alignedSize(sizeof(TSTR))*possibleTSTRs)) TSTR[possibleTSTRs]; + //------------------------------------------------------------------------- + bool RTCPPacket::getTransportLayerFeedbackMessageGenericNACKAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + size_t remaining = contentSize; + + if (remaining < sizeof(DWORD)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed generic NACK transport layer feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - while (remaining >= (sizeof(DWORD)*2)) { - TSTR *tstr = &(report->mFirstTSTR[report->mTSTRCount]); - fillCodecControlCommon(report, tstr, pos); + size_t possibleNACKs = remaining / sizeof(DWORD); - tstr->mControlSpecific = RTCP_GET_BITS(tstr->mReserved, 0x1F, 0); - tstr->mReserved = RTCP_GET_BITS(tstr->mReserved, 0x7FFFF, 5); + mAllocationSize += (internal::alignedSize(sizeof(TransportLayerFeedbackMessage::GenericNACK)) * possibleNACKs); + return true; + } - advancePos(pos, remaining, sizeof(DWORD)*2); + //------------------------------------------------------------------------- + bool RTCPPacket::getTransportLayerFeedbackMessageTMMBRAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed TMMBR transport layer feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - ++(report->mTSTRCount); - } + size_t possibleTMMBRs = remaining / (sizeof(DWORD)*2); - ASSERT(possibleTSTRs == report->mTSTRCount) - - return true; - } + mAllocationSize += (internal::alignedSize(sizeof(TransportLayerFeedbackMessage::TMMBR)) * possibleTMMBRs); + return true; + } - //------------------------------------------------------------------------- - bool RTCPPacket::parseTSTN(PayloadSpecificFeedbackMessage *report) - { - typedef PayloadSpecificFeedbackMessage::TSTN TSTN; - - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + //------------------------------------------------------------------------- + bool RTCPPacket::getTransportLayerFeedbackMessageTMMBNAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed TMMBN transport layer feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - size_t possibleTSTNs = remaining / (sizeof(DWORD)*2); + size_t possibleTMMBNs = remaining / (sizeof(DWORD)*2); - ASSERT(0 != possibleTSTNs) + mAllocationSize += (internal::alignedSize(sizeof(TransportLayerFeedbackMessage::TMMBN)) * possibleTMMBNs); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessagePLIAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageSLIAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + size_t remaining = contentSize; + + if (remaining < sizeof(DWORD)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed SLI payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - report->mFirstTSTN = new (allocateBuffer(alignedSize(sizeof(TSTN))*possibleTSTNs)) TSTN[possibleTSTNs]; + size_t possibleSLIs = remaining / sizeof(DWORD); - while (remaining >= (sizeof(DWORD)*2)) { - TSTN *tstn = &(report->mFirstTSTN[report->mTSTNCount]); - fillCodecControlCommon(report, tstn, pos); + mAllocationSize += (internal::alignedSize(sizeof(PayloadSpecificFeedbackMessage::SLI)) * possibleSLIs); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageRPSIAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageFIRAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed FIR payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - tstn->mControlSpecific = RTCP_GET_BITS(tstn->mReserved, 0x1F, 0); - tstn->mReserved = RTCP_GET_BITS(tstn->mReserved, 0x7FFFF, 5); + size_t possibleFIRs = remaining / (sizeof(DWORD)*2); - advancePos(pos, remaining, sizeof(DWORD)*2); + mAllocationSize += (internal::alignedSize(sizeof(PayloadSpecificFeedbackMessage::FIR)) * possibleFIRs); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageTSTRAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed TSTR payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - ++(report->mTSTNCount); - } + size_t possibleTSTRs = remaining / (sizeof(DWORD)*2); - ASSERT(possibleTSTNs == report->mTSTNCount) - - return true; - } + mAllocationSize += (internal::alignedSize(sizeof(PayloadSpecificFeedbackMessage::TSTR)) * possibleTSTRs); + return true; + } - //------------------------------------------------------------------------- - bool RTCPPacket::parseVBCM(PayloadSpecificFeedbackMessage *report) - { - typedef PayloadSpecificFeedbackMessage::VBCM VBCM; - - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageTSTNAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed TSTN payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - size_t possibleVBCMs = 0; + size_t possibleTSTNs = remaining / (sizeof(DWORD)*2); - // first count the VBCM blocks - { - while (remaining >= (sizeof(DWORD)*2)) { - ++possibleVBCMs; + mAllocationSize += (internal::alignedSize(sizeof(PayloadSpecificFeedbackMessage::TSTN)) * possibleTSTNs); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageVBCMAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + const BYTE *pos = contents; + size_t remaining = contentSize; - size_t length = RTPUtils::getBE16(&(pos[6])); - size_t modulas = length % sizeof(DWORD); - size_t padding = ((0 != modulas) ? (sizeof(DWORD)-modulas) : 0); + size_t possibleVBCMs = 0; - advancePos(pos, remaining, sizeof(DWORD)*2); + while (remaining >= (sizeof(DWORD)*2)) { + mAllocationSize += internal::alignedSize(sizeof(PayloadSpecificFeedbackMessage::VBCM)); + ++possibleVBCMs; - ASSERT(remaining >= length) + size_t length = UseRTPUtils::getBE16(&(pos[6])); + size_t modulas = length % sizeof(DWORD); + size_t padding = ((0 != modulas) ? (sizeof(DWORD)-modulas) : 0); - size_t skipLength = (((length + padding) > remaining) ? remaining : (length + padding)); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - advancePos(pos, remaining, skipLength); - } - ASSERT(0 != possibleVBCMs) + if (remaining < length) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed VBCM payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); + return false; } - pos = report->fci(); - remaining = report->fciSize(); - - { - ASSERT(0 != possibleVBCMs) - - report->mFirstVBCM = new (allocateBuffer(alignedSize(sizeof(VBCM))*possibleVBCMs)) VBCM[possibleVBCMs]; + size_t skipLength = (((length + padding) > remaining) ? remaining : (length + padding)); - while (remaining >= (sizeof(DWORD)*2)) { - VBCM *vcbm = &(report->mFirstVBCM[report->mVBCMCount]); - fillCodecControlCommon(report, vcbm, pos); + internal::advancePos(pos, remaining, skipLength); + } - // move reserved to control specific - vcbm->mControlSpecific = vcbm->mReserved; - vcbm->mReserved = 0; + if (possibleVBCMs < 1) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed VBCM payload specific feedback message (possible VBCMs too small)", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, possibleVBCMs + ); + return false; + } - size_t length = RTPUtils::getBE16(&(pos[6])); - size_t modulas = length % sizeof(DWORD); - size_t padding = ((0 != modulas) ? (sizeof(DWORD)-modulas) : 0); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageAFBAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + return true; + } - advancePos(pos, remaining, sizeof(DWORD)*2); + //------------------------------------------------------------------------- + bool RTCPPacket::getPayloadSpecificFeedbackMessageREMBAllocationSize( + BYTE fmt, + const BYTE *contents, + size_t contentSize + ) + { + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*3)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed REMB payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - ASSERT(remaining >= length) + size_t possibleSSRCs = (remaining - (sizeof(DWORD)*2)) / sizeof(DWORD); - if (length > 0) { - vcbm->mVBCMOctetString = pos; - } + mAllocationSize += (internal::alignedSize(sizeof(DWORD)) * possibleSSRCs); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getXRLossRLEReportBlockAllocationSize( + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + mAllocationSize += internal::alignedSize(sizeof(XR::LossRLEReportBlock)); + + const BYTE *pos = contents; + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed loss RLE report block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - size_t skipLength = (((length + padding) > remaining) ? remaining : (length + padding)); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - advancePos(pos, remaining, skipLength); + size_t possibleChunks = remaining / sizeof(WORD); - ++(report->mVBCMCount); - } + if (0 != possibleChunks) { + mAllocationSize += internal::alignedSize(sizeof(XR::RLEChunk)) * possibleChunks; + } - ASSERT(possibleVBCMs == report->mVBCMCount) - } - return true; + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getXRDuplicateRLEReportBlockAllocationSize( + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + mAllocationSize += internal::alignedSize(sizeof(XR::DuplicateRLEReportBlock)); + + const BYTE *pos = contents; + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed duplicate RLE report block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; } - //------------------------------------------------------------------------- - bool RTCPPacket::parseAFB(PayloadSpecificFeedbackMessage *report) - { - typedef PayloadSpecificFeedbackMessage::AFB AFB; + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + size_t possibleChunks = remaining / sizeof(WORD); - if (remaining > 0) { - report->mAFB.mData = pos; - report->mAFB.mDataSize = remaining; - } - return true; + if (0 != possibleChunks) { + mAllocationSize += internal::alignedSize(sizeof(XR::RLEChunk)) * possibleChunks; } - - //------------------------------------------------------------------------- - bool RTCPPacket::parseREMB(PayloadSpecificFeedbackMessage *report) - { - typedef PayloadSpecificFeedbackMessage::REMB REMB; - if (!parseAFB(report)) return false; - - const BYTE *pos = report->fci(); - size_t remaining = report->fciSize(); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getXRPacketReceiptTimesReportBlockAllocationSize( + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + mAllocationSize += internal::alignedSize(sizeof(XR::PacketReceiptTimesReportBlock)); + + const BYTE *pos = contents; + size_t remaining = contentSize; + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed packet receipt times report block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - report->mHasREMB = true; + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - { - ASSERT(remaining >= sizeof(DWORD)*3) + size_t possibleReceiptTimes = remaining / sizeof(DWORD); - report->mREMB.mNumSSRC = pos[4]; - report->mREMB.mBRExp = RTCP_GET_BITS(pos[5], 0x3F, 2); - report->mREMB.mBRMantissa = RTCP_GET_BITS(RTPUtils::getBE32(&(pos[4])), 0x3FFFF, 0); + if (0 != possibleReceiptTimes) { + mAllocationSize += internal::alignedSize(sizeof(DWORD)) * possibleReceiptTimes; + } - size_t possibleSSRCs = (remaining - sizeof(DWORD)*2) / (sizeof(DWORD)); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getXRReceiverReferenceTimeReportBlockAllocationSize( + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + mAllocationSize += internal::alignedSize(sizeof(XR::ReceiverReferenceTimeReportBlock)); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::getXRDLRRReportBlockAllocationSize( + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + mAllocationSize += internal::alignedSize(sizeof(XR::DLRRReportBlock)); - advancePos(pos, remaining, sizeof(DWORD)*2); + size_t possibleSubBlocks = contentSize / (sizeof(DWORD) + sizeof(DWORD) + sizeof(DWORD)); + if (0 != possibleSubBlocks) { + mAllocationSize += internal::alignedSize(sizeof(XR::DLRRReportBlock::SubBlock)) * possibleSubBlocks; + } + return true; + } - report->mREMB.mSSRCs = new (allocateBuffer(alignedSize(sizeof(DWORD))*possibleSSRCs)) DWORD[possibleSSRCs]; + //------------------------------------------------------------------------- + bool RTCPPacket::getXRStatisticsSummaryReportBlockAllocationSize( + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + mAllocationSize += internal::alignedSize(sizeof(XR::StatisticsSummaryReportBlock)); + return true; + } - size_t count = 0; - while ((possibleSSRCs > 0) && - (count < report->mREMB.numSSRC()) && - (remaining >= sizeof(DWORD))) - { - report->mREMB.mSSRCs[count] = RTPUtils::getBE32(pos); - advancePos(pos, remaining, sizeof(DWORD)); - --possibleSSRCs; - ++count; - } + //------------------------------------------------------------------------- + bool RTCPPacket::getXRVoIPMetricsReportBlockAllocationSize( + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + mAllocationSize += internal::alignedSize(sizeof(XR::VoIPMetricsReportBlock)); + return true; + } - if (count != report->mREMB.numSSRC()) goto illegal_remaining; - return true; - } + //------------------------------------------------------------------------- + bool RTCPPacket::getXRUnknownReportBlockAllocationSize( + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + mAllocationSize += internal::alignedSize(sizeof(XR::UnknownReportBlock)); + return true; + } - illegal_remaining: + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTCPPacket (parsing routines) + #pragma mark + + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + Report * &ioLastReport, + BYTE version, + BYTE padding, + BYTE reportSpecific, + BYTE pt, + const BYTE *contents, + size_t contentSize + ) + { + Report *usingReport = NULL; + + switch (pt) { + case SenderReport::kPayloadType: { + auto temp = &(mFirstSenderReport[mSenderReportCount]);; + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; + } + case ReceiverReport::kPayloadType: { + auto temp = &(mFirstReceiverReport[mReceiverReportCount]); + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; + } + case SDES::kPayloadType: { + auto temp = &(mFirstSDES[mSDESCount]); + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; + } + case Bye::kPayloadType: { + auto temp = &(mFirstBye[mByeCount]); + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; + } + case App::kPayloadType: { + auto temp = &(mFirstApp[mAppCount]); + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; + } + case TransportLayerFeedbackMessage::kPayloadType: { + auto temp = &(mFirstTransportLayerFeedbackMessage[mTransportLayerFeedbackMessageCount]); + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; + } + case PayloadSpecificFeedbackMessage::kPayloadType: { + auto temp = &(mFirstPayloadSpecificFeedbackMessage[mPayloadSpecificFeedbackMessageCount]); + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; + } + case XR::kPayloadType: { + auto temp = &(mFirstXR[mXRCount]); + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; + } + default: { - ZS_LOG_WARNING(Trace, debug("malformed REMB payload specific feedback message") + ZS_PARAM("pos", reinterpret_cast(pos) - reinterpret_cast(report->fci())) + ZS_PARAM("remaining", remaining)) + auto temp = &(mFirstUnknownReport[mUnknownReportCount]); + fill(temp, version, padding, reportSpecific, pt, contents, contentSize); + if (!parse(temp)) return false; + usingReport = temp; + break; } - return false; } - //------------------------------------------------------------------------- - bool RTCPPacket::parseUnknown(PayloadSpecificFeedbackMessage *report) - { - report->mUnknown = report; - return true; + if (NULL != ioLastReport) { + ioLastReport->mNext = usingReport; } - - //------------------------------------------------------------------------- - bool RTCPPacket::parseCommonRange( - XR *xr, - XR::ReportBlockRange *reportBlock - ) - { - const BYTE *pos = reportBlock->typeSpecificContents(); - size_t remaining = reportBlock->typeSpecificContentSize(); - - { - if (remaining < (sizeof(DWORD)*2)) goto illegal_remaining; - reportBlock->mSSRCOfSource = RTPUtils::getBE32(&(pos[0])); - reportBlock->mBeginSeq = RTPUtils::getBE16(&(pos[4])); - reportBlock->mEndSeq = RTPUtils::getBE16(&(pos[6])); + ioLastReport = usingReport; + return true; + } - return true; - } + //------------------------------------------------------------------------- + void RTCPPacket::fill( + Report *report, + BYTE version, + BYTE padding, + BYTE reportSpecific, + BYTE pt, + const BYTE *contents, + size_t contentSize + ) + { + if (contentSize > 0) { + report->mPtr = contents; + report->mSize = contentSize; + } + report->mVersion = version; + report->mPadding = padding; + report->mReportSpecific = reportSpecific; + report->mPT = pt; + } - illegal_remaining: - { - ZS_LOG_WARNING(Trace, debug("malformed report block range") + ZS_PARAM("pos", reinterpret_cast(pos) - reinterpret_cast(reportBlock->typeSpecificContents())) + ZS_PARAM("remaining", remaining)) - } - return false; - } + //------------------------------------------------------------------------- + bool RTCPPacket::parseCommon( + SenderReceiverCommonReport *report, + size_t detailedHeaderSize + ) + { + const BYTE *pos = report->ptr(); + size_t remaining = report->size(); - //------------------------------------------------------------------------- - bool RTCPPacket::parseCommonRLE( - XR *xr, - XR::RLEReportBlock *reportBlock - ) { - const BYTE *pos = reportBlock->typeSpecificContents(); - size_t remaining = reportBlock->typeSpecificContentSize(); + if (remaining < sizeof(DWORD)) goto illegal_size; - if (!parseCommonRange(xr, reportBlock)) return false; + report->mSSRCOfSender = UseRTPUtils::getBE32(pos); - advancePos(pos, remaining, sizeof(DWORD)*2); + internal::advancePos(pos, remaining, sizeof(DWORD)); + + if (remaining < detailedHeaderSize) goto illegal_size; - size_t possibleRLEsCount = (remaining / sizeof(WORD)); + internal::advancePos(pos, remaining, detailedHeaderSize); - if (0 == possibleRLEsCount) return true; + size_t count = 0; - reportBlock->mChunks = new (allocateBuffer(alignedSize(sizeof(XR::RLEChunk)*possibleRLEsCount))) XR::RLEChunk[possibleRLEsCount]; + if (report->rc() > 0) { + report->mFirstReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(SenderReceiverCommonReport::ReportBlock))*report->rc())) SenderReceiverCommonReport::ReportBlock[report->rc()]; - while (remaining >= sizeof(WORD)) - { - XR::RLEChunk value = RTPUtils::getBE16(pos); - advancePos(pos, remaining, sizeof(WORD)); + while ((remaining >= (sizeof(DWORD)*6)) && + (count < report->rc())) + { + SenderReceiverCommonReport::ReportBlock *block = &(report->mFirstReportBlock[count]); + if (0 != count) { + report->mFirstReportBlock[count-1].mNext = block; + } - if (0 == value) break; - reportBlock->mChunks[reportBlock->mChunkCount] = value; - ++(reportBlock->mChunkCount); + block->mSSRC = UseRTPUtils::getBE32(&(pos[0])); + block->mFractionLost = pos[4]; + block->mCumulativeNumberOfPacketsLost = UseRTPUtils::getBE32(&(pos[4])); + block->mCumulativeNumberOfPacketsLost = block->mCumulativeNumberOfPacketsLost & 0x00FFFFFF; + block->mExtendedHighestSequenceNumberReceived = UseRTPUtils::getBE32(&(pos[8])); + block->mInterarrivalJitter = UseRTPUtils::getBE32(&(pos[12])); + block->mLSR = UseRTPUtils::getBE32(&(pos[16])); + block->mDLSR = UseRTPUtils::getBE32(&(pos[20])); + + internal::advancePos(pos, remaining, sizeof(DWORD)*6); + + ++count; + } } - if (0 == reportBlock->mChunkCount) { - reportBlock->mChunks = NULL; + if (count != report->rc()) goto illegal_size; + + if (0 != remaining) { + report->mExtension = pos; + report->mExtensionSize = remaining; } return true; } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - XR *xr, - XR::LossRLEReportBlock *reportBlock - ) - { - return parseCommonRLE(xr, reportBlock); - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - XR *xr, - XR::DuplicateRLEReportBlock *reportBlock - ) - { - return parseCommonRLE(xr, reportBlock); - } - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - XR *xr, - XR::PacketReceiptTimesReportBlock *reportBlock - ) + illegal_size: { - if (!parseCommonRange(xr, reportBlock)) return false; + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "unable to parse sender/receiver report (malformed packet)", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, detailedHeaderSize + ); + } - const BYTE *pos = reportBlock->typeSpecificContents(); - size_t remaining = reportBlock->typeSpecificContentSize(); + return false; + } - advancePos(pos, remaining, sizeof(DWORD)*2); + //------------------------------------------------------------------------- + bool RTCPPacket::parse(SenderReport *report) + { + if (0 != mSenderReportCount) { + (&(mFirstSenderReport[mSenderReportCount-1]))->mNextSenderReport = report; + } + ++mSenderReportCount; - size_t possibleTimes = remaining / sizeof(DWORD); + if (!parseCommon(report, sizeof(DWORD)*5)) return false; - if (0 == possibleTimes) return true; + const BYTE *pos = report->ptr(); - reportBlock->mReceiptTimes = new (allocateBuffer(alignedSize(sizeof(DWORD))*possibleTimes)) DWORD[possibleTimes]; + report->mNTPTimestampMS = UseRTPUtils::getBE32(&(pos[4])); + report->mNTPTimestampLS = UseRTPUtils::getBE32(&(pos[8])); + report->mRTPTimestamp = UseRTPUtils::getBE32(&(pos[12])); + report->mSenderPacketCount = UseRTPUtils::getBE32(&(pos[16])); + report->mSenderOctetCount = UseRTPUtils::getBE32(&(pos[20])); - while (remaining >= sizeof(DWORD)) { - reportBlock->mReceiptTimes[reportBlock->mReceiptTimeCount] = RTPUtils::getBE32(pos); - advancePos(pos, remaining, sizeof(DWORD)); - ++(reportBlock->mReceiptTimeCount); - } + return true; + } - return true; + //------------------------------------------------------------------------- + bool RTCPPacket::parse(ReceiverReport *report) + { + if (0 != mReceiverReportCount) { + (&(mFirstReceiverReport[mReceiverReportCount-1]))->mNextReceiverReport = report; } + ++mReceiverReportCount; - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - XR *xr, - XR::ReceiverReferenceTimeReportBlock *reportBlock - ) - { - const BYTE *pos = reportBlock->typeSpecificContents(); - size_t remaining = reportBlock->typeSpecificContentSize(); + if (!parseCommon(report, 0)) return false; - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed receiver reference time report block") + ZS_PARAM("remain", remaining)) - return false; - } + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse(SDES *report) + { + if (0 != mSDESCount) { + (&(mFirstSDES[mSDESCount-1]))->mNextSDES = report; + } + ++mSDESCount; - reportBlock->mNTPTimestampMS = RTPUtils::getBE32(&(pos[0])); - reportBlock->mNTPTimestampLS = RTPUtils::getBE32(&(pos[4])); + if (0 == report->sc()) return true; - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - XR *xr, - XR::DLRRReportBlock *reportBlock - ) - { - const BYTE *pos = reportBlock->typeSpecificContents(); - size_t remaining = reportBlock->typeSpecificContentSize(); + size_t chunkCount = 0; - size_t possibleSubBlockCount = remaining / (sizeof(DWORD)*3); + const BYTE *pos = report->ptr(); + size_t remaining = report->size(); - if (0 == possibleSubBlockCount) return true; + report->mFirstChunk = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk))*(report->sc()))) SDES::Chunk[report->sc()]; - if (remaining < (sizeof(DWORD)*2)) { - ZS_LOG_WARNING(Trace, debug("malformed dlr report block") + ZS_PARAM("remain", remaining)) - return false; + while ((remaining > sizeof(DWORD)) && + ((chunkCount < report->sc()))) + { + SDES::Chunk *chunk = &(report->mFirstChunk[chunkCount]); + if (0 != chunkCount) { + report->mFirstChunk[chunkCount-1].mNext = chunk; } + ++chunkCount; - reportBlock->mSubBlocks = new (allocateBuffer(alignedSize(sizeof(XR::DLRRReportBlock::SubBlock))*possibleSubBlockCount)) XR::DLRRReportBlock::SubBlock[possibleSubBlockCount]; + ZS_EVENTING_2(x, i, Insane, RTCPPacketParseSDES, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + size_t, chunkCount, chunkCount - 1 + ); - while (remaining >= (sizeof(DWORD)*3)) - { - auto subBlock = &(reportBlock->mSubBlocks[reportBlock->mSubBlockCount]); - - subBlock->mSSRC = RTPUtils::getBE32(&(pos[0])); - subBlock->mLRR = RTPUtils::getBE32(&(pos[4])); - subBlock->mDLRR = RTPUtils::getBE32(&(pos[8])); + chunk->mSSRC = UseRTPUtils::getBE32(pos); + internal::advancePos(pos, remaining, sizeof(DWORD)); - advancePos(pos, remaining, sizeof(DWORD)*3); + const BYTE *startOfItems = pos; + size_t remainingAtStartOfItems = remaining; - ++(reportBlock->mSubBlockCount); - } + // first do an items count + while (remaining >= sizeof(BYTE)) { - ASSERT(reportBlock->mSubBlockCount == possibleSubBlockCount) + BYTE type = *pos; + internal::advancePos(pos, remaining); - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - XR *xr, - XR::StatisticsSummaryReportBlock *reportBlock - ) - { - const BYTE *pos = reportBlock->typeSpecificContents(); - size_t remaining = reportBlock->typeSpecificContentSize(); + if (SDES::Chunk::kEndOfItemsType == type) { + // stop now (going to retry parsing again anyway) + break; + } - parseCommonRange(xr, reportBlock); + ASSERT(remaining >= sizeof(BYTE)) - if (remaining < (sizeof(DWORD)*9)) { - ZS_LOG_TRACE(debug("malformed statistics summary report block") + ZS_PARAM("remaining", remaining)) - return false; - } + size_t length = static_cast(*pos); + internal::advancePos(pos, remaining); - advancePos(pos, remaining, sizeof(DWORD)*2); + ASSERT(remaining >= length) - reportBlock->mLostPackets = RTPUtils::getBE32(&(pos[0])); - reportBlock->mDupPackets = RTPUtils::getBE32(&(pos[4])); - reportBlock->mMinJitter = RTPUtils::getBE32(&(pos[8])); - reportBlock->mMaxJitter = RTPUtils::getBE32(&(pos[12])); - reportBlock->mMeanJitter = RTPUtils::getBE32(&(pos[16])); - reportBlock->mDevJitter = RTPUtils::getBE32(&(pos[20])); + switch (type) { + case SDES::Chunk::CName::kItemType: ++(chunk->mCNameCount); break; + case SDES::Chunk::Name::kItemType: ++(chunk->mNameCount); break; + case SDES::Chunk::Email::kItemType: ++(chunk->mEmailCount); break; + case SDES::Chunk::Phone::kItemType: ++(chunk->mPhoneCount); break; + case SDES::Chunk::Loc::kItemType: ++(chunk->mLocCount); break; + case SDES::Chunk::Tool::kItemType: ++(chunk->mToolCount); break; + case SDES::Chunk::Note::kItemType: ++(chunk->mNoteCount); break; + case SDES::Chunk::Priv::kItemType: ++(chunk->mPrivCount); break; + case SDES::Chunk::Mid::kItemType: ++(chunk->mMidCount); break; + case SDES::Chunk::Rid::kItemType: ++(chunk->mRidCount); break; + default: + { + ++(chunk->mUnknownCount); + ZS_EVENTING_2(x, w, Insane, RTCPPacketParseWarningSDESItemNotUnderstood, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + byte, type, type + ); + break; + } + } - reportBlock->mMinTTLOrHL = pos[24]; - reportBlock->mMaxTTLOrHL = pos[25]; - reportBlock->mMeanTTLOrHL = pos[26]; - reportBlock->mDevTTLOrHL = pos[27]; + internal::advancePos(pos, remaining, length); + } - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - XR *xr, - XR::VoIPMetricsReportBlock *reportBlock - ) - { - const BYTE *pos = reportBlock->typeSpecificContents(); - size_t remaining = reportBlock->typeSpecificContentSize(); + // allocate space for items - if (remaining < (sizeof(DWORD)*8)) { - ZS_LOG_TRACE(debug("malformed voip metrics report block") + ZS_PARAM("remaining", remaining)) - return false; + if (0 != chunk->mCNameCount) { + chunk->mFirstCName = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::CName))*(chunk->mCNameCount))) SDES::Chunk::CName[chunk->mCNameCount]; + } + if (0 != chunk->mNameCount) { + chunk->mFirstName = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Name))*(chunk->mNameCount))) SDES::Chunk::Name[chunk->mNameCount]; + } + if (0 != chunk->mEmailCount) { + chunk->mFirstEmail = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Email))*(chunk->mEmailCount))) SDES::Chunk::Email[chunk->mEmailCount]; + } + if (0 != chunk->mPhoneCount) { + chunk->mFirstPhone = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Phone))*(chunk->mPhoneCount))) SDES::Chunk::Phone[chunk->mPhoneCount]; + } + if (0 != chunk->mLocCount) { + chunk->mFirstLoc = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Loc))*(chunk->mLocCount))) SDES::Chunk::Loc[chunk->mLocCount]; + } + if (0 != chunk->mToolCount) { + chunk->mFirstTool = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Tool))*(chunk->mToolCount))) SDES::Chunk::Tool[chunk->mToolCount]; + } + if (0 != chunk->mNoteCount) { + chunk->mFirstNote = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Note))*(chunk->mNoteCount))) SDES::Chunk::Note[chunk->mNoteCount]; + } + if (0 != chunk->mPrivCount) { + chunk->mFirstPriv = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Priv))*(chunk->mPrivCount))) SDES::Chunk::Priv[chunk->mPrivCount]; + } + if (0 != chunk->mMidCount) { + chunk->mFirstMid = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Mid))*(chunk->mMidCount))) SDES::Chunk::Mid[chunk->mMidCount]; + } + if (0 != chunk->mRidCount) { + chunk->mFirstRid = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Rid))*(chunk->mRidCount))) SDES::Chunk::Rid[chunk->mRidCount]; + } + if (0 != chunk->mUnknownCount) { + chunk->mFirstUnknown = new (allocateBuffer(internal::alignedSize(sizeof(SDES::Chunk::Unknown))*(chunk->mUnknownCount))) SDES::Chunk::Unknown[chunk->mUnknownCount]; } - reportBlock->mSSRCOfSource = RTPUtils::getBE32(&(pos[0])); - reportBlock->mLossRate = pos[4]; - reportBlock->mDiscardRate = pos[5]; - reportBlock->mBurstDensity = pos[6]; - reportBlock->mGapDensity = pos[7]; - reportBlock->mBurstDuration = RTPUtils::getBE16(&(pos[8])); - reportBlock->mGapDuration = RTPUtils::getBE16(&(pos[10])); - reportBlock->mRoundTripDelay = RTPUtils::getBE16(&(pos[12])); - reportBlock->mEndSystemDelay = RTPUtils::getBE16(&(pos[14])); - reportBlock->mSignalLevel = pos[16]; - reportBlock->mNoiseLevel = pos[17]; - reportBlock->mRERL = pos[18]; - reportBlock->mGmin = pos[19]; - reportBlock->mRFactor = pos[20]; - reportBlock->mExtRFactor = pos[21]; - reportBlock->mMOSLQ = pos[22]; - reportBlock->mMOSCQ = pos[23]; - reportBlock->mRXConfig = pos[24]; - reportBlock->mReservedVoIP = pos[25]; - reportBlock->mJBNominal = RTPUtils::getBE16(&(pos[26])); - reportBlock->mJBMaximum = RTPUtils::getBE16(&(pos[28])); - reportBlock->mJBAbsMax = RTPUtils::getBE16(&(pos[30])); - - return true; - } - - //------------------------------------------------------------------------- - bool RTCPPacket::parse( - XR *xr, - XR::UnknownReportBlock *reportBlock - ) - { - return true; - } + chunk->mCNameCount = 0; + chunk->mNameCount = 0; + chunk->mEmailCount = 0; + chunk->mPhoneCount = 0; + chunk->mLocCount = 0; + chunk->mToolCount = 0; + chunk->mNoteCount = 0; + chunk->mPrivCount = 0; + chunk->mMidCount = 0; + chunk->mRidCount = 0; + chunk->mUnknownCount = 0; - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket (writing sizing routines) - #pragma mark + // start over and now parse + pos = startOfItems; + remaining = remainingAtStartOfItems; - //------------------------------------------------------------------------- - void *RTCPPacket::allocateBuffer(size_t size) - { - return internal::allocateBuffer(mAllocationPos, mAllocationSize, size); - } + while (remaining >= sizeof(BYTE)) { - //------------------------------------------------------------------------- - static size_t getPacketSizeSenderReport(const RTCPPacket::SenderReport *report) - { - auto rc = report->rc(); - throwIfGreaterThanBitsAllow(rc, 5); - return (sizeof(DWORD)*2) + (sizeof(DWORD)*5) + ((sizeof(DWORD)*6)*rc) + boundarySize(report->extensionSize()); - } + BYTE type = *pos; + internal::advancePos(pos, remaining); - //------------------------------------------------------------------------- - static size_t getPacketSizeReceiverReport(const RTCPPacket::ReceiverReport *report) - { - auto rc = report->rc(); - throwIfGreaterThanBitsAllow(rc, 5); - return (sizeof(DWORD)*2) + ((sizeof(DWORD)*6)*rc) + boundarySize(report->extensionSize()); - } + if (SDES::Chunk::kEndOfItemsType == type) { + // skip NUL item (no length octet is present) - //------------------------------------------------------------------------- - static size_t getPacketSizeSDES(const RTCPPacket::SDES *report) - { - typedef RTCPPacket::SDES::Chunk Chunk; + // skip to next DWORD alignment + auto diff = reinterpret_cast(pos) - reinterpret_cast(ptr()); + while ((0 != (diff % sizeof(DWORD))) && + (remaining > 0)) + { + // only NUL chunks are allowed + ASSERT(SDES::Chunk::kEndOfItemsType == (*pos)); + internal::advancePos(pos, remaining); + ++diff; + } + break; + } - size_t result = (sizeof(DWORD)); + ASSERT(remaining >= sizeof(BYTE)) - size_t chunkCount = 0; + size_t length = static_cast(*pos); + internal::advancePos(pos, remaining); - for (Chunk *chunk = report->firstChunk(); NULL != chunk; chunk = chunk->next(), ++chunkCount) - { - size_t chunkSize = sizeof(DWORD); + ASSERT(remaining >= length) - for (auto *item = chunk->firstCName(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES CName size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + SDES::Chunk::StringItem *item {}; - for (auto *item = chunk->firstName(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Name size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + const char *prefixStr = NULL; + size_t prefixLen = 0; - for (auto *item = chunk->firstEmail(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Email size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + switch (type) { + case SDES::Chunk::CName::kItemType: { + item = &(chunk->mFirstCName[chunk->mCNameCount]); + if (0 != chunk->mCNameCount) { + (&(chunk->mFirstCName[chunk->mCNameCount-1]))->mNext = item; + } + ++(chunk->mCNameCount); + break; + } + case SDES::Chunk::Name::kItemType: { + item = &(chunk->mFirstName[chunk->mNameCount]); + if (0 != chunk->mNameCount) { + (&(chunk->mFirstName[chunk->mNameCount-1]))->mNext = item; + } + ++(chunk->mNameCount); + break; + } + case SDES::Chunk::Email::kItemType: { + item = &(chunk->mFirstEmail[chunk->mEmailCount]); + if (0 != chunk->mEmailCount) { + (&(chunk->mFirstEmail[chunk->mEmailCount-1]))->mNext = item; + } + ++(chunk->mEmailCount); + break; + } + case SDES::Chunk::Phone::kItemType: { + item = &(chunk->mFirstPhone[chunk->mPhoneCount]); + if (0 != chunk->mPhoneCount) { + (&(chunk->mFirstPhone[chunk->mPhoneCount-1]))->mNext = item; + } + ++(chunk->mPhoneCount); + break; + } + case SDES::Chunk::Loc::kItemType: { + item = &(chunk->mFirstLoc[chunk->mLocCount]); + if (0 != chunk->mLocCount) { + (&(chunk->mFirstLoc[chunk->mLocCount-1]))->mNext = item; + } + ++(chunk->mLocCount); + break; + } + case SDES::Chunk::Tool::kItemType: { + item = &(chunk->mFirstTool[chunk->mToolCount]); + if (0 != chunk->mToolCount) { + (&(chunk->mFirstTool[chunk->mToolCount-1]))->mNext = item; + } + ++(chunk->mToolCount); + break; + } + case SDES::Chunk::Note::kItemType: { + item = &(chunk->mFirstNote[chunk->mNoteCount]); + if (0 != chunk->mNoteCount) { + (&(chunk->mFirstNote[chunk->mNoteCount-1]))->mNext = item; + } + ++(chunk->mNoteCount); + break; + } + case SDES::Chunk::Priv::kItemType: { + SDES::Chunk::Priv *priv = &(chunk->mFirstPriv[chunk->mPrivCount]); + if (0 != chunk->mPrivCount) { + (&(chunk->mFirstPriv[chunk->mPrivCount-1]))->mNext = priv; + } - for (auto *item = chunk->firstPhone(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Phone size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + if (length > 0) { + prefixLen = static_cast(*pos); + internal::advancePos(pos, remaining); + --length; + if (0 != prefixLen) { + priv->mPrefix = new (allocateBuffer(sizeof(char)*(prefixLen+1))) char [prefixLen+1]; + priv->mPrefixLength = prefixLen; + memcpy(const_cast(priv->mPrefix), pos, prefixLen); + + internal::advancePos(pos, remaining, prefixLen); + ASSERT(length >= prefixLen) + + length -= prefixLen; + } + } - for (auto *item = chunk->firstLoc(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Loc size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + item = priv; - for (auto *item = chunk->firstTool(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Tool size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + ++(chunk->mPrivCount); + break; + } + case SDES::Chunk::Mid::kItemType: { + item = &(chunk->mFirstMid[chunk->mMidCount]); + if (0 != chunk->mMidCount) { + (&(chunk->mFirstMid[chunk->mMidCount-1]))->mNext = item; + } + ++(chunk->mMidCount); + break; + } + case SDES::Chunk::Rid::kItemType: { + item = &(chunk->mFirstRid[chunk->mRidCount]); + if (0 != chunk->mRidCount) { + (&(chunk->mFirstRid[chunk->mRidCount-1]))->mNext = item; + } + ++(chunk->mRidCount); + break; + } + default: + { + item = &(chunk->mFirstUnknown[chunk->mUnknownCount]); + if (0 != chunk->mUnknownCount) { + (&(chunk->mFirstUnknown[chunk->mUnknownCount-1]))->mNext = item; + } + ++(chunk->mUnknownCount); + ZS_EVENTING_2(x, w, Insane, RTCPPacketParseSDESItemTypeNotUnderstood, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + byte, type, type + ); + break; + } } - for (auto *item = chunk->firstNote(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Note size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + if (NULL != item) { + item->mType = type; + if (length > 0) { + item->mValue = new (allocateBuffer(length+1)) char [length+1]; + item->mLength = length; + memcpy(const_cast(item->mValue), pos, length); + } + if (NULL != prefixStr) { + ZS_EVENTING_7(x, i, Insane, RTCPPacketParseSDESPrefixItemPrefix, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, type, item->typeToString(), + size_t, chunkCount, chunkCount, + size_t, prefixLen, prefixLen, + string, prefixStr, prefixStr, + size_t, length, length, + string, value, (NULL != item->mValue ? item->mValue : NULL) + ); + } else { + ZS_EVENTING_5(x, i, Insane, RTCPPacketParseSDESItemPrefix, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, type, item->typeToString(), + size_t, chunkCount, chunkCount, + size_t, length, length, + string, value, (NULL != item->mValue ? item->mValue : NULL) + ); + } } - for (auto *item = chunk->firstPriv(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len1 = (NULL != item->mValue ? strlen(item->mValue) : 0); - size_t len2 = (NULL != item->mPrefix ? strlen(item->mPrefix) : 0); - - size_t totalLen = len1 + len2; - if (0 != totalLen) ++totalLen; + ++(chunk->mCount); - throwIfGreaterThanBitsAllow(totalLen, 8); - chunkSize += ((sizeof(BYTE))*totalLen); - ZS_LOG_INSANE(packet_slog("get packet SDES Priv size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("prefix len", len2) + ZS_PARAM("prefix", (NULL != item->mPrefix ? item->mPrefix : NULL)) + ZS_PARAM("len", len1) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + internal::advancePos(pos, remaining, length); + } - for (auto *item = chunk->firstMid(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Mid size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + } - for (auto *item = chunk->firstRid(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Rid size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } - for (auto *item = chunk->firstUnknown(); NULL != item; item = item->next()) - { - chunkSize += (sizeof(BYTE)*2); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - throwIfGreaterThanBitsAllow(len, 8); - chunkSize += ((sizeof(BYTE))*len); - ZS_LOG_INSANE(packet_slog("get packet SDES Unknown size") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + if (chunkCount != report->sc()) { + ZS_EVENTING_3(x, w, Trace, RTCPPacketParseSDESChunkCountAndPacketCountMismatch, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + size_t, chunkCount, chunkCount, + size_t, sc, report->sc() + ); + return false; + } - size_t modulas = chunkSize % sizeof(DWORD); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse(Bye *report) + { + if (0 != mByeCount) { + (&(mFirstBye[mByeCount-1]))->mNextBye = report; + } + ++mByeCount; - if ((chunkSize == sizeof(DWORD)) || - (0 == modulas)) { - chunkSize += sizeof(DWORD); - } + const BYTE *pos = report->ptr(); + size_t remaining = report->size(); - result += boundarySize(chunkSize); + if (NULL == pos) { + if (0 != report->sc()) { + ZS_EVENTING_2(x, w, Trace, RTCPPacketParseByeReportCountMissingSSRCs, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + size_t, sc, report->sc() + ); + trace("BYE report count > 0 but does not contain SSRCs"); + return false; } - throwIfGreaterThanBitsAllow(chunkCount, 5); - return result; + return true; + } + + if (0 != report->sc()) { + report->mSSRCs = new (allocateBuffer(internal::alignedSize(sizeof(DWORD))*(report->sc()))) DWORD[report->sc()]; } - //------------------------------------------------------------------------- - static size_t getPacketSizeBye(const RTCPPacket::Bye *report) { - auto sc = report->sc(); - throwIfGreaterThanBitsAllow(sc, 5); + size_t index = 0; - size_t result = (sizeof(DWORD)) + (sizeof(DWORD)*sc); + while (index < report->sc()) { + if (remaining < sizeof(DWORD)) goto illegal_remaining; - if (NULL != report->reasonForLeaving()) { - size_t len = strlen(report->reasonForLeaving()); - if (len > 0) { - throwIfGreaterThanBitsAllow(len, 8); - result += sizeof(BYTE)+(sizeof(BYTE)*len); + report->mSSRCs[index] = UseRTPUtils::getBE32(pos); + internal::advancePos(pos, remaining, sizeof(DWORD)); + ++index; + } + + if (remaining > sizeof(BYTE)) { + size_t length = static_cast(*pos); + internal::advancePos(pos, remaining); + + if (remaining < length) goto illegal_remaining; + + if (length > 0) { + report->mReasonForLeaving = new (allocateBuffer(internal::alignedSize((sizeof(char)*length)+sizeof(char)))) char[length+1]; + memcpy(const_cast(report->mReasonForLeaving), pos, length); } } - return boundarySize(result); + return true; } - //------------------------------------------------------------------------- - static size_t getPacketSizeApp(const RTCPPacket::App *report) + illegal_remaining: { - size_t result = (sizeof(DWORD)*3); - - auto dataSize = report->dataSize(); - if (0 != dataSize) { - ORTC_THROW_INVALID_PARAMETERS_IF(NULL == report->mData) - result += dataSize; - } + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed BYE", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, (reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ); + } + return false; + } - return boundarySize(result); + //------------------------------------------------------------------------- + bool RTCPPacket::parse(App *report) + { + if (0 != mAppCount) { + (&(mFirstApp[mAppCount-1]))->mNextApp = report; } - - //------------------------------------------------------------------------- - static size_t getPacketSizeTransportLayerFeedbackMessage(const RTCPPacket::TransportLayerFeedbackMessage *fm) + ++mAppCount; + + const BYTE *pos = report->ptr(); + size_t remaining = report->size(); + { - typedef RTCPPacket::TransportLayerFeedbackMessage TransportLayerFeedbackMessage; - typedef RTCPPacket::TransportLayerFeedbackMessage::GenericNACK GenericNACK; - typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBR TMMBR; - typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBN TMMBN; + if (remaining < sizeof(DWORD)) goto illegal_remaining; - size_t result = (sizeof(DWORD)*3); + report->mSSRC = UseRTPUtils::getBE32(pos); + internal::advancePos(pos, remaining, sizeof(DWORD)); - switch (fm->fmt()) { - case GenericNACK::kFmt: - { - auto count = fm->genericNACKCount(); - throwIfLessThan(count, 1); - result += ((sizeof(DWORD))*(count)); - break; - } - case TMMBR::kFmt: - { - auto count = fm->tmmbrCount(); - throwIfLessThan(count, 1); - result += ((sizeof(DWORD)*2)*(count)); - break; - } - case TMMBN::kFmt: - { - auto count = fm->tmmbnCount(); - result += ((sizeof(DWORD)*2)*(count)); - break; - } - default: - { - auto fciSize = fm->fciSize(); - if (0 != fciSize) { - ORTC_THROW_INVALID_PARAMETERS_IF(NULL == fm->fci()) - result += fciSize; - } - break; - } + if (remaining < sizeof(DWORD)) goto illegal_remaining; + + for (size_t index = 0; index < sizeof(DWORD); ++index) { + report->mName[index] = static_cast(pos[index]); } + internal::advancePos(pos, remaining, sizeof(DWORD)); - ZS_LOG_INSANE(packet_slog("getting transport layer feedback message packet size") + ZS_PARAM("fmt", fm->fmtToString()) + ZS_PARAM("fmt (number)", fm->reportSpecific()) + ZS_PARAM("size", result)) + if (0 != remaining) { + report->mData = pos; + report->mDataSize = remaining; + } - return boundarySize(result); + return true; } - //------------------------------------------------------------------------- - static size_t getPacketSizePayloadSpecificFeedbackMessage(const RTCPPacket::PayloadSpecificFeedbackMessage *fm) + illegal_remaining: { - typedef RTCPPacket::PayloadSpecificFeedbackMessage PayloadSpecificFeedbackMessage; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::PLI PLI; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::SLI SLI; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::RPSI RPSI; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::FIR FIR; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTR TSTR; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTN TSTN; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::VBCM VBCM; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::AFB AFB; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::REMB REMB; + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed APP", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, (reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ); + } + return false; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse(TransportLayerFeedbackMessage *report) + { + if (0 != mTransportLayerFeedbackMessageCount) { + (&(mFirstTransportLayerFeedbackMessage[mTransportLayerFeedbackMessageCount-1]))->mNextTransportLayerFeedbackMessage = report; + } + ++mTransportLayerFeedbackMessageCount; - size_t result = (sizeof(DWORD)*3); + const BYTE *pos = report->ptr(); + size_t remaining = report->size(); - switch (fm->fmt()) { - case PLI::kFmt: - { - break; - } - case SLI::kFmt: - { - auto count = fm->sliCount(); - throwIfLessThan(count, 1); - result += (sizeof(DWORD)*(count)); - break; - } - case RPSI::kFmt: - { - auto rpsi = fm->rpsi(); - ORTC_THROW_INVALID_PARAMETERS_IF(NULL == rpsi) - result += sizeof(WORD) + (rpsi->nativeRPSIBitStringSizeInBits()/8); - if (0 != (rpsi->nativeRPSIBitStringSizeInBits()%8)) ++result; - break; - } - case FIR::kFmt: - { - auto count = fm->firCount(); - throwIfLessThan(count, 1); - result += ((sizeof(DWORD)*2)*(count)); - break; - } - case TSTR::kFmt: - { - auto count = fm->tstrCount(); - throwIfLessThan(count, 1); - result += ((sizeof(DWORD)*2)*(count)); - break; - } - case TSTN::kFmt: - { - auto count = fm->tstnCount(); - throwIfLessThan(count, 1); - result += ((sizeof(DWORD)*2)*(count)); - break; - } - case VBCM::kFmt: - { - auto count = fm->vbcmCount(); - throwIfLessThan(count, 1); - for (size_t index = 0; index < count; ++index) - { - auto vbcm = fm->vbcmAtIndex(index); - ORTC_THROW_INVALID_PARAMETERS_IF(NULL == vbcm) + { + if (remaining < (sizeof(DWORD)*2)) goto illegal_remaining; - size_t size = (sizeof(DWORD)*2) + (vbcm->vbcmOctetStringSize()*sizeof(BYTE)); - result += boundarySize(size); - } - break; - } - case AFB::kFmt: - { - auto remb = fm->remb(); - if (NULL == remb) { - auto afb = fm->afb(); - ORTC_THROW_INVALID_PARAMETERS_IF(NULL == afb) + fill(report, pos, remaining); - result += afb->dataSize(); - } else { - result += (sizeof(DWORD)*2); - size_t numSSRCs = remb->numSSRC(); - throwIfGreaterThanBitsAllow(numSSRCs, 8); - throwIfLessThan(numSSRCs, 1); - result += ((sizeof(DWORD))*numSSRCs); - } - break; - } - default: - { - auto fciSize = fm->fciSize(); - if (0 != fciSize) { - ORTC_THROW_INVALID_PARAMETERS_IF(NULL == fm->fci()) - result += fciSize; - } + bool result = false; + + switch (report->fmt()) { + case TransportLayerFeedbackMessage::GenericNACK::kFmt: result = parseGenericNACK(report); break; + case TransportLayerFeedbackMessage::TMMBR::kFmt: result = parseTMMBR(report); break; + case TransportLayerFeedbackMessage::TMMBN::kFmt: result = parseTMMBN(report); break; + default: { + result = parseUnknown(report); break; } } - ZS_LOG_INSANE(packet_slog("getting payload specific feedback message packet size") + ZS_PARAM("fmt", fm->fmtToString()) + ZS_PARAM("fmt (number)", fm->reportSpecific()) + ZS_PARAM("size", result)) + ZS_EVENTING_3(x, i, Insane, RTCPPacketParseTransportLayerFeedbackMessage, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, fmt, report->fmtToString(), + byte, fmtNumber, report->reportSpecific() + ); + return true; + } - return boundarySize(result); + illegal_remaining: + { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed transport layer feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, (reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ); + } + return false; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse(PayloadSpecificFeedbackMessage *report) + { + if (0 != mPayloadSpecificFeedbackMessageCount) { + (&(mFirstPayloadSpecificFeedbackMessage[mPayloadSpecificFeedbackMessageCount-1]))->mNextPayloadSpecificFeedbackMessage = report; } + ++mPayloadSpecificFeedbackMessageCount; + + const BYTE *pos = report->ptr(); + size_t remaining = report->size(); - //------------------------------------------------------------------------- - static size_t getPacketSizeXR(const RTCPPacket::XR *report) { - typedef RTCPPacket::XR XR; - typedef RTCPPacket::XR::ReportBlock ReportBlock; - typedef RTCPPacket::XR::LossRLEReportBlock LossRLEReportBlock; - typedef RTCPPacket::XR::DuplicateRLEReportBlock DuplicateRLEReportBlock; - typedef RTCPPacket::XR::PacketReceiptTimesReportBlock PacketReceiptTimesReportBlock; - typedef RTCPPacket::XR::ReceiverReferenceTimeReportBlock ReceiverReferenceTimeReportBlock; - typedef RTCPPacket::XR::DLRRReportBlock DLRRReportBlock; - typedef RTCPPacket::XR::StatisticsSummaryReportBlock StatisticsSummaryReportBlock; - typedef RTCPPacket::XR::VoIPMetricsReportBlock VoIPMetricsReportBlock; - typedef RTCPPacket::XR::UnknownReportBlock UnknownReportBlock; + if (remaining < (sizeof(DWORD)*2)) goto illegal_remaining; - size_t result = (sizeof(DWORD)*2); + fill(report, pos, remaining); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - for (const ReportBlock *reportBlock = report->firstReportBlock(); NULL != reportBlock; reportBlock = reportBlock->next()) - { - size_t preSize = result; + bool result = false; - switch (reportBlock->mBlockType) { - case LossRLEReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); - result += (sizeof(DWORD)*3); - result += boundarySize(sizeof(WORD)*(block->chunkCount())); - break; - } - case DuplicateRLEReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); - result += (sizeof(DWORD)*3); - result += boundarySize(sizeof(WORD)*(block->chunkCount())); - break; - } - case PacketReceiptTimesReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); - result += (sizeof(DWORD)*3); - result += (sizeof(DWORD)*(block->receiptTimeCount())); - break; - } - case ReceiverReferenceTimeReportBlock::kBlockType: - { - result += (sizeof(DWORD)*3); - break; - } - case DLRRReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); - result += (sizeof(DWORD)); - result += ((sizeof(DWORD)*3)*(block->subBlockCount())); - break; - } - case StatisticsSummaryReportBlock::kBlockType: + switch (report->fmt()) { + case PayloadSpecificFeedbackMessage::PLI::kFmt: result = parsePLI(report); break; + case PayloadSpecificFeedbackMessage::SLI::kFmt: result = parseSLI(report); break; + case PayloadSpecificFeedbackMessage::RPSI::kFmt: result = parseRPSI(report); break; + case PayloadSpecificFeedbackMessage::FIR::kFmt: result = parseFIR(report); break; + case PayloadSpecificFeedbackMessage::TSTR::kFmt: result = parseTSTR(report); break; + case PayloadSpecificFeedbackMessage::TSTN::kFmt: result = parseTSTN(report); break; + case PayloadSpecificFeedbackMessage::VBCM::kFmt: result = parseVBCM(report); break; + case PayloadSpecificFeedbackMessage::AFB::kFmt: { { - result += (sizeof(DWORD)*10); + if (remaining < sizeof(DWORD)) goto generic_afb; + if (0 != memcmp(pos, reinterpret_cast("REMB"), sizeof(DWORD))) goto generic_afb; + + result = parseREMB(report); break; } - case VoIPMetricsReportBlock::kBlockType: + generic_afb: { - result += (sizeof(DWORD)*9); + result = parseAFB(report); break; } - default: - { - result += (sizeof(DWORD)) + boundarySize(reportBlock->mTypeSpecificContentSize); - } } - - ZS_LOG_INSANE(packet_slog("XR block packet size") + ZS_PARAM("block type", reportBlock->blockTypeToString()) + ZS_PARAM("block type (number)", reportBlock->blockType()) + ZS_PARAM("size", result - preSize)) + default: { + result = parseUnknown(report); + break; + } } - return boundarySize(result); + ZS_EVENTING_3(x, i, Insane, RTCPPacketParsePayloadSpecificFeedbackMessage, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, fmt, report->fmtToString(), + byte, fmtNumber, report->reportSpecific() + ); + return true; } - //------------------------------------------------------------------------- - size_t RTCPPacket::getPacketSize(const Report *first) + illegal_remaining: + { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, (reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ); + } + return false; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse(XR *report) + { + if (0 != mXRCount) { + (&(mFirstXR[mXRCount-1]))->mNextXR = report; + } + ++mXRCount; + + const BYTE *pos = report->ptr(); + size_t remaining = report->size(); + { - size_t result = 0; + if (remaining < sizeof(DWORD)) goto illegal_remaining; - const Report *final = NULL; + report->mSSRC = UseRTPUtils::getBE32(pos); + internal::advancePos(pos, remaining, sizeof(DWORD)); - for (const Report *report = first; NULL != report; report = report->next()) - { - final = report; + // first count the totals for each XR block type + while (remaining >= sizeof(DWORD)) { + + BYTE bt = pos[0]; + size_t blockLength = static_cast(UseRTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD); - size_t beforeSize = result; + internal::advancePos(pos, remaining, sizeof(DWORD)); - switch (report->pt()) { - case SenderReport::kPayloadType: + ++report->mReportBlockCount; + + if (remaining < blockLength) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "illegal XR block length found", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, blockLength + ); + return false; + } + + switch (bt) { + case XR::LossRLEReportBlock::kBlockType: ++(report->mLossRLEReportBlockCount); break; + case XR::DuplicateRLEReportBlock::kBlockType: ++(report->mDuplicateRLEReportBlockCount); break; + case XR::PacketReceiptTimesReportBlock::kBlockType: ++(report->mPacketReceiptTimesReportBlockCount); break; + case XR::ReceiverReferenceTimeReportBlock::kBlockType: ++(report->mReceiverReferenceTimeReportBlockCount); break; + case XR::DLRRReportBlock::kBlockType: ++(report->mDLRRReportBlockCount); break; + case XR::StatisticsSummaryReportBlock::kBlockType: ++(report->mStatisticsSummaryReportBlockCount); break; + case XR::VoIPMetricsReportBlock::kBlockType: ++(report->mVoIPMetricsReportBlockCount); break; + default: { - const SenderReport *sr = static_cast(report); - result += internal::getPacketSizeSenderReport(sr); + ++(report->mUnknownReportBlockCount); break; break; } - case ReceiverReport::kPayloadType: - { - const ReceiverReport *rr = static_cast(report); - result += internal::getPacketSizeReceiverReport(rr); + } + + internal::advancePos(pos, remaining, blockLength); + } + + if (0 != report->mLossRLEReportBlockCount) { + report->mFirstLossRLEReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(XR::LossRLEReportBlock))*(report->mLossRLEReportBlockCount))) XR::LossRLEReportBlock[report->mLossRLEReportBlockCount]; + } + if (0 != report->mDuplicateRLEReportBlockCount) { + report->mFirstDuplicateRLEReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(XR::DuplicateRLEReportBlock))*(report->mDuplicateRLEReportBlockCount))) XR::DuplicateRLEReportBlock[report->mDuplicateRLEReportBlockCount]; + } + if (0 != report->mPacketReceiptTimesReportBlockCount) { + report->mFirstPacketReceiptTimesReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(XR::PacketReceiptTimesReportBlock))*(report->mPacketReceiptTimesReportBlockCount))) XR::PacketReceiptTimesReportBlock[report->mPacketReceiptTimesReportBlockCount]; + } + if (0 != report->mReceiverReferenceTimeReportBlockCount) { + report->mFirstReceiverReferenceTimeReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(XR::ReceiverReferenceTimeReportBlock))*(report->mReceiverReferenceTimeReportBlockCount))) XR::ReceiverReferenceTimeReportBlock[report->mReceiverReferenceTimeReportBlockCount]; + } + if (0 != report->mDLRRReportBlockCount) { + report->mFirstDLRRReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(XR::DLRRReportBlock))*(report->mDLRRReportBlockCount))) XR::DLRRReportBlock[report->mDLRRReportBlockCount]; + } + if (0 != report->mStatisticsSummaryReportBlockCount) { + report->mFirstStatisticsSummaryReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(XR::StatisticsSummaryReportBlock))*(report->mStatisticsSummaryReportBlockCount))) XR::StatisticsSummaryReportBlock[report->mStatisticsSummaryReportBlockCount]; + } + if (0 != report->mVoIPMetricsReportBlockCount) { + report->mFirstVoIPMetricsReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(XR::VoIPMetricsReportBlock))*(report->mVoIPMetricsReportBlockCount))) XR::VoIPMetricsReportBlock[report->mVoIPMetricsReportBlockCount]; + } + if (0 != report->mUnknownReportBlockCount) { + report->mFirstUnknownReportBlock = new (allocateBuffer(internal::alignedSize(sizeof(XR::UnknownReportBlock))*(report->mUnknownReportBlockCount))) XR::UnknownReportBlock[report->mUnknownReportBlockCount]; + } + + report->mLossRLEReportBlockCount = 0; + report->mDuplicateRLEReportBlockCount = 0; + report->mPacketReceiptTimesReportBlockCount = 0; + report->mReceiverReferenceTimeReportBlockCount = 0; + report->mDLRRReportBlockCount = 0; + report->mStatisticsSummaryReportBlockCount = 0; + report->mVoIPMetricsReportBlockCount = 0; + report->mUnknownReportBlockCount = 0; + + XR::ReportBlock *previousReportBlock = NULL; + + // reset to start of buffer + pos = report->ptr(); + remaining = report->size(); + + internal::advancePos(pos, remaining, sizeof(DWORD)); + + // parse each XR report block + while (remaining >= sizeof(DWORD)) { + const BYTE *prePos = pos; + size_t preAllocationSize = mAllocationSize; + + BYTE bt = pos[0]; + BYTE typeSpecific = pos[1]; + size_t blockLength = static_cast(UseRTPUtils::getBE16(&(pos[2]))) * sizeof(DWORD); + + internal::advancePos(pos, remaining, sizeof(DWORD)); + + if (remaining < blockLength) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed XR block length found", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, blockLength + ); + return false; + } + + XR::ReportBlock *usingBlock = NULL; + + switch (bt) { + case XR::LossRLEReportBlock::kBlockType: { + auto reportBlock = &(report->mFirstLossRLEReportBlock[report->mLossRLEReportBlockCount]); + usingBlock = reportBlock; + if (0 != report->mLossRLEReportBlockCount) { + (&(report->mFirstLossRLEReportBlock[report->mLossRLEReportBlockCount-1]))->mNextLossRLE = reportBlock; + } + ++(report->mLossRLEReportBlockCount); + fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); + if (!parse(report, reportBlock)) return false; break; } - case SDES::kPayloadType: - { - const SDES *sdes = static_cast(report); - result += internal::getPacketSizeSDES(sdes); + case XR::DuplicateRLEReportBlock::kBlockType: { + auto reportBlock = &(report->mFirstDuplicateRLEReportBlock[report->mDuplicateRLEReportBlockCount]); + usingBlock = reportBlock; + if (0 != report->mDuplicateRLEReportBlockCount) { + (&(report->mFirstDuplicateRLEReportBlock[report->mDuplicateRLEReportBlockCount-1]))->mNextDuplicateRLE = reportBlock; + } + ++(report->mDuplicateRLEReportBlockCount); + fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); + if (!parse(report, reportBlock)) return false; break; } - case Bye::kPayloadType: - { - const Bye *bye = static_cast(report); - result += internal::getPacketSizeBye(bye); + case XR::PacketReceiptTimesReportBlock::kBlockType: { + auto reportBlock = &(report->mFirstPacketReceiptTimesReportBlock[report->mPacketReceiptTimesReportBlockCount]); + usingBlock = reportBlock; + if (0 != report->mPacketReceiptTimesReportBlockCount) { + (&(report->mFirstPacketReceiptTimesReportBlock[report->mPacketReceiptTimesReportBlockCount-1]))->mNextPacketReceiptTimesReportBlock = reportBlock; + } + ++(report->mPacketReceiptTimesReportBlockCount); + fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); + if (!parse(report, reportBlock)) return false; break; } - case App::kPayloadType: - { - const App *app = static_cast(report); - result += internal::getPacketSizeApp(app); + case XR::ReceiverReferenceTimeReportBlock::kBlockType: { + auto reportBlock = &(report->mFirstReceiverReferenceTimeReportBlock[report->mReceiverReferenceTimeReportBlockCount]); + usingBlock = reportBlock; + if (0 != report->mReceiverReferenceTimeReportBlockCount) { + (&(report->mFirstReceiverReferenceTimeReportBlock[report->mReceiverReferenceTimeReportBlockCount-1]))->mNextReceiverReferenceTimeReportBlock = reportBlock; + } + ++(report->mReceiverReferenceTimeReportBlockCount); + fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); + if (!parse(report, reportBlock)) return false; break; } - case TransportLayerFeedbackMessage::kPayloadType: - { - const TransportLayerFeedbackMessage *fm = static_cast(report); - result += internal::getPacketSizeTransportLayerFeedbackMessage(fm); + case XR::DLRRReportBlock::kBlockType: { + auto reportBlock = &(report->mFirstDLRRReportBlock[report->mDLRRReportBlockCount]); + usingBlock = reportBlock; + if (0 != report->mDLRRReportBlockCount) { + (&(report->mFirstDLRRReportBlock[report->mDLRRReportBlockCount-1]))->mNextDLRRReportBlock = reportBlock; + } + ++(report->mDLRRReportBlockCount); + fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); + if (!parse(report, reportBlock)) return false; break; } - case PayloadSpecificFeedbackMessage::kPayloadType: - { - const PayloadSpecificFeedbackMessage *fm = static_cast(report); - result += internal::getPacketSizePayloadSpecificFeedbackMessage(fm); + case XR::StatisticsSummaryReportBlock::kBlockType: { + auto reportBlock = &(report->mFirstStatisticsSummaryReportBlock[report->mStatisticsSummaryReportBlockCount]); + usingBlock = reportBlock; + if (0 != report->mStatisticsSummaryReportBlockCount) { + (&(report->mFirstStatisticsSummaryReportBlock[report->mStatisticsSummaryReportBlockCount-1]))->mNextStatisticsSummaryReportBlock = reportBlock; + } + ++(report->mStatisticsSummaryReportBlockCount); + fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); + if (!parse(report, reportBlock)) return false; break; } - case XR::kPayloadType: - { - const XR *xr = static_cast(report); - result += internal::getPacketSizeXR(xr); + case XR::VoIPMetricsReportBlock::kBlockType: { + auto reportBlock = &(report->mFirstVoIPMetricsReportBlock[report->mVoIPMetricsReportBlockCount]); + usingBlock = reportBlock; + if (0 != report->mVoIPMetricsReportBlockCount) { + (&(report->mFirstVoIPMetricsReportBlock[report->mVoIPMetricsReportBlockCount-1]))->mNextVoIPMetricsReportBlock = reportBlock; + } + ++(report->mVoIPMetricsReportBlockCount); + fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); + if (!parse(report, reportBlock)) return false; break; } - default: - { - result += sizeof(DWORD) + boundarySize(report->size()); + default: { + auto reportBlock = &(report->mFirstUnknownReportBlock[report->mUnknownReportBlockCount]); + usingBlock = reportBlock; + if (0 != report->mUnknownReportBlockCount) { + (&(report->mFirstUnknownReportBlock[report->mUnknownReportBlockCount-1]))->mNextUnknownReportBlock = reportBlock; + } + ++(report->mUnknownReportBlockCount); + fill(report, reportBlock, previousReportBlock, bt, typeSpecific, pos, blockLength); + if (!parse(report, reportBlock)) return false; break; } } - size_t afterSize = result; + internal::advancePos(pos, remaining, blockLength); - if (ZS_IS_LOGGING(Insane)) { - ZS_LOG_TRACE(slog("getting report packet size") + ZS_PARAM("pt", report->ptToString()) + ZS_PARAM("pt (num)", report->pt()) + ZS_PARAM("size", afterSize-beforeSize)) - } + ZS_EVENTING_5(x, i, Insane, RTCPPacketParseXR, ol, RtcpPacket, Parse, + puid, mediaChannelID, mMediaChannelID, + string, blockType, usingBlock->blockTypeToString(), + size_t, blockLength, blockLength, + size_t, consumed, (reinterpret_cast(pos) - reinterpret_cast(prePos)), + size_t, allocationConsumed, preAllocationSize - mAllocationSize + ); } - if (NULL != final) { - auto padding = final->padding(); - if (0 != padding) { - result += padding; - } - } + return true; + } - return boundarySize(result); + illegal_remaining: + { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed XR when parsing", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, (reinterpret_cast(pos) - reinterpret_cast(report->ptr())) + ); } + return false; + } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket (packet writing routines) - #pragma mark + //------------------------------------------------------------------------- + bool RTCPPacket::parse(UnknownReport *report) + { + if (0 != mUnknownReportCount) { + (&(mFirstUnknownReport[mUnknownReportCount-1]))->mNextUnknown = report; + } + ++mUnknownReportCount; - //------------------------------------------------------------------------- - static void writePacketHeader(const RTCPPacket::Report *report, BYTE * &pos, size_t &remaining) - { - ASSERT(remaining >= sizeof(DWORD)) - ASSERT(2 == report->version()) + return true; + } + + //------------------------------------------------------------------------- + void RTCPPacket::fill(FeedbackMessage *report, const BYTE *contents, size_t contentSize) + { + const BYTE *pos = contents; + size_t remaining = contentSize; - auto padding = report->padding(); - if (0 != padding) { - ASSERT(NULL == report->next()) - ASSERT(throwIfGreaterThanBitsAllow(padding, 8)) - } + report->mSSRCOfPacketSender = UseRTPUtils::getBE32(&(pos[0])); + report->mSSRCOfMediaSource = UseRTPUtils::getBE32(&(pos[4])); - ASSERT(throwIfGreaterThanBitsAllow(report->reportSpecific(), 5)) + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - pos[0] = RTCP_PACK_BITS(report->version(), 0x3, 6) | - ((0 != padding) ? RTCP_PACK_BITS(1, 0x1, 5) : 0) | - RTCP_PACK_BITS(report->reportSpecific(), 0x1F, 0); - pos[1] = report->pt(); + if (remaining > sizeof(BYTE)) { + report->mFCI = pos; + report->mFCISize = remaining; } + } - //------------------------------------------------------------------------- - static void writePacketSenderReceiverCommonReport(const RTCPPacket::SenderReceiverCommonReport *report, BYTE * &pos, size_t &remaining) - { - typedef RTCPPacket::SenderReceiverCommonReport SenderReceiverCommonReport; - typedef RTCPPacket::SenderReceiverCommonReport::ReportBlock ReportBlock; + //------------------------------------------------------------------------- + void RTCPPacket::fill( + XR *report, + XR::ReportBlock *reportBlock, + XR::ReportBlock * &ioPreviousReportBlock, + BYTE blockType, + BYTE typeSpecific, + const BYTE *contents, + size_t contentSize + ) + { + reportBlock->mBlockType = blockType; + reportBlock->mTypeSpecific = typeSpecific; + if (0 != contentSize) { + reportBlock->mTypeSpecificContents = contents; + reportBlock->mTypeSpecificContentSize = contentSize; + } - size_t count = 0; - for (const ReportBlock *block = report->firstReportBlock(); NULL != block; block = block->next(), ++count) - { - ASSERT(count < report->rc()) + if (NULL == report->mFirstReportBlock) { + report->mFirstReportBlock = reportBlock; + } + if (NULL != ioPreviousReportBlock) { + ioPreviousReportBlock->mNext = reportBlock; + } + ioPreviousReportBlock = reportBlock; + } - RTPUtils::setBE32(&(pos[0]), block->ssrc()); - ASSERT(throwIfGreaterThanBitsAllow(block->cumulativeNumberOfPacketsLost(), 24)) - RTPUtils::setBE32(&(pos[4]), block->cumulativeNumberOfPacketsLost()); - pos[4] = block->fractionLost(); - RTPUtils::setBE32(&(pos[8]), block->extendedHighestSequenceNumberReceived()); - RTPUtils::setBE32(&(pos[12]), block->interarrivalJitter()); - RTPUtils::setBE32(&(pos[16]), block->lsr()); - RTPUtils::setBE32(&(pos[20]), block->dlsr()); + //------------------------------------------------------------------------- + bool RTCPPacket::parseGenericNACK(TransportLayerFeedbackMessage *report) + { + typedef TransportLayerFeedbackMessage::GenericNACK GenericNACK; + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); - advancePos(pos, remaining, sizeof(DWORD)*6); - } + size_t possibleNACKs = remaining / sizeof(DWORD); - ASSERT(count == report->rc()) + ASSERT(0 != possibleNACKs) - if (report->extensionSize() > 0) { - ASSERT(NULL != report->extension()) - memcpy(pos, report->extension(), report->extensionSize()); - advancePos(pos, remaining, boundarySize(report->extensionSize())); - } + report->mFirstGenericNACK = new (allocateBuffer(internal::alignedSize(sizeof(GenericNACK))*possibleNACKs)) GenericNACK[possibleNACKs]; + + while (remaining >= sizeof(DWORD)) { + GenericNACK *nack = &(report->mFirstGenericNACK[report->mGenericNACKCount]); + + nack->mPID = UseRTPUtils::getBE16(&(pos[0])); + nack->mBLP = UseRTPUtils::getBE16(&(pos[2])); + + internal::advancePos(pos, remaining, sizeof(DWORD)); + + ++(report->mGenericNACKCount); } + + ASSERT(possibleNACKs == report->mGenericNACKCount) + + return true; + } - //------------------------------------------------------------------------- - static void writePacketSenderReport(const RTCPPacket::SenderReport *report, BYTE * &pos, size_t &remaining) - { - typedef RTCPPacket::SenderReport SenderReport; - pos[1] = SenderReport::kPayloadType; + //------------------------------------------------------------------------- + void RTCPPacket::fillTMMBRCommon( + TransportLayerFeedbackMessage *report, + TransportLayerFeedbackMessage::TMMBRCommon *common, + const BYTE *pos + ) + { + typedef TransportLayerFeedbackMessage::TMMBRCommon TMMBRCommon; - RTPUtils::setBE32(&(pos[4]), report->ssrcOfSender()); - RTPUtils::setBE32(&(pos[8]), report->ntpTimestampMS()); - RTPUtils::setBE32(&(pos[12]), report->ntpTimestampLS()); - RTPUtils::setBE32(&(pos[16]), report->rtpTimestamp()); - RTPUtils::setBE32(&(pos[20]), report->senderPacketCount()); - RTPUtils::setBE32(&(pos[24]), report->senderOctetCount()); + common->mSSRC = UseRTPUtils::getBE32(&(pos[0])); + common->mMxTBRExp = RTCP_GET_BITS(pos[4], 0x3F, 2); + common->mMxTBRMantissa = RTCP_GET_BITS(UseRTPUtils::getBE32(&(pos[4])), 0x1FFFF, 9); + common->mMeasuredOverhead = RTCP_GET_BITS(UseRTPUtils::getBE32(&(pos[4])), 0x1FF, 0); + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parseTMMBR(TransportLayerFeedbackMessage *report) + { + typedef TransportLayerFeedbackMessage::TMMBR TMMBR; - advancePos(pos, remaining, sizeof(DWORD)*7); + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); - writePacketSenderReceiverCommonReport(report, pos, remaining); - } + size_t possibleTMMBRs = remaining / (sizeof(DWORD)*2); - //------------------------------------------------------------------------- - static void writePacketReceiverReport(const RTCPPacket::ReceiverReport *report, BYTE * &pos, size_t &remaining) - { - typedef RTCPPacket::ReceiverReport ReceiverReport; - pos[1] = ReceiverReport::kPayloadType; + ASSERT(0 != possibleTMMBRs) - RTPUtils::setBE32(&(pos[4]), report->ssrcOfPacketSender()); + report->mFirstTMMBR = new (allocateBuffer(internal::alignedSize(sizeof(TMMBR))*possibleTMMBRs)) TMMBR[possibleTMMBRs]; - advancePos(pos, remaining, sizeof(DWORD)*2); + while (remaining >= (sizeof(DWORD)*2)) { + TMMBR *tmmbr = &(report->mFirstTMMBR[report->mTMMBRCount]); - writePacketSenderReceiverCommonReport(report, pos, remaining); + fillTMMBRCommon(report, tmmbr, pos); + + internal::advancePos(pos, remaining, sizeof(DWORD)*2); + + ++(report->mTMMBRCount); } + + ASSERT(possibleTMMBRs == report->mTMMBRCount) + + return true; + } - //------------------------------------------------------------------------- - static void writePacketSDES(const RTCPPacket::SDES *report, BYTE * &pos, size_t &remaining) - { - typedef RTCPPacket::SDES SDES; - typedef RTCPPacket::SDES::Chunk Chunk; + //------------------------------------------------------------------------- + bool RTCPPacket::parseTMMBN(TransportLayerFeedbackMessage *report) + { + typedef TransportLayerFeedbackMessage::TMMBN TMMBN; + + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); + + size_t possibleTMMBNs = remaining / (sizeof(DWORD)*2); + + if (possibleTMMBNs < 1) { + report->mFirstTMMBN = NULL; + report->mTMMBNCount = 0; + return true; + } + + report->mFirstTMMBN = new (allocateBuffer(internal::alignedSize(sizeof(TMMBN))*possibleTMMBNs)) TMMBN[possibleTMMBNs]; + + while (remaining >= (sizeof(DWORD)*2)) { + TMMBN *tmmbr = &(report->mFirstTMMBN[report->mTMMBNCount]); + + fillTMMBRCommon(report, tmmbr, pos); + + internal::advancePos(pos, remaining, sizeof(DWORD)*2); + + ++(report->mTMMBNCount); + } + + ASSERT(possibleTMMBNs == report->mTMMBNCount) + + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parseUnknown(TransportLayerFeedbackMessage *report) + { + report->mUnknown = report; + return true; + } - pos[1] = SDES::kPayloadType; + //------------------------------------------------------------------------- + bool RTCPPacket::parsePLI(PayloadSpecificFeedbackMessage *report) + { + return true; + } - advancePos(pos, remaining, sizeof(DWORD)); + //------------------------------------------------------------------------- + bool RTCPPacket::parseSLI(PayloadSpecificFeedbackMessage *report) + { + typedef PayloadSpecificFeedbackMessage::SLI SLI; - size_t chunkCount = 0; + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); - for (Chunk *chunk = report->firstChunk(); NULL != chunk; chunk = chunk->next(), ++chunkCount) - { - RTPUtils::setBE32(pos, chunk->ssrc()); - advancePos(pos, remaining, sizeof(DWORD)); + size_t possibleSLIs = remaining / (sizeof(DWORD)); - BYTE *startPos = pos; + ASSERT(0 != possibleSLIs) - for (auto *item = chunk->firstCName(); NULL != item; item = item->next()) - { - pos[0] = Chunk::CName::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + report->mFirstSLI = new (allocateBuffer(internal::alignedSize(sizeof(SLI))*possibleSLIs)) SLI[possibleSLIs]; - advancePos(pos, remaining, sizeof(WORD)); + while (remaining >= (sizeof(DWORD))) { + SLI *sli = &(report->mFirstSLI[report->mSLICount]); - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES CName") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + sli->mFirst = RTCP_GET_BITS(UseRTPUtils::getBE16(&(pos[0])), 0x1FFF, 3); + sli->mNumber = static_cast(RTCP_GET_BITS(UseRTPUtils::getBE32(&(pos[0])), 0x1FFF, 6)); + sli->mPictureID = RTCP_GET_BITS(pos[3], 0x3F, 0); - for (auto *item = chunk->firstName(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Name::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + internal::advancePos(pos, remaining, sizeof(DWORD)); - advancePos(pos, remaining, sizeof(WORD)); + ++(report->mSLICount); + } - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Name") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + ASSERT(possibleSLIs == report->mSLICount) - for (auto *item = chunk->firstEmail(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Email::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parseRPSI(PayloadSpecificFeedbackMessage *report) + { + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); - advancePos(pos, remaining, sizeof(WORD)); + { + if (remaining < sizeof(WORD)) goto illegal_remaining; - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Email") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + BYTE pb = pos[0]; + report->mRPSI.mZeroBit = RTCP_GET_BITS(pos[1], 0x1, 7); + report->mRPSI.mPayloadType = RTCP_GET_BITS(pos[1], 0x7F, 0); - for (auto *item = chunk->firstPhone(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Phone::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + internal::advancePos(pos, remaining, sizeof(WORD)); - advancePos(pos, remaining, sizeof(WORD)); + if (remaining > 0) { + report->mRPSI.mNativeRPSIBitString = pos; + report->mRPSI.mNativeRPSIBitStringSizeInBits = (remaining*8); + if (pb > report->mRPSI.mNativeRPSIBitStringSizeInBits) goto illegal_remaining; - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Phone") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) + report->mRPSI.mNativeRPSIBitStringSizeInBits -= static_cast(pb); + if (0 == report->mRPSI.mNativeRPSIBitStringSizeInBits) { + report->mRPSI.mNativeRPSIBitString = NULL; } + } - for (auto *item = chunk->firstLoc(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Loc::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + return true; + } - advancePos(pos, remaining, sizeof(WORD)); + illegal_remaining: + { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed RPSI payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, (reinterpret_cast(pos) - reinterpret_cast(report->fci())) + ); + } + return false; + } + + //------------------------------------------------------------------------- + void RTCPPacket::fillCodecControlCommon( + PayloadSpecificFeedbackMessage *report, + PayloadSpecificFeedbackMessage::CodecControlCommon *common, + const BYTE *pos + ) + { + common->mSSRC = UseRTPUtils::getBE32(&(pos[0])); + common->mSeqNr = pos[4]; + common->mReserved = RTCP_GET_BITS(UseRTPUtils::getBE32(&(pos[4])), 0xFFFFFF, 0); + } - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Loc") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + //------------------------------------------------------------------------- + bool RTCPPacket::parseFIR(PayloadSpecificFeedbackMessage *report) + { + typedef PayloadSpecificFeedbackMessage::FIR FIR; - for (auto *item = chunk->firstTool(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Tool::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); - advancePos(pos, remaining, sizeof(WORD)); + size_t possibleFIRs = remaining / (sizeof(DWORD)*2); - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Tool") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + ASSERT(0 != possibleFIRs) - for (auto *item = chunk->firstNote(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Note::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + report->mFirstFIR = new (allocateBuffer(internal::alignedSize(sizeof(FIR))*possibleFIRs)) FIR[possibleFIRs]; - advancePos(pos, remaining, sizeof(WORD)); + while (remaining >= (sizeof(DWORD)*2)) { + FIR *fir = &(report->mFirstFIR[report->mFIRCount]); + fillCodecControlCommon(report, fir, pos); - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Note") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - for (auto *item = chunk->firstPriv(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Priv::kItemType; - size_t len1 = (NULL != item->mPrefix ? strlen(item->mPrefix) : 0); - size_t len2 = (NULL != item->mValue ? strlen(item->mValue) : 0); - size_t len = len1 + len2; - if (len > 0) ++len; - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + ++(report->mFIRCount); + } - advancePos(pos, remaining, sizeof(WORD)); + ASSERT(possibleFIRs == report->mFIRCount) - if (len > 0) { - pos[0] = static_cast(len1); - advancePos(pos, remaining); - if (len1 > 0) { - memcpy(pos, item->prefix(), len1*sizeof(BYTE)); - advancePos(pos, remaining, len1*sizeof(BYTE)); - } - if (len2 > 0) { - memcpy(pos, item->value(), len2*sizeof(BYTE)); - advancePos(pos, remaining, len2*sizeof(BYTE)); - } - } - ZS_LOG_INSANE(packet_slog("writing SDES Priv") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("prefix len", len1) + ZS_PARAM("prefix", (NULL != item->mPrefix ? item->mPrefix : NULL)) + ZS_PARAM("len", len2) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parseTSTR(PayloadSpecificFeedbackMessage *report) + { + typedef PayloadSpecificFeedbackMessage::TSTR TSTR; - for (auto *item = chunk->firstMid(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Mid::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); - advancePos(pos, remaining, sizeof(WORD)); + size_t possibleTSTRs = remaining / (sizeof(DWORD)*2); - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Mid report") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + ASSERT(0 != possibleTSTRs) - for (auto *item = chunk->firstRid(); NULL != item; item = item->next()) - { - pos[0] = Chunk::Rid::kItemType; - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + report->mFirstTSTR = new (allocateBuffer(internal::alignedSize(sizeof(TSTR))*possibleTSTRs)) TSTR[possibleTSTRs]; - advancePos(pos, remaining, sizeof(WORD)); + while (remaining >= (sizeof(DWORD)*2)) { + TSTR *tstr = &(report->mFirstTSTR[report->mTSTRCount]); + fillCodecControlCommon(report, tstr, pos); - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Rid report") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + tstr->mControlSpecific = RTCP_GET_BITS(tstr->mReserved, 0x1F, 0); + tstr->mReserved = RTCP_GET_BITS(tstr->mReserved, 0x7FFFF, 5); - for (auto *item = chunk->firstUnknown(); NULL != item; item = item->next()) - { - pos[0] = item->type(); - size_t len = (NULL != item->mValue ? strlen(item->mValue) : 0); - pos[1] = static_cast(len); - ASSERT(throwIfGreaterThanBitsAllow(len, 8)) + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - advancePos(pos, remaining, sizeof(WORD)); + ++(report->mTSTRCount); + } - if (len > 0) { - memcpy(pos, item->value(), len*sizeof(BYTE)); - advancePos(pos, remaining, len*sizeof(BYTE)); - } - ZS_LOG_INSANE(packet_slog("writing SDES Unknown") + ZS_PARAM("chunk", chunkCount) + ZS_PARAM("len", len) + ZS_PARAM("type", item->mType) + ZS_PARAM("value", (NULL != item->mValue ? item->mValue : NULL))) - } + ASSERT(possibleTSTRs == report->mTSTRCount) + + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parseTSTN(PayloadSpecificFeedbackMessage *report) + { + typedef PayloadSpecificFeedbackMessage::TSTN TSTN; - BYTE *endPos = pos; + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); - PTRNUMBER diff = reinterpret_cast(endPos) - reinterpret_cast(startPos); - auto modulas = (diff % sizeof(DWORD)); - if (0 != modulas) { - advancePos(pos, remaining, sizeof(DWORD)-modulas); - } + size_t possibleTSTNs = remaining / (sizeof(DWORD)*2); - if ((0 == diff) || - (0 == modulas)) { - // write "empty" chunk - RTPUtils::setBE32(pos, 0); - advancePos(pos, remaining, sizeof(DWORD)); - } - } + ASSERT(0 != possibleTSTNs) - throwIfGreaterThanBitsAllow(chunkCount, 5); - } - - //------------------------------------------------------------------------- - static void writePacketBye(const RTCPPacket::Bye *report, BYTE * &pos, size_t &remaining) - { - typedef RTCPPacket::Bye Bye; - pos[1] = Bye::kPayloadType; + report->mFirstTSTN = new (allocateBuffer(internal::alignedSize(sizeof(TSTN))*possibleTSTNs)) TSTN[possibleTSTNs]; - advancePos(pos, remaining, sizeof(DWORD)); + while (remaining >= (sizeof(DWORD)*2)) { + TSTN *tstn = &(report->mFirstTSTN[report->mTSTNCount]); + fillCodecControlCommon(report, tstn, pos); - for (size_t index = 0; index < report->sc(); ++index) - { - RTPUtils::setBE32(pos, report->ssrc(index)); - advancePos(pos, remaining, sizeof(DWORD)); - } + tstn->mControlSpecific = RTCP_GET_BITS(tstn->mReserved, 0x1F, 0); + tstn->mReserved = RTCP_GET_BITS(tstn->mReserved, 0x7FFFF, 5); - if (NULL != report->reasonForLeaving()) { - size_t len = strlen(report->reasonForLeaving()); - if (len > 0) { - pos[0] = static_cast(len); - memcpy(&(pos[1]), report->reasonForLeaving(), len*sizeof(BYTE)); - advancePos(pos, remaining, (len*sizeof(BYTE))+sizeof(BYTE)); - } - } + internal::advancePos(pos, remaining, sizeof(DWORD)*2); + + ++(report->mTSTNCount); } - //------------------------------------------------------------------------- - static void writePacketApp(const RTCPPacket::App *report, BYTE * &pos, size_t &remaining) + ASSERT(possibleTSTNs == report->mTSTNCount) + + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parseVBCM(PayloadSpecificFeedbackMessage *report) + { + typedef PayloadSpecificFeedbackMessage::VBCM VBCM; + + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); + + size_t possibleVBCMs = 0; + + // first count the VBCM blocks { - typedef RTCPPacket::App App; - pos[1] = App::kPayloadType; + while (remaining >= (sizeof(DWORD)*2)) { + ++possibleVBCMs; - RTPUtils::setBE32(&(pos[4]), report->ssrc()); - memcpy(&(pos[8]), report->name(), sizeof(DWORD)); + size_t length = UseRTPUtils::getBE16(&(pos[6])); + size_t modulas = length % sizeof(DWORD); + size_t padding = ((0 != modulas) ? (sizeof(DWORD)-modulas) : 0); - advancePos(pos, remaining, sizeof(DWORD)*3); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - size_t dataSize = report->dataSize(); - if (0 != dataSize) { - memcpy(pos, report->data(), dataSize); - advancePos(pos, remaining, dataSize); - } - } + ASSERT(remaining >= length) - //------------------------------------------------------------------------- - static void writePacketTransportLayerFeedbackMessage(const RTCPPacket::TransportLayerFeedbackMessage *report, BYTE * &pos, size_t &remaining) - { - typedef RTCPPacket::TransportLayerFeedbackMessage TransportLayerFeedbackMessage; - typedef RTCPPacket::TransportLayerFeedbackMessage::GenericNACK GenericNACK; - typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBR TMMBR; - typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBN TMMBN; + size_t skipLength = (((length + padding) > remaining) ? remaining : (length + padding)); + + internal::advancePos(pos, remaining, skipLength); + } + ASSERT(0 != possibleVBCMs); + } - pos[1] = TransportLayerFeedbackMessage::kPayloadType; + pos = report->fci(); + remaining = report->fciSize(); - RTPUtils::setBE32(&(pos[4]), report->ssrcOfPacketSender()); - RTPUtils::setBE32(&(pos[8]), report->ssrcOfMediaSource()); + { + ASSERT(0 != possibleVBCMs); - advancePos(pos, remaining, sizeof(DWORD)*3); + report->mFirstVBCM = new (allocateBuffer(internal::alignedSize(sizeof(VBCM))*possibleVBCMs)) VBCM[possibleVBCMs]; - switch (report->fmt()) { - case GenericNACK::kFmt: - { - auto count = report->genericNACKCount(); + while (remaining >= (sizeof(DWORD)*2)) { + VBCM *vcbm = &(report->mFirstVBCM[report->mVBCMCount]); + fillCodecControlCommon(report, vcbm, pos); - for (size_t index = 0; index < count; ++index) - { - auto item = report->genericNACKAtIndex(index); - RTPUtils::setBE16(&(pos[0]), item->pid()); - RTPUtils::setBE16(&(pos[2]), item->blp()); - advancePos(pos, remaining, sizeof(DWORD)); - } - break; - } - case TMMBR::kFmt: - { - auto count = report->tmmbrCount(); + // move reserved to control specific + vcbm->mControlSpecific = vcbm->mReserved; + vcbm->mReserved = 0; - for (size_t index = 0; index < count; ++index) - { - auto item = report->tmmbrAtIndex(index); - RTPUtils::setBE32(&(pos[0]), item->ssrc()); + size_t length = UseRTPUtils::getBE16(&(pos[6])); + size_t modulas = length % sizeof(DWORD); + size_t padding = ((0 != modulas) ? (sizeof(DWORD)-modulas) : 0); - DWORD merged = RTCP_PACK_BITS(static_cast(item->mxTBRExp()), 0x3F, 26) | - RTCP_PACK_BITS(static_cast(item->mxTBRMantissa()), 0x1FFFF, 9) | - RTCP_PACK_BITS(static_cast(item->measuredOverhead()), 0x1FF, 0); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - RTPUtils::setBE32(&(pos[4]), merged); + ASSERT(remaining >= length) - advancePos(pos, remaining, sizeof(DWORD)*2); - } - break; + if (length > 0) { + vcbm->mVBCMOctetString = pos; } - case TMMBN::kFmt: - { - auto count = report->tmmbnCount(); - - for (size_t index = 0; index < count; ++index) - { - auto item = report->tmmbnAtIndex(index); - RTPUtils::setBE32(&(pos[0]), item->ssrc()); - DWORD merged = RTCP_PACK_BITS(static_cast(item->mxTBRExp()), 0x3F, 26) | - RTCP_PACK_BITS(static_cast(item->mxTBRMantissa()), 0x1FFFF, 9) | - RTCP_PACK_BITS(static_cast(item->measuredOverhead()), 0x1FF, 0); + size_t skipLength = (((length + padding) > remaining) ? remaining : (length + padding)); - RTPUtils::setBE32(&(pos[4]), merged); + internal::advancePos(pos, remaining, skipLength); - advancePos(pos, remaining, sizeof(DWORD)*2); - } - break; - } - default: - { - auto fciSize = report->fciSize(); - if (0 != fciSize) { - memcpy(pos, report->fci(), report->fciSize()); - advancePos(pos, remaining, report->fciSize()); - } - break; - } + ++(report->mVBCMCount); } - ZS_LOG_INSANE(packet_slog("writing transport layer feedback message") + ZS_PARAM("fmt", report->fmtToString()) + ZS_PARAM("fmt (number)", report->reportSpecific())) + ASSERT(possibleVBCMs == report->mVBCMCount); + } + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parseAFB(PayloadSpecificFeedbackMessage *report) + { + typedef PayloadSpecificFeedbackMessage::AFB AFB; + + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); + + if (remaining > 0) { + report->mAFB.mData = pos; + report->mAFB.mDataSize = remaining; } + return true; + } - //------------------------------------------------------------------------- - static void writePacketPayloadSpecificFeedbackMessage(const RTCPPacket::PayloadSpecificFeedbackMessage *report, BYTE * &pos, size_t &remaining) - { - typedef RTCPPacket::PayloadSpecificFeedbackMessage PayloadSpecificFeedbackMessage; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::PLI PLI; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::SLI SLI; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::RPSI RPSI; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::FIR FIR; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTR TSTR; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTN TSTN; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::VBCM VBCM; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::AFB AFB; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::REMB REMB; + //------------------------------------------------------------------------- + bool RTCPPacket::parseREMB(PayloadSpecificFeedbackMessage *report) + { + typedef PayloadSpecificFeedbackMessage::REMB REMB; - pos[1] = PayloadSpecificFeedbackMessage::kPayloadType; + if (!parseAFB(report)) return false; - RTPUtils::setBE32(&(pos[4]), report->ssrcOfPacketSender()); - RTPUtils::setBE32(&(pos[8]), report->ssrcOfMediaSource()); + const BYTE *pos = report->fci(); + size_t remaining = report->fciSize(); - advancePos(pos, remaining, sizeof(DWORD)*3); + report->mHasREMB = true; - switch (report->fmt()) { - case PLI::kFmt: - { - break; - } - case SLI::kFmt: - { - auto count = report->sliCount(); + { + ASSERT(remaining >= sizeof(DWORD) * 3); - for (size_t index = 0; index < count; ++index) - { - auto item = report->sliAtIndex(index); + report->mREMB.mNumSSRC = pos[4]; + report->mREMB.mBRExp = RTCP_GET_BITS(pos[5], 0x3F, 2); + report->mREMB.mBRMantissa = RTCP_GET_BITS(UseRTPUtils::getBE32(&(pos[4])), 0x3FFFF, 0); - DWORD merged = RTCP_PACK_BITS(static_cast(item->first()), 0x1FFF, 19) | - RTCP_PACK_BITS(static_cast(item->number()), 0x1FFF, 6) | - RTCP_PACK_BITS(static_cast(item->pictureID()), 0x3F, 0); + size_t possibleSSRCs = (remaining - sizeof(DWORD)*2) / (sizeof(DWORD)); - RTPUtils::setBE32(&(pos[0]), merged); - advancePos(pos, remaining, sizeof(DWORD)); - } - break; - } - case RPSI::kFmt: - { - auto rpsi = report->rpsi(); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - pos[1] = RTCP_PACK_BITS(static_cast(rpsi->zeroBit()), 0x1, 7) | - RTCP_PACK_BITS(static_cast(rpsi->payloadType()), 0x7F, 0); + report->mREMB.mSSRCs = new (allocateBuffer(internal::alignedSize(sizeof(DWORD))*possibleSSRCs)) DWORD[possibleSSRCs]; - auto totalBits = static_cast(rpsi->nativeRPSIBitStringSizeInBits()); + size_t count = 0; + while ((possibleSSRCs > 0) && + (count < report->mREMB.numSSRC()) && + (remaining >= sizeof(DWORD))) + { + report->mREMB.mSSRCs[count] = UseRTPUtils::getBE32(pos); + internal::advancePos(pos, remaining, sizeof(DWORD)); + --possibleSSRCs; + ++count; + } - size_t byteModulas = (totalBits%8); + if (count != report->mREMB.numSSRC()) goto illegal_remaining; + return true; + } - size_t totalBytes = (totalBits/8) + ((0 != byteModulas) ? 1 : 0); - if (0 != totalBytes) { - memcpy(&(pos[2]), rpsi->nativeRPSIBitString(), totalBytes); - if (0 != byteModulas) { - BYTE &by = (pos[2+totalBytes-1]); - by = by & static_cast(((1 << byteModulas)-1) << (8-byteModulas)); - } - } + illegal_remaining: + { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed REMB payload specific feedback message", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, (reinterpret_cast(pos) - reinterpret_cast(report->fci())) + ); + } + return false; + } - size_t totalSizeInBits = (sizeof(WORD)*8)+(totalBits); - auto boundaryModulas = totalSizeInBits % (sizeof(DWORD)*8); + //------------------------------------------------------------------------- + bool RTCPPacket::parseUnknown(PayloadSpecificFeedbackMessage *report) + { + report->mUnknown = report; + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parseCommonRange( + XR *xr, + XR::ReportBlockRange *reportBlock + ) + { + const BYTE *pos = reportBlock->typeSpecificContents(); + size_t remaining = reportBlock->typeSpecificContentSize(); - if (0 != boundaryModulas) { - pos[0] = static_cast((sizeof(DWORD)*8)-boundaryModulas); - } else { - pos[0] = 0; - } + { + if (remaining < (sizeof(DWORD)*2)) goto illegal_remaining; - advancePos(pos, remaining, sizeof(WORD)+(sizeof(BYTE)*totalBytes)); - break; - } - case FIR::kFmt: - { - auto count = report->firCount(); + reportBlock->mSSRCOfSource = UseRTPUtils::getBE32(&(pos[0])); + reportBlock->mBeginSeq = UseRTPUtils::getBE16(&(pos[4])); + reportBlock->mEndSeq = UseRTPUtils::getBE16(&(pos[6])); - for (size_t index = 0; index < count; ++index) - { - auto item = report->firAtIndex(index); - RTPUtils::setBE32(&(pos[0]), item->ssrc()); - RTPUtils::setBE32(&(pos[4]), item->reserved()); - pos[4] = item->seqNr(); - advancePos(pos, remaining, sizeof(DWORD)*2); - } - break; - } - case TSTR::kFmt: - { - auto count = report->tstrCount(); + return true; + } - for (size_t index = 0; index < count; ++index) - { - auto item = report->tstrAtIndex(index); - RTPUtils::setBE32(&(pos[0]), item->ssrc()); + illegal_remaining: + { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed report block range", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, (reinterpret_cast(pos) - reinterpret_cast(reportBlock->typeSpecificContents())) + ); + } + return false; + } - DWORD merged = RTCP_PACK_BITS(static_cast(item->seqNr()), 0xFF, 24) | - RTCP_PACK_BITS(static_cast(item->reserved()), 0x7FFFF, 5) | - RTCP_PACK_BITS(static_cast(item->index()), 0x1F, 0); + //------------------------------------------------------------------------- + bool RTCPPacket::parseCommonRLE( + XR *xr, + XR::RLEReportBlock *reportBlock + ) + { + const BYTE *pos = reportBlock->typeSpecificContents(); + size_t remaining = reportBlock->typeSpecificContentSize(); - RTPUtils::setBE32(&(pos[4]), merged); - advancePos(pos, remaining, sizeof(DWORD)*2); - } - break; - } - case TSTN::kFmt: - { - auto count = report->tstnCount(); + if (!parseCommonRange(xr, reportBlock)) return false; - for (size_t index = 0; index < count; ++index) - { - auto item = report->tstnAtIndex(index); - RTPUtils::setBE32(&(pos[0]), item->ssrc()); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - DWORD merged = RTCP_PACK_BITS(static_cast(item->seqNr()), 0xFF, 24) | - RTCP_PACK_BITS(static_cast(item->reserved()), 0x7FFFF, 5) | - RTCP_PACK_BITS(static_cast(item->index()), 0x1F, 0); + size_t possibleRLEsCount = (remaining / sizeof(WORD)); - RTPUtils::setBE32(&(pos[4]), merged); - advancePos(pos, remaining, sizeof(DWORD)*2); - } - break; - } - case VBCM::kFmt: - { - auto count = report->vbcmCount(); + if (0 == possibleRLEsCount) return true; - for (size_t index = 0; index < count; ++index) - { - auto item = report->vbcmAtIndex(index); + reportBlock->mChunks = new (allocateBuffer(internal::alignedSize(sizeof(XR::RLEChunk)*possibleRLEsCount))) XR::RLEChunk[possibleRLEsCount]; - RTPUtils::setBE32(&(pos[0]), item->ssrc()); + while (remaining >= sizeof(WORD)) + { + XR::RLEChunk value = UseRTPUtils::getBE16(pos); + internal::advancePos(pos, remaining, sizeof(WORD)); - pos[4] = item->seqNr(); - pos[5] = RTCP_PACK_BITS(static_cast(item->zeroBit()), 0x1, 7) | - RTCP_PACK_BITS(static_cast(item->payloadType()), 0x7F, 0); + if (0 == value) break; + reportBlock->mChunks[reportBlock->mChunkCount] = value; + ++(reportBlock->mChunkCount); + } - auto size = item->vbcmOctetStringSize(); - if (0 != size) { - RTPUtils::setBE16(&(pos[6]), static_cast(size)); - memcpy(&(pos[8]), item->vbcmOctetString(), size*sizeof(BYTE)); - } + if (0 == reportBlock->mChunkCount) { + reportBlock->mChunks = NULL; + } - advancePos(pos, remaining, boundarySize((sizeof(DWORD)*2)+(size*sizeof(BYTE)))); - } - break; - } - case AFB::kFmt: - { + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + XR *xr, + XR::LossRLEReportBlock *reportBlock + ) + { + return parseCommonRLE(xr, reportBlock); + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + XR *xr, + XR::DuplicateRLEReportBlock *reportBlock + ) + { + return parseCommonRLE(xr, reportBlock); + } - auto remb = report->remb(); - if (NULL == remb) { - auto afb = report->afb(); + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + XR *xr, + XR::PacketReceiptTimesReportBlock *reportBlock + ) + { + if (!parseCommonRange(xr, reportBlock)) return false; - size_t size = afb->dataSize(); - if (0 != size) { - memcpy(pos, afb->data(), size*sizeof(BYTE)); - advancePos(pos, remaining, boundarySize(size*sizeof(BYTE))); - } - } else { - memcpy(pos, "REMB", sizeof(DWORD)); + const BYTE *pos = reportBlock->typeSpecificContents(); + size_t remaining = reportBlock->typeSpecificContentSize(); - DWORD merged = RTCP_PACK_BITS(static_cast(remb->brExp()), 0x3F, 18) | - RTCP_PACK_BITS(static_cast(remb->brMantissa()), 0x3FFFF, 0); - RTPUtils::setBE32(&(pos[4]), merged); - pos[4] = static_cast(remb->numSSRC()); - advancePos(pos, remaining, sizeof(DWORD)*2); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - auto count = remb->numSSRC(); - for (size_t index = 0; index < count; ++index) - { - auto ssrc = remb->ssrcAtIndex(index); - RTPUtils::setBE32(pos, ssrc); - advancePos(pos, remaining, sizeof(DWORD)); - } - } - break; - } - default: - { - auto fciSize = report->fciSize(); - if (0 != fciSize) { - memcpy(pos, report->fci(), fciSize); - advancePos(pos, remaining, fciSize); - } - break; - } - } - ZS_LOG_INSANE(packet_slog("writing payload specific feedback message") + ZS_PARAM("fmt", report->fmtToString()) + ZS_PARAM("fmt (number)", report->reportSpecific())) - } + size_t possibleTimes = remaining / sizeof(DWORD); - //------------------------------------------------------------------------- - static void writePacketXR(const RTCPPacket::XR *report, BYTE * &pos, size_t &remaining) - { - typedef RTCPPacket::XR XR; - typedef RTCPPacket::XR::ReportBlock ReportBlock; - typedef RTCPPacket::XR::LossRLEReportBlock LossRLEReportBlock; - typedef RTCPPacket::XR::DuplicateRLEReportBlock DuplicateRLEReportBlock; - typedef RTCPPacket::XR::PacketReceiptTimesReportBlock PacketReceiptTimesReportBlock; - typedef RTCPPacket::XR::ReceiverReferenceTimeReportBlock ReceiverReferenceTimeReportBlock; - typedef RTCPPacket::XR::DLRRReportBlock DLRRReportBlock; - typedef RTCPPacket::XR::StatisticsSummaryReportBlock StatisticsSummaryReportBlock; - typedef RTCPPacket::XR::VoIPMetricsReportBlock VoIPMetricsReportBlock; - typedef RTCPPacket::XR::UnknownReportBlock UnknownReportBlock; - typedef RTCPPacket::XR::RLEChunk RLEChunk; + if (0 == possibleTimes) return true; - pos[1] = XR::kPayloadType; - RTPUtils::setBE32(&(pos[4]), report->mSSRC); + reportBlock->mReceiptTimes = new (allocateBuffer(internal::alignedSize(sizeof(DWORD))*possibleTimes)) DWORD[possibleTimes]; - advancePos(pos, remaining, sizeof(DWORD)*2); + while (remaining >= sizeof(DWORD)) { + reportBlock->mReceiptTimes[reportBlock->mReceiptTimeCount] = UseRTPUtils::getBE32(pos); + internal::advancePos(pos, remaining, sizeof(DWORD)); + ++(reportBlock->mReceiptTimeCount); + } - for (const ReportBlock *reportBlock = report->firstReportBlock(); NULL != reportBlock; reportBlock = reportBlock->next()) - { - BYTE *blockStart = pos; + return true; + } - pos[0] = reportBlock->blockType(); - pos[1] = reportBlock->typeSpecific(); + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + XR *xr, + XR::ReceiverReferenceTimeReportBlock *reportBlock + ) + { + const BYTE *pos = reportBlock->typeSpecificContents(); + size_t remaining = reportBlock->typeSpecificContentSize(); + + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed receiver reference time report block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - advancePos(pos, remaining, sizeof(DWORD)); + reportBlock->mNTPTimestampMS = UseRTPUtils::getBE32(&(pos[0])); + reportBlock->mNTPTimestampLS = UseRTPUtils::getBE32(&(pos[4])); - switch (reportBlock->mBlockType) { - case LossRLEReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + XR *xr, + XR::DLRRReportBlock *reportBlock + ) + { + const BYTE *pos = reportBlock->typeSpecificContents(); + size_t remaining = reportBlock->typeSpecificContentSize(); - RTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); - RTPUtils::setBE16(&(pos[4]), block->beginSeq()); - RTPUtils::setBE16(&(pos[6]), block->endSeq()); + size_t possibleSubBlockCount = remaining / (sizeof(DWORD)*3); - advancePos(pos, remaining, sizeof(DWORD)*2); + if (0 == possibleSubBlockCount) return true; - size_t chunkCount = block->chunkCount(); - for (size_t index = 0; index < chunkCount; ++index) - { - RLEChunk chunk = block->chunkAtIndex(index); - RTPUtils::setBE16(pos, chunk); - advancePos(pos, remaining, sizeof(WORD)); - } - break; - } - case DuplicateRLEReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); + if (remaining < (sizeof(DWORD)*2)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed dlr report block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - RTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); - RTPUtils::setBE16(&(pos[4]), block->beginSeq()); - RTPUtils::setBE16(&(pos[6]), block->endSeq()); + reportBlock->mSubBlocks = new (allocateBuffer(internal::alignedSize(sizeof(XR::DLRRReportBlock::SubBlock))*possibleSubBlockCount)) XR::DLRRReportBlock::SubBlock[possibleSubBlockCount]; - advancePos(pos, remaining, sizeof(DWORD)*2); + while (remaining >= (sizeof(DWORD)*3)) + { + auto subBlock = &(reportBlock->mSubBlocks[reportBlock->mSubBlockCount]); - size_t count = block->chunkCount(); - for (size_t index = 0; index < count; ++index) - { - RLEChunk chunk = block->chunkAtIndex(index); - RTPUtils::setBE16(pos, chunk); - advancePos(pos, remaining, sizeof(WORD)); - } - break; - } - case PacketReceiptTimesReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); + subBlock->mSSRC = UseRTPUtils::getBE32(&(pos[0])); + subBlock->mLRR = UseRTPUtils::getBE32(&(pos[4])); + subBlock->mDLRR = UseRTPUtils::getBE32(&(pos[8])); - RTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); - RTPUtils::setBE16(&(pos[4]), block->beginSeq()); - RTPUtils::setBE16(&(pos[6]), block->endSeq()); + internal::advancePos(pos, remaining, sizeof(DWORD)*3); - advancePos(pos, remaining, sizeof(DWORD)*2); + ++(reportBlock->mSubBlockCount); + } - size_t count = block->receiptTimeCount(); - for (size_t index = 0; index < count; ++index) - { - DWORD receiptTime = block->receiptTimeAtIndex(index); - RTPUtils::setBE32(pos, receiptTime); - advancePos(pos, remaining, sizeof(DWORD)); - } - break; - } - case ReceiverReferenceTimeReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); - RTPUtils::setBE32(&(pos[0]), block->ntpTimestampMS()); - RTPUtils::setBE32(&(pos[4]), block->ntpTimestampLS()); - advancePos(pos, remaining, sizeof(DWORD)*2); - break; - } - case DLRRReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); + ASSERT(reportBlock->mSubBlockCount == possibleSubBlockCount) - size_t count = block->subBlockCount(); - for (size_t index = 0; index < count; ++index) - { - DLRRReportBlock::SubBlock *subBlock = block->subBlockAtIndex(index); - RTPUtils::setBE32(&(pos[0]), subBlock->ssrc()); - RTPUtils::setBE32(&(pos[4]), subBlock->lrr()); - RTPUtils::setBE32(&(pos[8]), subBlock->dlrr()); - advancePos(pos, remaining, sizeof(DWORD)*3); - } - break; - } - case StatisticsSummaryReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); - RTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); - RTPUtils::setBE16(&(pos[4]), block->beginSeq()); - RTPUtils::setBE16(&(pos[6]), block->endSeq()); - RTPUtils::setBE32(&(pos[8]), block->lostPackets()); - RTPUtils::setBE32(&(pos[12]), block->dupPackets()); - RTPUtils::setBE32(&(pos[16]), block->minJitter()); - RTPUtils::setBE32(&(pos[20]), block->maxJitter()); - RTPUtils::setBE32(&(pos[24]), block->meanJitter()); - RTPUtils::setBE32(&(pos[28]), block->devJitter()); - pos[32] = block->mMinTTLOrHL; - pos[33] = block->mMaxTTLOrHL; - pos[34] = block->mMeanTTLOrHL; - pos[35] = block->mDevTTLOrHL; - advancePos(pos, remaining, sizeof(DWORD)*9); - break; - } - case VoIPMetricsReportBlock::kBlockType: - { - auto block = reinterpret_cast(reportBlock); - RTPUtils::setBE32(&(pos[0]), block->ssrcOfSource()); - pos[4] = block->lossRate(); - pos[5] = block->discardRate(); - pos[6] = block->burstDensity(); - pos[7] = block->gapDensity(); - RTPUtils::setBE16(&(pos[8]), block->burstDuration()); - RTPUtils::setBE16(&(pos[10]), block->gapDuration()); - RTPUtils::setBE16(&(pos[12]), block->roundTripDelay()); - RTPUtils::setBE16(&(pos[14]), block->endSystemDelay()); - pos[16] = block->signalLevel(); - pos[17] = block->noiseLevel(); - pos[18] = block->rerl(); - pos[19] = block->Gmin(); + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + XR *xr, + XR::StatisticsSummaryReportBlock *reportBlock + ) + { + const BYTE *pos = reportBlock->typeSpecificContents(); + size_t remaining = reportBlock->typeSpecificContentSize(); + + parseCommonRange(xr, reportBlock); + + if (remaining < (sizeof(DWORD)*9)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed statistics summary report block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - pos[20] = block->rFactor(); - pos[21] = block->extRFactor(); - pos[22] = block->mosLQ(); - pos[23] = block->mosCQ(); + internal::advancePos(pos, remaining, sizeof(DWORD)*2); - pos[24] = block->rxConfig(); - pos[25] = block->mReservedVoIP; - RTPUtils::setBE16(&(pos[26]), block->jbNominal()); - RTPUtils::setBE16(&(pos[28]), block->jbMaximum()); - RTPUtils::setBE16(&(pos[30]), block->jbAbsMax()); - advancePos(pos, remaining, sizeof(DWORD)*8); - break; - } - default: - { - auto block = reinterpret_cast(reportBlock); + reportBlock->mLostPackets = UseRTPUtils::getBE32(&(pos[0])); + reportBlock->mDupPackets = UseRTPUtils::getBE32(&(pos[4])); + reportBlock->mMinJitter = UseRTPUtils::getBE32(&(pos[8])); + reportBlock->mMaxJitter = UseRTPUtils::getBE32(&(pos[12])); + reportBlock->mMeanJitter = UseRTPUtils::getBE32(&(pos[16])); + reportBlock->mDevJitter = UseRTPUtils::getBE32(&(pos[20])); - auto size = block->typeSpecificContentSize(); - if (0 != size) { - memcpy(pos, block->typeSpecificContents(), size*sizeof(BYTE)); - advancePos(pos, remaining, boundarySize(size*sizeof(BYTE))); - } - } - } + reportBlock->mMinTTLOrHL = pos[24]; + reportBlock->mMaxTTLOrHL = pos[25]; + reportBlock->mMeanTTLOrHL = pos[26]; + reportBlock->mDevTTLOrHL = pos[27]; - BYTE *blockEnd = pos; + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + XR *xr, + XR::VoIPMetricsReportBlock *reportBlock + ) + { + const BYTE *pos = reportBlock->typeSpecificContents(); + size_t remaining = reportBlock->typeSpecificContentSize(); + + if (remaining < (sizeof(DWORD)*8)) { + ZS_EVENTING_4(x, w, Trace, RTCPPacketParseWarning, ol, RtcpPacket, Parse, + string, message, "malformed voip metrics report block", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - size_t diff = static_cast(reinterpret_cast(blockEnd) - reinterpret_cast(blockStart)); - auto modulas = diff % sizeof(DWORD); - if (0 != modulas) { - advancePos(pos, remaining, sizeof(DWORD)-modulas); - } + reportBlock->mSSRCOfSource = UseRTPUtils::getBE32(&(pos[0])); + reportBlock->mLossRate = pos[4]; + reportBlock->mDiscardRate = pos[5]; + reportBlock->mBurstDensity = pos[6]; + reportBlock->mGapDensity = pos[7]; + reportBlock->mBurstDuration = UseRTPUtils::getBE16(&(pos[8])); + reportBlock->mGapDuration = UseRTPUtils::getBE16(&(pos[10])); + reportBlock->mRoundTripDelay = UseRTPUtils::getBE16(&(pos[12])); + reportBlock->mEndSystemDelay = UseRTPUtils::getBE16(&(pos[14])); + reportBlock->mSignalLevel = pos[16]; + reportBlock->mNoiseLevel = pos[17]; + reportBlock->mRERL = pos[18]; + reportBlock->mGmin = pos[19]; + reportBlock->mRFactor = pos[20]; + reportBlock->mExtRFactor = pos[21]; + reportBlock->mMOSLQ = pos[22]; + reportBlock->mMOSCQ = pos[23]; + reportBlock->mRXConfig = pos[24]; + reportBlock->mReservedVoIP = pos[25]; + reportBlock->mJBNominal = UseRTPUtils::getBE16(&(pos[26])); + reportBlock->mJBMaximum = UseRTPUtils::getBE16(&(pos[28])); + reportBlock->mJBAbsMax = UseRTPUtils::getBE16(&(pos[30])); + + return true; + } + + //------------------------------------------------------------------------- + bool RTCPPacket::parse( + XR *xr, + XR::UnknownReportBlock *reportBlock + ) + { + return true; + } - diff = boundarySize(diff); - ZS_LOG_INSANE(packet_slog("writing XR block") + ZS_PARAM("block type", reportBlock->blockTypeToString()) + ZS_PARAM("block type (number)", reportBlock->blockType()) + ZS_PARAM("block size", diff)) + //------------------------------------------------------------------------- + void *RTCPPacket::allocateBuffer(size_t size) + { + return internal::allocateBuffer(mAllocationPos, mAllocationSize, size); + } - RTPUtils::setBE16(&(blockStart[2]), static_cast((diff/sizeof(DWORD))-1)); - } - } + //------------------------------------------------------------------------- + size_t RTCPPacket::getPacketSize(const Report *first) + { + size_t result = 0; - //------------------------------------------------------------------------- - static void writePacketUnknown(const RTCPPacket::UnknownReport *report, BYTE * &pos, size_t &remaining) + const Report *final = NULL; + + for (const Report *report = first; NULL != report; report = report->next()) { - typedef RTCPPacket::UnknownReport UnknownReport; - pos[1] = report->pt(); + final = report; - advancePos(pos, remaining, sizeof(DWORD)); + size_t beforeSize = result; - auto size = report->size(); - if (0 == size) return; + switch (report->pt()) { + case SenderReport::kPayloadType: + { + const SenderReport *sr = static_cast(report); + result += internal::getPacketSizeSenderReport(sr); + break; + } + case ReceiverReport::kPayloadType: + { + const ReceiverReport *rr = static_cast(report); + result += internal::getPacketSizeReceiverReport(rr); + break; + } + case SDES::kPayloadType: + { + const SDES *sdes = static_cast(report); + result += internal::getPacketSizeSDES(sdes); + break; + } + case Bye::kPayloadType: + { + const Bye *bye = static_cast(report); + result += internal::getPacketSizeBye(bye); + break; + } + case App::kPayloadType: + { + const App *app = static_cast(report); + result += internal::getPacketSizeApp(app); + break; + } + case TransportLayerFeedbackMessage::kPayloadType: + { + const TransportLayerFeedbackMessage *fm = static_cast(report); + result += internal::getPacketSizeTransportLayerFeedbackMessage(fm); + break; + } + case PayloadSpecificFeedbackMessage::kPayloadType: + { + const PayloadSpecificFeedbackMessage *fm = static_cast(report); + result += internal::getPacketSizePayloadSpecificFeedbackMessage(fm); + break; + } + case XR::kPayloadType: + { + const XR *xr = static_cast(report); + result += internal::getPacketSizeXR(xr); + break; + } + default: + { + result += sizeof(DWORD) + internal::boundarySize(report->size()); + break; + } + } - ASSERT(NULL != report->ptr()) + size_t afterSize = result; - memcpy(pos, report->ptr(), size); + ZS_EVENTING_3(x, i, Insane, RTCPPacketGettingReportPacketSize, ol, RtcpPacket, Info, + string, payloadType , report->ptToString(), + byte, payloadTypeNumber, report->pt(), + size_t, size, afterSize - beforeSize + ); + } - advancePos(pos, remaining, size); + if (NULL != final) { + auto padding = final->padding(); + if (0 != padding) { + result += padding; + } } - //------------------------------------------------------------------------- - void RTCPPacket::writePacket(const Report *first, BYTE * &pos, size_t &remaining) - { - ASSERT(sizeof(char) == sizeof(BYTE)) - ASSERT(NULL != first) + return internal::boundarySize(result); + } - for (const Report *report = first; NULL != report; report = report->next()) - { - BYTE *startOfReport = pos; + //------------------------------------------------------------------------- + void RTCPPacket::writePacket(const Report *first, BYTE * &pos, size_t &remaining) + { + ASSERT(sizeof(char) == sizeof(BYTE)) + ASSERT(NULL != first) - writePacketHeader(report, pos, remaining); + for (const Report *report = first; NULL != report; report = report->next()) + { + BYTE *startOfReport = pos; - switch (report->pt()) { - case SenderReport::kPayloadType: - { - const SenderReport *sr = static_cast(report); - internal::writePacketSenderReport(sr, pos, remaining); - break; - } - case ReceiverReport::kPayloadType: - { - const ReceiverReport *rr = static_cast(report); - internal::writePacketReceiverReport(rr, pos, remaining); - break; - } - case SDES::kPayloadType: - { - const SDES *sdes = static_cast(report); - internal::writePacketSDES(sdes, pos, remaining); - break; - } - case Bye::kPayloadType: - { - const Bye *bye = static_cast(report); - internal::writePacketBye(bye, pos, remaining); - break; - } - case App::kPayloadType: - { - const App *app = static_cast(report); - internal::writePacketApp(app, pos, remaining); - break; - } - case TransportLayerFeedbackMessage::kPayloadType: - { - const TransportLayerFeedbackMessage *fm = static_cast(report); - internal::writePacketTransportLayerFeedbackMessage(fm, pos, remaining); - break; - } - case PayloadSpecificFeedbackMessage::kPayloadType: - { - const PayloadSpecificFeedbackMessage *fm = static_cast(report); - internal::writePacketPayloadSpecificFeedbackMessage(fm, pos, remaining); - break; - } - case XR::kPayloadType: - { - const XR *xr = static_cast(report); - internal::writePacketXR(xr, pos, remaining); - break; - } - default: - { - const UnknownReport *unknown = static_cast(report); - internal::writePacketUnknown(unknown, pos, remaining); - break; - } + internal::writePacketHeader(report, pos, remaining); + + switch (report->pt()) { + case SenderReport::kPayloadType: + { + const SenderReport *sr = static_cast(report); + internal::writePacketSenderReport(sr, pos, remaining); + break; + } + case ReceiverReport::kPayloadType: + { + const ReceiverReport *rr = static_cast(report); + internal::writePacketReceiverReport(rr, pos, remaining); + break; + } + case SDES::kPayloadType: + { + const SDES *sdes = static_cast(report); + internal::writePacketSDES(sdes, pos, remaining); + break; } + case Bye::kPayloadType: + { + const Bye *bye = static_cast(report); + internal::writePacketBye(bye, pos, remaining); + break; + } + case App::kPayloadType: + { + const App *app = static_cast(report); + internal::writePacketApp(app, pos, remaining); + break; + } + case TransportLayerFeedbackMessage::kPayloadType: + { + const TransportLayerFeedbackMessage *fm = static_cast(report); + internal::writePacketTransportLayerFeedbackMessage(fm, pos, remaining); + break; + } + case PayloadSpecificFeedbackMessage::kPayloadType: + { + const PayloadSpecificFeedbackMessage *fm = static_cast(report); + internal::writePacketPayloadSpecificFeedbackMessage(fm, pos, remaining); + break; + } + case XR::kPayloadType: + { + const XR *xr = static_cast(report); + internal::writePacketXR(xr, pos, remaining); + break; + } + default: + { + const UnknownReport *unknown = static_cast(report); + internal::writePacketUnknown(unknown, pos, remaining); + break; + } + } - BYTE *endOfReport = pos; - size_t diff = static_cast(reinterpret_cast(endOfReport) - reinterpret_cast(startOfReport)); + BYTE *endOfReport = pos; + size_t diff = static_cast(reinterpret_cast(endOfReport) - reinterpret_cast(startOfReport)); - size_t modulas = diff % sizeof(DWORD); - if (0 != modulas) { - advancePos(pos, remaining, sizeof(DWORD)-modulas); - diff += (sizeof(DWORD)-modulas); - } + size_t modulas = diff % sizeof(DWORD); + if (0 != modulas) { + internal::advancePos(pos, remaining, sizeof(DWORD)-modulas); + diff += (sizeof(DWORD)-modulas); + } - if (ZS_IS_LOGGING(Insane)) { - ZS_LOG_TRACE(slog("writing report") + ZS_PARAM("pt", report->ptToString()) + ZS_PARAM("pt (number)", report->pt()) + ZS_PARAM("size", diff)) - } + ZS_EVENTING_3(x, i, Insane, RTCPPacketWriteReport, ol, RtcpPacket, Info, + string, payloadType, report->ptToString(), + byte, payloadTypeNumber, report->pt(), + size_t, size, diff + ); - size_t padding = 0; + size_t padding = 0; - if (NULL == report->next()) { - padding = boundarySize(static_cast(report->padding())); - if (0 != padding) { - if (padding > 1) { - advancePos(pos, remaining, (padding-1)*sizeof(BYTE)); - } - pos[0] = static_cast(padding); - advancePos(pos, remaining); + if (NULL == report->next()) { + padding = internal::boundarySize(static_cast(report->padding())); + if (0 != padding) { + if (padding > 1) { + internal::advancePos(pos, remaining, (padding-1)*sizeof(BYTE)); } + pos[0] = static_cast(padding); + internal::advancePos(pos, remaining); } - - size_t headerSize = ((diff+padding)/sizeof(DWORD))-1; - ASSERT(throwIfGreaterThanBitsAllow(headerSize, 16)) - - RTPUtils::setBE16(&(startOfReport[2]), static_cast(headerSize)); } - ASSERT(0 == remaining) + size_t headerSize = ((diff+padding)/sizeof(DWORD))-1; + ASSERT(internal::throwIfGreaterThanBitsAllow(headerSize, 16)); + + UseRTPUtils::setBE16(&(startOfReport[2]), static_cast(headerSize)); } + ASSERT(0 == remaining); } } diff --git a/ortc/cpp/ortc_RTPDecoderAudio.cpp b/ortc/cpp/ortc_RTPDecoderAudio.cpp new file mode 100644 index 00000000..c608827f --- /dev/null +++ b/ortc/cpp/ortc_RTPDecoderAudio.cpp @@ -0,0 +1,602 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(RTPDecoderAudioSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudioSettingsDefaults + #pragma mark + + class RTPDecoderAudioSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~RTPDecoderAudioSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static RTPDecoderAudioSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static RTPDecoderAudioSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + } + + }; + + //------------------------------------------------------------------------- + void installRTPDecoderAudioSettingsDefaults() + { + RTPDecoderAudioSettingsDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderAudioForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + IRTPDecoderAudio::PromiseWithRTPDecoderAudioPtr IRTPDecoderAudio::create( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderAudio, UseEngine); + return UseEngine::createRTPDecoderAudio(parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPDecoderAudio + #pragma mark + + //------------------------------------------------------------------------- + IRTPDecoderAudioForMediaEngine::ForMediaEnginePtr IRTPDecoderAudioForMediaEngine::create( + PromiseWithRTPDecoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ) + { + return internal::IRTPDecoderAudioFactory::singleton().create(promise, mediaEngine, parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + //------------------------------------------------------------------------- + RTPDecoderAudio::RTPDecoderAudio( + const make_private &, + IMessageQueuePtr queue, + PromiseWithRTPDecoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + promise_(promise), + mediaEngine_(mediaEngine), + parameters_(parameters), + notifyDelegate_(delegate_), + delegate_(IRTPDecoderDelegateProxy::createWeak(delegate)), + traceHelper_(id_) + { + ZS_EVENTING_1(x, i, Detail, RTPDecoderAudioCreate, ol, MediaEngine, Start, puid, id, id_); + } + + //------------------------------------------------------------------------- + void RTPDecoderAudio::init() + { + asyncThisDelegate_ = IRTPDecoderAysncDelegateProxy::createWeak(thisWeak_.lock()); + AutoRecursiveLock lock(*this); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + RTPDecoderAudio::~RTPDecoderAudio() + { + if (isNoop()) return; + + thisWeak_.reset(); + + cancel(); + ZS_EVENTING_1(x, i, Detail, RTPDecoderAudioDestroy, ol, MediaEngine, Stop, puid, id, id_); + } + + //----------------------------------------------------------------------- + RTPDecoderAudioPtr RTPDecoderAudio::create( + PromiseWithRTPDecoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ) + { + auto pThis(make_shared(make_private{}, IORTCForInternal::queueRTP(), promise, mediaEngine, parameters, delegate)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + RTPDecoderAudioPtr RTPDecoderAudio::convert(ForMediaEnginePtr object) + { + return ZS_DYNAMIC_PTR_CAST(RTPDecoderAudio, object); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTP + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderAudio::cancel() + { + ZS_EVENTING_1(x, i, Debug, RTPDecoderAudioCancel, ol, MediaEngine, Cancel, puid, id, id_); + + AutoRecursiveLock lock(*this); + innerCancel(); + } + + //------------------------------------------------------------------------- + RTPDecoderAudio::States RTPDecoderAudio::getState() const + { + AutoRecursiveLock lock(*this); + return currentState_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoder + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderAudio::notifyRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) + { + try { + asyncThisDelegate_->onRTPDecoderRTPPacket(trace, packet); + } catch (const IRTPDecoderAysncDelegateProxy::Exceptions::DelegateGone &) { + // should never happen + } + } + + //------------------------------------------------------------------------- + void RTPDecoderAudio::notifyRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) + { + try { + asyncThisDelegate_->onRTPDecoderRTCPPacket(trace, packet); + } catch (const IRTPDecoderAysncDelegateProxy::Exceptions::DelegateGone &) { + // should never happen + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoderAudio + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderAudio::shutdown() + { + ZS_EVENTING_1(x, i, Detail, RTPDecoderAudioShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoderForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoderAudioForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderAudio::onWake() + { + ZS_EVENTING_1(x, i, Trace, RTPDecoderAudioOnWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IPromiseSettledDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderAudio::onPromiseSettled(PromisePtr promise) + { + ZS_EVENTING_2(x, i, Trace, RTPDecoderAudioOnPromiseSettled, ol, MediaEngine, Event, puid, id, id_, puid, promiseId, promise->getID()); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoderAysncDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderAudio::onRTPDecoderRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) + { +#define TODO 1 +#define TODO 2 + } + + //------------------------------------------------------------------------- + void RTPDecoderAudio::onRTPDecoderRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) + { +#define TODO 1 +#define TODO 2 + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderAudio::innerCancel() + { + //....................................................................... + // try to gracefully shutdown + + if (isShutdown()) return; + + setState(IRTP::State_ShuttingDown); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { + ZS_EVENTING_2(x, i, Debug, RTPDecoderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "graceful"); + + // perform any graceful asynchronous shutdown processes needed and + // re-attempt shutdown again later if needed. + + if (!stepShutdownPendingPromise()) return; + if (!stepShutdownCoder()) return; + } + + //....................................................................... + // final cleanup (hard shutdown) + + setState(IRTP::State_Shutdown); + + stepShutdownPendingPromise(); + stepShutdownCoder(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyRTPShutdownStateChanged(); + } + + // make sure to cleanup any final reference to self + gracefulShutdownReference_.reset(); + + mediaEngine_.reset(); + } + + //------------------------------------------------------------------------- + bool RTPDecoderAudio::stepShutdownPendingPromise() + { + if (!promise_) { + ZS_EVENTING_2(x, i, Debug, RTPDecoderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no pending promise"); + return true; + } + + ZS_EVENTING_2(x, i, Debug, RTPDecoderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "pending promise"); + + promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + promise_.reset(); + return true; + } + + //------------------------------------------------------------------------- + bool RTPDecoderAudio::stepShutdownCoder() + { + ZS_EVENTING_2(x, i, Debug, RTPDecoderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "coder"); + +#define TODO 1 +#define TODO 2 + + return true; + } + + //------------------------------------------------------------------------- + void RTPDecoderAudio::step() + { + ZS_EVENTING_1(x, i, Trace, RTPDecoderAudioStep, ol, MediaEngine, Step, puid, id, id_); + + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, RTPDecoderAudioStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + if (!stepSetup()) goto not_ready; + if (!stepResolve()) goto not_ready; + + goto ready; + + not_ready: + { + ZS_EVENTING_2(x, i, Trace, RTPDecoderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); + return; + } + + ready: + { + ZS_EVENTING_2(x, i, Trace, RTPDecoderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); + setState(IRTP::State_Ready); + return; + } + } + + //------------------------------------------------------------------------- + bool RTPDecoderAudio::stepSetup() + { + return true; + } + + //------------------------------------------------------------------------- + bool RTPDecoderAudio::stepResolve() + { + if (!promise_) { + ZS_EVENTING_2(x, i, Trace, RTPDecoderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "promise already resolved"); + return true; + } + + ZS_EVENTING_2(x, i, Trace, RTPDecoderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "resolving promise"); + + promise_->resolve(thisWeak_.lock()); + promise_.reset(); + return true; + } + + //------------------------------------------------------------------------- + void RTPDecoderAudio::setState(States state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, RTPDecoderAudioSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IRTP::toString(state), string, oldState, IRTP::toString(currentState_)); + + currentState_ = state; + + auto pThis = thisWeak_.lock(); + + if ((delegate_) && + (pThis)) { + try { + delegate_->onRTPDecoderStateChanged(thisWeak_.lock(), state); + } catch (IRTPDecoderDelegateProxy::Exceptions::DelegateGone &) { + } + } + +// MediaEnginePtr pThis = mThisWeak.lock(); +// if (pThis) { +// mSubscriptions.delegate()->onMediaEngineStateChanged(pThis, currentState_); +// } + } + + //------------------------------------------------------------------------- + void RTPDecoderAudio::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void RTPDecoderAudio::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, RTPDecoderAudioSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, RTPDecoderAudioSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + } + + //------------------------------------------------------------------------- + void RTPDecoderAudio::innerNotifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) + { + IRTPDecoderDelegatePtr delegate; + + { + AutoRecursiveLock lock(*this); + delegate = notifyDelegate_.lock(); + } + + if (!delegate) return; + + delegate->notifyRTPDecoderAudioFrame(traceHelper_.trace(trace), frame); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderAudioFactory + #pragma mark + + //------------------------------------------------------------------------- + IRTPDecoderAudioFactory &IRTPDecoderAudioFactory::singleton() + { + return RTPDecoderAudioFactory::singleton(); + } + + //------------------------------------------------------------------------- + RTPDecoderAudioPtr IRTPDecoderAudioFactory::create( + PromiseWithRTPDecoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ) + { + if (this) {} + return internal::RTPDecoderAudio::create(promise, mediaEngine, parameters, delegate); + } + + } // internal namespace +} diff --git a/ortc/cpp/ortc_RTPDecoderVideo.cpp b/ortc/cpp/ortc_RTPDecoderVideo.cpp new file mode 100644 index 00000000..2f22fcdf --- /dev/null +++ b/ortc/cpp/ortc_RTPDecoderVideo.cpp @@ -0,0 +1,602 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(RTPDecoderVideoSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideoSettingsDefaults + #pragma mark + + class RTPDecoderVideoSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~RTPDecoderVideoSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static RTPDecoderVideoSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static RTPDecoderVideoSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + } + + }; + + //------------------------------------------------------------------------- + void installRTPDecoderVideoSettingsDefaults() + { + RTPDecoderVideoSettingsDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderVideoForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + IRTPDecoderVideo::PromiseWithRTPDecoderVideoPtr IRTPDecoderVideo::create( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderVideo, UseEngine); + return UseEngine::createRTPDecoderVideo(parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPDecoderVideo + #pragma mark + + //------------------------------------------------------------------------- + IRTPDecoderVideoForMediaEngine::ForMediaEnginePtr IRTPDecoderVideoForMediaEngine::create( + PromiseWithRTPDecoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ) + { + return internal::IRTPDecoderVideoFactory::singleton().create(promise, mediaEngine, parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + //------------------------------------------------------------------------- + RTPDecoderVideo::RTPDecoderVideo( + const make_private &, + IMessageQueuePtr queue, + PromiseWithRTPDecoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + promise_(promise), + mediaEngine_(mediaEngine), + parameters_(parameters), + notifyDelegate_(delegate_), + delegate_(IRTPDecoderDelegateProxy::createWeak(delegate)), + traceHelper_(id_) + { + ZS_EVENTING_1(x, i, Detail, RTPDecoderVideoCreate, ol, MediaEngine, Start, puid, id, id_); + } + + //------------------------------------------------------------------------- + void RTPDecoderVideo::init() + { + asyncThisDelegate_ = IRTPDecoderAysncDelegateProxy::createWeak(thisWeak_.lock()); + AutoRecursiveLock lock(*this); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + RTPDecoderVideo::~RTPDecoderVideo() + { + if (isNoop()) return; + + thisWeak_.reset(); + + cancel(); + ZS_EVENTING_1(x, i, Detail, RTPDecoderVideoDestroy, ol, MediaEngine, Stop, puid, id, id_); + } + + //----------------------------------------------------------------------- + RTPDecoderVideoPtr RTPDecoderVideo::create( + PromiseWithRTPDecoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ) + { + auto pThis(make_shared(make_private{}, IORTCForInternal::queueRTP(), promise, mediaEngine, parameters, delegate)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + RTPDecoderVideoPtr RTPDecoderVideo::convert(ForMediaEnginePtr object) + { + return ZS_DYNAMIC_PTR_CAST(RTPDecoderVideo, object); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTP + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderVideo::cancel() + { + ZS_EVENTING_1(x, i, Debug, RTPDecoderVideoCancel, ol, MediaEngine, Cancel, puid, id, id_); + + AutoRecursiveLock lock(*this); + innerCancel(); + } + + //------------------------------------------------------------------------- + RTPDecoderVideo::States RTPDecoderVideo::getState() const + { + AutoRecursiveLock lock(*this); + return currentState_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoder + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderVideo::notifyRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) + { + try { + asyncThisDelegate_->onRTPDecoderRTPPacket(trace, packet); + } catch (const IRTPDecoderAysncDelegateProxy::Exceptions::DelegateGone &) { + // should never happen + } + } + + //------------------------------------------------------------------------- + void RTPDecoderVideo::notifyRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) + { + try { + asyncThisDelegate_->onRTPDecoderRTCPPacket(trace, packet); + } catch (const IRTPDecoderAysncDelegateProxy::Exceptions::DelegateGone &) { + // should never happen + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoderVideo + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderVideo::shutdown() + { + ZS_EVENTING_1(x, i, Detail, RTPDecoderVideoShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoderForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoderVideoForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderVideo::onWake() + { + ZS_EVENTING_1(x, i, Trace, RTPDecoderVideoOnWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IPromiseSettledDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderVideo::onPromiseSettled(PromisePtr promise) + { + ZS_EVENTING_2(x, i, Trace, RTPDecoderVideoOnPromiseSettled, ol, MediaEngine, Event, puid, id, id_, puid, promiseId, promise->getID()); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoderAysncDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderVideo::onRTPDecoderRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) + { +#define TODO 1 +#define TODO 2 + } + + //------------------------------------------------------------------------- + void RTPDecoderVideo::onRTPDecoderRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) + { +#define TODO 1 +#define TODO 2 + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void RTPDecoderVideo::innerCancel() + { + //....................................................................... + // try to gracefully shutdown + + if (isShutdown()) return; + + setState(IRTP::State_ShuttingDown); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { + ZS_EVENTING_2(x, i, Debug, RTPDecoderVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "graceful"); + + // perform any graceful asynchronous shutdown processes needed and + // re-attempt shutdown again later if needed. + + if (!stepShutdownPendingPromise()) return; + if (!stepShutdownCoder()) return; + } + + //....................................................................... + // final cleanup (hard shutdown) + + setState(IRTP::State_Shutdown); + + stepShutdownPendingPromise(); + stepShutdownCoder(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyRTPShutdownStateChanged(); + } + + // make sure to cleanup any final reference to self + gracefulShutdownReference_.reset(); + + mediaEngine_.reset(); + } + + //------------------------------------------------------------------------- + bool RTPDecoderVideo::stepShutdownPendingPromise() + { + if (!promise_) { + ZS_EVENTING_2(x, i, Debug, RTPDecoderVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no pending promise"); + return true; + } + + ZS_EVENTING_2(x, i, Debug, RTPDecoderVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "pending promise"); + + promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + promise_.reset(); + return true; + } + + //------------------------------------------------------------------------- + bool RTPDecoderVideo::stepShutdownCoder() + { + ZS_EVENTING_2(x, i, Debug, RTPDecoderVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "coder"); + +#define TODO 1 +#define TODO 2 + + return true; + } + + //------------------------------------------------------------------------- + void RTPDecoderVideo::step() + { + ZS_EVENTING_1(x, i, Trace, RTPDecoderVideoStep, ol, MediaEngine, Step, puid, id, id_); + + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, RTPDecoderVideoStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + if (!stepSetup()) goto not_ready; + if (!stepResolve()) goto not_ready; + + goto ready; + + not_ready: + { + ZS_EVENTING_2(x, i, Trace, RTPDecoderVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); + return; + } + + ready: + { + ZS_EVENTING_2(x, i, Trace, RTPDecoderVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); + setState(IRTP::State_Ready); + return; + } + } + + //------------------------------------------------------------------------- + bool RTPDecoderVideo::stepSetup() + { + return true; + } + + //------------------------------------------------------------------------- + bool RTPDecoderVideo::stepResolve() + { + if (!promise_) { + ZS_EVENTING_2(x, i, Trace, RTPDecoderVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "promise already resolved"); + return true; + } + + ZS_EVENTING_2(x, i, Trace, RTPDecoderVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "resolving promise"); + + promise_->resolve(thisWeak_.lock()); + promise_.reset(); + return true; + } + + //------------------------------------------------------------------------- + void RTPDecoderVideo::setState(States state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, RTPDecoderVideoSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IRTP::toString(state), string, oldState, IRTP::toString(currentState_)); + + currentState_ = state; + + auto pThis = thisWeak_.lock(); + + if ((delegate_) && + (pThis)) { + try { + delegate_->onRTPDecoderStateChanged(thisWeak_.lock(), state); + } catch (IRTPDecoderDelegateProxy::Exceptions::DelegateGone &) { + } + } + +// MediaEnginePtr pThis = mThisWeak.lock(); +// if (pThis) { +// mSubscriptions.delegate()->onMediaEngineStateChanged(pThis, currentState_); +// } + } + + //------------------------------------------------------------------------- + void RTPDecoderVideo::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void RTPDecoderVideo::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, RTPDecoderVideoSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, RTPDecoderVideoSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + } + + //------------------------------------------------------------------------- + void RTPDecoderVideo::innerNotifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) + { + IRTPDecoderDelegatePtr delegate; + + { + AutoRecursiveLock lock(*this); + delegate = notifyDelegate_.lock(); + } + + if (!delegate) return; + + delegate->notifyRTPDecoderVideoFrame(traceHelper_.trace(trace), frame); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderVideoFactory + #pragma mark + + //------------------------------------------------------------------------- + IRTPDecoderVideoFactory &IRTPDecoderVideoFactory::singleton() + { + return RTPDecoderVideoFactory::singleton(); + } + + //------------------------------------------------------------------------- + RTPDecoderVideoPtr IRTPDecoderVideoFactory::create( + PromiseWithRTPDecoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ) + { + if (this) {} + return internal::RTPDecoderVideo::create(promise, mediaEngine, parameters, delegate); + } + + } // internal namespace +} diff --git a/ortc/cpp/ortc_RTPEncoderAudio.cpp b/ortc/cpp/ortc_RTPEncoderAudio.cpp new file mode 100644 index 00000000..f2ae8fb6 --- /dev/null +++ b/ortc/cpp/ortc_RTPEncoderAudio.cpp @@ -0,0 +1,597 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(RTPEncoderAudioSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudioSettingsDefaults + #pragma mark + + class RTPEncoderAudioSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~RTPEncoderAudioSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static RTPEncoderAudioSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static RTPEncoderAudioSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + } + + }; + + //------------------------------------------------------------------------- + void installRTPEncoderAudioSettingsDefaults() + { + RTPEncoderAudioSettingsDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderAudioForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + IRTPEncoderAudio::PromiseWithRTPEncoderAudioPtr IRTPEncoderAudio::create( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderAudio, UseEngine); + return UseEngine::createRTPEncoderAudio(parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPEncoderAudio + #pragma mark + + //------------------------------------------------------------------------- + IRTPEncoderAudioForMediaEngine::ForMediaEnginePtr IRTPEncoderAudioForMediaEngine::create( + PromiseWithRTPEncoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ) + { + return internal::IRTPEncoderAudioFactory::singleton().create(promise, mediaEngine, parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + //------------------------------------------------------------------------- + RTPEncoderAudio::RTPEncoderAudio( + const make_private &, + IMessageQueuePtr queue, + PromiseWithRTPEncoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + promise_(promise), + mediaEngine_(mediaEngine), + parameters_(parameters), + notifyDelegate_(delegate_), + delegate_(IRTPEncoderDelegateProxy::createWeak(delegate)), + traceHelper_(id_) + { + ZS_EVENTING_1(x, i, Detail, RTPEncoderAudioCreate, ol, MediaEngine, Start, puid, id, id_); + } + + //------------------------------------------------------------------------- + void RTPEncoderAudio::init() + { + asyncThisDelegate_ = IRTPEncoderAysncDelegateProxy::createWeak(thisWeak_.lock()); + AutoRecursiveLock lock(*this); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + RTPEncoderAudio::~RTPEncoderAudio() + { + if (isNoop()) return; + + thisWeak_.reset(); + + cancel(); + ZS_EVENTING_1(x, i, Detail, RTPEncoderAudioDestroy, ol, MediaEngine, Stop, puid, id, id_); + } + + //----------------------------------------------------------------------- + RTPEncoderAudioPtr RTPEncoderAudio::create( + PromiseWithRTPEncoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ) + { + auto pThis(make_shared(make_private{}, IORTCForInternal::queueRTP(), promise, mediaEngine, parameters, delegate)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + RTPEncoderAudioPtr RTPEncoderAudio::convert(ForMediaEnginePtr object) + { + return ZS_DYNAMIC_PTR_CAST(RTPEncoderAudio, object); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTP + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderAudio::cancel() + { + ZS_EVENTING_1(x, i, Debug, RTPEncoderAudioCancel, ol, MediaEngine, Cancel, puid, id, id_); + + AutoRecursiveLock lock(*this); + innerCancel(); + } + + //------------------------------------------------------------------------- + RTPEncoderAudio::States RTPEncoderAudio::getState() const + { + AutoRecursiveLock lock(*this); + return currentState_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoder + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderAudio::notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) + { + try { + asyncThisDelegate_->onRTPEncoderAudioFrame(trace, frame); + } catch (const IRTPEncoderAysncDelegateProxy::Exceptions::DelegateGone &) { + // should never happen + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoderAudio + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderAudio::shutdown() + { + ZS_EVENTING_1(x, i, Detail, RTPEncoderAudioShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoderForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoderAudioForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderAudio::onWake() + { + ZS_EVENTING_1(x, i, Trace, RTPEncoderAudioOnWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IPromiseSettledDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderAudio::onPromiseSettled(PromisePtr promise) + { + ZS_EVENTING_2(x, i, Trace, RTPEncoderAudioOnPromiseSettled, ol, MediaEngine, Event, puid, id, id_, puid, promiseId, promise->getID()); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoderAysncDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderAudio::onRTPEncoderAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) + { +#define TODO 1 +#define TODO 2 + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderAudio::innerCancel() + { + //....................................................................... + // try to gracefully shutdown + + if (isShutdown()) return; + + setState(IRTP::State_ShuttingDown); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { + ZS_EVENTING_2(x, i, Debug, RTPEncoderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "graceful"); + + // perform any graceful asynchronous shutdown processes needed and + // re-attempt shutdown again later if needed. + + if (!stepShutdownPendingPromise()) return; + if (!stepShutdownCoder()) return; + } + + //....................................................................... + // final cleanup (hard shutdown) + + setState(IRTP::State_Shutdown); + + stepShutdownPendingPromise(); + stepShutdownCoder(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyRTPShutdownStateChanged(); + } + + // make sure to cleanup any final reference to self + gracefulShutdownReference_.reset(); + + mediaEngine_.reset(); + } + + //------------------------------------------------------------------------- + bool RTPEncoderAudio::stepShutdownPendingPromise() + { + if (!promise_) { + ZS_EVENTING_2(x, i, Debug, RTPEncoderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no pending promise"); + return true; + } + + ZS_EVENTING_2(x, i, Debug, RTPEncoderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "pending promise"); + + promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + promise_.reset(); + return true; + } + + //------------------------------------------------------------------------- + bool RTPEncoderAudio::stepShutdownCoder() + { + ZS_EVENTING_2(x, i, Debug, RTPEncoderAudioShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "coder"); + +#define TODO 1 +#define TODO 2 + + return true; + } + + //------------------------------------------------------------------------- + void RTPEncoderAudio::step() + { + ZS_EVENTING_1(x, i, Trace, RTPEncoderAudioStep, ol, MediaEngine, Step, puid, id, id_); + + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, RTPEncoderAudioStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + if (!stepSetup()) goto not_ready; + if (!stepResolve()) goto not_ready; + + goto ready; + + not_ready: + { + ZS_EVENTING_2(x, i, Trace, RTPEncoderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); + return; + } + + ready: + { + ZS_EVENTING_2(x, i, Trace, RTPEncoderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); + setState(IRTP::State_Ready); + return; + } + } + + //------------------------------------------------------------------------- + bool RTPEncoderAudio::stepSetup() + { + return true; + } + + //------------------------------------------------------------------------- + bool RTPEncoderAudio::stepResolve() + { + if (!promise_) { + ZS_EVENTING_2(x, i, Trace, RTPEncoderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "promise already resolved"); + return true; + } + + ZS_EVENTING_2(x, i, Trace, RTPEncoderAudioStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "resolving promise"); + + promise_->resolve(thisWeak_.lock()); + promise_.reset(); + return true; + } + + //------------------------------------------------------------------------- + void RTPEncoderAudio::setState(States state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, RTPEncoderAudioSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IRTP::toString(state), string, oldState, IRTP::toString(currentState_)); + + currentState_ = state; + + auto pThis = thisWeak_.lock(); + + if ((delegate_) && + (pThis)) { + try { + delegate_->onRTPEncoderStateChanged(thisWeak_.lock(), state); + } catch (IRTPEncoderDelegateProxy::Exceptions::DelegateGone &) { + } + } + +// MediaEnginePtr pThis = mThisWeak.lock(); +// if (pThis) { +// mSubscriptions.delegate()->onMediaEngineStateChanged(pThis, currentState_); +// } + } + + //------------------------------------------------------------------------- + void RTPEncoderAudio::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void RTPEncoderAudio::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, RTPEncoderAudioSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, RTPEncoderAudioSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + } + + //------------------------------------------------------------------------- + void RTPEncoderAudio::innerNotifyRTP( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) + { + IRTPEncoderDelegatePtr delegate; + + { + AutoRecursiveLock lock(*this); + delegate = notifyDelegate_.lock(); + } + + if (!delegate) return; + + delegate->notifyRTPEncoderRTPPacket(traceHelper_.trace(trace), packet); + } + + //------------------------------------------------------------------------- + void RTPEncoderAudio::innerNotifyRTCP( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) + { + IRTPEncoderDelegatePtr delegate; + + { + AutoRecursiveLock lock(*this); + delegate = notifyDelegate_.lock(); + } + + if (!delegate) return; + + delegate->notifyRTPEncoderRTCPPacket(traceHelper_.trace(trace), packet); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderAudioFactory + #pragma mark + + //------------------------------------------------------------------------- + IRTPEncoderAudioFactory &IRTPEncoderAudioFactory::singleton() + { + return RTPEncoderAudioFactory::singleton(); + } + + //------------------------------------------------------------------------- + RTPEncoderAudioPtr IRTPEncoderAudioFactory::create( + PromiseWithRTPEncoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ) + { + if (this) {} + return internal::RTPEncoderAudio::create(promise, mediaEngine, parameters, delegate); + } + + } // internal namespace +} diff --git a/ortc/cpp/ortc_RTPEncoderVideo.cpp b/ortc/cpp/ortc_RTPEncoderVideo.cpp new file mode 100644 index 00000000..ceddfe0a --- /dev/null +++ b/ortc/cpp/ortc_RTPEncoderVideo.cpp @@ -0,0 +1,597 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } + +namespace ortc +{ + ZS_DECLARE_USING_PTR(zsLib, ISettings); + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + + namespace internal + { + ZS_DECLARE_CLASS_PTR(RTPEncoderVideoSettingsDefaults); + ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideoSettingsDefaults + #pragma mark + + class RTPEncoderVideoSettingsDefaults : public ISettingsApplyDefaultsDelegate + { + public: + //----------------------------------------------------------------------- + ~RTPEncoderVideoSettingsDefaults() + { + ISettings::removeDefaults(*this); + } + + //----------------------------------------------------------------------- + static RTPEncoderVideoSettingsDefaultsPtr singleton() + { + static SingletonLazySharedPtr singleton(create()); + return singleton.singleton(); + } + + //----------------------------------------------------------------------- + static RTPEncoderVideoSettingsDefaultsPtr create() + { + auto pThis(make_shared()); + ISettings::installDefaults(pThis); + return pThis; + } + + //----------------------------------------------------------------------- + virtual void notifySettingsApplyDefaults() override + { + } + + }; + + //------------------------------------------------------------------------- + void installRTPEncoderVideoSettingsDefaults() + { + RTPEncoderVideoSettingsDefaults::singleton(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderVideoForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + IRTPEncoderVideo::PromiseWithRTPEncoderVideoPtr IRTPEncoderVideo::create( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderVideo, UseEngine); + return UseEngine::createRTPEncoderVideo(parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPEncoderVideo + #pragma mark + + //------------------------------------------------------------------------- + IRTPEncoderVideoForMediaEngine::ForMediaEnginePtr IRTPEncoderVideoForMediaEngine::create( + PromiseWithRTPEncoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ) + { + return internal::IRTPEncoderVideoFactory::singleton().create(promise, mediaEngine, parameters, delegate); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + //------------------------------------------------------------------------- + RTPEncoderVideo::RTPEncoderVideo( + const make_private &, + IMessageQueuePtr queue, + PromiseWithRTPEncoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ) : + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + promise_(promise), + mediaEngine_(mediaEngine), + parameters_(parameters), + notifyDelegate_(delegate_), + delegate_(IRTPEncoderDelegateProxy::createWeak(delegate)), + traceHelper_(id_) + { + ZS_EVENTING_1(x, i, Detail, RTPEncoderVideoCreate, ol, MediaEngine, Start, puid, id, id_); + } + + //------------------------------------------------------------------------- + void RTPEncoderVideo::init() + { + asyncThisDelegate_ = IRTPEncoderAysncDelegateProxy::createWeak(thisWeak_.lock()); + AutoRecursiveLock lock(*this); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); + } + + //------------------------------------------------------------------------- + RTPEncoderVideo::~RTPEncoderVideo() + { + if (isNoop()) return; + + thisWeak_.reset(); + + cancel(); + ZS_EVENTING_1(x, i, Detail, RTPEncoderVideoDestroy, ol, MediaEngine, Stop, puid, id, id_); + } + + //----------------------------------------------------------------------- + RTPEncoderVideoPtr RTPEncoderVideo::create( + PromiseWithRTPEncoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ) + { + auto pThis(make_shared(make_private{}, IORTCForInternal::queueRTP(), promise, mediaEngine, parameters, delegate)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + + //------------------------------------------------------------------------- + RTPEncoderVideoPtr RTPEncoderVideo::convert(ForMediaEnginePtr object) + { + return ZS_DYNAMIC_PTR_CAST(RTPEncoderVideo, object); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTP + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderVideo::cancel() + { + ZS_EVENTING_1(x, i, Debug, RTPEncoderVideoCancel, ol, MediaEngine, Cancel, puid, id, id_); + + AutoRecursiveLock lock(*this); + innerCancel(); + } + + //------------------------------------------------------------------------- + RTPEncoderVideo::States RTPEncoderVideo::getState() const + { + AutoRecursiveLock lock(*this); + return currentState_; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoder + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderVideo::notifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) + { + try { + asyncThisDelegate_->onRTPEncoderVideoFrame(trace, frame); + } catch (const IRTPEncoderAysncDelegateProxy::Exceptions::DelegateGone &) { + // should never happen + } + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoderVideo + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderVideo::shutdown() + { + ZS_EVENTING_1(x, i, Detail, RTPEncoderVideoShutdown, ol, MediaEngine, Close, puid, id, id_); + + AutoRecursiveLock lock(*this); + cancel(); + } + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoderForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoderVideoForMediaEngine + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IWakeDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderVideo::onWake() + { + ZS_EVENTING_1(x, i, Trace, RTPEncoderVideoOnWake, ol, MediaEngine, Event, puid, id, id_); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IPromiseSettledDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderVideo::onPromiseSettled(PromisePtr promise) + { + ZS_EVENTING_2(x, i, Trace, RTPEncoderVideoOnPromiseSettled, ol, MediaEngine, Event, puid, id, id_, puid, promiseId, promise->getID()); + + AutoRecursiveLock lock(*this); + step(); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoderAysncDelegate + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderVideo::onRTPEncoderVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) + { +#define TODO 1 +#define TODO 2 + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => (internal) + #pragma mark + + //------------------------------------------------------------------------- + void RTPEncoderVideo::innerCancel() + { + //....................................................................... + // try to gracefully shutdown + + if (isShutdown()) return; + + setState(IRTP::State_ShuttingDown); + + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); + + if (gracefulShutdownReference_) { + ZS_EVENTING_2(x, i, Debug, RTPEncoderVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "graceful"); + + // perform any graceful asynchronous shutdown processes needed and + // re-attempt shutdown again later if needed. + + if (!stepShutdownPendingPromise()) return; + if (!stepShutdownCoder()) return; + } + + //....................................................................... + // final cleanup (hard shutdown) + + setState(IRTP::State_Shutdown); + + stepShutdownPendingPromise(); + stepShutdownCoder(); + + auto engine = mediaEngine_.lock(); + if (engine) { + engine->notifyRTPShutdownStateChanged(); + } + + // make sure to cleanup any final reference to self + gracefulShutdownReference_.reset(); + + mediaEngine_.reset(); + } + + //------------------------------------------------------------------------- + bool RTPEncoderVideo::stepShutdownPendingPromise() + { + if (!promise_) { + ZS_EVENTING_2(x, i, Debug, RTPEncoderVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "no pending promise"); + return true; + } + + ZS_EVENTING_2(x, i, Debug, RTPEncoderVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "pending promise"); + + promise_->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "media engine is shutting down")); + promise_.reset(); + return true; + } + + //------------------------------------------------------------------------- + bool RTPEncoderVideo::stepShutdownCoder() + { + ZS_EVENTING_2(x, i, Debug, RTPEncoderVideoShutdownStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "coder"); + +#define TODO 1 +#define TODO 2 + + return true; + } + + //------------------------------------------------------------------------- + void RTPEncoderVideo::step() + { + ZS_EVENTING_1(x, i, Trace, RTPEncoderVideoStep, ol, MediaEngine, Step, puid, id, id_); + + if ((isShuttingDown()) || + (isShutdown())) { + ZS_EVENTING_1(x, i, Trace, RTPEncoderVideoStepForwardCancel, ol, MediaEngine, Step, puid, id, id_); + cancel(); + return; + } + + if (!stepSetup()) goto not_ready; + if (!stepResolve()) goto not_ready; + + goto ready; + + not_ready: + { + ZS_EVENTING_2(x, i, Trace, RTPEncoderVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); + return; + } + + ready: + { + ZS_EVENTING_2(x, i, Trace, RTPEncoderVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); + setState(IRTP::State_Ready); + return; + } + } + + //------------------------------------------------------------------------- + bool RTPEncoderVideo::stepSetup() + { + return true; + } + + //------------------------------------------------------------------------- + bool RTPEncoderVideo::stepResolve() + { + if (!promise_) { + ZS_EVENTING_2(x, i, Trace, RTPEncoderVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "promise already resolved"); + return true; + } + + ZS_EVENTING_2(x, i, Trace, RTPEncoderVideoStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "resolving promise"); + + promise_->resolve(thisWeak_.lock()); + promise_.reset(); + return true; + } + + //------------------------------------------------------------------------- + void RTPEncoderVideo::setState(States state) + { + if (state == currentState_) return; + + ZS_EVENTING_3(x, i, Detail, RTPEncoderVideoSetState, ol, MediaEngine, StateEvent, puid, id, id_, string, newState, IRTP::toString(state), string, oldState, IRTP::toString(currentState_)); + + currentState_ = state; + + auto pThis = thisWeak_.lock(); + + if ((delegate_) && + (pThis)) { + try { + delegate_->onRTPEncoderStateChanged(thisWeak_.lock(), state); + } catch (IRTPEncoderDelegateProxy::Exceptions::DelegateGone &) { + } + } + +// MediaEnginePtr pThis = mThisWeak.lock(); +// if (pThis) { +// mSubscriptions.delegate()->onMediaEngineStateChanged(pThis, currentState_); +// } + } + + //------------------------------------------------------------------------- + void RTPEncoderVideo::setError(PromisePtr promise) + { + if (!promise) return; + + auto reason = promise->reason(); + if (!reason) return; + + setError(reason->mErrorCode, reason->mReason); + } + + //------------------------------------------------------------------------- + void RTPEncoderVideo::setError(WORD errorCode, const char *inReason) + { + String reason(inReason); + if (reason.isEmpty()) { + reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); + } + + if (0 != lastError_) { + ZS_EVENTING_3(x, e, Detail, RTPEncoderVideoSetErrorIgnored, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + return; + } + + lastError_ = errorCode; + lastErrorReason_ = reason; + + ZS_EVENTING_3(x, e, Detail, RTPEncoderVideoSetError, ol, MediaEngine, ErrorEvent, puid, id, id_, word, error, lastError_, string, reason, lastErrorReason_); + } + + //------------------------------------------------------------------------- + void RTPEncoderVideo::innerNotifyRTP( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) + { + IRTPEncoderDelegatePtr delegate; + + { + AutoRecursiveLock lock(*this); + delegate = notifyDelegate_.lock(); + } + + if (!delegate) return; + + delegate->notifyRTPEncoderRTPPacket(traceHelper_.trace(trace), packet); + } + + //------------------------------------------------------------------------- + void RTPEncoderVideo::innerNotifyRTCP( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) + { + IRTPEncoderDelegatePtr delegate; + + { + AutoRecursiveLock lock(*this); + delegate = notifyDelegate_.lock(); + } + + if (!delegate) return; + + delegate->notifyRTPEncoderRTCPPacket(traceHelper_.trace(trace), packet); + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderVideoFactory + #pragma mark + + //------------------------------------------------------------------------- + IRTPEncoderVideoFactory &IRTPEncoderVideoFactory::singleton() + { + return RTPEncoderVideoFactory::singleton(); + } + + //------------------------------------------------------------------------- + RTPEncoderVideoPtr IRTPEncoderVideoFactory::create( + PromiseWithRTPEncoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ) + { + if (this) {} + return internal::RTPEncoderVideo::create(promise, mediaEngine, parameters, delegate); + } + + } // internal namespace +} diff --git a/ortc/cpp/ortc_RTPListener.cpp b/ortc/cpp/ortc_RTPListener.cpp index d92602b0..765057af 100644 --- a/ortc/cpp/ortc_RTPListener.cpp +++ b/ortc/cpp/ortc_RTPListener.cpp @@ -33,8 +33,6 @@ #include #include #include -#include -#include #include #include #include @@ -42,6 +40,9 @@ #include #include +#include +#include + #include #include diff --git a/ortc/cpp/ortc_RTPMediaEngine.cpp b/ortc/cpp/ortc_RTPMediaEngine.cpp deleted file mode 100644 index fcce33c0..00000000 --- a/ortc/cpp/ortc_RTPMediaEngine.cpp +++ /dev/null @@ -1,5431 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef WINRT -#include -#endif - -#ifdef _DEBUG -#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) -#else -#define ASSERT(x) -#endif //_DEBUG - -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpmediaengine) } - -namespace ortc -{ - ZS_DECLARE_USING_PTR(zsLib, ISettings); - ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); - - namespace internal - { - ZS_DECLARE_CLASS_PTR(RTPMediaEngineSettingsDefaults); - ZS_DECLARE_CLASS_PTR(RTPMediaEngineRegistration); - ZS_DECLARE_CLASS_PTR(RTPMediaEngineSingleton); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark (helpers) - #pragma mark - - // foreward declaration - void webrtcTrace(Log::Severity severity, Log::Level level, const char *message); - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngineSettingsDefaults - #pragma mark - - class RTPMediaEngineSettingsDefaults : public ISettingsApplyDefaultsDelegate - { - public: - //----------------------------------------------------------------------- - ~RTPMediaEngineSettingsDefaults() - { - ISettings::removeDefaults(*this); - } - - //----------------------------------------------------------------------- - static RTPMediaEngineSettingsDefaultsPtr singleton() - { - static SingletonLazySharedPtr singleton(create()); - return singleton.singleton(); - } - - //----------------------------------------------------------------------- - static RTPMediaEngineSettingsDefaultsPtr create() - { - auto pThis(make_shared()); - ISettings::installDefaults(pThis); - return pThis; - } - - //----------------------------------------------------------------------- - virtual void notifySettingsApplyDefaults() override - { - } - - }; - - //------------------------------------------------------------------------- - void installRTPMediaEngineSettingsDefaults() - { - RTPMediaEngineSettingsDefaults::singleton(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngineRegistration - #pragma mark - - class RTPMediaEngineRegistration : public IRTPMediaEngineRegistration - { - protected: - struct make_private {}; - public: - //----------------------------------------------------------------------- - RTPMediaEngineRegistration(const make_private &) - {} - - //----------------------------------------------------------------------- - ~RTPMediaEngineRegistration() - { - mEngine->shutdown(); - mEngine.reset(); - } - - //----------------------------------------------------------------------- - static RTPMediaEngineRegistrationPtr create() - { - RTPMediaEngineRegistrationPtr pThis(make_shared(make_private{})); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //----------------------------------------------------------------------- - void init() - { - mEngine = IRTPMediaEngineFactory::singleton().create(mThisWeak.lock()); - } - - //----------------------------------------------------------------------- - PromiseWithRTPMediaEnginePtr notify() - { - auto promise = PromiseWithRTPMediaEngine::create(IORTCForInternal::queueORTC()); - promise->setReferenceHolder(mThisWeak.lock()); - mEngine->notify(promise); - return promise; - } - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineRegistration - #pragma mark - - virtual RTPMediaEnginePtr getRTPEngine() const {return mEngine;} - - protected: - RTPMediaEngineRegistrationWeakPtr mThisWeak; - RTPMediaEnginePtr mEngine; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngineSingleton - #pragma mark - - class RTPMediaEngineSingleton : public SharedRecursiveLock, - public ISingletonManagerDelegate - { - protected: - struct make_private {}; - - public: - //----------------------------------------------------------------------- - RTPMediaEngineSingleton(const make_private &) : - SharedRecursiveLock(SharedRecursiveLock::create()) - { - } - - //----------------------------------------------------------------------- - static RTPMediaEngineSingletonPtr create() - { - RTPMediaEngineSingletonPtr pThis(make_shared(make_private{})); - return pThis; - } - - //----------------------------------------------------------------------- - static RTPMediaEngineSingletonPtr singleton() - { - AutoRecursiveLock lock(*IHelper::getGlobalLock()); - static SingletonLazySharedPtr singleton(create()); - RTPMediaEngineSingletonPtr result = singleton.singleton(); - - static zsLib::SingletonManager::Register registerSingleton("org.ortc.RTPMediaEngineSingleton", result); - - if (!result) { - ZS_LOG_WARNING(Detail, slog("singleton gone")) - } - - return result; - } - - //----------------------------------------------------------------------- - static RTPMediaEnginePtr getEngineIfAlive() - { - auto pThis(singleton()); - if (!pThis) return RTPMediaEnginePtr(); - - AutoRecursiveLock lock(*pThis); - auto result = pThis->mEngineRegistration.lock(); - if (!result) return RTPMediaEnginePtr(); - - return result->getRTPEngine(); - } - - //----------------------------------------------------------------------- - Log::Params log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::RTPMediaEngineSingleton"); - IHelper::debugAppend(objectEl, "id", mID); - return Log::Params(message, objectEl); - } - - //----------------------------------------------------------------------- - static Log::Params slog(const char *message) - { - return Log::Params(message, "ortc::RTPMediaEngineSingleton"); - } - - //----------------------------------------------------------------------- - Log::Params debug(const char *message) const - { - return Log::Params(message, toDebug()); - } - - //----------------------------------------------------------------------- - virtual ElementPtr toDebug() const - { - AutoRecursiveLock lock(*this); - ElementPtr resultEl = Element::create("ortc::RTPMediaEngineSingleton"); - - IHelper::debugAppend(resultEl, "id", mID); - - return resultEl; - } - - //----------------------------------------------------------------------- - RTPMediaEngineRegistrationPtr getEngineRegistration() - { - AutoRecursiveLock lock(*this); - auto result = mEngineRegistration.lock(); - if (!result) { - result = RTPMediaEngineRegistration::create(); - mEngineRegistration = result; - } - return result; - } - - protected: - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark ISingletonManagerDelegate - #pragma mark - - virtual void notifySingletonCleanup() - { - AutoRecursiveLock lock(*this); - mEngineRegistration.reset(); - } - - protected: - AutoPUID mID; - - RTPMediaEngineRegistrationWeakPtr mEngineRegistration; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForORTC - #pragma mark - - //------------------------------------------------------------------------- - void IRTPMediaEngineForORTC::setLogLevel(Log::Level level) - { - RTPMediaEngine::setLogLevel(level); - } - - //------------------------------------------------------------------------- - void IRTPMediaEngineForORTC::ntpServerTime(const Milliseconds &value) - { - RTPMediaEngine::ntpServerTime(value); - } - - //------------------------------------------------------------------------- - void IRTPMediaEngineForORTC::startMediaTracing() - { - RTPMediaEngine::startMediaTracing(); - } - - //------------------------------------------------------------------------- - void IRTPMediaEngineForORTC::stopMediaTracing() - { - RTPMediaEngine::stopMediaTracing(); - } - - //------------------------------------------------------------------------- - bool IRTPMediaEngineForORTC::isMediaTracing() - { - return RTPMediaEngine::isMediaTracing(); - } - - //------------------------------------------------------------------------- - bool IRTPMediaEngineForORTC::saveMediaTrace(String filename) - { - return RTPMediaEngine::saveMediaTrace(filename); - } - - //------------------------------------------------------------------------- - bool IRTPMediaEngineForORTC::saveMediaTrace(String host, int port) - { - return RTPMediaEngine::saveMediaTrace(host, port); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForSettings - #pragma mark - - //------------------------------------------------------------------------- - void IRTPMediaEngineForSettings::applyDefaults() - { - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPReceiverChannelMediaBase - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr IRTPMediaEngineForRTPReceiverChannelMediaBase::toDebug(ForRTPReceiverChannelMediaBasePtr object) - { - if (!object) return ElementPtr(); - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object)->toDebug(); - } - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEnginePtr IRTPMediaEngineForRTPReceiverChannelMediaBase::create() - { - return RTPMediaEngine::createEnginePromise(); - } - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEngineChannelResourcePtr IRTPMediaEngineForRTPReceiverChannelMediaBase::setupChannel( - UseReceiverChannelMediaBasePtr channel, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ) - { - auto singleton = RTPMediaEngineSingleton::singleton(); - if (!singleton) return PromiseWithRTPMediaEngineChannelResource::createRejected(IORTCForInternal::queueORTC()); - return singleton->getEngineRegistration()->getRTPEngine()->setupChannel( - channel, - transport, - track, - parameters, - packet - ); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPSenderChannelMediaBase - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr IRTPMediaEngineForRTPSenderChannelMediaBase::toDebug(ForRTPSenderChannelMediaBasePtr object) - { - if (!object) return ElementPtr(); - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object)->toDebug(); - } - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEnginePtr IRTPMediaEngineForRTPSenderChannelMediaBase::create() - { - return RTPMediaEngine::createEnginePromise(); - } - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEngineChannelResourcePtr IRTPMediaEngineForRTPSenderChannelMediaBase::setupChannel( - UseSenderChannelMediaBasePtr channel, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - IDTMFSenderDelegatePtr dtmfDelegate - ) - { - auto singleton = RTPMediaEngineSingleton::singleton(); - if (!singleton) return PromiseWithRTPMediaEngineChannelResource::createRejected(IORTCForInternal::queueORTC()); - return singleton->getEngineRegistration()->getRTPEngine()->setupChannel( - channel, - transport, - track, - parameters, - dtmfDelegate - ); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForMediaStreamTrack - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr IRTPMediaEngineForMediaStreamTrack::toDebug(ForMediaStreamTrackPtr object) - { - if (!object) return ElementPtr(); - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object)->toDebug(); - } - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEnginePtr IRTPMediaEngineForMediaStreamTrack::create() - { - return RTPMediaEngine::createEnginePromise(); - } - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEngineDeviceResourcePtr IRTPMediaEngineForMediaStreamTrack::setupDevice(UseMediaStreamTrackPtr track) - { - auto singleton = RTPMediaEngineSingleton::singleton(); - if (!singleton) return PromiseWithRTPMediaEngineDeviceResource::createRejected(IORTCForInternal::queueORTC()); - return singleton->getEngineRegistration()->getRTPEngine()->setupDevice(track); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine - #pragma mark - - //--------------------------------------------------------------------------- - const char *RTPMediaEngine::toString(States state) - { - switch (state) { - case State_Pending: return "pending"; - case State_Ready: return "ready"; - case State_ShuttingDown: return "shutting down"; - case State_Shutdown: return "shutdown"; - } - return "UNDEFINED"; - } - - //------------------------------------------------------------------------- - RTPMediaEngine::RTPMediaEngine( - const make_private &, - IMessageQueuePtr queue, - IRTPMediaEngineRegistrationPtr registration - ) : - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()), - mRegistration(registration), - mTraceCallback(new WebRtcTraceCallback()), - mLogSink(new WebRtcLogSink()) - { - ZS_EVENTING_1(x, i, Detail, RtpMediaEngineCreate, ol, RtpMediaEngine, Start, puid, id, mID); - ZS_LOG_DETAIL(debug("created")); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::init() - { - webrtc::Trace::CreateTrace(); - webrtc::Trace::SetTraceCallback(mTraceCallback.get()); - - auto level = IORTCForInternal::webrtcLogLevel(); - if (level.hasValue()) { - internalSetLogLevel(level); - } - -#if defined(WINRT) - webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent); -#endif - - AutoRecursiveLock lock(*this); - - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - RTPMediaEngine::~RTPMediaEngine() - { - if (isNoop()) return; - - webrtc::Trace::SetTraceCallback(nullptr); - webrtc::Trace::ReturnTrace(); - - ZS_LOG_DETAIL(log("destroyed")); - mThisWeak.reset(); - - cancel(); - ZS_EVENTING_1(x, i, Detail, RtpMediaEngineDestroy, ol, RtpMediaEngine, Stop, puid, id, mID); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForSettingsPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForRTPReceiverChannelPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForRTPReceiverChannelMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForRTPReceiverChannelAudioPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForRTPReceiverChannelVideoPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForRTPSenderChannelMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForRTPSenderChannelAudioPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForRTPSenderChannelVideoPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::convert(ForMediaStreamTrackPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - RTPMediaEnginePtr RTPMediaEngine::convert(ForDeviceResourcePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - RTPMediaEnginePtr RTPMediaEngine::convert(ForChannelResourcePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPMediaEngine, object); - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => RTPMediaEngineSingleton/RTPMediaEngineRegistration - #pragma mark - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEnginePtr RTPMediaEngine::createEnginePromise() - { - auto singleton = RTPMediaEngineSingleton::singleton(); - if (!singleton) { - return PromiseWithRTPMediaEngine::createRejected(IORTCForInternal::queueORTC()); - } - return singleton->getEngineRegistration()->notify(); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr RTPMediaEngine::create(IRTPMediaEngineRegistrationPtr registration) - { - RTPMediaEnginePtr pThis(make_shared(make_private {}, IORTCForInternal::queueBlockingMediaStartStopThread(), registration)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::notify(PromiseWithRTPMediaEnginePtr promise) - { - IRTPMediaEngineRegistrationPtr registration; - - { - AutoRecursiveLock lock(*this); - if (!isReady()) { - mPendingReady.push_back(promise); - return; - } - registration = mRegistration.lock(); - } - - if (registration) { - promise->resolve(registration->getRTPEngine()); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::shutdown() - { - AutoRecursiveLock lock(*this); - - // WARNING: Do NOT call cancel directly as this object must only be - // shutdown on the object's media queue. - setState(State_ShuttingDown); - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForORTC - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::setLogLevel(Log::Level level) - { - auto engine = RTPMediaEngineSingleton::getEngineIfAlive(); - if (engine) { - engine->internalSetLogLevel(level); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::ntpServerTime(const Milliseconds &value) - { - rtc::SyncWithNtp(value.count()); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::startMediaTracing() - { - auto engine = RTPMediaEngineSingleton::getEngineIfAlive(); - if (engine) { - engine->internalStartMediaTracing(); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::stopMediaTracing() - { - auto engine = RTPMediaEngineSingleton::getEngineIfAlive(); - if (engine) { - engine->internalStopMediaTracing(); - } - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::isMediaTracing() - { - auto engine = RTPMediaEngineSingleton::getEngineIfAlive(); - if (engine) { - return engine->internalIsMediaTracing(); - } - return false; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::saveMediaTrace(String filename) - { - auto engine = RTPMediaEngineSingleton::getEngineIfAlive(); - if (engine) { - return engine->internalSaveMediaTrace(filename); - } - return false; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::saveMediaTrace(String host, int port) - { - auto engine = RTPMediaEngineSingleton::getEngineIfAlive(); - if (engine) { - return engine->internalSaveMediaTrace(host, port); - } - return false; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPReceiverChannel - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPReceiverChannelMediaBase - #pragma mark - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEngineChannelResourcePtr RTPMediaEngine::setupChannel( - UseReceiverChannelMediaBasePtr channel, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ) - { - // WARNING - DO NOT ENTER A LOCK! - - auto setup = make_shared(); - setup->mRegistration = mRegistration.lock(); - setup->mPromise = PromiseWithRTPMediaEngineChannelResource::create(IORTCForInternal::queueORTC()); - setup->mChannel = channel; - setup->mTransport = transport; - setup->mTrack = track; - setup->mParameters = parameters; - setup->mPacket = packet; - - IRTPMediaEngineAsyncDelegateProxy::create(mThisWeak.lock())->onSetupReceiverChannel(setup); - - return setup->mPromise; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPReceiverChannelAudio - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPReceiverChannelVideo - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPSenderChannel - #pragma mark - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPSenderChannelMediaBase - #pragma mark - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEngineChannelResourcePtr RTPMediaEngine::setupChannel( - UseSenderChannelMediaBasePtr channel, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - IDTMFSenderDelegatePtr dtmfDelegate - ) - { - // WARNING - DO NOT ENTER A LOCK! - - auto setup = make_shared(); - setup->mRegistration = mRegistration.lock(); - setup->mPromise = PromiseWithRTPMediaEngineChannelResource::create(IORTCForInternal::queueORTC()); - setup->mChannel = channel; - setup->mTransport = transport; - setup->mTrack = track; - setup->mParameters = parameters; - setup->mDTMFDelegate = dtmfDelegate; - - IRTPMediaEngineAsyncDelegateProxy::create(mThisWeak.lock())->onSetupSenderChannel(setup); - - return setup->mPromise; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPSenderChannelAudio - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPSenderChannelVideo - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForMediaStreamTrack - #pragma mark - - //------------------------------------------------------------------------- - PromiseWithRTPMediaEngineDeviceResourcePtr RTPMediaEngine::setupDevice(UseMediaStreamTrackPtr track) - { - // WARNING - DO NOT ENTER A LOCK! - - auto setup = make_shared(); - setup->mRegistration = mRegistration.lock(); - setup->mPromise = PromiseWithRTPMediaEngineDeviceResource::create(IORTCForInternal::queueORTC()); - setup->mTrack = track; - - IRTPMediaEngineAsyncDelegateProxy::create(mThisWeak.lock())->onSetupDevice(setup); - - return setup->mPromise; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForDeviceResource - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::notifyResourceGone(IDeviceResourceForRTPMediaEngine &inResource) - { - PUID resourceID = inResource.getID(); - - AutoRecursiveLock lock(*this); - - auto found = mDeviceResources.find(resourceID); - if (found != mDeviceResources.end()) { - mDeviceResources.erase(found); - } - - // invoke "step" mechanism again - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForChannelResource - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::notifyResourceGone(IChannelResourceForRTPMediaEngine &inResource) - { - PUID resourceID = inResource.getID(); - - AutoRecursiveLock lock(*this); - - auto found = mChannelResources.find(resourceID); - if (found != mChannelResources.end()) { - mChannelResources.erase(found); - } - - // invoke "step" mechanism again - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - webrtc::VoiceEngine *RTPMediaEngine::getVoiceEngine() - { - return mVoiceEngine.get(); - } - - //------------------------------------------------------------------------- - rtc::scoped_refptr RTPMediaEngine::getAudioDecoderFactory() - { - return mAudioDecoderFactory; - } - - //------------------------------------------------------------------------- - rtc::scoped_refptr RTPMediaEngine::getAudioState() - { - return mAudioState; - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IWakeDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::onWake() - { - ZS_LOG_DEBUG(log("wake")) - - // Do not call step() method within a lock! - step(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => ITimerDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::onTimer(ITimerPtr timer) - { - ZS_LOG_DEBUG(log("timer") + ZS_PARAM("timer id", timer->getID())) - - AutoRecursiveLock lock(*this); - // NOTE: ADD IF NEEDED... - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::onSetupSenderChannel(SetupSenderChannelPtr setup) - { - { - AutoRecursiveLock lock(*this); - - if (ZS_DYNAMIC_PTR_CAST(IRTPSenderChannelAudioForRTPMediaEngine, setup->mChannel)) { - ChannelResourcePtr resource = AudioSenderChannelResource::create( - setup->mRegistration, - setup->mTransport, - setup->mTrack, - setup->mParameters, - setup->mDTMFDelegate - ); - resource->registerPromise(setup->mPromise); - mChannelResources[resource->getID()] = resource; - mPendingSetupChannelResources.push_back(resource); - } else if (ZS_DYNAMIC_PTR_CAST(IRTPSenderChannelVideoForRTPMediaEngine, setup->mChannel)) { - ChannelResourcePtr resource = VideoSenderChannelResource::create( - setup->mRegistration, - setup->mTransport, - setup->mTrack, - setup->mParameters - ); - resource->registerPromise(setup->mPromise); - mChannelResources[resource->getID()] = resource; - mPendingSetupChannelResources.push_back(resource); - } - } - - // Do not call step() method within a lock! - step(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::onSetupReceiverChannel(SetupReceiverChannelPtr setup) - { - { - AutoRecursiveLock lock(*this); - - if (ZS_DYNAMIC_PTR_CAST(IRTPReceiverChannelAudioForRTPMediaEngine, setup->mChannel)) { - AudioReceiverChannelResourcePtr resource = AudioReceiverChannelResource::create( - setup->mRegistration, - setup->mTransport, - setup->mTrack, - setup->mParameters, - setup->mPacket - ); - resource->registerPromise(setup->mPromise); - mChannelResources[resource->getID()] = resource; - mPendingSetupChannelResources.push_back(resource); - } else if (ZS_DYNAMIC_PTR_CAST(IRTPReceiverChannelVideoForRTPMediaEngine, setup->mChannel)) { - VideoReceiverChannelResourcePtr resource = VideoReceiverChannelResource::create( - setup->mRegistration, - setup->mTransport, - setup->mTrack, - setup->mParameters, - setup->mPacket - ); - resource->registerPromise(setup->mPromise); - mChannelResources[resource->getID()] = resource; - mPendingSetupChannelResources.push_back(resource); - } - } - - // Do not call step() method within a lock! - step(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::onSetupDevice(SetupDevicePtr setup) - { - { - AutoRecursiveLock lock(*this); - - DeviceResourcePtr resource = DeviceResource::create( - setup->mRegistration, - setup->mTrack - ); - - resource->registerPromise(setup->mPromise); - - mDeviceResources[resource->getID()] = resource; - mPendingSetupDeviceResources.push_back(resource); - } - - // Do not call step() method within a lock! - step(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => (friend DeviceResource) - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::shutdownDeviceResource(DeviceResourcePtr deviceResource) - { - AutoRecursiveLock lock(*this); - - mPendingCloseDeviceResources.push_back(deviceResource); - - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => webrtc::SetupEventTracer - #pragma mark - -#if defined(WINRT) - const unsigned char *RTPMediaEngine::GetCategoryGroupEnabled(const char *categoryGroup) - { - return reinterpret_cast("webrtc"); - } - - void __cdecl RTPMediaEngine::AddTraceEvent( - char phase, - const unsigned char *categoryGroupEnabled, - const char *name, - uint64_t id, - int numArgs, - const char **argNames, - const unsigned char *argTypes, - const uint64_t *argValues, - unsigned char flags - ) - { - auto engine = RTPMediaEngineSingleton::getEngineIfAlive(); - if (engine) { - engine->internalAddTraceEvent(phase, categoryGroupEnabled, name, id, - numArgs, argNames, argTypes, argValues, flags); - } - } -#endif - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => (friend ChannelResource) - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::shutdownChannelResource(ChannelResourcePtr channelResource) - { - AutoRecursiveLock lock(*this); - - mPendingCloseChannelResources.push_back(channelResource); - - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => (internal) - #pragma mark - - //------------------------------------------------------------------------- - Log::Params RTPMediaEngine::log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::RTPMediaEngine"); - IHelper::debugAppend(objectEl, "id", mID); - return Log::Params(message, objectEl); - } - - //------------------------------------------------------------------------- - Log::Params RTPMediaEngine::debug(const char *message) const - { - return Log::Params(message, toDebug()); - } - - //------------------------------------------------------------------------- - ElementPtr RTPMediaEngine::toDebug() const - { - AutoRecursiveLock lock(*this); - - ElementPtr resultEl = Element::create("ortc::RTPMediaEngine"); - - IHelper::debugAppend(resultEl, "id", mID); - - IHelper::debugAppend(resultEl, "graceful shutdown", (bool)mGracefulShutdownReference); - - IHelper::debugAppend(resultEl, "state", toString(mCurrentState)); - - IHelper::debugAppend(resultEl, "error", mLastError); - IHelper::debugAppend(resultEl, "error reason", mLastErrorReason); - - auto registration = mRegistration.lock(); - IHelper::debugAppend(resultEl, "registration", (bool)registration); - - IHelper::debugAppend(resultEl, "pending ready", mPendingReady.size()); - - IHelper::debugAppend(resultEl, "device resources", mDeviceResources.size()); - IHelper::debugAppend(resultEl, "pending setup device resources", mPendingSetupDeviceResources.size()); - IHelper::debugAppend(resultEl, "pending close device resources", mPendingCloseDeviceResources.size()); - - IHelper::debugAppend(resultEl, "channel resources", mChannelResources.size()); - IHelper::debugAppend(resultEl, "pending setup channel resources", mPendingSetupChannelResources.size()); - IHelper::debugAppend(resultEl, "pending close channel resources", mPendingCloseChannelResources.size()); - - return resultEl; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::internalSetLogLevel(Log::Level level) - { - webrtc::TraceLevel traceLevel {webrtc::kTraceAll}; - rtc::LoggingSeverity rtcLevel {rtc::LS_INFO}; - - switch (level) - { - case Log::Level::None: rtcLevel = rtc::LS_NONE; traceLevel = static_cast(webrtc::kTraceNone); break; - case Log::Level::Basic: rtcLevel = rtc::LS_ERROR; traceLevel = static_cast(webrtc::kTraceCritical | webrtc::kTraceError); break; - case Log::Level::Detail: rtcLevel = rtc::LS_WARNING; traceLevel = static_cast(webrtc::kTraceWarning | webrtc::kTraceError | webrtc::kTraceCritical); break; - case Log::Level::Debug: rtcLevel = rtc::LS_INFO; traceLevel = static_cast(webrtc::kTraceDefault); break; - case Log::Level::Trace: rtcLevel = rtc::LS_VERBOSE; traceLevel = static_cast(webrtc::kTraceDefault | webrtc::kTraceModuleCall | webrtc::kTraceTimer | webrtc::kTraceDebug); break; - case Log::Level::Insane: rtcLevel = rtc::LS_SENSITIVE; traceLevel = static_cast(webrtc::kTraceAll); break; - } - - rtc::LogMessage::RemoveLogToStream(mLogSink.get()); - rtc::LogMessage::AddLogToStream(mLogSink.get(), rtcLevel); - - webrtc::Trace::set_level_filter(traceLevel); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::internalStartMediaTracing() - { - mTraceLog.EnableTraceInternalStorage(); - mTraceLog.StartTracing(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::internalStopMediaTracing() - { - mTraceLog.StopTracing(); - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::internalIsMediaTracing() - { - return mTraceLog.IsTracing(); - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::internalSaveMediaTrace(String filename) - { - return mTraceLog.Save(filename); - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::internalSaveMediaTrace(String host, int port) - { - return mTraceLog.Save(host, port); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::internalAddTraceEvent( - char phase, - const unsigned char *categoryGroupEnabled, - const char *name, - uint64_t id, - int numArgs, - const char **argNames, - const unsigned char *argTypes, - const uint64_t *argValues, - unsigned char flags - ) - { - mTraceLog.Add(phase, categoryGroupEnabled, name, id, - numArgs, argNames, argTypes, argValues, flags); - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::isReady() const - { - return State_Ready == mCurrentState; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::isShuttingDown() const - { - return State_ShuttingDown == mCurrentState; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::isShutdown() const - { - return State_Shutdown == mCurrentState; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::step() - { - ZS_LOG_DEBUG(debug("step")) - - bool shuttingDown; - bool shutdown; - { - AutoRecursiveLock lock(*this); - - shuttingDown = isShuttingDown(); - shutdown = isShutdown(); - } - - if (shuttingDown || shutdown) { - ZS_LOG_DEBUG(debug("step forwarding to cancel")) - stepCancel(); - return; - } - - // ... other steps here ... - if (!stepSetup()) goto not_ready; - if (!stepSetupDevices()) goto not_ready; - if (!stepSetupChannels()) goto not_ready; - if (!stepCloseDevices()) goto not_ready; - if (!stepCloseChannels()) goto not_ready; - // ... other steps here ... - - goto ready; - - not_ready: - { - ZS_LOG_TRACE(debug("not ready")) - return; - } - - ready: - { - ZS_LOG_TRACE(log("ready")) - AutoRecursiveLock lock(*this); - setState(State_Ready); - } - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::stepSetup() - { - AutoRecursiveLock lock(*this); - - if (isReady()) { - ZS_LOG_TRACE(log("already setup")) - return true; - } - - mVoiceEngine = std::unique_ptr(webrtc::VoiceEngine::Create()); - - mAudioDecoderFactory = webrtc::CreateBuiltinAudioDecoderFactory(); - - webrtc::VoEBase::GetInterface(mVoiceEngine.get())->Init(nullptr, nullptr, mAudioDecoderFactory); - - webrtc::AudioState::Config audioStateConfig; - audioStateConfig.voice_engine = mVoiceEngine.get(); - mAudioState = rtc::scoped_refptr(webrtc::AudioState::Create(audioStateConfig)); - - webrtc::EcModes ecMode = webrtc::kEcConference; - webrtc::AecmModes aecmMode = webrtc::kAecmSpeakerphone; - webrtc::AgcModes agcMode = webrtc::kAgcAdaptiveAnalog; - webrtc::NsModes nsMode = webrtc::kNsHighSuppression; -#if defined(WINRT) - ecMode = webrtc::kEcAecm; -#endif - - if (webrtc::VoEHardware::GetInterface(mVoiceEngine.get())->BuiltInAECIsAvailable()) - webrtc::VoEHardware::GetInterface(mVoiceEngine.get())->EnableBuiltInAEC(true); - webrtc::VoEAudioProcessing::GetInterface(mVoiceEngine.get())->SetEcStatus(true, ecMode); -#if !defined(WINRT) - webrtc::VoEAudioProcessing::GetInterface(mVoiceEngine.get())->SetEcMetricsStatus(true); -#endif - if (ecMode == webrtc::kEcAecm) - webrtc::VoEAudioProcessing::GetInterface(mVoiceEngine.get())->SetAecmMode(aecmMode); - - if (webrtc::VoEHardware::GetInterface(mVoiceEngine.get())->BuiltInAGCIsAvailable()) - webrtc::VoEHardware::GetInterface(mVoiceEngine.get())->EnableBuiltInAGC(true); - webrtc::VoEAudioProcessing::GetInterface(mVoiceEngine.get())->SetAgcStatus(true, agcMode); - - if (webrtc::VoEHardware::GetInterface(mVoiceEngine.get())->BuiltInNSIsAvailable()) - webrtc::VoEHardware::GetInterface(mVoiceEngine.get())->EnableBuiltInNS(true); - webrtc::VoEAudioProcessing::GetInterface(mVoiceEngine.get())->SetNsStatus(true, nsMode); - - webrtc::VoEAudioProcessing::GetInterface(mVoiceEngine.get())->EnableHighPassFilter(true); - - return true; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::stepSetupDevices() - { - DeviceResourceList pendingSetupDeviceResources; - { - AutoRecursiveLock lock(*this); - pendingSetupDeviceResources = mPendingSetupDeviceResources; - mPendingSetupDeviceResources.clear(); - } - - while (pendingSetupDeviceResources.size() > 0) { - auto deviceResource = pendingSetupDeviceResources.front(); - - deviceResource->stepSetup(); - - pendingSetupDeviceResources.pop_front(); - } - - return true; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::stepCloseDevices() - { - DeviceResourceList pendingCloseDeviceResources; - { - AutoRecursiveLock lock(*this); - pendingCloseDeviceResources = mPendingCloseDeviceResources; - mPendingSetupDeviceResources.clear(); - } - - while (pendingCloseDeviceResources.size() > 0) { - auto deviceResource = pendingCloseDeviceResources.front(); - - deviceResource->stepShutdown(); - - pendingCloseDeviceResources.pop_front(); - } - - return true; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::stepSetupChannels() - { - ChannelResourceList pendingSetupChannelResources; - { - AutoRecursiveLock lock(*this); - pendingSetupChannelResources = mPendingSetupChannelResources; - mPendingSetupChannelResources.clear(); - } - - while (pendingSetupChannelResources.size() > 0) { - auto channelResource = pendingSetupChannelResources.front(); - - channelResource->stepSetup(); - - pendingSetupChannelResources.pop_front(); - } - - return true; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::stepCloseChannels() - { - ChannelResourceList pendingCloseChannelResources; - { - AutoRecursiveLock lock(*this); - pendingCloseChannelResources = mPendingCloseChannelResources; - mPendingCloseChannelResources.clear(); - } - - while (pendingCloseChannelResources.size() > 0) { - auto channelResource = pendingCloseChannelResources.front(); - - channelResource->stepShutdown(); - - pendingCloseChannelResources.pop_front(); - } - - return true; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::cancel() - { - //....................................................................... - // try to gracefully shutdown - - if (isShutdown()) return; - - setState(State_ShuttingDown); - - if (!mGracefulShutdownReference) mGracefulShutdownReference = mThisWeak.lock(); - - { - for (auto iter = mPendingSetupChannelResources.begin(); iter != mPendingSetupChannelResources.end(); ++iter) - { - auto channelResource = (*iter); - channelResource->notifyPromisesReject(); - } - mPendingSetupChannelResources.clear(); - } - - if (mGracefulShutdownReference) { - // perform any graceful asynchronous shutdown processes needed and - // re-attempt shutdown again later if needed. - -#define TODO_IMPLEMENT_MEDIA_GRACEFUL_SHUTDOWN 1 -#define TODO_IMPLEMENT_MEDIA_GRACEFUL_SHUTDOWN 2 -// return; - } - - //....................................................................... - // final cleanup (hard shutdown) - - setState(State_Shutdown); - -#define TODO_IMPLEMENT_MEDIA_HARD_SHUTDOWN 1 -#define TODO_IMPLEMENT_MEDIA_HARD_SHUTDOWN 2 - - // resolve any outstanding promises - { - auto registration = mRegistration.lock(); - while (mPendingReady.size() > 0) - { - auto &front = mPendingReady.front(); - if (registration) { - front->resolve(registration); - } else { - front->reject(); - } - mPendingReady.pop_front(); - } - } - - // make sure to cleanup any final reference to self - mGracefulShutdownReference.reset(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::stepCancel() - { - ChannelResourceList pendingCloseChannelResources; - ChannelResourceWeakMap channelResources; - { - AutoRecursiveLock lock(*this); - pendingCloseChannelResources = mPendingCloseChannelResources; - mPendingCloseChannelResources.clear(); - channelResources = mChannelResources; - mChannelResources.clear(); - } - - while (pendingCloseChannelResources.size() > 0) { - auto channelResource = pendingCloseChannelResources.front(); - - channelResource->stepShutdown(); - - pendingCloseChannelResources.pop_front(); - } - - for (auto iter = channelResources.begin(); iter != channelResources.end(); ++iter) - { - auto channelResource = (*iter).second.lock(); - if (channelResource) - channelResource->stepShutdown(); - } - - { - AutoRecursiveLock lock(*this); - cancel(); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::setState(States state) - { - if (state == mCurrentState) return; - - ZS_LOG_DETAIL(debug("state changed") + ZS_PARAM("new state", toString(state)) + ZS_PARAM("old state", toString(mCurrentState))) - - mCurrentState = state; - - if (isReady()) { - auto registration = mRegistration.lock(); - - while (mPendingReady.size() > 0) - { - auto &front = mPendingReady.front(); - if (registration) { - front->resolve(registration->getRTPEngine()); - } else { - front->reject(); - } - mPendingReady.pop_front(); - } - } - -// RTPMediaEnginePtr pThis = mThisWeak.lock(); -// if (pThis) { -// mSubscriptions.delegate()->onRTPMediaEngineStateChanged(pThis, mCurrentState); -// } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::setError(WORD errorCode, const char *inReason) - { - String reason(inReason); - if (reason.isEmpty()) { - reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); - } - - if (0 != mLastError) { - ZS_LOG_WARNING(Detail, debug("error already set thus ignoring new error") + ZS_PARAM("new error", errorCode) + ZS_PARAM("new reason", reason)) - return; - } - - mLastError = errorCode; - mLastErrorReason = reason; - - ZS_LOG_WARNING(Detail, debug("error set") + ZS_PARAM("error", mLastError) + ZS_PARAM("reason", mLastErrorReason)) - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::WebRtcTraceCallback - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::WebRtcTraceCallback::Print(webrtc::TraceLevel trace, const char* message, int length) - { - static const size_t stripLength = 34; - - Log::Severity severity {Log::Severity::Informational}; - Log::Level level {Log::Level::Basic}; - - switch (trace) - { - case webrtc::kTraceNone: level = Log::Level::None; break; - case webrtc::kTraceStateInfo: level = Log::Level::Debug; break; - case webrtc::kTraceCritical: severity = Log::Severity::Fatal; level = Log::Level::Basic; break; - case webrtc::kTraceError: severity = Log::Severity::Error; level = Log::Level::Basic; break; - case webrtc::kTraceWarning: severity = Log::Severity::Warning; level = Log::Level::Detail; break; - case webrtc::kTraceApiCall: level = Log::Level::Debug; break; - case webrtc::kTraceDefault: level = Log::Level::Debug; break; - case webrtc::kTraceModuleCall: level = Log::Level::Trace; break; - case webrtc::kTraceMemory: level = Log::Level::Trace; break; - case webrtc::kTraceTimer: level = Log::Level::Trace; break; - case webrtc::kTraceStream: level = Log::Level::Insane; break; - case webrtc::kTraceDebug: level = Log::Level::Insane; break; - case webrtc::kTraceInfo: level = Log::Level::Insane; break; - case webrtc::kTraceTerseInfo: level = Log::Level::Insane; break; - case webrtc::kTraceAll: level = Log::Level::Insane; break; - } - - // Skip past boilerplate prefix text - if (length < stripLength) { - std::string msg(message, length); - webrtcTrace(Log::Severity::Error, Log::Level::Basic, (std::string("Malformed webrtc log message: ") + msg).c_str()); - } else { - std::string msg(message + (stripLength-1), length - stripLength); - webrtcTrace(severity, level, msg.c_str()); - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::WebRtcTraceCallback - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::WebRtcLogSink::OnLogMessage(const std::string& message) - { - if (message.length() < 1) return; - - bool hasEOL = ('\n' == message[message.length() - 1]); - - std::string msg(message.c_str(), message.length() - (hasEOL ? 1 : 0)); - - webrtcTrace(Log::Severity::Informational, Log::Level::Basic, msg.c_str()); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::BaseResource - #pragma mark - - //------------------------------------------------------------------------- - RTPMediaEngine::BaseResource::BaseResource( - const make_private &, - IRTPMediaEngineRegistrationPtr registration, - RTPMediaEnginePtr engine - ) : - SharedRecursiveLock(engine ? SharedRecursiveLock(engine->getSharedLock()) : SharedRecursiveLock::create()), - MessageQueueAssociator(engine ? engine->getAssociatedMessageQueue() : IORTCForInternal::queueBlockingMediaStartStopThread()), - mMediaEngine(engine), - mRegistration(registration) - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::BaseResource::~BaseResource() - { - mThisWeak.reset(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::BaseResource::notifyPromisesResolve() - { - { - AutoRecursiveLock lock(*this); - mNotifiedReady = true; - } - internalFixState(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::BaseResource::notifyPromisesReject() - { - { - AutoRecursiveLock lock(*this); - mNotifiedRejected = true; - } - internalFixState(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::BaseResource => (internal) - #pragma mark - - - //------------------------------------------------------------------------- - IMessageQueuePtr RTPMediaEngine::BaseResource::delegateQueue() - { - return IORTCForInternal::queueORTC(); - } - - //------------------------------------------------------------------------- - PromisePtr RTPMediaEngine::BaseResource::internalSetupPromise(PromisePtr promise) - { - auto lifetime = make_shared(mThisWeak.lock()); - promise->setReferenceHolder(lifetime); - - { - AutoRecursiveLock lock(*this); - mPendingPromises.push_back(promise); - } - internalFixState(); - return promise; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::BaseResource::internalFixState() - { - PendingPromiseList promises; - - { - AutoRecursiveLock lock(*this); - - { - if (mNotifiedRejected) goto prepare_reject_all; - if (mNotifiedReady) goto prepare_resolve_all; - return; - } - - prepare_resolve_all: - { - promises = mPendingPromises; - mPendingPromises.clear(); - goto resolve_all; - } - - prepare_reject_all: - { - promises = mPendingPromises; - mPendingPromises.clear(); - goto reject_all; - } - } - - resolve_all: - { - for (auto iter = promises.begin(); iter != promises.end(); ++iter) { - auto promise = (*iter).lock(); - if (!promise) continue; - promise->resolve(mThisWeak.lock()); - } - return; - } - - reject_all: - { - for (auto iter = promises.begin(); iter != promises.end(); ++iter) { - auto promise = (*iter).lock(); - if (!promise) continue; - promise->reject(); - } - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource - #pragma mark - - //------------------------------------------------------------------------- - RTPMediaEngine::DeviceResource::DeviceResource( - const make_private &priv, - IRTPMediaEngineRegistrationPtr registration, - UseMediaStreamTrackPtr track - ) : - BaseResource(priv, registration, registration ? registration->getRTPEngine() : RTPMediaEnginePtr()), - mTrack(track) - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::DeviceResource::~DeviceResource() - { - mThisWeak.reset(); // shared pointer to self is no longer valid - - // inform the rtp media engine of this resource no longer being in use - UseEnginePtr engine = getEngine(); - if (engine) { - engine->notifyResourceGone(*this); - } - } - - //------------------------------------------------------------------------- - RTPMediaEngine::DeviceResourcePtr RTPMediaEngine::DeviceResource::create( - IRTPMediaEngineRegistrationPtr registration, - UseMediaStreamTrackPtr track - ) - { - auto pThis = make_shared( - make_private{}, - registration, - track - ); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::lifetimeHolderGone() - { - auto shutdownPromise = shutdown(); - if (shutdownPromise) { - // don't really care about result - shutdownPromise->then(IPromiseDelegateProxy::createNoop(IORTCForInternal::queueBlockingMediaStartStopThread())); - shutdownPromise->background(); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::init() - { - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => IRTPMediaEngineDeviceResource - #pragma mark - - //------------------------------------------------------------------------- - String RTPMediaEngine::DeviceResource::getDeviceID() const - { - return mDeviceID; - } - - //------------------------------------------------------------------------- - PromisePtr RTPMediaEngine::DeviceResource::shutdown() - { - PromisePtr promise; - { - AutoRecursiveLock lock(*this); - - promise = getShutdownPromise(); - if (isShutdown()) return promise; - if (isShuttingDown()) return promise; - - mShuttingDown = true; - } - - auto outer = mMediaEngine.lock(); - if (outer) { - outer->shutdownDeviceResource(ZS_DYNAMIC_PTR_CAST(DeviceResource, mThisWeak.lock())); - } else { - stepShutdown(); - } - return promise; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::stop() - { - rtc::scoped_refptr videoCaptureModule; - { - AutoRecursiveLock lock(*this); - - videoCaptureModule = mVideoCaptureModule; - } - - if (videoCaptureModule) { - videoCaptureModule->StopCapture(); - videoCaptureModule->DeRegisterCaptureDataCallback(); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::updateConstraints(PromisePtr promise, TrackConstraintsPtr constraints) - { - auto pThis = ZS_DYNAMIC_PTR_CAST(DeviceResource, mThisWeak.lock()); - IRTPMediaEngineDeviceResourceAsyncDelegateProxy::create(pThis)->onUpdateConstraints(promise, constraints); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) - { - auto pThis = ZS_DYNAMIC_PTR_CAST(DeviceResource, mThisWeak.lock()); - IRTPMediaEngineDeviceResourceAsyncDelegateProxy::create(pThis)->onProvideStats(promise, stats); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::setVideoRenderCallback(IMediaStreamTrackRenderCallbackPtr callback) - { - auto track = mTrack.lock(); - if (!track) return; - auto kind = track->kind(); - - AutoRecursiveLock lock(*this); - - if (kind == Kinds::Kind_Video) { - mVideoRenderCallbackReferenceHolder = callback; - mVideoRendererCallback = dynamic_cast(callback.get()); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::renderVideoFrame(VideoFramePtr videoFrame) - { - ++mFramesReceived; - - auto track = mTrack.lock(); - if (!track) return; - - auto settings = track->getSettings(); - if (!settings) return; - - if (!settings->mWidth.hasValue() || (settings->mWidth != videoFrame->width())) - settings->mWidth = videoFrame->width(); - if (!settings->mHeight.hasValue() || (settings->mHeight != videoFrame->height())) - settings->mHeight = videoFrame->height(); - - AutoRecursiveLock lock(*this); - - if (mVideoRendererCallback) { - mVideoRendererCallback->RenderFrame(1, *videoFrame); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::setFrameCount() - { - AutoRecursiveLock lock(*this); - - if (mFramesSent > 5) { - mAverageFramesSent += mFramesSent; - } - if (mFramesReceived > 5) { - mAverageFramesReceived += mFramesReceived; - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => IRTPMediaEngineDeviceResourceAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::onUpdateConstraints(PromisePtr promise, TrackConstraintsPtr constraints) - { - auto track = mTrack.lock(); - if (!track) { - notifyPromisesReject(); - return; - } - - auto settings = track->getSettings(); - if (!settings) { - notifyPromisesReject(); - return; - } - - auto kind = track->kind(); - auto remote = track->remote(); - - AutoRecursiveLock lock(*this); - - if (kind == Kinds::Kind_Audio && remote) { - - mDeviceID = constraints->mAdvanced.front()->mDeviceID.mValue.value().mValue.value(); - - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - int audioDeviceIndex = getAudioDeviceIndex(voiceEngine, mDeviceID); - - if (webrtc::VoEHardware::GetInterface(voiceEngine)->SetPlayoutDevice(audioDeviceIndex) == -1) { - return; - } - - settings->mDeviceID = mDeviceID; - } - - promise->resolve(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) - { - auto track = mTrack.lock(); - if (!track) { - notifyPromisesReject(); - return; - } - - auto settings = track->getSettings(); - if (!settings) { - notifyPromisesReject(); - return; - } - - auto remote = track->remote(); - auto id = track->id(); - - AutoRecursiveLock lock(*this); - - UseStatsReport::StatMap reportStats; - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_Track)) { - - auto report = make_shared(); - - decltype(report->mFramesPerSecond) framesPerSecond{}; - - if (!remote) - framesPerSecond = mAverageFramesSent.value(); - else - framesPerSecond = mAverageFramesReceived.value(); - - report->mID = id; - report->mTrackID = id; - report->mRemoteSource = remote; - report->mFrameWidth = settings->mWidth.hasValue() ? settings->mWidth.value() : 0; - report->mFrameHeight = settings->mHeight.hasValue() ? settings->mHeight.value() : 0; - report->mFramesPerSecond = framesPerSecond; - report->mFramesSent = mFramesSent; - report->mFramesReceived = mFramesReceived; - report->mAudioLevel = 0.0; - - reportStats[report->mID] = report; - } - - promise->resolve(UseStatsReport::create(reportStats)); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::onCapturedVideoFrame(VideoFramePtr frame) - { - { - AutoRecursiveLock lock(*this); - - if (mVideoRendererCallback) mVideoRendererCallback->RenderFrame(1, *frame); - } - - auto track = mTrack.lock(); - if (!track) return; - - track->sendCapturedVideoFrame(frame); - ++mFramesSent; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => friend RTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::stepSetup() - { - auto track = mTrack.lock(); - if (!track) { - notifyPromisesReject(); - return; - } - - auto settings = track->getSettings(); - if (!settings) { - notifyPromisesReject(); - return; - } - - auto kind = track->kind(); - auto remote = track->remote(); - - auto constraints = track->getConstraints(); - auto pThis = ZS_DYNAMIC_PTR_CAST(DeviceResource, mThisWeak.lock()); - - if (kind == Kinds::Kind_Video && !remote) { - - if (!constraints) { - notifyPromisesReject(); - return; - } - - String deviceID; - rtc::scoped_refptr videoCaptureModule; - VideoCaptureTransportPtr transport; - - deviceID = constraints->mAdvanced.front()->mDeviceID.mValue.value().mValue.value(); - videoCaptureModule = webrtc::VideoCaptureFactory::Create(0, deviceID.c_str()); - if (!videoCaptureModule) { - notifyPromisesReject(); - return; - } - - transport = VideoCaptureTransport::create(pThis); - videoCaptureModule->RegisterCaptureDataCallback(*transport); - - webrtc::VideoCaptureModule::DeviceInfo* info = webrtc::VideoCaptureFactory::CreateDeviceInfo(0); - if (!info) { - notifyPromisesReject(); - return; - } - - std::list capabilityCandidates; - int32_t numCapabilities = info->NumberOfCapabilities(deviceID.c_str()); - for (INT i = 0; i < numCapabilities; ++i) { - webrtc::VideoCaptureCapability capability; - if (info->GetCapability(deviceID.c_str(), i, capability) == -1) - continue; - ConstrainLongRange widthRange; - ConstrainLongRange heightRange; - if (constraints->mWidth.mValue.hasValue()) - widthRange.mIdeal = constraints->mWidth.mValue.value(); - if (constraints->mHeight.mValue.hasValue()) - heightRange.mIdeal = constraints->mHeight.mValue.value(); - if (constraints->mWidth.mRange.hasValue()) - widthRange = constraints->mWidth.mRange; - if (constraints->mHeight.mRange.hasValue()) - heightRange = constraints->mHeight.mRange; - FLOAT sizeDistance = calculateSizeDistance(widthRange, heightRange, capability); - if (sizeDistance == FLT_MAX) - continue; - ConstrainDoubleRange frameRateRange; - if (constraints->mFrameRate.mValue.hasValue()) - frameRateRange.mIdeal = constraints->mFrameRate.mValue.value(); - if (constraints->mFrameRate.mRange.hasValue()) - frameRateRange = constraints->mFrameRate.mRange; - FLOAT frameRateDistance = calculateFrameRateDistance(frameRateRange, capability); - if (frameRateDistance == FLT_MAX) - continue; - ConstrainDoubleRange aspectRatioRange; - if (constraints->mAspectRatio.mValue.hasValue()) - aspectRatioRange.mIdeal = constraints->mAspectRatio.mValue.value(); - if (constraints->mAspectRatio.mRange.hasValue()) - aspectRatioRange = constraints->mAspectRatio.mRange; - FLOAT aspectRatioDistance = calculateAspectRatioDistance(aspectRatioRange, capability); - if (aspectRatioDistance == FLT_MAX) - continue; - FLOAT formatDistance = calculateFormatDistance(capability); - FLOAT totalDistance = 200.0F * sizeDistance + 20.0F * frameRateDistance + 10.0F * aspectRatioDistance + formatDistance; - VideoCaptureCapabilityWithDistance capabilityWithDistance; - capabilityWithDistance.mCapability = capability; - capabilityWithDistance.mDistance = totalDistance; - capabilityCandidates.push_back(capabilityWithDistance); - } - delete info; - - std::list advancedCapabilityCandidates; - std::list::iterator constraintsIter = constraints->mAdvanced.begin(); - while (constraintsIter != constraints->mAdvanced.end()) { - std::list::iterator capabilityCandidatesIter = capabilityCandidates.begin(); - while (capabilityCandidatesIter != capabilityCandidates.end()) { - ConstrainLongRange widthRange; - ConstrainLongRange heightRange; - if ((*constraintsIter)->mWidth.mValue.hasValue()) - widthRange.mExact = (*constraintsIter)->mWidth.mValue.value(); - if ((*constraintsIter)->mHeight.mValue.hasValue()) - heightRange.mExact = (*constraintsIter)->mHeight.mValue.value(); - if ((*constraintsIter)->mWidth.mRange.hasValue()) - widthRange = (*constraintsIter)->mWidth.mRange; - if ((*constraintsIter)->mHeight.mRange.hasValue()) - heightRange = (*constraintsIter)->mHeight.mRange; - FLOAT sizeDistance = calculateSizeDistance(widthRange, heightRange, capabilityCandidatesIter->mCapability); - if (sizeDistance == FLT_MAX) { - capabilityCandidatesIter++; - continue; - } - ConstrainDoubleRange frameRateRange; - if ((*constraintsIter)->mFrameRate.mValue.hasValue()) - frameRateRange.mExact = (*constraintsIter)->mFrameRate.mValue.value(); - if ((*constraintsIter)->mFrameRate.mRange.hasValue()) - frameRateRange = (*constraintsIter)->mFrameRate.mRange; - FLOAT frameRateDistance = calculateFrameRateDistance(frameRateRange, capabilityCandidatesIter->mCapability); - if (frameRateDistance == FLT_MAX) { - capabilityCandidatesIter++; - continue; - } - ConstrainDoubleRange aspectRatioRange; - if ((*constraintsIter)->mAspectRatio.mValue.hasValue()) - aspectRatioRange.mExact = (*constraintsIter)->mAspectRatio.mValue.value(); - if ((*constraintsIter)->mAspectRatio.mRange.hasValue()) - aspectRatioRange = (*constraintsIter)->mAspectRatio.mRange; - FLOAT aspectRatioDistance = calculateAspectRatioDistance(aspectRatioRange, capabilityCandidatesIter->mCapability); - if (aspectRatioDistance == FLT_MAX) { - capabilityCandidatesIter++; - continue; - } - FLOAT formatDistance = calculateFormatDistance(capabilityCandidatesIter->mCapability); - FLOAT totalDistance = 200.0F * sizeDistance + 20.0F * frameRateDistance + 10.0F * aspectRatioDistance + formatDistance; - VideoCaptureCapabilityWithDistance capabilityWithDistance; - capabilityWithDistance.mCapability = capabilityCandidatesIter->mCapability; - capabilityWithDistance.mDistance = totalDistance; - advancedCapabilityCandidates.push_back(capabilityWithDistance); - capabilityCandidatesIter++; - } - if (advancedCapabilityCandidates.size() > 0) - break; - constraintsIter++; - } - - FLOAT bestDistance = FLT_MAX; - webrtc::VideoCaptureCapability bestCapability; - if (advancedCapabilityCandidates.size() > 0) { - std::list::iterator advancedCapabilityCandidatesIter = advancedCapabilityCandidates.begin(); - while (advancedCapabilityCandidatesIter != advancedCapabilityCandidates.end()) { - if (advancedCapabilityCandidatesIter->mDistance <= bestDistance) { - bestDistance = advancedCapabilityCandidatesIter->mDistance; - bestCapability = advancedCapabilityCandidatesIter->mCapability; - } - advancedCapabilityCandidatesIter++; - } - } else if (advancedCapabilityCandidates.size() > 0) { - std::list::iterator capabilityCandidatesIter = capabilityCandidates.begin(); - while (capabilityCandidatesIter != capabilityCandidates.end()) { - if (capabilityCandidatesIter->mDistance <= bestDistance) { - bestDistance = capabilityCandidatesIter->mDistance; - bestCapability = capabilityCandidatesIter->mCapability; - } - capabilityCandidatesIter++; - } - } - - if (bestDistance == FLT_MAX) { - notifyPromisesReject(); - return; - } - - settings->mWidth = bestCapability.width; - settings->mHeight = bestCapability.height; - settings->mFrameRate = bestCapability.maxFPS; - settings->mDeviceID = deviceID; - - if (videoCaptureModule->StartCapture(bestCapability) != 0) { - videoCaptureModule->DeRegisterCaptureDataCallback(); - notifyPromisesReject(); - return; - } - - { - AutoRecursiveLock lock(*this); - mDeviceID = deviceID; - mVideoCaptureModule = videoCaptureModule; - mTransport = transport; - } - } else if (kind == Kinds::Kind_Audio && !remote) { - - if (!constraints) { - notifyPromisesReject(); - return; - } - - auto engine = mMediaEngine.lock(); - if (!engine) { - notifyPromisesReject(); - return; - } - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) { - notifyPromisesReject(); - return; - } - - String deviceID; - - deviceID = constraints->mAdvanced.front()->mDeviceID.mValue.value().mValue.value(); - - int audioDeviceIndex = getAudioDeviceIndex(voiceEngine, mDeviceID); - - if (webrtc::VoEHardware::GetInterface(voiceEngine)->SetRecordingDevice(audioDeviceIndex) == -1) { - notifyPromisesReject(); - return; - } - - settings->mDeviceID = deviceID; - - { - AutoRecursiveLock lock(*this); - mDeviceID = deviceID; - } - } - - notifyPromisesResolve(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::stepShutdown() - { - mDenyNonLockedAccess = true; - - // rare race condition that can happen so - while (mAccessFromNonLockedMethods > 0) - { - // NOTE: very temporary lock so should clear itself out fast - std::this_thread::yield(); - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => (internal friend derived) - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::notifyPromisesShutdown() - { - AutoRecursiveLock lock(*this); - - mShutdown = true; - mShuttingDown = false; - - for (auto iter = mShutdownPromises.begin(); iter != mShutdownPromises.end(); ++iter) { - auto promise = (*iter); - promise->resolve(); - } - mShutdownPromises.clear(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => friend VideoCaptureTransport - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::OnIncomingCapturedFrame(const int32_t id, const webrtc::VideoFrame& videoFrame) - { - auto newFrame = make_shared(); - newFrame->ShallowCopy(videoFrame); - - auto pThis = ZS_DYNAMIC_PTR_CAST(DeviceResource, mThisWeak.lock()); - - IRTPMediaEngineDeviceResourceAsyncDelegateProxy::create(pThis)->onCapturedVideoFrame(newFrame); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::OnCaptureDelayChanged(const int32_t id, const int32_t delay) - { -#define TODO 1 -#define TODO 2 - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource::VideoCaptureTransport - #pragma mark - - //------------------------------------------------------------------------- - RTPMediaEngine::DeviceResource::VideoCaptureTransport::VideoCaptureTransport( - const make_private &, - DeviceResourcePtr outer - ) : - mOuter(outer) - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::DeviceResource::VideoCaptureTransport::~VideoCaptureTransport() - { - mThisWeak.reset(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::VideoCaptureTransport::init() - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::DeviceResource::VideoCaptureTransportPtr RTPMediaEngine::DeviceResource::VideoCaptureTransport::create(DeviceResourcePtr outer) - { - VideoCaptureTransportPtr pThis(make_shared(make_private{}, outer)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource::Transport => webrtc::VideoCaptureDataCallback - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::VideoCaptureTransport::OnIncomingCapturedFrame(const int32_t id, const webrtc::VideoFrame& videoFrame) - { - auto outer = mOuter.lock(); - if (!outer) return; - return outer->OnIncomingCapturedFrame(id, videoFrame); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::DeviceResource::VideoCaptureTransport::OnCaptureDelayChanged(const int32_t id, const int32_t delay) - { - auto outer = mOuter.lock(); - if (!outer) return; - return outer->OnCaptureDelayChanged(id, delay); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => (internal) - #pragma mark - - //------------------------------------------------------------------------- - PromisePtr RTPMediaEngine::DeviceResource::getShutdownPromise() - { - if (isShutdown()) { - return Promise::createResolved(delegateQueue()); - } - PromisePtr promise = Promise::create(delegateQueue()); - mShutdownPromises.push_back(promise); - return promise; - } - - int RTPMediaEngine::DeviceResource::getAudioDeviceIndex(webrtc::VoiceEngine *voiceEngine, String deviceID) - { - int devices; - if (webrtc::VoEHardware::GetInterface(voiceEngine)->GetNumOfRecordingDevices(devices) != 0) { - return -1; - } - int index = -1; - char deviceName[128]; - char deviceUniqueId[128]; - for (int i = 0; i < devices; i++) { - webrtc::VoEHardware::GetInterface(voiceEngine)->GetRecordingDeviceName(i, deviceName, deviceUniqueId); - if (0 == String(deviceUniqueId).compareNoCase(deviceID)) { - index = i; - break; - } - } - return index; - } - - //------------------------------------------------------------------------- - FLOAT RTPMediaEngine::DeviceResource::calculateSizeDistance( - ConstrainLongRange width, - ConstrainLongRange height, - webrtc::VideoCaptureCapability capability - ) - { - if (width.mMin.hasValue() && width.mMin.value() > capability.width) - return FLT_MAX; - if (width.mMax.hasValue() && width.mMax.value() < capability.width) - return FLT_MAX; - if (width.mExact.hasValue() && width.mExact.value() != capability.width) - return FLT_MAX; - FLOAT withDistance = 0.0F; - if (width.mIdeal.hasValue() && width.mIdeal.value() != capability.width) { - withDistance = (FLOAT)(abs((int)(capability.width - width.mIdeal.value()))) / (FLOAT)width.mIdeal.value(); - } - - if (height.mMin.hasValue() && height.mMin.value() > capability.height) - return FLT_MAX; - if (height.mMax.hasValue() && height.mMax.value() < capability.height) - return FLT_MAX; - if (height.mExact.hasValue() && height.mExact.value() != capability.height) - return FLT_MAX; - FLOAT heightDistance = 0.0F; - if (height.mIdeal.hasValue() && height.mIdeal.value() != capability.height) { - heightDistance = (FLOAT)(abs((int)(capability.height - height.mIdeal.value()))) / (FLOAT)height.mIdeal.value(); - } - - - return withDistance + heightDistance; - } - - //------------------------------------------------------------------------- - FLOAT RTPMediaEngine::DeviceResource::calculateFrameRateDistance( - ConstrainDoubleRange frameRate, - webrtc::VideoCaptureCapability capability - ) - { - if (frameRate.mMin.hasValue() && frameRate.mMin.value() > (zsLib::DOUBLE)capability.maxFPS) - return FLT_MAX; - if (frameRate.mMax.hasValue() && frameRate.mMax.value() < (zsLib::DOUBLE)capability.maxFPS) - return FLT_MAX; - if (frameRate.mExact.hasValue() && fabs(frameRate.mExact.value() - (zsLib::DOUBLE)capability.maxFPS) > 0.01F) - return FLT_MAX; - FLOAT frameRateDistance = 0.0F; - if (frameRate.mIdeal.hasValue() && fabs(frameRate.mExact.value() - (zsLib::DOUBLE)capability.maxFPS) > 0.01F) { - frameRateDistance = (FLOAT)(abs((int)(capability.maxFPS - frameRate.mIdeal.value()))) / (FLOAT)frameRate.mIdeal.value(); - } - - return frameRateDistance; - } - - //------------------------------------------------------------------------- - FLOAT RTPMediaEngine::DeviceResource::calculateAspectRatioDistance( - ConstrainDoubleRange aspectRatio, - webrtc::VideoCaptureCapability capability - ) - { - zsLib::DOUBLE capabilityAspectRatio = (zsLib::DOUBLE)capability.width / (zsLib::DOUBLE)capability.height; - - if (aspectRatio.mMin.hasValue() && aspectRatio.mMin.value() > capabilityAspectRatio) - return FLT_MAX; - if (aspectRatio.mMax.hasValue() && aspectRatio.mMax.value() < capabilityAspectRatio) - return FLT_MAX; - if (aspectRatio.mExact.hasValue() && fabs(aspectRatio.mExact.value() - capabilityAspectRatio) > 0.001F) - return FLT_MAX; - FLOAT aspectRatioDistance = 0.0F; - if (aspectRatio.mIdeal.hasValue() && fabs(aspectRatio.mIdeal.value() - capabilityAspectRatio) > 0.001F) { - aspectRatioDistance = (FLOAT)((capabilityAspectRatio - aspectRatio.mIdeal.value()) / aspectRatio.mIdeal.value()); - } - - return aspectRatioDistance; - } - - //------------------------------------------------------------------------- - FLOAT RTPMediaEngine::DeviceResource::calculateFormatDistance(webrtc::VideoCaptureCapability capability) - { - switch (capability.rawType) { - case webrtc::kVideoI420: - case webrtc::kVideoYV12: - case webrtc::kVideoYUY2: - case webrtc::kVideoUYVY: - case webrtc::kVideoIYUV: - case webrtc::kVideoARGB: - case webrtc::kVideoRGB24: - case webrtc::kVideoRGB565: - case webrtc::kVideoARGB4444: - case webrtc::kVideoARGB1555: - case webrtc::kVideoNV12: - case webrtc::kVideoNV21: - case webrtc::kVideoBGRA: - return 0.0F; - case webrtc::kVideoMJPEG: - return 1.0F; - default: - return FLT_MAX; - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource - #pragma mark - - //------------------------------------------------------------------------- - RTPMediaEngine::ChannelResource::ChannelResource( - const make_private &priv, - IRTPMediaEngineRegistrationPtr registration - ) : - BaseResource(priv, registration, registration ? registration->getRTPEngine() : RTPMediaEnginePtr()), - mHandlePacketQueue(IORTCForInternal::queuePacket()), - mClock(webrtc::Clock::GetRealTimeClock()), - mRemb(mClock), - mEventLog(new webrtc::RtcEventLogNullImpl()) - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::ChannelResource::~ChannelResource() - { - mThisWeak.reset(); - UseEnginePtr engine = getEngine(); - if (engine) { - engine->notifyResourceGone(*this); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::ChannelResource::lifetimeHolderGone() - { - auto shutdownPromise = shutdown(); - if (shutdownPromise) { - // don't really care about result - shutdownPromise->then(IPromiseDelegateProxy::createNoop(IORTCForInternal::queueBlockingMediaStartStopThread())); - shutdownPromise->background(); - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - //------------------------------------------------------------------------- - PromisePtr RTPMediaEngine::ChannelResource::shutdown() - { - PromisePtr promise; - { - AutoRecursiveLock lock(*this); - - promise = getShutdownPromise(); - if (isShutdown()) return promise; - if (mShuttingDown) return promise; - - mShuttingDown = true; - } - - auto outer = mMediaEngine.lock(); - if (outer) { - outer->shutdownChannelResource(ZS_DYNAMIC_PTR_CAST(ChannelResource, mThisWeak.lock())); - } else { - stepShutdown(); - } - return promise; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::ChannelResource::notifyTransportState(ISecureTransportTypes::States state) - { - auto pThis = ZS_DYNAMIC_PTR_CAST(ChannelResource, mThisWeak.lock()); - IRTPMediaEngineChannelResourceAsyncDelegateProxy::create(pThis)->onSecureTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::ChannelResource::notifyUpdate(ParametersPtr param) - { - auto pThis = ZS_DYNAMIC_PTR_CAST(ChannelResource, mThisWeak.lock()); - IRTPMediaEngineChannelResourceAsyncDelegateProxy::create(pThis)->onUpdate(param); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::ChannelResource::requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) - { - auto pThis = ZS_DYNAMIC_PTR_CAST(ChannelResource, mThisWeak.lock()); - IRTPMediaEngineChannelResourceAsyncDelegateProxy::create(pThis)->onProvideStats(promise, stats); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource => (internal friend derived) - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::ChannelResource::notifyPromisesShutdown() - { - AutoRecursiveLock lock(*this); - - mShutdown = true; - mShuttingDown = false; - - for (auto iter = mShutdownPromises.begin(); iter != mShutdownPromises.end(); ++iter) { - auto promise = (*iter); - promise->resolve(); - } - mShutdownPromises.clear(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource => (internal) - #pragma mark - - //------------------------------------------------------------------------- - PromisePtr RTPMediaEngine::ChannelResource::getShutdownPromise() - { - if (isShutdown()) { - return Promise::createResolved(delegateQueue()); - } - PromisePtr promise = Promise::create(delegateQueue()); - mShutdownPromises.push_back(promise); - return promise; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource - #pragma mark - - //------------------------------------------------------------------------- - RTPMediaEngine::AudioReceiverChannelResource::AudioReceiverChannelResource( - const make_private &priv, - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ) : - ChannelResource(priv, registration), - mTransport(transport), - mTrack(track), - mParameters(parameters), - mInitPacket(packet) - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::AudioReceiverChannelResource::~AudioReceiverChannelResource() - { - mThisWeak.reset(); // shared pointer to self is no longer valid - } - - //------------------------------------------------------------------------- - RTPMediaEngine::AudioReceiverChannelResourcePtr RTPMediaEngine::AudioReceiverChannelResource::create( - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ) - { - auto pThis = make_shared( - make_private{}, - registration, - transport, - track, - parameters, - packet - ); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::init() - { - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::onSecureTransportState(ISecureTransport::States state) - { - if (state == mTransportState) return; - - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - ParametersPtr parameters; - IRTPTypes::EncodingParametersList encodings; - ISecureTransport::States previousState; - { - AutoRecursiveLock lock(*this); - - parameters = mParameters; - if (parameters) - encodings = mParameters->mEncodings; - previousState = mTransportState; - mTransportState = state; - } - - if (parameters && (encodings.size() == 0 || - encodings.size() > 0 && encodings.begin()->mActive)) { - if (state == ISecureTransport::State_Connected) { - webrtc::VoEBase::GetInterface(voiceEngine)->StartReceive(mChannel); - webrtc::VoEBase::GetInterface(voiceEngine)->StartPlayout(mChannel); - } else if (previousState == ISecureTransport::State_Connected) { - webrtc::VoEBase::GetInterface(voiceEngine)->StopPlayout(mChannel); - webrtc::VoEBase::GetInterface(voiceEngine)->StopReceive(mChannel); - } - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::onUpdate(ParametersPtr params) - { - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - bool previousActive = false; - bool currentActive = false; - { - AutoRecursiveLock lock(*this); - - ParametersPtr previousParams = mParameters; - mParameters = params; - if (previousParams->mEncodings.size() == 0 || - (previousParams->mEncodings.size() > 0 && previousParams->mEncodings.begin()->mActive)) { - previousActive = true; - } - if (params->mEncodings.size() == 0 || - (params->mEncodings.size() > 0 && params->mEncodings.begin()->mActive)) { - currentActive = true; - } - } - - if (mTransportState == ISecureTransport::State_Connected) { - if (!previousActive && currentActive) { - webrtc::VoEBase::GetInterface(voiceEngine)->StartReceive(mChannel); - webrtc::VoEBase::GetInterface(voiceEngine)->StartPlayout(mChannel); - } else if (previousActive && !currentActive) { - webrtc::VoEBase::GetInterface(voiceEngine)->StopPlayout(mChannel); - webrtc::VoEBase::GetInterface(voiceEngine)->StopReceive(mChannel); - } - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) - { - auto track = mTrack.lock(); - if (!track) { - notifyPromisesReject(); - return; - } - - AutoRecursiveLock lock(*this); - - if (!mReceiveStream) { - notifyPromisesReject(); - return; - } - - UseStatsReport::StatMap reportStats; - - webrtc::AudioReceiveStream::Stats receiveStreamStats = mReceiveStream->GetStats(); - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_InboundRTP)) { - - auto report = make_shared(); - - report->mID = string(receiveStreamStats.remote_ssrc) + "_recv"; - - report->mSSRC = receiveStreamStats.remote_ssrc; - report->mIsRemote = true; - report->mMediaType = "audio"; - report->mMediaTrackID = track->id(); - report->mCodecID = mCodecPayloadName; - report->mPacketsReceived = receiveStreamStats.packets_rcvd; - report->mBytesReceived = receiveStreamStats.bytes_rcvd; - report->mPacketsLost = receiveStreamStats.packets_lost; - report->mJitter = receiveStreamStats.jitter_ms; - report->mFractionLost = receiveStreamStats.fraction_lost; -#ifdef WINRT - report->mEndToEndDelay = Milliseconds(receiveStreamStats.end_to_end_delay_ms); -#endif - reportStats[report->mID] = report; - } - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_Codec)) { - - auto report = make_shared(); - - report->mID = string(receiveStreamStats.remote_ssrc) + "_recv_codec"; - - report->mPayloadType = mCodecPayloadType; - report->mCodec = mCodecPayloadName; - report->mClockRate = 0; - report->mChannels = 0; - - reportStats[report->mID] = report; - } - - promise->resolve(UseStatsReport::create(reportStats)); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => IRTPMediaEngineAudioReceiverChannelResource - #pragma mark - - //------------------------------------------------------------------------- - bool RTPMediaEngine::AudioReceiverChannelResource::handlePacket(const RTPPacket &packet) - { - IRTPMediaEngineHandlePacketAsyncDelegateProxy::createUsingQueue(mHandlePacketQueue, getThis())->onHandleRTPPacket(packet.timestamp(), packet.buffer()); - return true; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::AudioReceiverChannelResource::handlePacket(const RTCPPacket &packet) - { - IRTPMediaEngineHandlePacketAsyncDelegateProxy::createUsingQueue(mHandlePacketQueue, getThis())->onHandleRTCPPacket(packet.buffer()); - return true; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::onHandleRTPPacket(DWORD timestamp, SecureByteBlockPtr buffer) - { - AutoIncrementLock incLock(mAccessFromNonLockedMethods); - - if (mDenyNonLockedAccess) return; - - webrtc::PacketTime time(timestamp, 0); - - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - webrtc::VoENetwork::GetInterface(voiceEngine)->ReceivedRTPPacket(getChannel(), buffer->BytePtr(), buffer->SizeInBytes(), time); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::onHandleRTCPPacket(SecureByteBlockPtr buffer) - { - AutoIncrementLock incLock(mAccessFromNonLockedMethods); - - if (mDenyNonLockedAccess) return; - - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - webrtc::VoENetwork::GetInterface(voiceEngine)->ReceivedRTCPPacket(getChannel(), buffer->BytePtr(), buffer->SizeInBytes()); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => webrtc::CongestionController::Observer - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::OnNetworkChanged(uint32_t targetBitrateBps, uint8_t fractionLoss, int64_t rttMs) - { - mBitrateAllocator->OnNetworkChanged( - targetBitrateBps, - fractionLoss, - rttMs - ); - - AutoRecursiveLock lock(*this); - - mCurrentTargetBitrate = targetBitrateBps; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => webrtc::BitrateAllocator::LimitObserver - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, uint32_t max_padding_bitrate_bps) - { - AutoRecursiveLock lock(*this); - - mCongestionController->SetAllocatedSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => friend RTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::stepSetup() - { - auto engine = mMediaEngine.lock(); - if (!engine) { - notifyPromisesReject(); - return; - } - - auto voiceEngine = engine->getVoiceEngine(); - if (NULL == voiceEngine) { - notifyPromisesReject(); - return; - } - - auto audioDecoderFactory = engine->getAudioDecoderFactory(); - auto audioState = engine->getAudioState(); - - ParametersPtr parameters; - webrtc::AudioReceiveStream::Config config; - - std::unique_ptr moduleProcessThread; - std::unique_ptr pacerThread; - std::unique_ptr bitrateAllocator; - std::unique_ptr callStats; - std::unique_ptr congestionController; - int channel; - String codecPayloadName; - BYTE codecPayloadType; - - { - AutoRecursiveLock lock(*this); - - parameters = mParameters; - } - - if (!parameters) { - notifyPromisesReject(); - return; - } - - moduleProcessThread = webrtc::ProcessThread::Create("AudioReceiverChannelResourceModuleProcessThread"); - pacerThread = webrtc::ProcessThread::Create("AudioReceiverChannelResourcePacerThread"); - - bitrateAllocator = std::unique_ptr(new webrtc::BitrateAllocator(this)); - callStats = std::unique_ptr(new webrtc::CallStats(mClock)); - congestionController = - std::unique_ptr(new webrtc::CongestionController( - mClock, - this, - &mRemb, - mEventLog.get() - )); - - callStats->RegisterStatsObserver(congestionController.get()); - - channel = webrtc::VoEBase::GetInterface(voiceEngine)->CreateChannel(); - - bool audioCodecSet = false; - webrtc::CodecInst codec; - for (auto codecIter = parameters->mCodecs.begin(); codecIter != parameters->mCodecs.end(); codecIter++) { - auto supportedCodec = IRTPTypes::toSupportedCodec(codecIter->mName); - if (IRTPTypes::getCodecKind(supportedCodec) == IRTPTypes::CodecKind_Audio && audioCodecSet) - continue; - codec = getAudioCodec(voiceEngine, codecIter->mName); - codec.pltype = codecIter->mPayloadType; - if (codecIter->mPTime != Milliseconds::zero()) - codec.pacsize = (int)((codec.plfreq / 1000) * codecIter->mPTime.count()); - if (codecIter->mNumChannels.hasValue()) - codec.channels = codecIter->mNumChannels; - switch (supportedCodec) { - case IRTPTypes::SupportedCodec_Opus: - codec.rate = 48000; - webrtc::VoECodec::GetInterface(voiceEngine)->SetRecPayloadType(channel, codec); - goto set_rtcp_feedback; - case IRTPTypes::SupportedCodec_Isac: - case IRTPTypes::SupportedCodec_G722: - case IRTPTypes::SupportedCodec_ILBC: - case IRTPTypes::SupportedCodec_PCMU: - case IRTPTypes::SupportedCodec_PCMA: - webrtc::VoECodec::GetInterface(voiceEngine)->SetRecPayloadType(channel, codec); - goto set_rtcp_feedback; - case IRTPTypes::SupportedCodec_RED: - break; - } - continue; - - set_rtcp_feedback: - for (auto rtcpFeedbackIter = codecIter->mRTCPFeedback.begin(); rtcpFeedbackIter != codecIter->mRTCPFeedback.end(); rtcpFeedbackIter++) { - IRTPTypes::KnownFeedbackTypes feedbackType = IRTPTypes::toKnownFeedbackType(rtcpFeedbackIter->mType); - IRTPTypes::KnownFeedbackParameters feedbackParameter = IRTPTypes::toKnownFeedbackParameter(rtcpFeedbackIter->mParameter); - if (IRTPTypes::KnownFeedbackType_NACK == feedbackType && IRTPTypes::KnownFeedbackParameter_Unknown == feedbackParameter) { - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetNACKStatus(channel, true, 250); - } - } - audioCodecSet = true; - } - - codecPayloadName = codec.plname; - codecPayloadType = (BYTE)codec.pltype; - - config.voe_channel_id = channel; - config.decoder_factory = audioDecoderFactory; - - for (auto encodingParamIter = parameters->mEncodings.begin(); encodingParamIter != parameters->mEncodings.end(); encodingParamIter++) { - - IRTPTypes::PayloadType codecPayloadType{}; - if (encodingParamIter->mCodecPayloadType.hasValue()) - codecPayloadType = encodingParamIter->mCodecPayloadType; - else - codecPayloadType = (BYTE)codec.pltype; - - if (codecPayloadType == codec.pltype) { - uint32_t ssrc = 0; - if (encodingParamIter->mSSRC.hasValue()) - ssrc = encodingParamIter->mSSRC; - if (encodingParamIter->mFEC.hasValue()) { - IRTPTypes::FECParameters fec = encodingParamIter->mFEC; - if (fec.mSSRC.hasValue()) - ssrc = fec.mSSRC; - } - config.rtp.remote_ssrc = ssrc; - } - } - if (config.rtp.remote_ssrc == 0) { - config.rtp.remote_ssrc = mInitPacket->ssrc(); - mInitPacket.reset(); - } - - for (auto headerExtensionIter = parameters->mHeaderExtensions.begin(); headerExtensionIter != parameters->mHeaderExtensions.end(); headerExtensionIter++) { - IRTPTypes::HeaderExtensionURIs headerExtensionURI = IRTPTypes::toHeaderExtensionURI(headerExtensionIter->mURI); - switch (headerExtensionURI) { - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_ClienttoMixerAudioLevelIndication: - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetReceiveAudioLevelIndicationStatus(channel, true, (BYTE)headerExtensionIter->mID); - config.rtp.extensions.push_back(webrtc::RtpExtension(headerExtensionIter->mURI, headerExtensionIter->mID)); - break; - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_AbsoluteSendTime: - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetReceiveAbsoluteSenderTimeStatus(channel, true, (BYTE)headerExtensionIter->mID); - config.rtp.extensions.push_back(webrtc::RtpExtension(headerExtensionIter->mURI, headerExtensionIter->mID)); - break; - default: - break; - } - } - - uint32_t localSSRC = mParameters->mRTCP.mSSRC; - if (localSSRC == 0) - localSSRC = 1; - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetLocalSSRC(channel, localSSRC); - config.rtp.local_ssrc = localSSRC; - config.rtcp_send_transport = mTransport.get(); - - { - AutoRecursiveLock lock(*this); - - mModuleProcessThread.swap(moduleProcessThread); - mPacerThread.swap(pacerThread); - mBitrateAllocator.swap(bitrateAllocator); - mCallStats.swap(callStats); - mCongestionController.swap(congestionController); - mChannel = channel; - mCodecPayloadName = codecPayloadName; - mCodecPayloadType = codecPayloadType; - } - - mModuleProcessThread->Start(); - mModuleProcessThread->RegisterModule(mCallStats.get()); - mModuleProcessThread->RegisterModule(mCongestionController.get()); - mPacerThread->RegisterModule(mCongestionController->pacer()); - mPacerThread->RegisterModule(mCongestionController->GetRemoteBitrateEstimator(true)); - mPacerThread->Start(); - - webrtc::internal::AudioReceiveStream *receiveStream = - new webrtc::internal::AudioReceiveStream( - mCongestionController.get(), - config, - audioState, - mEventLog.get() - ); - - { - AutoRecursiveLock lock(*this); - - mReceiveStream = receiveStream; - } - - webrtc::VoENetwork::GetInterface(voiceEngine)->RegisterExternalTransport(channel, *mTransport); - - if (mTransportState == ISecureTransport::State_Connected) { - webrtc::VoEBase::GetInterface(voiceEngine)->StartReceive(channel); - webrtc::VoEBase::GetInterface(voiceEngine)->StartPlayout(channel); - } - - notifyPromisesResolve(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioReceiverChannelResource::stepShutdown() - { - mDenyNonLockedAccess = true; - - // rare race condition that can happen so - while (mAccessFromNonLockedMethods > 0) - { - // NOTE: very temporary lock so should clear itself out fast - std::this_thread::yield(); - } - - int channel; - { - AutoRecursiveLock lock(*this); - - channel = mChannel; - } - - auto outer = mMediaEngine.lock(); - - if (outer) { - auto voiceEngine = outer->getVoiceEngine(); - if (voiceEngine) { - if (mTransportState == ISecureTransport::State_Connected) { - webrtc::VoEBase::GetInterface(voiceEngine)->StopPlayout(channel); - webrtc::VoEBase::GetInterface(voiceEngine)->StopReceive(channel); - } - webrtc::VoENetwork::GetInterface(voiceEngine)->DeRegisterExternalTransport(channel); - } - } - - { - AutoRecursiveLock lock(*this); - - mPacerThread->Stop(); - mPacerThread->DeRegisterModule(mCongestionController->pacer()); - mPacerThread->DeRegisterModule(mCongestionController->GetRemoteBitrateEstimator(true)); - mModuleProcessThread->DeRegisterModule(mCongestionController.get()); - mModuleProcessThread->DeRegisterModule(mCallStats.get()); - mModuleProcessThread->Stop(); - - mCallStats->DeregisterStatsObserver(mCongestionController.get()); - - if (mReceiveStream) { - delete reinterpret_cast(mReceiveStream); - mReceiveStream = NULL; - } - - mCongestionController.reset(); - mCallStats.reset(); - mBitrateAllocator.reset(); - mModuleProcessThread.reset(); - mPacerThread.reset(); - } - - notifyPromisesShutdown(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => (internal) - #pragma mark - - //------------------------------------------------------------------------- - int RTPMediaEngine::AudioReceiverChannelResource::getChannel() const - { - return mChannel; - } - - //------------------------------------------------------------------------- - webrtc::CodecInst RTPMediaEngine::AudioReceiverChannelResource::getAudioCodec( - webrtc::VoiceEngine *voiceEngine, - String payloadName - ) - { - webrtc::CodecInst codec; - int numOfCodecs = webrtc::VoECodec::GetInterface(voiceEngine)->NumOfCodecs(); - for (int i = 0; i < numOfCodecs; ++i) { - webrtc::CodecInst currentCodec; - webrtc::VoECodec::GetInterface(voiceEngine)->GetCodec(i, currentCodec); - if (0 == String(currentCodec.plname).compareNoCase(payloadName)) { - codec = currentCodec; - break; - } - } - - return codec; - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource - #pragma mark - - //------------------------------------------------------------------------- - RTPMediaEngine::AudioSenderChannelResource::AudioSenderChannelResource( - const make_private &priv, - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - IDTMFSenderDelegatePtr dtmfDelegate - ) : - ChannelResource(priv, registration), - mTransport(transport), - mTrack(track), - mParameters(parameters), - mWorkerQueue("AudioSenderChannelResourceWorkerQueue"), - mDTMFSenderDelegate(IDTMFSenderDelegateProxy::createWeak(dtmfDelegate)) - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::AudioSenderChannelResource::~AudioSenderChannelResource() - { - mThisWeak.reset(); // shared pointer to self is no longer valid - } - - //------------------------------------------------------------------------- - RTPMediaEngine::AudioSenderChannelResourcePtr RTPMediaEngine::AudioSenderChannelResource::create( - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - IDTMFSenderDelegatePtr dtmfDelegate - ) - { - auto pThis = make_shared( - make_private{}, - registration, - transport, - track, - parameters, - dtmfDelegate - ); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::init() - { - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::onSecureTransportState(ISecureTransport::States state) - { - if (state == mTransportState) return; - - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - ParametersPtr parameters; - IRTPTypes::EncodingParametersList encodings; - ISecureTransport::States previousState; - { - AutoRecursiveLock lock(*this); - - parameters = mParameters; - if (parameters) - encodings = mParameters->mEncodings; - previousState = mTransportState; - mTransportState = state; - } - - if (parameters && (encodings.size() == 0 || - encodings.size() > 0 && encodings.begin()->mActive)) { - if (state == ISecureTransport::State_Connected) { - webrtc::VoEBase::GetInterface(voiceEngine)->StartSend(mChannel); - } else if (previousState == ISecureTransport::State_Connected) { - webrtc::VoEBase::GetInterface(voiceEngine)->StopSend(mChannel); - } - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::onUpdate(ParametersPtr params) - { - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - bool previousActive = false; - bool currentActive = false; - { - AutoRecursiveLock lock(*this); - - ParametersPtr previousParams = mParameters; - mParameters = params; - if (previousParams->mEncodings.size() == 0 || - (previousParams->mEncodings.size() > 0 && previousParams->mEncodings.begin()->mActive)) { - previousActive = true; - } - if (params->mEncodings.size() == 0 || - (params->mEncodings.size() > 0 && params->mEncodings.begin()->mActive)) { - currentActive = true; - } - } - - if (mTransportState == ISecureTransport::State_Connected) { - if (!previousActive && currentActive) { - webrtc::VoEBase::GetInterface(voiceEngine)->StartSend(mChannel); - } else if (previousActive && !currentActive) { - webrtc::VoEBase::GetInterface(voiceEngine)->StopSend(mChannel); - } - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) - { - auto track = mTrack.lock(); - if (!track) { - notifyPromisesReject(); - return; - } - - AutoRecursiveLock lock(*this); - - if (!mSendStream) { - notifyPromisesReject(); - return; - } - - UseStatsReport::StatMap reportStats; - - webrtc::AudioSendStream::Stats sendStreamStats = mSendStream->GetStats(); - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_OutboundRTP)) { - - auto report = make_shared(); - - report->mID = string(sendStreamStats.local_ssrc) + "_send"; - - report->mSSRC = sendStreamStats.local_ssrc; - report->mIsRemote = false; - report->mMediaType = "audio"; - report->mMediaTrackID = track->id(); - report->mCodecID = mCodecPayloadName; - report->mPacketsSent = sendStreamStats.packets_sent; - report->mBytesSent = sendStreamStats.bytes_sent; - report->mTargetBitrate = (zsLib::DOUBLE)mCurrentTargetBitrate; - report->mRoundTripTime = (zsLib::DOUBLE)mCallStats->rtcp_rtt_stats()->LastProcessedRtt(); - - reportStats[report->mID] = report; - } - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_Codec)) { - auto report = make_shared(); - - report->mID = string(sendStreamStats.local_ssrc) + "_send_codec"; - - report->mPayloadType = mCodecPayloadType; - report->mCodec = mCodecPayloadName; - report->mClockRate = 0; - report->mChannels = 0; - - reportStats[report->mID] = report; - } - - promise->resolve(UseStatsReport::create(reportStats)); - } - - void RTPMediaEngine::AudioSenderChannelResource::onSendDTMFTone() - { - AutoRecursiveLock lock(*this); - - if (mDTMFPayloadType == 0) - return; - - size_t firstTonePosition = mDTMFTones.find_first_of(dtmfValidTones); - int code = 0; - if (firstTonePosition == std::string::npos) { - mDTMFTones.clear(); - notifyToneEvent(""); - return; - } else { - char tone = mDTMFTones[firstTonePosition]; - char event = (char)toupper(tone); - const char* p = strchr(dtmfTonesTable, event); - if (!p) { - mDTMFTones.clear(); - notifyToneEvent(""); - return; - } - code = p - dtmfTonesTable - 1; - } - - int toneGap = (int)mDTMFInterToneGap.count(); - if (code == dtmfTwoSecondsDelayCode) { - toneGap = dtmfTwoSecondInMs; - } else { - mSendStream->SendTelephoneEvent(mDTMFPayloadType, code, (int)mDTMFDuration.count()); - toneGap += (int)mDTMFDuration.count(); - } - - notifyToneEvent(mDTMFTones.substr(firstTonePosition, 1).c_str()); - - mDTMFTones.erase(0, firstTonePosition + 1); - - auto pThis = ZS_DYNAMIC_PTR_CAST(AudioSenderChannelResource, mThisWeak.lock()); - mDTMFTimer = ITimer::create(pThis, Milliseconds(toneGap), false); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => IRTPMediaEngineAudioSenderChannelResource - #pragma mark - - //------------------------------------------------------------------------- - bool RTPMediaEngine::AudioSenderChannelResource::handlePacket(const RTCPPacket &packet) - { - IRTPMediaEngineHandlePacketAsyncDelegateProxy::createUsingQueue(mHandlePacketQueue, getThis())->onHandleRTCPPacket(packet.buffer()); - return true; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::insertDTMF( - const char *tones, - Milliseconds duration, - Milliseconds interToneGap - ) - { - AutoRecursiveLock lock(*this); - - auto pThis = ZS_DYNAMIC_PTR_CAST(AudioSenderChannelResource, mThisWeak.lock()); - mDTMFTones = tones; - mDTMFDuration = duration; - mDTMFInterToneGap = interToneGap; - mDTMFTimer = ITimer::create(pThis, Milliseconds(0), false); - } - - //------------------------------------------------------------------------- - String RTPMediaEngine::AudioSenderChannelResource::toneBuffer() const - { - AutoRecursiveLock lock(*this); - - return mDTMFTones; - } - - //------------------------------------------------------------------------- - Milliseconds RTPMediaEngine::AudioSenderChannelResource::duration() const - { - AutoRecursiveLock lock(*this); - - return mDTMFDuration; - } - - //------------------------------------------------------------------------- - Milliseconds RTPMediaEngine::AudioSenderChannelResource::interToneGap() const - { - AutoRecursiveLock lock(*this); - - return mDTMFInterToneGap; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::onHandleRTCPPacket(SecureByteBlockPtr buffer) - { - AutoIncrementLock incLock(mAccessFromNonLockedMethods); - - if (mDenyNonLockedAccess) return; - - auto stream = reinterpret_cast(mSendStream); - if (NULL == stream) return; - - bool result = stream->DeliverRtcp(buffer->BytePtr(), buffer->SizeInBytes()); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => ITimerDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::onTimer(ITimerPtr timer) - { - AutoRecursiveLock lock(*this); - - auto pThis = ZS_DYNAMIC_PTR_CAST(AudioSenderChannelResource, mThisWeak.lock()); - IRTPMediaEngineChannelResourceAsyncDelegateProxy::create(pThis)->onSendDTMFTone(); - - mDTMFTimer->cancel(); - mDTMFTimer.reset(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => webrtc::CongestionController::Observer - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::OnNetworkChanged(uint32_t targetBitrateBps, uint8_t fractionLoss, int64_t rttMs) - { - if (!mWorkerQueue.IsCurrent()) { - mWorkerQueue.PostTask([this, targetBitrateBps, fractionLoss, rttMs] { - OnNetworkChanged(targetBitrateBps, fractionLoss, rttMs); - }); - return; - } - - mBitrateAllocator->OnNetworkChanged( - targetBitrateBps, - fractionLoss, - rttMs - ); - - AutoRecursiveLock lock(*this); - - mCurrentTargetBitrate = targetBitrateBps; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => webrtc::BitrateAllocator::LimitObserver - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, uint32_t max_padding_bitrate_bps) - { - AutoRecursiveLock lock(*this); - - mCongestionController->SetAllocatedSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => friend RTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::stepSetup() - { - auto engine = mMediaEngine.lock(); - if (!engine) { - notifyPromisesReject(); - return; - } - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) { - notifyPromisesReject(); - return; - } - - auto audioState = engine->getAudioState(); - - ParametersPtr parameters; - webrtc::AudioSendStream::Config config(mTransport.get()); - - std::unique_ptr moduleProcessThread; - std::unique_ptr pacerThread; - std::unique_ptr bitrateAllocator; - std::unique_ptr callStats; - std::unique_ptr congestionController; - int channel; - String codecPayloadName; - BYTE codecPayloadType; - int dtmfPayloadType; - - { - AutoRecursiveLock lock(*this); - - parameters = mParameters; - } - - if (!parameters) { - notifyPromisesReject(); - return; - } - - moduleProcessThread = webrtc::ProcessThread::Create("AudioSenderChannelResourceModuleProcessThread"); - pacerThread = webrtc::ProcessThread::Create("AudioSenderChannelResourcePacerThread"); - - bitrateAllocator = std::unique_ptr(new webrtc::BitrateAllocator(this)); - callStats = std::unique_ptr(new webrtc::CallStats(mClock)); - congestionController = - std::unique_ptr(new webrtc::CongestionController( - mClock, - this, - &mRemb, - mEventLog.get() - )); - - callStats->RegisterStatsObserver(congestionController.get()); - - channel = webrtc::VoEBase::GetInterface(voiceEngine)->CreateChannel(); - - bool audioCodecSet = false; - webrtc::CodecInst codec; - for (auto codecIter = parameters->mCodecs.begin(); codecIter != parameters->mCodecs.end(); codecIter++) { - auto supportedCodec = IRTPTypes::toSupportedCodec(codecIter->mName); - if (IRTPTypes::getCodecKind(supportedCodec) == IRTPTypes::CodecKind_Audio && audioCodecSet) - continue; - codec = getAudioCodec(voiceEngine, codecIter->mName); - codec.pltype = codecIter->mPayloadType; - if (codecIter->mPTime != Milliseconds::zero()) - codec.pacsize = (int)((codec.plfreq / 1000) * codecIter->mPTime.count()); - if (codecIter->mNumChannels.hasValue()) - codec.channels = codecIter->mNumChannels; - switch (supportedCodec) { - case IRTPTypes::SupportedCodec_Opus: - { - codec.rate = 32000 * codec.channels; - webrtc::VoECodec::GetInterface(voiceEngine)->SetSendCodec(channel, codec); - auto parameters = IRTPTypes::OpusCodecParameters::convert(codecIter->mParameters); - if (parameters->mUseInbandFEC.hasValue()) - webrtc::VoECodec::GetInterface(voiceEngine)->SetFECStatus(channel, parameters->mUseInbandFEC); - if (parameters->mUseDTX.hasValue()) - webrtc::VoECodec::GetInterface(voiceEngine)->SetOpusDtx(channel, parameters->mUseDTX); - webrtc::VoECodec::GetInterface(voiceEngine)->SetOpusMaxPlaybackRate(channel, 48000); - goto set_rtcp_feedback; - } - case IRTPTypes::SupportedCodec_Isac: - case IRTPTypes::SupportedCodec_G722: - case IRTPTypes::SupportedCodec_ILBC: - case IRTPTypes::SupportedCodec_PCMU: - case IRTPTypes::SupportedCodec_PCMA: - webrtc::VoECodec::GetInterface(voiceEngine)->SetSendCodec(channel, codec); - goto set_rtcp_feedback; - case IRTPTypes::SupportedCodec_RED: - break; - case IRTPTypes::SupportedCodec_TelephoneEvent: - dtmfPayloadType = codecIter->mPayloadType; - break; - } - continue; - - set_rtcp_feedback: - for (auto rtcpFeedbackIter = codecIter->mRTCPFeedback.begin(); rtcpFeedbackIter != codecIter->mRTCPFeedback.end(); rtcpFeedbackIter++) { - IRTPTypes::KnownFeedbackTypes feedbackType = IRTPTypes::toKnownFeedbackType(rtcpFeedbackIter->mType); - IRTPTypes::KnownFeedbackParameters feedbackParameter = IRTPTypes::toKnownFeedbackParameter(rtcpFeedbackIter->mParameter); - if (IRTPTypes::KnownFeedbackType_NACK == feedbackType && IRTPTypes::KnownFeedbackParameter_Unknown == feedbackParameter) { - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetNACKStatus(channel, true, 250); - } - } - audioCodecSet = true; - } - - codecPayloadName = codec.plname; - codecPayloadType = (BYTE)codec.pltype; - - config.voe_channel_id = mChannel; - - for (auto encodingParamIter = parameters->mEncodings.begin(); encodingParamIter != parameters->mEncodings.end(); encodingParamIter++) { - - IRTPTypes::PayloadType codecPayloadType{}; - if (encodingParamIter->mCodecPayloadType.hasValue()) - codecPayloadType = encodingParamIter->mCodecPayloadType; - else - codecPayloadType = (BYTE)codec.pltype; - - if (codecPayloadType == codec.pltype) { - uint32_t ssrc = 0; - if (encodingParamIter->mSSRC.hasValue()) { - ssrc = encodingParamIter->mSSRC; - } - if (encodingParamIter->mFEC.hasValue()) { - IRTPTypes::FECParameters fec = encodingParamIter->mFEC; - if (fec.mSSRC.hasValue()) { - ssrc = fec.mSSRC; - } - } - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetLocalSSRC(channel, ssrc); - config.rtp.ssrc = ssrc; - } - } - if (config.rtp.ssrc == 0) { - uint32_t ssrc = SafeInt(ortc::services::IHelper::random(1, 0xFFFFFFFF)); - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetLocalSSRC(channel, ssrc); - config.rtp.ssrc = ssrc; - } - - for (auto headerExtensionIter = parameters->mHeaderExtensions.begin(); headerExtensionIter != parameters->mHeaderExtensions.end(); headerExtensionIter++) { - IRTPTypes::HeaderExtensionURIs headerExtensionURI = IRTPTypes::toHeaderExtensionURI(headerExtensionIter->mURI); - switch (headerExtensionURI) { - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_ClienttoMixerAudioLevelIndication: - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetSendAudioLevelIndicationStatus(channel, true, (BYTE)headerExtensionIter->mID); - config.rtp.extensions.push_back(webrtc::RtpExtension(headerExtensionIter->mURI, headerExtensionIter->mID)); - break; - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_AbsoluteSendTime: - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetSendAbsoluteSenderTimeStatus(channel, true, (BYTE)headerExtensionIter->mID); - config.rtp.extensions.push_back(webrtc::RtpExtension(headerExtensionIter->mURI, headerExtensionIter->mID)); - break; - default: - break; - } - } - - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetRTCPStatus(channel, true); - webrtc::VoERTP_RTCP::GetInterface(voiceEngine)->SetRTCP_CNAME(channel, parameters->mRTCP.mCName); - - { - AutoRecursiveLock lock(*this); - - mModuleProcessThread.swap(moduleProcessThread); - mPacerThread.swap(pacerThread); - mBitrateAllocator.swap(bitrateAllocator); - mCallStats.swap(callStats); - mCongestionController.swap(congestionController); - mChannel = channel; - mCodecPayloadName = codecPayloadName; - mCodecPayloadType = codecPayloadType; - mDTMFPayloadType = dtmfPayloadType; - } - - mCongestionController->SetBweBitrates(10000, 40000, 100000); - - mModuleProcessThread->Start(); - mModuleProcessThread->RegisterModule(mCallStats.get()); - mModuleProcessThread->RegisterModule(mCongestionController.get()); - mPacerThread->RegisterModule(mCongestionController->pacer()); - mPacerThread->RegisterModule(mCongestionController->GetRemoteBitrateEstimator(true)); - mPacerThread->Start(); - - webrtc::internal::AudioSendStream *sendStream = - new webrtc::internal::AudioSendStream( - config, - audioState, - &mWorkerQueue, - mCongestionController.get(), - mBitrateAllocator.get() - ); - - { - AutoRecursiveLock lock(*this); - - mSendStream = sendStream; - } - - webrtc::VoENetwork::GetInterface(voiceEngine)->RegisterExternalTransport(channel, *mTransport); - - if (mTransportState == ISecureTransport::State_Connected) - webrtc::VoEBase::GetInterface(voiceEngine)->StartSend(channel); - - notifyPromisesResolve(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::stepShutdown() - { - mDenyNonLockedAccess = true; - - // rare race condition that can happen so - while (mAccessFromNonLockedMethods > 0) - { - // NOTE: very temporary lock so should clear itself out fast - std::this_thread::yield(); - } - - int channel; - { - AutoRecursiveLock lock(*this); - - channel = mChannel; - } - - auto engine = mMediaEngine.lock(); - if (engine) { - auto voiceEngine = engine->getVoiceEngine(); - if (voiceEngine) { - if (mTransportState == ISecureTransport::State_Connected) - webrtc::VoEBase::GetInterface(voiceEngine)->StopSend(channel); - webrtc::VoENetwork::GetInterface(voiceEngine)->DeRegisterExternalTransport(channel); - } - } - - { - AutoRecursiveLock lock(*this); - - mPacerThread->Stop(); - mPacerThread->DeRegisterModule(mCongestionController->pacer()); - mPacerThread->DeRegisterModule(mCongestionController->GetRemoteBitrateEstimator(true)); - mModuleProcessThread->DeRegisterModule(mCongestionController.get()); - mModuleProcessThread->DeRegisterModule(mCallStats.get()); - mModuleProcessThread->Stop(); - - mCallStats->DeregisterStatsObserver(mCongestionController.get()); - - if (mSendStream) { - delete reinterpret_cast(mSendStream); - mSendStream = NULL; - } - - mCongestionController.reset(); - mCallStats.reset(); - mBitrateAllocator.reset(); - mModuleProcessThread.reset(); - mPacerThread.reset(); - } - - notifyPromisesShutdown(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => (internal) - #pragma mark - - //------------------------------------------------------------------------- - webrtc::CodecInst RTPMediaEngine::AudioSenderChannelResource::getAudioCodec( - webrtc::VoiceEngine *voiceEngine, - String payloadName - ) - { - webrtc::CodecInst codec; - int numOfCodecs = webrtc::VoECodec::GetInterface(voiceEngine)->NumOfCodecs(); - for (int i = 0; i < numOfCodecs; ++i) { - webrtc::CodecInst currentCodec; - webrtc::VoECodec::GetInterface(voiceEngine)->GetCodec(i, currentCodec); - if (0 == String(currentCodec.plname).compareNoCase(payloadName)) { - codec = currentCodec; - break; - } - } - return codec; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::AudioSenderChannelResource::notifyToneEvent(const char *tone) - { - if (!mDTMFSenderDelegate) return; - - try { - mDTMFSenderDelegate->onDTMFSenderToneChanged(IDTMFSenderPtr(), tone); - } catch (const IDTMFSenderDelegateProxy::Exceptions::DelegateGone &) { - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource::ReceiverVideoRenderer - #pragma mark - - //--------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::ReceiverVideoRenderer::setMediaStreamTrack(UseMediaStreamTrackPtr videoTrack) - { - mVideoTrack = videoTrack; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::ReceiverVideoRenderer::OnFrame(const webrtc::VideoFrame& frame) - { - auto frameCopy = make_shared(); - frameCopy->ShallowCopy(frame); - - mVideoTrack.lock()->renderVideoFrame(frameCopy); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource - #pragma mark - - //------------------------------------------------------------------------- - RTPMediaEngine::VideoReceiverChannelResource::VideoReceiverChannelResource( - const make_private &priv, - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ) : - ChannelResource(priv, registration), - mTransport(transport), - mTrack(track), - mParameters(parameters), - mInitPacket(packet) - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::VideoReceiverChannelResource::~VideoReceiverChannelResource() - { - mThisWeak.reset(); // shared pointer to self is no longer valid - } - - //------------------------------------------------------------------------- - RTPMediaEngine::VideoReceiverChannelResourcePtr RTPMediaEngine::VideoReceiverChannelResource::create( - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ) - { - auto pThis = make_shared( - make_private{}, - registration, - transport, - track, - parameters, - packet - ); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::init() - { - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::onSecureTransportState(ISecureTransport::States state) - { - if (state == mTransportState) return; - - ParametersPtr parameters; - IRTPTypes::EncodingParametersList encodings; - webrtc::VideoReceiveStream *receiveStream; - ISecureTransport::States previousState; - { - AutoRecursiveLock lock(*this); - - receiveStream = mReceiveStream; - - parameters = mParameters; - if (parameters) - encodings = mParameters->mEncodings; - previousState = mTransportState; - mTransportState = state; - } - - if (parameters && receiveStream && (encodings.size() == 0 || - encodings.size() > 0 && encodings.begin()->mActive)) { - if (state == ISecureTransport::State_Connected) - receiveStream->Start(); - else if (previousState == ISecureTransport::State_Connected) - receiveStream->Stop(); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::onUpdate(ParametersPtr params) - { - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - webrtc::VideoReceiveStream *receiveStream; - bool previousActive = false; - bool currentActive = false; - { - AutoRecursiveLock lock(*this); - - receiveStream = mReceiveStream; - - ParametersPtr previousParams = mParameters; - mParameters = params; - - if (previousParams->mEncodings.size() == 0 || - (previousParams->mEncodings.size() > 0 && previousParams->mEncodings.begin()->mActive)) { - previousActive = true; - } - if (params->mEncodings.size() == 0 || - (params->mEncodings.size() > 0 && params->mEncodings.begin()->mActive)) { - currentActive = true; - } - } - - if (mTransportState == ISecureTransport::State_Connected && receiveStream) { - if (!previousActive && currentActive) - receiveStream->Start(); - else if (previousActive && !currentActive) - receiveStream->Stop(); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) - { - auto track = mTrack.lock(); - if (!track) { - notifyPromisesReject(); - return; - } - - AutoRecursiveLock lock(*this); - - if (!mReceiveStream) { - notifyPromisesReject(); - return; - } - - UseStatsReport::StatMap reportStats; - - webrtc::VideoReceiveStream::Stats receiveStreamStats = mReceiveStream->GetStats(); - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_InboundRTP)) { - - auto report = make_shared(); - - report->mID = string(receiveStreamStats.ssrc) + "_recv"; - - report->mSSRC = receiveStreamStats.ssrc; - report->mIsRemote = true; - report->mMediaType = "video"; - report->mMediaTrackID = track->id(); - report->mCodecID = mCodecPayloadName; - report->mFIRCount = receiveStreamStats.rtcp_packet_type_counts.fir_packets; - report->mPLICount = receiveStreamStats.rtcp_packet_type_counts.pli_packets; - report->mNACKCount = receiveStreamStats.rtcp_packet_type_counts.nack_packets; - report->mPacketsReceived = receiveStreamStats.rtp_stats.transmitted.packets; - report->mBytesReceived = receiveStreamStats.rtp_stats.transmitted.header_bytes + - receiveStreamStats.rtp_stats.transmitted.payload_bytes + - receiveStreamStats.rtp_stats.transmitted.padding_bytes; - report->mPacketsLost = receiveStreamStats.rtp_stats.retransmitted.packets; - report->mJitter = receiveStreamStats.rtcp_stats.jitter; - report->mFractionLost = receiveStreamStats.rtcp_stats.fraction_lost; -#ifdef WINRT - report->mEndToEndDelay = Milliseconds(receiveStreamStats.current_endtoend_delay_ms); -#endif - reportStats[report->mID] = report; - } - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_Codec)) { - - auto report = make_shared(); - - report->mID = string(receiveStreamStats.ssrc) + "_recv_codec"; - - report->mPayloadType = mCodecPayloadType; - report->mCodec = mCodecPayloadName; - report->mClockRate = 0; - report->mChannels = 0; - - reportStats[report->mID] = report; - } - - promise->resolve(UseStatsReport::create(reportStats)); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => IRTPMediaEngineVideoReceiverChannelResource - #pragma mark - - //------------------------------------------------------------------------- - bool RTPMediaEngine::VideoReceiverChannelResource::handlePacket(const RTPPacket &packet) - { - IRTPMediaEngineHandlePacketAsyncDelegateProxy::createUsingQueue(mHandlePacketQueue, getThis())->onHandleRTPPacket(packet.timestamp(), packet.buffer()); - return true; - } - - //------------------------------------------------------------------------- - bool RTPMediaEngine::VideoReceiverChannelResource::handlePacket(const RTCPPacket &packet) - { - IRTPMediaEngineHandlePacketAsyncDelegateProxy::createUsingQueue(mHandlePacketQueue, getThis())->onHandleRTCPPacket(packet.buffer()); - return true; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::onHandleRTPPacket(DWORD timestamp, SecureByteBlockPtr buffer) - { - AutoIncrementLock incLock(mAccessFromNonLockedMethods); - - if (mDenyNonLockedAccess) return; - - auto stream = reinterpret_cast(mReceiveStream); - if (NULL == stream) return; - - webrtc::PacketTime time(timestamp, 0); - bool result = stream->DeliverRtp(buffer->BytePtr(), buffer->SizeInBytes(), time); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::onHandleRTCPPacket(SecureByteBlockPtr buffer) - { - AutoIncrementLock incLock(mAccessFromNonLockedMethods); - - if (mDenyNonLockedAccess) return; - - auto stream = reinterpret_cast(mReceiveStream); - if (NULL == stream) return; - - bool result = stream->DeliverRtcp(buffer->BytePtr(), buffer->SizeInBytes()); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => webrtc::CongestionController::Observer - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::OnNetworkChanged(uint32_t targetBitrateBps, uint8_t fractionLoss, int64_t rttMs) - { - mBitrateAllocator->OnNetworkChanged( - targetBitrateBps, - fractionLoss, - rttMs - ); - - AutoRecursiveLock lock(*this); - - mCurrentTargetBitrate = targetBitrateBps; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => webrtc::BitrateAllocator::LimitObserver - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, uint32_t max_padding_bitrate_bps) - { - AutoRecursiveLock lock(*this); - - mCongestionController->SetAllocatedSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => friend RTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::stepSetup() - { - auto track = mTrack.lock(); - if (!track) { - return; - } - - int numCpuCores; - ParametersPtr parameters; - webrtc::VideoReceiveStream::Config config(mTransport.get()); - - std::unique_ptr moduleProcessThread; - std::unique_ptr pacerThread; - std::unique_ptr bitrateAllocator; - std::unique_ptr callStats; - std::unique_ptr congestionController; - String codecPayloadName; - BYTE codecPayloadType; - - { - AutoRecursiveLock lock(*this); - - parameters = mParameters; - } - - if (!parameters) { - notifyPromisesReject(); - return; - } - - moduleProcessThread = webrtc::ProcessThread::Create("VideoReceiverChannelResourceModuleProcessThread"); - pacerThread = webrtc::ProcessThread::Create("VideoReceiverChannelResourcePacerThread"); - - mReceiverVideoRenderer.setMediaStreamTrack(track); - - bitrateAllocator = std::unique_ptr(new webrtc::BitrateAllocator(this)); - callStats = std::unique_ptr(new webrtc::CallStats(mClock)); - congestionController = - std::unique_ptr(new webrtc::CongestionController( - mClock, - this, - &mRemb, - mEventLog.get() - )); - - callStats->RegisterStatsObserver(congestionController.get()); - - numCpuCores = webrtc::CpuInfo::DetectNumberOfCores(); - - webrtc::VideoReceiveStream::Decoder decoder; - std::vector rtxPayloadTypes; - - bool videoCodecSet = false; - bool rtxCodecSet = false; - bool redCodecSet = false; - bool fecCodecSet = false; - for (auto codecIter = parameters->mCodecs.begin(); codecIter != parameters->mCodecs.end(); ++codecIter) { - auto supportedCodec = IRTPTypes::toSupportedCodec(codecIter->mName); - switch (supportedCodec) { - case IRTPTypes::SupportedCodec_VP8: - { - if (videoCodecSet) - continue; - webrtc::VideoDecoder* videoDecoder = webrtc::VideoDecoder::Create(webrtc::VideoDecoder::kVp8); - decoder.decoder = videoDecoder; - decoder.payload_name = IRTPTypes::toString(supportedCodec); - decoder.payload_type = codecIter->mPayloadType; - goto set_rtcp_feedback; - } - case IRTPTypes::SupportedCodec_VP9: - { - if (videoCodecSet) - continue; - webrtc::VideoDecoder* videoDecoder = webrtc::VideoDecoder::Create(webrtc::VideoDecoder::kVp9); - decoder.decoder = videoDecoder; - decoder.payload_name = IRTPTypes::toString(supportedCodec); - decoder.payload_type = codecIter->mPayloadType; - goto set_rtcp_feedback; - } - case IRTPTypes::SupportedCodec_H264: - { - if (videoCodecSet) - continue; -#ifndef WINRT - webrtc::VideoDecoder* videoDecoder = webrtc::VideoDecoder::Create(webrtc::VideoDecoder::kH264); -#else - std::unique_ptr decoderFactory = std::make_unique(); - webrtc::VideoDecoder* videoDecoder = decoderFactory->CreateVideoDecoder(webrtc::VideoCodecType::kVideoCodecH264); -#endif - decoder.decoder = videoDecoder; - decoder.payload_name = IRTPTypes::toString(supportedCodec); - decoder.payload_type = codecIter->mPayloadType; - goto set_rtcp_feedback; - } - case IRTPTypes::SupportedCodec_RTX: - { - if (rtxCodecSet) - continue; - rtxPayloadTypes.push_back(codecIter->mPayloadType); - rtxCodecSet = true; - break; - } - case IRTPTypes::SupportedCodec_RED: - { - if (redCodecSet) - continue; - config.rtp.fec.red_payload_type = codecIter->mPayloadType; - redCodecSet = true; - break; - } - case IRTPTypes::SupportedCodec_ULPFEC: - { - if (fecCodecSet) - continue; - config.rtp.fec.ulpfec_payload_type = codecIter->mPayloadType; - fecCodecSet = true; - break; - } - case IRTPTypes::SupportedCodec_FlexFEC: - { - break; - } - } - continue; - - set_rtcp_feedback: - for (auto rtcpFeedbackIter = codecIter->mRTCPFeedback.begin(); rtcpFeedbackIter != codecIter->mRTCPFeedback.end(); rtcpFeedbackIter++) { - IRTPTypes::KnownFeedbackTypes feedbackType = IRTPTypes::toKnownFeedbackType(rtcpFeedbackIter->mType); - IRTPTypes::KnownFeedbackParameters feedbackParameter = IRTPTypes::toKnownFeedbackParameter(rtcpFeedbackIter->mParameter); - if (IRTPTypes::KnownFeedbackType_NACK == feedbackType && IRTPTypes::KnownFeedbackParameter_Unknown == feedbackParameter) { - config.rtp.nack.rtp_history_ms = 1000; - } else if (IRTPTypes::KnownFeedbackType_REMB == feedbackType && IRTPTypes::KnownFeedbackParameter_Unknown == feedbackParameter) { - config.rtp.remb = true; - } - } - videoCodecSet = true; - } - - codecPayloadName = decoder.payload_name; - codecPayloadType = (BYTE)decoder.payload_type; - - for (auto encodingParamIter = parameters->mEncodings.begin(); encodingParamIter != parameters->mEncodings.end(); encodingParamIter++) { - - IRTPTypes::PayloadType codecPayloadType {}; - if (encodingParamIter->mCodecPayloadType.hasValue()) - codecPayloadType = encodingParamIter->mCodecPayloadType; - else - codecPayloadType = (BYTE)decoder.payload_type; - - if (codecPayloadType == decoder.payload_type) { - uint32_t ssrc = 0; - if (encodingParamIter->mSSRC.hasValue()) - ssrc = encodingParamIter->mSSRC; - if (encodingParamIter->mFEC.hasValue()) { - IRTPTypes::FECParameters fec = encodingParamIter->mFEC; - if (fec.mSSRC.hasValue()) { - ssrc = encodingParamIter->mSSRC; - } - } - config.rtp.remote_ssrc = ssrc; - if (encodingParamIter->mRTX.hasValue()) { - IRTPTypes::RTXParameters rtxEncodingParam = encodingParamIter->mRTX; - webrtc::VideoReceiveStream::Config::Rtp::Rtx rtx; - rtx.payload_type = rtxPayloadTypes.front(); - if (rtxEncodingParam.mSSRC.hasValue()) - rtx.ssrc = rtxEncodingParam.mSSRC; - config.rtp.rtx[codecPayloadType] = rtx; - } - } - } - if (config.rtp.remote_ssrc == 0) { - config.rtp.remote_ssrc = mInitPacket->ssrc(); - mInitPacket.reset(); - } - uint32_t localSSRC = parameters->mRTCP.mSSRC; - if (localSSRC == 0) - localSSRC = 1; - config.rtp.local_ssrc = localSSRC; - - for (auto headerExtensionIter = parameters->mHeaderExtensions.begin(); headerExtensionIter != parameters->mHeaderExtensions.end(); headerExtensionIter++) { - IRTPTypes::HeaderExtensionURIs headerExtensionURI = IRTPTypes::toHeaderExtensionURI(headerExtensionIter->mURI); - switch (headerExtensionURI) { - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_TransmissionTimeOffsets: - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_AbsoluteSendTime: - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_3gpp_VideoOrientation: - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_TransportSequenceNumber: - config.rtp.extensions.push_back(webrtc::RtpExtension(headerExtensionIter->mURI, headerExtensionIter->mID)); - break; - default: - break; - } - } - - if (parameters->mRTCP.mReducedSize) - config.rtp.rtcp_mode = webrtc::RtcpMode::kReducedSize; - config.decoders.push_back(decoder); - config.renderer = &mReceiverVideoRenderer; - - { - AutoRecursiveLock lock(*this); - - mModuleProcessThread.swap(moduleProcessThread); - mPacerThread.swap(pacerThread); - mBitrateAllocator.swap(bitrateAllocator); - mCallStats.swap(callStats); - mCongestionController.swap(congestionController); - mCodecPayloadName = codecPayloadName; - mCodecPayloadType = codecPayloadType; - } - - mModuleProcessThread->Start(); - mModuleProcessThread->RegisterModule(mCallStats.get()); - mModuleProcessThread->RegisterModule(mCongestionController.get()); - mPacerThread->RegisterModule(mCongestionController->pacer()); - mPacerThread->RegisterModule(mCongestionController->GetRemoteBitrateEstimator(true)); - mPacerThread->Start(); - - webrtc::internal::VideoReceiveStream *receiveStream = - new webrtc::internal::VideoReceiveStream( - numCpuCores, - mCongestionController.get(), - std::move(config), - NULL, - mModuleProcessThread.get(), - mCallStats.get(), - &mRemb - ); - - { - AutoRecursiveLock lock(*this); - - mReceiveStream = receiveStream; - } - - if (mTransportState == ISecureTransport::State_Connected) - receiveStream->Start(); - - notifyPromisesResolve(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoReceiverChannelResource::stepShutdown() - { - mDenyNonLockedAccess = true; - - // rare race condition that can happen so - while (mAccessFromNonLockedMethods > 0) - { - // NOTE: very temporary lock so should clear itself out fast - std::this_thread::yield(); - } - - webrtc::VideoReceiveStream *receiveStream; - { - AutoRecursiveLock lock(*this); - - receiveStream = mReceiveStream; - } - - if (receiveStream && mTransportState == ISecureTransport::State_Connected) - receiveStream->Stop(); - - { - AutoRecursiveLock lock(*this); - - mPacerThread->Stop(); - mPacerThread->DeRegisterModule(mCongestionController->pacer()); - mPacerThread->DeRegisterModule(mCongestionController->GetRemoteBitrateEstimator(true)); - mModuleProcessThread->DeRegisterModule(mCongestionController.get()); - mModuleProcessThread->DeRegisterModule(mCallStats.get()); - mModuleProcessThread->Stop(); - - mCallStats->DeregisterStatsObserver(mCongestionController.get()); - - if (mReceiveStream) { - delete reinterpret_cast(mReceiveStream); - mReceiveStream = NULL; - } - - mCongestionController.reset(); - mCallStats.reset(); - mBitrateAllocator.reset(); - mModuleProcessThread.reset(); - mPacerThread.reset(); - } - - notifyPromisesShutdown(); - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource - #pragma mark - - //------------------------------------------------------------------------- - RTPMediaEngine::VideoSenderChannelResource::VideoSenderChannelResource( - const make_private &priv, - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters - ) : - ChannelResource(priv, registration), - mTransport(transport), - mTrack(track), - mParameters(parameters), - mWorkerQueue("VideoSenderChannelResourceWorkerQueue"), - mVideoSendDelayStats(new webrtc::SendDelayStats(mClock)) - { - } - - //------------------------------------------------------------------------- - RTPMediaEngine::VideoSenderChannelResource::~VideoSenderChannelResource() - { - mThisWeak.reset(); // shared pointer to self is no longer valid - } - - //------------------------------------------------------------------------- - RTPMediaEngine::VideoSenderChannelResourcePtr RTPMediaEngine::VideoSenderChannelResource::create( - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters - ) - { - auto pThis = make_shared( - make_private{}, - registration, - transport, - track, - parameters - ); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::init() - { - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::onSecureTransportState(ISecureTransport::States state) - { - if (state == mTransportState) return; - - if (!mSendStream) return; - - ParametersPtr parameters; - IRTPTypes::EncodingParametersList encodings; - webrtc::VideoSendStream *sendStream; - ISecureTransport::States previousState; - { - AutoRecursiveLock lock(*this); - - sendStream = mSendStream; - - parameters = mParameters; - if (parameters) - encodings = mParameters->mEncodings; - previousState = mTransportState; - mTransportState = state; - } - - if (parameters && sendStream && (encodings.size() == 0 || - encodings.size() > 0 && encodings.begin()->mActive)) { - if (state == ISecureTransport::State_Connected) - sendStream->Start(); - else if (previousState == ISecureTransport::State_Connected) - sendStream->Stop(); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::onUpdate(ParametersPtr params) - { - auto engine = mMediaEngine.lock(); - if (!engine) return; - - auto voiceEngine = engine->getVoiceEngine(); - if (!voiceEngine) return; - - webrtc::VideoSendStream *sendStream; - bool previousActive = false; - bool currentActive = false; - { - AutoRecursiveLock lock(*this); - - sendStream = mSendStream; - - ParametersPtr previousParams = mParameters; - mParameters = params; - - if (previousParams->mEncodings.size() == 0 || - (previousParams->mEncodings.size() > 0 && previousParams->mEncodings.begin()->mActive)) { - previousActive = true; - } - if (params->mEncodings.size() == 0 || - (params->mEncodings.size() > 0 && params->mEncodings.begin()->mActive)) { - currentActive = true; - } - } - - if (mTransportState == ISecureTransport::State_Connected && sendStream) { - if (!previousActive && currentActive) - sendStream->Start(); - else if (previousActive && !currentActive) - sendStream->Stop(); - } - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) - { - auto track = mTrack.lock(); - if (!track) { - notifyPromisesReject(); - return; - } - - AutoRecursiveLock lock(*this); - - if (!mSendStream) { - notifyPromisesReject(); - return; - } - - UseStatsReport::StatMap reportStats; - - webrtc::VideoSendStream::Stats sendStreamStats = mSendStream->GetStats(); - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_OutboundRTP)) { - - for (auto statsIter = sendStreamStats.substreams.begin(); statsIter != sendStreamStats.substreams.end(); statsIter++) { - - auto report = make_shared(); - - report->mID = string((*statsIter).first) + "_send"; - - report->mSSRC = (*statsIter).first; - report->mIsRemote = false; - report->mMediaType = "video"; - report->mMediaTrackID = track->id(); - report->mCodecID = mCodecPayloadName; - report->mFIRCount = (*statsIter).second.rtcp_packet_type_counts.fir_packets; - report->mPLICount = (*statsIter).second.rtcp_packet_type_counts.pli_packets; - report->mNACKCount = (*statsIter).second.rtcp_packet_type_counts.nack_packets; - report->mPacketsSent = (*statsIter).second.rtp_stats.transmitted.packets; - report->mBytesSent = (*statsIter).second.rtp_stats.transmitted.header_bytes + - (*statsIter).second.rtp_stats.transmitted.payload_bytes + - (*statsIter).second.rtp_stats.transmitted.padding_bytes; - report->mTargetBitrate = (zsLib::DOUBLE)mCurrentTargetBitrate; - report->mRoundTripTime = (zsLib::DOUBLE)mCallStats->rtcp_rtt_stats()->LastProcessedRtt(); - - reportStats[report->mID] = report; - } - } - - if (stats.hasStatType(IStatsReportTypes::StatsTypes::StatsType_Codec)) { - auto report = make_shared(); - - report->mID = string((*sendStreamStats.substreams.begin()).first) + "_send_codec"; - - report->mPayloadType = mCodecPayloadType; - report->mCodec = mCodecPayloadName; - report->mClockRate = 0; - report->mChannels = 0; - - reportStats[report->mID] = report; - } - - promise->resolve(UseStatsReport::create(reportStats)); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - bool RTPMediaEngine::VideoSenderChannelResource::handlePacket(const RTCPPacket &packet) - { - IRTPMediaEngineHandlePacketAsyncDelegateProxy::createUsingQueue(mHandlePacketQueue, getThis())->onHandleRTCPPacket(packet.buffer()); - return true; - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::sendVideoFrame(VideoFramePtr videoFrame) - { - IRTPMediaEngineHandlePacketAsyncDelegateProxy::createUsingQueue(mHandlePacketQueue, getThis())->onSendVideoFrame(videoFrame); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::onHandleRTCPPacket(SecureByteBlockPtr buffer) - { - AutoIncrementLock incLock(mAccessFromNonLockedMethods); - - if (mDenyNonLockedAccess) return; - - auto stream = reinterpret_cast(mSendStream); - if (NULL == stream) return; - - bool result = stream->DeliverRtcp(buffer->BytePtr(), buffer->SizeInBytes()); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::onSendVideoFrame(VideoFramePtr videoFrame) - { - AutoIncrementLock incLock(mAccessFromNonLockedMethods); - - if (mDenyNonLockedAccess) return; - - if (NULL == mSendStream) return; - - mSendStream->Input()->IncomingCapturedFrame(*videoFrame); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => webrtc::CongestionController::Observer - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::OnNetworkChanged(uint32_t targetBitrateBps, uint8_t fractionLoss, int64_t rttMs) - { - if (!mWorkerQueue.IsCurrent()) { - mWorkerQueue.PostTask([this, targetBitrateBps, fractionLoss, rttMs] { - OnNetworkChanged(targetBitrateBps, fractionLoss, rttMs); - }); - return; - } - - mBitrateAllocator->OnNetworkChanged( - targetBitrateBps, - fractionLoss, - rttMs - ); - - AutoRecursiveLock lock(*this); - - mCurrentTargetBitrate = targetBitrateBps; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => webrtc::BitrateAllocator::LimitObserver - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, uint32_t max_padding_bitrate_bps) - { - AutoRecursiveLock lock(*this); - - mCongestionController->SetAllocatedSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => friend RTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::stepSetup() - { - auto track = mTrack.lock(); - if (!track) return; - - auto trackSettings = track->getSettings(); - if (!trackSettings) return; - - int numCpuCores; - ParametersPtr parameters; - webrtc::VideoSendStream::Config config(mTransport.get()); - webrtc::VideoEncoderConfig encoderConfig; - std::map suspendedSSRCs; - - std::unique_ptr moduleProcessThread; - std::unique_ptr pacerThread; - std::unique_ptr bitrateAllocator; - std::unique_ptr callStats; - std::unique_ptr congestionController; - String codecPayloadName; - BYTE codecPayloadType; - - { - AutoRecursiveLock lock(*this); - - parameters = mParameters; - } - - if (!parameters) { - notifyPromisesReject(); - return; - } - - moduleProcessThread = webrtc::ProcessThread::Create("VideoSenderChannelResourceModuleProcessThread"); - pacerThread = webrtc::ProcessThread::Create("VideoSenderChannelResourcePacerThread"); - - bitrateAllocator = std::unique_ptr(new webrtc::BitrateAllocator(this)); - callStats = std::unique_ptr(new webrtc::CallStats(mClock)); - congestionController = - std::unique_ptr(new webrtc::CongestionController( - mClock, - this, - &mRemb, - mEventLog.get() - )); - - callStats->RegisterStatsObserver(congestionController.get()); - - numCpuCores = webrtc::CpuInfo::DetectNumberOfCores(); - - size_t sourceWidth = 640; - size_t sourceHeight = 480; - int sourceMaxFramerate = 15; - if (trackSettings->mWidth.hasValue()) - sourceWidth = trackSettings->mWidth.value(); - if (trackSettings->mHeight.hasValue()) - sourceHeight = trackSettings->mHeight.value(); - if (trackSettings->mFrameRate.hasValue()) - sourceMaxFramerate = (int)trackSettings->mFrameRate.value(); - - encoderConfig.min_transmit_bitrate_bps = 0; - encoderConfig.content_type = webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo; - - bool videoCodecSet = false; - bool rtxCodecSet = false; - bool redCodecSet = false; - bool fecCodecSet = false; - for (auto codecIter = parameters->mCodecs.begin(); codecIter != parameters->mCodecs.end(); codecIter++) { - auto supportedCodec = IRTPTypes::toSupportedCodec(codecIter->mName); - switch (supportedCodec) { - case IRTPTypes::SupportedCodec_VP8: - { - if (videoCodecSet) - continue; - webrtc::VideoEncoder* videoEncoder = webrtc::VideoEncoder::Create(webrtc::VideoEncoder::kVp8); - config.encoder_settings.encoder = videoEncoder; - config.encoder_settings.payload_name = IRTPTypes::toString(supportedCodec); - config.encoder_settings.payload_type = codecIter->mPayloadType; - mVideoEncoderSettings.mVp8 = webrtc::VideoEncoder::GetDefaultVp8Settings(); - mVideoEncoderSettings.mVp8.automaticResizeOn = true; - mVideoEncoderSettings.mVp8.denoisingOn = true; - mVideoEncoderSettings.mVp8.frameDroppingOn = true; - encoderConfig.encoder_specific_settings = &mVideoEncoderSettings.mVp8; - goto set_rtcp_feedback; - } - case IRTPTypes::SupportedCodec_VP9: - { - if (videoCodecSet) - continue; - webrtc::VideoEncoder* videoEncoder = webrtc::VideoEncoder::Create(webrtc::VideoEncoder::kVp9); - config.encoder_settings.encoder = videoEncoder; - config.encoder_settings.payload_name = IRTPTypes::toString(supportedCodec); - config.encoder_settings.payload_type = codecIter->mPayloadType; - mVideoEncoderSettings.mVp9 = webrtc::VideoEncoder::GetDefaultVp9Settings(); - mVideoEncoderSettings.mVp9.frameDroppingOn = true; - encoderConfig.encoder_specific_settings = &mVideoEncoderSettings.mVp9; - goto set_rtcp_feedback; - } - case IRTPTypes::SupportedCodec_H264: - { - if (videoCodecSet) - continue; -#ifndef WINRT - webrtc::VideoEncoder* videoEncoder = webrtc::VideoEncoder::Create(webrtc::VideoEncoder::kH264); -#else - std::unique_ptr encoderFactory = std::make_unique(); - webrtc::VideoEncoder* videoEncoder = encoderFactory->CreateVideoEncoder(webrtc::VideoCodecType::kVideoCodecH264); -#endif - config.encoder_settings.encoder = videoEncoder; - config.encoder_settings.payload_name = IRTPTypes::toString(supportedCodec); - config.encoder_settings.payload_type = codecIter->mPayloadType; - mVideoEncoderSettings.mH264 = webrtc::VideoEncoder::GetDefaultH264Settings(); - mVideoEncoderSettings.mH264.frameDroppingOn = true; - encoderConfig.encoder_specific_settings = &mVideoEncoderSettings.mH264; - goto set_rtcp_feedback; - } - case IRTPTypes::SupportedCodec_RTX: - { - if (rtxCodecSet) - continue; - config.rtp.rtx.payload_type = codecIter->mPayloadType; - rtxCodecSet = true; - break; - } - case IRTPTypes::SupportedCodec_RED: - { - if (redCodecSet) - continue; - config.rtp.fec.red_payload_type = codecIter->mPayloadType; - redCodecSet = true; - break; - } - case IRTPTypes::SupportedCodec_ULPFEC: - { - if (fecCodecSet) - continue; - config.rtp.fec.ulpfec_payload_type = codecIter->mPayloadType; - fecCodecSet = true; - break; - } - case IRTPTypes::SupportedCodec_FlexFEC: - { - break; - } - } - continue; - - set_rtcp_feedback: - for (auto rtcpFeedbackIter = codecIter->mRTCPFeedback.begin(); rtcpFeedbackIter != codecIter->mRTCPFeedback.end(); rtcpFeedbackIter++) { - IRTPTypes::KnownFeedbackTypes feedbackType = IRTPTypes::toKnownFeedbackType(rtcpFeedbackIter->mType); - IRTPTypes::KnownFeedbackParameters feedbackParameter = IRTPTypes::toKnownFeedbackParameter(rtcpFeedbackIter->mParameter); - if (IRTPTypes::KnownFeedbackType_NACK == feedbackType && IRTPTypes::KnownFeedbackParameter_Unknown == feedbackParameter) { - config.rtp.nack.rtp_history_ms = 1000; - } - } - videoCodecSet = true; - } - - codecPayloadName = config.encoder_settings.payload_name; - codecPayloadType = (BYTE)config.encoder_settings.payload_type; - - int totalMinBitrate = 0; - int totalMaxBitrate = 0; - int totalTargetBitrate = 0; - int numberOfTemporalLayers[webrtc::kMaxSimulcastStreams] = {}; - int numberOfSpatialLayers[webrtc::kMaxSimulcastStreams] = {}; - int streamIndex = 0; - // Vectors of both spatial and temporal layer encoding IDs, one vector per each simulcast stream. - // Base layer is first in a row and enhancement layers are positioned after. - std::vector> encodingIDs; - for (auto encodingParamIter = parameters->mEncodings.begin(); encodingParamIter != parameters->mEncodings.end(); encodingParamIter++) { - - IRTPTypes::PayloadType codecPayloadType{}; - if (encodingParamIter->mCodecPayloadType.hasValue()) - codecPayloadType = encodingParamIter->mCodecPayloadType; - else - codecPayloadType = (BYTE)config.encoder_settings.payload_type; - - if (codecPayloadType != config.encoder_settings.payload_type) - continue; - - if (encodingParamIter->mDependencyEncodingIDs.size() == 0) { - encodingIDs.push_back(std::vector()); - numberOfTemporalLayers[streamIndex] = 1; - numberOfSpatialLayers[streamIndex] = 1; - if (!encodingParamIter->mEncodingID.empty()) - encodingIDs[streamIndex].push_back(encodingParamIter->mEncodingID); - } - int dependencyStreamIndex = 0; - bool isTemporalLayer = false; - bool isSpatialLayer = false; - for (auto dependencyEncodingIDIter = encodingParamIter->mDependencyEncodingIDs.begin(); dependencyEncodingIDIter != encodingParamIter->mDependencyEncodingIDs.end(); dependencyEncodingIDIter++) { - dependencyStreamIndex = 0; - for (auto encodingIDVectorIter = encodingIDs.begin(); encodingIDVectorIter != encodingIDs.end(); encodingIDVectorIter++) { - for (auto encodingIDStringIter = encodingIDVectorIter->begin(); encodingIDStringIter != encodingIDVectorIter->end(); encodingIDStringIter++) { - if (encodingIDStringIter->compare(*dependencyEncodingIDIter) != 0) - continue; - for (auto dependencyEncodingParamIter = parameters->mEncodings.begin(); dependencyEncodingParamIter != encodingParamIter; dependencyEncodingParamIter++) { - if (dependencyEncodingParamIter->mEncodingID.compare(*dependencyEncodingIDIter) != 0) - continue; - if (encodingParamIter->mFramerateScale.hasValue() && dependencyEncodingParamIter->mFramerateScale.hasValue() && - encodingParamIter->mFramerateScale.value() != dependencyEncodingParamIter->mFramerateScale.value() || - !encodingParamIter->mFramerateScale.hasValue() && dependencyEncodingParamIter->mFramerateScale.hasValue() && - dependencyEncodingParamIter->mFramerateScale.value() != 1.0 || - encodingParamIter->mFramerateScale.hasValue() && !dependencyEncodingParamIter->mFramerateScale.hasValue() && - encodingParamIter->mFramerateScale.value() != 1.0 - ) { - isTemporalLayer = true; - } - if (encodingParamIter->mResolutionScale.hasValue() && dependencyEncodingParamIter->mResolutionScale.hasValue() && - encodingParamIter->mResolutionScale.value() != dependencyEncodingParamIter->mResolutionScale.value() || - !encodingParamIter->mResolutionScale.hasValue() && dependencyEncodingParamIter->mResolutionScale.hasValue() && - dependencyEncodingParamIter->mResolutionScale.value() != 1.0 || - encodingParamIter->mResolutionScale.hasValue() && !dependencyEncodingParamIter->mResolutionScale.hasValue() && - encodingParamIter->mResolutionScale.value() != 1.0 - ) { - isSpatialLayer = true; - } - break; - } - break; - } - if (isTemporalLayer || isSpatialLayer) - break; - dependencyStreamIndex++; - } - } - if (isTemporalLayer) - numberOfTemporalLayers[dependencyStreamIndex]++; - if (isSpatialLayer) - numberOfSpatialLayers[dependencyStreamIndex]++; - if ((isTemporalLayer || isSpatialLayer) && !encodingParamIter->mEncodingID.empty()) - encodingIDs[dependencyStreamIndex].push_back(encodingParamIter->mEncodingID); - - if (encodingParamIter->mDependencyEncodingIDs.size() == 0) - streamIndex++; - else - continue; - - uint32_t ssrc = 0; - if (encodingParamIter->mSSRC.hasValue()) - ssrc = encodingParamIter->mSSRC; - if (encodingParamIter->mFEC.hasValue()) { - IRTPTypes::FECParameters fec = encodingParamIter->mFEC; - if (fec.mSSRC.hasValue()) { - ssrc = encodingParamIter->mSSRC; - } - } - if (ssrc == 0) - ssrc = SafeInt(ortc::services::IHelper::random(1, 0xFFFFFFFF)); - config.rtp.ssrcs.push_back(ssrc); - if (encodingParamIter->mRTX.hasValue()) { - IRTPTypes::RTXParameters rtx = encodingParamIter->mRTX; - if (rtx.mSSRC.hasValue()) - config.rtp.rtx.ssrcs.push_back(rtx.mSSRC); - } - webrtc::VideoStream stream; - stream.width = encodingParamIter->mResolutionScale.hasValue() ? (size_t)(sourceWidth / encodingParamIter->mResolutionScale) : sourceWidth; - stream.height = encodingParamIter->mResolutionScale.hasValue() ? (size_t)(sourceHeight / encodingParamIter->mResolutionScale) : sourceHeight; - stream.max_framerate = encodingParamIter->mFramerateScale.hasValue() ? (int)(sourceMaxFramerate / encodingParamIter->mFramerateScale) : sourceMaxFramerate; - stream.min_bitrate_bps = 30000; - stream.max_bitrate_bps = encodingParamIter->mMaxBitrate.hasValue() ? (int)encodingParamIter->mMaxBitrate : 2000000; - stream.target_bitrate_bps = stream.max_bitrate_bps / 2; - stream.max_qp = 56; - encoderConfig.streams.push_back(stream); - totalMinBitrate += stream.min_bitrate_bps; - totalMaxBitrate += stream.max_bitrate_bps; - totalTargetBitrate += stream.target_bitrate_bps; - } - if (encoderConfig.streams.size() == 0) { - config.rtp.ssrcs.push_back(SafeInt(ortc::services::IHelper::random(1, 0xFFFFFFFF))); - webrtc::VideoStream stream; - stream.width = sourceWidth; - stream.height = sourceHeight; - stream.max_framerate = sourceMaxFramerate; - stream.min_bitrate_bps = 30000; - stream.max_bitrate_bps = 2000000; - stream.target_bitrate_bps = stream.max_bitrate_bps / 2; - stream.max_qp = 56; - encoderConfig.streams.push_back(stream); - totalMinBitrate = stream.min_bitrate_bps; - totalMaxBitrate = stream.max_bitrate_bps; - totalTargetBitrate = stream.target_bitrate_bps; - } - auto supportedCodec = IRTPTypes::toSupportedCodec(codecPayloadName); - if (supportedCodec == IRTPTypes::SupportedCodec_VP8) { - if (encoderConfig.streams.size() > 1) - mVideoEncoderSettings.mVp8.automaticResizeOn = false; - for (size_t i = 0; i < encoderConfig.streams.size(); i++) { - if (numberOfTemporalLayers[i] > 0) - encoderConfig.streams[i].temporal_layer_thresholds_bps.resize(numberOfTemporalLayers[i] - 1); - } - } else if (supportedCodec == IRTPTypes::SupportedCodec_VP9) { - for (size_t i = 0; i < encoderConfig.streams.size(); i++) { - if (numberOfTemporalLayers[i] > 0) - encoderConfig.streams[i].temporal_layer_thresholds_bps.resize(numberOfTemporalLayers[i] - 1); - } - mVideoEncoderSettings.mVp9.numberOfSpatialLayers = (unsigned char)numberOfSpatialLayers[0]; - } - - for (auto headerExtensionIter = parameters->mHeaderExtensions.begin(); headerExtensionIter != parameters->mHeaderExtensions.end(); headerExtensionIter++) { - IRTPTypes::HeaderExtensionURIs headerExtensionURI = IRTPTypes::toHeaderExtensionURI(headerExtensionIter->mURI); - switch (headerExtensionURI) { - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_TransmissionTimeOffsets: - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_AbsoluteSendTime: - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_3gpp_VideoOrientation: - case IRTPTypes::HeaderExtensionURIs::HeaderExtensionURI_TransportSequenceNumber: - config.rtp.extensions.push_back(webrtc::RtpExtension(headerExtensionIter->mURI, headerExtensionIter->mID)); - break; - default: - break; - } - } - - config.rtp.c_name = parameters->mRTCP.mCName; - - { - AutoRecursiveLock lock(*this); - - mModuleProcessThread.swap(moduleProcessThread); - mPacerThread.swap(pacerThread); - mBitrateAllocator.swap(bitrateAllocator); - mCallStats.swap(callStats); - mCongestionController.swap(congestionController); - mCodecPayloadName = codecPayloadName; - mCodecPayloadType = codecPayloadType; - } - - mCongestionController->SetBweBitrates(totalMinBitrate, totalTargetBitrate, totalMaxBitrate); - mVideoSendDelayStats->AddSsrcs(config); - - mModuleProcessThread->Start(); - mModuleProcessThread->RegisterModule(mCallStats.get()); - mModuleProcessThread->RegisterModule(mCongestionController.get()); - mPacerThread->RegisterModule(mCongestionController->pacer()); - mPacerThread->RegisterModule(mCongestionController->GetRemoteBitrateEstimator(true)); - mPacerThread->Start(); - - webrtc::internal::VideoSendStream *sendStream = - new webrtc::internal::VideoSendStream( - numCpuCores, - mModuleProcessThread.get(), - &mWorkerQueue, - mCallStats.get(), - mCongestionController.get(), - mBitrateAllocator.get(), - mVideoSendDelayStats.get(), - &mRemb, - mEventLog.get(), - std::move(config), - std::move(encoderConfig), - suspendedSSRCs - ); - - { - AutoRecursiveLock lock(*this); - - mSendStream = sendStream; - } - - if (mTransportState == ISecureTransport::State_Connected) - sendStream->Start(); - - notifyPromisesResolve(); - } - - //------------------------------------------------------------------------- - void RTPMediaEngine::VideoSenderChannelResource::stepShutdown() - { - mDenyNonLockedAccess = true; - - // rare race condition that can happen so - while (mAccessFromNonLockedMethods > 0) - { - // NOTE: very temporary lock so should clear itself out fast - std::this_thread::yield(); - } - - webrtc::VideoSendStream *sendStream; - { - AutoRecursiveLock lock(*this); - - sendStream = mSendStream; - } - - if (sendStream) { - if (mTransportState == ISecureTransport::State_Connected) - sendStream->Stop(); - reinterpret_cast(sendStream)->StopPermanentlyAndGetRtpStates(); - } - - { - AutoRecursiveLock lock(*this); - - mPacerThread->Stop(); - mPacerThread->DeRegisterModule(mCongestionController->pacer()); - mPacerThread->DeRegisterModule(mCongestionController->GetRemoteBitrateEstimator(true)); - mModuleProcessThread->DeRegisterModule(mCongestionController.get()); - mModuleProcessThread->DeRegisterModule(mCallStats.get()); - mModuleProcessThread->Stop(); - - mCallStats->DeregisterStatsObserver(mCongestionController.get()); - - if (mSendStream) { - delete reinterpret_cast(mSendStream); - mSendStream = NULL; - } - - mCongestionController.reset(); - mCallStats.reset(); - mBitrateAllocator.reset(); - mModuleProcessThread.reset(); - mPacerThread.reset(); - } - - notifyPromisesShutdown(); - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineFactory - #pragma mark - - //------------------------------------------------------------------------- - IRTPMediaEngineFactory &IRTPMediaEngineFactory::singleton() - { - return RTPMediaEngineFactory::singleton(); - } - - //------------------------------------------------------------------------- - RTPMediaEnginePtr IRTPMediaEngineFactory::create(IRTPMediaEngineRegistrationPtr registration) - { - if (this) {} - return internal::RTPMediaEngine::create(registration); - } - - } // internal namespace -} diff --git a/ortc/cpp/ortc_RTPPacket.cpp b/ortc/cpp/ortc_RTPPacket.cpp index 3ccc5609..ec1e12ac 100644 --- a/ortc/cpp/ortc_RTPPacket.cpp +++ b/ortc/cpp/ortc_RTPPacket.cpp @@ -29,7 +29,9 @@ */ -#include +#include +#include + #include #include #include @@ -46,6 +48,7 @@ #include + #ifdef _DEBUG #define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) #else @@ -69,17 +72,19 @@ namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtp_rtcp_packet) } namespace ortc { - ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHelper, UseServicesHelper) -// ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP) -// -// typedef ortc::services::Hasher SHA1Hasher; + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHelper, UseServicesHelper); + ZS_DECLARE_TYPEDEF_PTR(ortc::internal::Helper, UseHelper); + ZS_DECLARE_TYPEDEF_PTR(ortc::internal::RTPUtils, UseRTPUtils); - namespace internal - { - ZS_DECLARE_TYPEDEF_PTR(ortc::internal::Helper, UseHelper) + using CryptoPP::Integer; + + // ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP) + // + // typedef ortc::services::Hasher SHA1Hasher; - using CryptoPP::Integer; + namespace internal + { //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -131,1268 +136,1349 @@ namespace ortc outSizeInBytes += (sizeof(DWORD) - modulas); } } + } // namespace internal + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::HeaderExtension + #pragma mark + + //--------------------------------------------------------------------------- + void RTPPacket::HeaderExtension::trace(const char *message) const + { + ZS_EVENTING_5(x, i, Insane, RTPPacketHeaderExtension, ol, RtpPacket, Info, + string, message, message, + byte, id, mID, + binary, data, mData, + size, dataSizeInBytes, mDataSizeInBytes, + size_t, postPaddingSize, mPostPaddingSize + ); + } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::ClientToMixerExtension - #pragma mark - - //------------------------------------------------------------------------- - RTPPacket::ClientToMixerExtension::ClientToMixerExtension(const HeaderExtension &header) - { - mID = header.mID; - mDataSizeInBytes = header.mDataSizeInBytes; - mPostPaddingSize = header.mPostPaddingSize; - if (NULL == header.mData) mDataSizeInBytes = 0; - if (0 == mDataSizeInBytes) mData = NULL; - - if (sizeof(BYTE) == header.mDataSizeInBytes) { - memcpy(&mLevelBuffer, header.mData, sizeof(BYTE)); - mData = &mLevelBuffer; - } - } + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::ClientToMixerExtension + #pragma mark - //------------------------------------------------------------------------- - RTPPacket::ClientToMixerExtension::ClientToMixerExtension( - BYTE id, - bool voiceActivity, - BYTE level - ) - { - mID = id; + //--------------------------------------------------------------------------- + RTPPacket::ClientToMixerExtension::ClientToMixerExtension(const HeaderExtension &header) + { + mID = header.mID; + mDataSizeInBytes = header.mDataSizeInBytes; + mPostPaddingSize = header.mPostPaddingSize; + if (NULL == header.mData) mDataSizeInBytes = 0; + if (0 == mDataSizeInBytes) mData = NULL; + + if (sizeof(BYTE) == header.mDataSizeInBytes) { + memcpy(&mLevelBuffer, header.mData, sizeof(BYTE)); mData = &mLevelBuffer; - mDataSizeInBytes = sizeof(BYTE); - - mLevelBuffer = static_cast(voiceActivity ? 0x80 : 0x00) | (level & 0x7F); } + } - //------------------------------------------------------------------------- - bool RTPPacket::ClientToMixerExtension::voiceActivity() const - { - return RTP_IS_FLAG_SET(mLevelBuffer, 7); - } + //--------------------------------------------------------------------------- + RTPPacket::ClientToMixerExtension::ClientToMixerExtension( + BYTE id, + bool voiceActivity, + BYTE level + ) + { + mID = id; + mData = &mLevelBuffer; + mDataSizeInBytes = sizeof(BYTE); - //------------------------------------------------------------------------- - BYTE RTPPacket::ClientToMixerExtension::level() const - { - return RTP_GET_BITS(mLevelBuffer, 0x7F, 0); - } + mLevelBuffer = static_cast(voiceActivity ? 0x80 : 0x00) | (level & 0x7F); + } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::MixerToClientExtension - #pragma mark + //--------------------------------------------------------------------------- + bool RTPPacket::ClientToMixerExtension::voiceActivity() const + { + return RTP_IS_FLAG_SET(mLevelBuffer, 7); + } - //------------------------------------------------------------------------- - RTPPacket::MixerToClientExtension::MixerToClientExtension(const HeaderExtension &header) - { - mID = header.mID; - mDataSizeInBytes = header.mDataSizeInBytes; - mPostPaddingSize = header.mPostPaddingSize; - if (NULL == header.mData) mDataSizeInBytes = 0; - if (0 == mDataSizeInBytes) mData = NULL; - - size_t copySize = header.mDataSizeInBytes; - if (copySize > sizeof(mLevelBuffer)) copySize = sizeof(mLevelBuffer); - - if (0 != copySize) { - memcpy(&(mLevelBuffer[0]), header.mData, copySize); - mData = &(mLevelBuffer[0]); - } - mDataSizeInBytes = copySize; - } + //--------------------------------------------------------------------------- + BYTE RTPPacket::ClientToMixerExtension::level() const + { + return RTP_GET_BITS(mLevelBuffer, 0x7F, 0); + } - //------------------------------------------------------------------------- - RTPPacket::MixerToClientExtension::MixerToClientExtension( - BYTE id, - BYTE *levels, - size_t count - ) - { - mID = id; - mDataSizeInBytes = count * sizeof(BYTE); + //--------------------------------------------------------------------------- + void RTPPacket::ClientToMixerExtension::trace(const char *message) const + { + ZS_EVENTING_7(x, i, Insane, RTPPacketClientToMixerExtension, ol, RtpPacket, Info, + string, message, message, + byte, id, mID, + binary, data, mData, + size, dataSizeInBytes, mDataSizeInBytes, + size_t, postPaddingSize, mPostPaddingSize, + bool, voiceActivity, voiceActivity(), + byte, level, level() + ); + } - if (mDataSizeInBytes > sizeof(mLevelBuffer)) { - count = sizeof(mLevelBuffer)/sizeof(BYTE); - } + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::MixerToClientExtension + #pragma mark - if (0 != mDataSizeInBytes) { - mData = &(mLevelBuffer[0]); - memcpy(&(mLevelBuffer[0]), levels, mDataSizeInBytes); - } + //--------------------------------------------------------------------------- + RTPPacket::MixerToClientExtension::MixerToClientExtension(const HeaderExtension &header) + { + mID = header.mID; + mDataSizeInBytes = header.mDataSizeInBytes; + mPostPaddingSize = header.mPostPaddingSize; + if (NULL == header.mData) mDataSizeInBytes = 0; + if (0 == mDataSizeInBytes) mData = NULL; + + size_t copySize = header.mDataSizeInBytes; + if (copySize > sizeof(mLevelBuffer)) copySize = sizeof(mLevelBuffer); + + if (0 != copySize) { + memcpy(&(mLevelBuffer[0]), header.mData, copySize); + mData = &(mLevelBuffer[0]); } + mDataSizeInBytes = copySize; + } - //------------------------------------------------------------------------- - size_t RTPPacket::MixerToClientExtension::levelsCount() const - { - return mDataSizeInBytes / sizeof(BYTE); - } + //--------------------------------------------------------------------------- + RTPPacket::MixerToClientExtension::MixerToClientExtension( + BYTE id, + BYTE *levels, + size_t count + ) + { + mID = id; + mDataSizeInBytes = count * sizeof(BYTE); - //------------------------------------------------------------------------- - BYTE RTPPacket::MixerToClientExtension::unusedBit(size_t index) const - { - ASSERT(index < levelsCount()) - return RTP_GET_BITS(mLevelBuffer[index], 0x80, 7); + if (mDataSizeInBytes > sizeof(mLevelBuffer)) { + count = sizeof(mLevelBuffer)/sizeof(BYTE); } - //------------------------------------------------------------------------- - BYTE RTPPacket::MixerToClientExtension::level(size_t index) const - { - ASSERT(index < levelsCount()) - return RTP_GET_BITS(mLevelBuffer[index], 0x7F, 0); + if (0 != mDataSizeInBytes) { + mData = &(mLevelBuffer[0]); + memcpy(&(mLevelBuffer[0]), levels, mDataSizeInBytes); } + } + //--------------------------------------------------------------------------- + size_t RTPPacket::MixerToClientExtension::levelsCount() const + { + return mDataSizeInBytes / sizeof(BYTE); + } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::StringHeaderExtension - #pragma mark - - //------------------------------------------------------------------------- - RTPPacket::StringHeaderExtension::StringHeaderExtension(const HeaderExtension &header) - { - ASSERT(sizeof(char) == sizeof(BYTE)) + //--------------------------------------------------------------------------- + BYTE RTPPacket::MixerToClientExtension::unusedBit(size_t index) const + { + ASSERT(index < levelsCount()) + return RTP_GET_BITS(mLevelBuffer[index], 0x80, 7); + } - mID = header.mID; - mDataSizeInBytes = header.mDataSizeInBytes; - mPostPaddingSize = header.mPostPaddingSize; - if (NULL == header.mData) mDataSizeInBytes = 0; - if (0 == mDataSizeInBytes) mData = NULL; + //--------------------------------------------------------------------------- + BYTE RTPPacket::MixerToClientExtension::level(size_t index) const + { + ASSERT(index < levelsCount()) + return RTP_GET_BITS(mLevelBuffer[index], 0x7F, 0); + } - size_t copySize = header.mDataSizeInBytes; - if (copySize > (sizeof(BYTE)*kMaxStringLength)) copySize = (sizeof(BYTE)*kMaxStringLength); + //--------------------------------------------------------------------------- + void RTPPacket::MixerToClientExtension::trace(const char *message) const + { + ZS_EVENTING_6(x, i, Insane, RTPPacketMixerToClientExtension, ol, RtpPacket, Info, + string, message, message, + byte, id, mID, + binary, data, mData, + size, dataSizeInBytes, mDataSizeInBytes, + size_t, postPaddingSize, mPostPaddingSize, + size_t, levelsCount, levelsCount() + ); + } - if (0 != copySize) { - memcpy(&(mStringBuffer[0]), header.mData, copySize); - mData = &(mStringBuffer[0]); - } - mDataSizeInBytes = copySize; - } + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::StringHeaderExtension + #pragma mark - //------------------------------------------------------------------------- - RTPPacket::StringHeaderExtension::StringHeaderExtension( - BYTE id, - const char *mid - ) - { - mID = id; - mData = &(mStringBuffer[0]); - mDataSizeInBytes = sizeof(char)*(NULL != mid ? strlen(mid) : 0); + //--------------------------------------------------------------------------- + RTPPacket::StringHeaderExtension::StringHeaderExtension(const HeaderExtension &header) + { + ASSERT(sizeof(char) == sizeof(BYTE)) - if (mDataSizeInBytes > (sizeof(BYTE)*kMaxStringLength)) mDataSizeInBytes = (sizeof(BYTE)*kMaxStringLength); + mID = header.mID; + mDataSizeInBytes = header.mDataSizeInBytes; + mPostPaddingSize = header.mPostPaddingSize; + if (NULL == header.mData) mDataSizeInBytes = 0; + if (0 == mDataSizeInBytes) mData = NULL; - if (0 != mDataSizeInBytes) { - memcpy(&(mStringBuffer[0]), mid, mDataSizeInBytes); - } - } + size_t copySize = header.mDataSizeInBytes; + if (copySize > (sizeof(BYTE)*kMaxStringLength)) copySize = (sizeof(BYTE)*kMaxStringLength); - //------------------------------------------------------------------------- - const char *RTPPacket::StringHeaderExtension::str() const - { - return reinterpret_cast(&mStringBuffer[0]); + if (0 != copySize) { + memcpy(&(mStringBuffer[0]), header.mData, copySize); + mData = &(mStringBuffer[0]); } + mDataSizeInBytes = copySize; + } - //------------------------------------------------------------------------- - ElementPtr RTPPacket::StringHeaderExtension::toDebug() const - { - ElementPtr result = Element::create("ortc::RTPPacket::StringHeaderExtension"); + //--------------------------------------------------------------------------- + RTPPacket::StringHeaderExtension::StringHeaderExtension( + BYTE id, + const char *mid + ) + { + mID = id; + mData = &(mStringBuffer[0]); + mDataSizeInBytes = sizeof(char)*(NULL != mid ? strlen(mid) : 0); - UseServicesHelper::debugAppend(result, "str", str()); + if (mDataSizeInBytes > (sizeof(BYTE)*kMaxStringLength)) mDataSizeInBytes = (sizeof(BYTE)*kMaxStringLength); - return result; + if (0 != mDataSizeInBytes) { + memcpy(&(mStringBuffer[0]), mid, mDataSizeInBytes); } + } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::StringHeaderExtension - #pragma mark + //--------------------------------------------------------------------------- + const char *RTPPacket::StringHeaderExtension::str() const + { + return reinterpret_cast(&mStringBuffer[0]); + } - //------------------------------------------------------------------------- - RTPPacket::NumberHeaderExtension::NumberHeaderExtension(const HeaderExtension &header) - { - ASSERT(sizeof(char) == sizeof(BYTE)) + //--------------------------------------------------------------------------- + void RTPPacket::StringHeaderExtension::trace(const char *message) const + { + ZS_EVENTING_6(x, i, Insane, RTPPacketStringHeaderExtension, ol, RtpPacket, Info, + string, message, message, + byte, id, mID, + binary, data, mData, + size, dataSizeInBytes, mDataSizeInBytes, + size_t, postPaddingSize, mPostPaddingSize, + string, str, str() + ); + } - mID = header.mID; - mDataSizeInBytes = header.mDataSizeInBytes; - mPostPaddingSize = header.mPostPaddingSize; - if (NULL == header.mData) mDataSizeInBytes = 0; - if (0 == mDataSizeInBytes) mData = NULL; + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::NumberHeaderExtension + #pragma mark - size_t copySize = header.mDataSizeInBytes; - if (copySize > (sizeof(BYTE)*kMaxNumberByteLength)) copySize = (sizeof(BYTE)*kMaxNumberByteLength); + //--------------------------------------------------------------------------- + RTPPacket::NumberHeaderExtension::NumberHeaderExtension(const HeaderExtension &header) + { + ASSERT(sizeof(char) == sizeof(BYTE)) - if (0 != copySize) { - memcpy(&(mNumberBuffer[0]), header.mData, copySize); - mData = &(mNumberBuffer[0]); - } - mDataSizeInBytes = copySize; - } + mID = header.mID; + mDataSizeInBytes = header.mDataSizeInBytes; + mPostPaddingSize = header.mPostPaddingSize; + if (NULL == header.mData) mDataSizeInBytes = 0; + if (0 == mDataSizeInBytes) mData = NULL; - //------------------------------------------------------------------------- - RTPPacket::NumberHeaderExtension::NumberHeaderExtension( - BYTE id, - const BYTE *number, - size_t lengthInBytes - ) - { - mID = id; + size_t copySize = header.mDataSizeInBytes; + if (copySize > (sizeof(BYTE)*kMaxNumberByteLength)) copySize = (sizeof(BYTE)*kMaxNumberByteLength); + + if (0 != copySize) { + memcpy(&(mNumberBuffer[0]), header.mData, copySize); mData = &(mNumberBuffer[0]); - mDataSizeInBytes = sizeof(char)*(NULL != number ? lengthInBytes : 0); + } + mDataSizeInBytes = copySize; + } - if (mDataSizeInBytes > (sizeof(BYTE)*kMaxNumberByteLength)) mDataSizeInBytes = (sizeof(BYTE)*kMaxNumberByteLength); + //--------------------------------------------------------------------------- + RTPPacket::NumberHeaderExtension::NumberHeaderExtension( + BYTE id, + const BYTE *number, + size_t lengthInBytes + ) + { + mID = id; + mData = &(mNumberBuffer[0]); + mDataSizeInBytes = sizeof(char)*(NULL != number ? lengthInBytes : 0); - if (0 != mDataSizeInBytes) { - memcpy(&(mNumberBuffer[0]), number, mDataSizeInBytes); - } + if (mDataSizeInBytes > (sizeof(BYTE)*kMaxNumberByteLength)) mDataSizeInBytes = (sizeof(BYTE)*kMaxNumberByteLength); + + if (0 != mDataSizeInBytes) { + memcpy(&(mNumberBuffer[0]), number, mDataSizeInBytes); } + } - //------------------------------------------------------------------------- - RTPPacket::NumberHeaderExtension::NumberHeaderExtension( - BYTE id, - const char *valueInBase10 - ) - { - mID = id; - mData = &(mNumberBuffer[0]); - mDataSizeInBytes = 1; + //--------------------------------------------------------------------------- + RTPPacket::NumberHeaderExtension::NumberHeaderExtension( + BYTE id, + const char *valueInBase10 + ) + { + mID = id; + mData = &(mNumberBuffer[0]); + mDataSizeInBytes = 1; - String str(valueInBase10); + String str(valueInBase10); - try { - Integer value(str); // convert from base 10 into big number class + try { + Integer value(str); // convert from base 10 into big number class - size_t minSizeNeeded = value.MinEncodedSize(); - ORTC_THROW_INVALID_PARAMETERS_IF(minSizeNeeded > kMaxNumberByteLength) + size_t minSizeNeeded = value.MinEncodedSize(); + ORTC_THROW_INVALID_PARAMETERS_IF(minSizeNeeded > kMaxNumberByteLength) - // this will encode in big endian and pad with most significant "0" - // values as needed - value.Encode(&(mNumberBuffer[0]), minSizeNeeded); + // this will encode in big endian and pad with most significant "0" + // values as needed + value.Encode(&(mNumberBuffer[0]), minSizeNeeded); - mDataSizeInBytes = minSizeNeeded; + mDataSizeInBytes = minSizeNeeded; - } catch(...) { - ORTC_THROW_INVALID_PARAMETERS("unable to convert integer: " + str) - } + } catch(...) { + ORTC_THROW_INVALID_PARAMETERS("unable to convert integer: " + str) } + } - //------------------------------------------------------------------------- - const BYTE *RTPPacket::NumberHeaderExtension::number() const - { - return &(mNumberBuffer[0]); - } + //--------------------------------------------------------------------------- + const BYTE *RTPPacket::NumberHeaderExtension::number() const + { + return &(mNumberBuffer[0]); + } - //------------------------------------------------------------------------- - size_t RTPPacket::NumberHeaderExtension::length() const - { - return mDataSizeInBytes; - } + //--------------------------------------------------------------------------- + size_t RTPPacket::NumberHeaderExtension::length() const + { + return mDataSizeInBytes; + } - //------------------------------------------------------------------------- - String RTPPacket::NumberHeaderExtension::str() const - { - if (mDataSizeInBytes < 1) return String(); + //--------------------------------------------------------------------------- + String RTPPacket::NumberHeaderExtension::str() const + { + if (mDataSizeInBytes < 1) return String(); - Integer value(&(mNumberBuffer[0]), mDataSizeInBytes); + Integer value(&(mNumberBuffer[0]), mDataSizeInBytes); - std::stringstream output; + std::stringstream output; - output << value; + output << value; - return output.str(); - } + return output.str(); + } - //------------------------------------------------------------------------- - ElementPtr RTPPacket::NumberHeaderExtension::toDebug() const - { - ElementPtr result = Element::create("ortc::RTPPacket::NumberHeaderExtension"); + //--------------------------------------------------------------------------- + void RTPPacket::NumberHeaderExtension::trace(const char *message) const + { + ZS_EVENTING_6(x, i, Insane, RTPPacketNumberHeaderExtension, ol, RtpPacket, Info, + string, message, message, + byte, id, mID, + binary, data, mData, + size, dataSizeInBytes, mDataSizeInBytes, + size_t, postPaddingSize, mPostPaddingSize, + string, number, str() + ); + } - Integer value(number(), length()); + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::MidHeaderExtension + #pragma mark - UseServicesHelper::debugAppend(result, "number", str()); + //--------------------------------------------------------------------------- + void RTPPacket::MidHeaderExtension::trace(const char *message) const + { + ZS_EVENTING_6(x, i, Insane, RTPPacketMidHeaderExtension, ol, RtpPacket, Info, + string, message, message, + byte, id, mID, + bool, data, mData ? true : false, + size_t, dataSizeInBytes, mDataSizeInBytes, + size_t, postPaddingSize, mPostPaddingSize, + string, mid, mid() + ); + } - return result; - } + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::RidHeaderExtension + #pragma mark - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::MidHeaderExtension - #pragma mark + //--------------------------------------------------------------------------- + void RTPPacket::RidHeaderExtension::trace(const char *message) const + { + ZS_EVENTING_6(x, i, Insane, RTPPacketRidHeaderExtension, ol, RtpPacket, Info, + string, message, message, + byte, id, mID, + binary, data, mData, + size, dataSizeInBytes, mDataSizeInBytes, + size_t, postPaddingSize, mPostPaddingSize, + string, rid, rid() + ); + } - //------------------------------------------------------------------------- - ElementPtr RTPPacket::MidHeaderExtension::toDebug() const - { - ElementPtr result = Element::create("ortc::RTPPacket::MidHeaderExtension"); + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::VideoOrientationHeaderExtension + #pragma mark - UseServicesHelper::debugAppend(result, "mid", mid()); + //--------------------------------------------------------------------------- + RTPPacket::VideoOrientationHeaderExtension::VideoOrientationHeaderExtension(const HeaderExtension &header) + { + mID = header.mID; + mDataSizeInBytes = header.mDataSizeInBytes; + mPostPaddingSize = header.mPostPaddingSize; + if (NULL == header.mData) mDataSizeInBytes = 0; - return result; - } + if (mDataSizeInBytes < sizeof(mEncoded)) return; // cannot decrypt this packet + } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::RidHeaderExtension - #pragma mark + //--------------------------------------------------------------------------- + RTPPacket::VideoOrientationHeaderExtension::VideoOrientationHeaderExtension(const VideoOrientation6HeaderExtension &) + { + mData = &(mEncoded[0]); + mDataSizeInBytes = sizeof(mEncoded); + } - //------------------------------------------------------------------------- - ElementPtr RTPPacket::RidHeaderExtension::toDebug() const - { - ElementPtr result = Element::create("ortc::RTPPacket::RidHeaderExtension"); + //--------------------------------------------------------------------------- + RTPPacket::VideoOrientationHeaderExtension::VideoOrientationHeaderExtension( + const Clockwise &, + bool frontFacingCamera, + bool flip, + UINT orientation + ) + { + mData = &(mEncoded[0]); + mDataSizeInBytes = sizeof(mEncoded); - UseServicesHelper::debugAppend(result, "rid", rid()); + orientation %= 360; - return result; - } + // find closest approximation to the video orientation for the 2 bit allowance + orientation += 45; // range is now 45 -> 404 + orientation /= 90; + orientation %= 4; // range is now 0..3 - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::VideoOrientationHeaderExtension - #pragma mark + // Bit# 7 6 5 4 3 2 1 0 (LSB) + // Definition 0 0 0 0 C F R1 R0 - //------------------------------------------------------------------------- - RTPPacket::VideoOrientationHeaderExtension::VideoOrientationHeaderExtension(const HeaderExtension &header) - { - mID = header.mID; - mDataSizeInBytes = header.mDataSizeInBytes; - mPostPaddingSize = header.mPostPaddingSize; - if (NULL == header.mData) mDataSizeInBytes = 0; + mEncoded[0] = RTP_PACK_BITS(frontFacingCamera ? 1 : 0, 0x1, 3) | + RTP_PACK_BITS(flip ? 1 : 0, 0x1, 2) | + RTP_PACK_BITS(static_cast(orientation), 0x3, 0); + } - if (mDataSizeInBytes < sizeof(mEncoded)) return; // cannot decrypt this packet - } + //--------------------------------------------------------------------------- + RTPPacket::VideoOrientationHeaderExtension::VideoOrientationHeaderExtension( + const CounterClockwise &, + bool frontFacingCamera, // true = front facing, false = backfacing + bool flip, // horizontal left-right flip (mirro) + UINT orientation + ) : + VideoOrientationHeaderExtension(Clockwise {}, frontFacingCamera, flip, 360-(orientation%360)) + { + } - //------------------------------------------------------------------------- - RTPPacket::VideoOrientationHeaderExtension::VideoOrientationHeaderExtension(const VideoOrientation6HeaderExtension &) - { - mData = &(mEncoded[0]); - mDataSizeInBytes = sizeof(mEncoded); - } + //--------------------------------------------------------------------------- + bool RTPPacket::VideoOrientationHeaderExtension::frontFacing() const + { + if (NULL == mData) return false; + return (0 != RTP_GET_BITS(mData[0], 0x1, 3)); + } - //------------------------------------------------------------------------- - RTPPacket::VideoOrientationHeaderExtension::VideoOrientationHeaderExtension( - const Clockwise &, - bool frontFacingCamera, - bool flip, - UINT orientation - ) - { - mData = &(mEncoded[0]); - mDataSizeInBytes = sizeof(mEncoded); + //--------------------------------------------------------------------------- + bool RTPPacket::VideoOrientationHeaderExtension::backFacing() const + { + if (NULL == mData) return false; + return (0 == RTP_GET_BITS(mData[0], 0x1, 3)); + } - orientation %= 360; + //--------------------------------------------------------------------------- + bool RTPPacket::VideoOrientationHeaderExtension::flip() const + { + if (NULL == mData) return false; + return (0 == RTP_GET_BITS(mData[0], 0x1, 2)); + } - // find closest approximation to the video orientation for the 2 bit allowance - orientation += 45; // range is now 45 -> 404 - orientation /= 90; - orientation %= 4; // range is now 0..3 + //--------------------------------------------------------------------------- + UINT RTPPacket::VideoOrientationHeaderExtension::degreesClockwise() const + { + if (NULL == mData) return 0; + UINT degrees = static_cast(RTP_GET_BITS(mData[0], 0x3, 0)); - // Bit# 7 6 5 4 3 2 1 0 (LSB) - // Definition 0 0 0 0 C F R1 R0 + degrees *= 90; - mEncoded[0] = RTP_PACK_BITS(frontFacingCamera ? 1 : 0, 0x1, 3) | - RTP_PACK_BITS(flip ? 1 : 0, 0x1, 2) | - RTP_PACK_BITS(static_cast(orientation), 0x3, 0); - } + return degrees; + } - //------------------------------------------------------------------------- - RTPPacket::VideoOrientationHeaderExtension::VideoOrientationHeaderExtension( - const CounterClockwise &, - bool frontFacingCamera, // true = front facing, false = backfacing - bool flip, // horizontal left-right flip (mirro) + //--------------------------------------------------------------------------- + UINT RTPPacket::VideoOrientationHeaderExtension::degreesCounterClockwise() const + { + return (360-degreesClockwise())%360; + } + + //--------------------------------------------------------------------------- + void RTPPacket::VideoOrientationHeaderExtension::trace(const char *message) const + { + ZS_EVENTING_8(x, i, Insane, RTPPacketVideoOrientationHeaderExtension, ol, RtpPacket, Info, + string, message, message, + byte, id, mID, + binary, data, mData, + size, dataSizeInBytes, mDataSizeInBytes, + size_t, postPaddingSize, mPostPaddingSize, + bool, frontFacing, frontFacing(), + bool, flip, flip(), + uint64, degrees, degreesClockwise() + ); + } + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket::VideoOrientation6HeaderExtension + #pragma mark + + //--------------------------------------------------------------------------- + RTPPacket::VideoOrientation6HeaderExtension::VideoOrientation6HeaderExtension(const HeaderExtension &header) : + VideoOrientationHeaderExtension(header) + { + } + + //--------------------------------------------------------------------------- + RTPPacket::VideoOrientation6HeaderExtension::VideoOrientation6HeaderExtension( + const Clockwise &, + bool frontFacingCamera, + bool flip, UINT orientation ) : - VideoOrientationHeaderExtension(Clockwise {}, frontFacingCamera, flip, 360-(orientation%360)) - { - } + VideoOrientationHeaderExtension(*this) + { + // find closest approximation to the video orientation for the 6 bit allowance + orientation %= 360; + + // r = x * 360 + // ------- + // 64 + // + // r * 64 = x * 360 + // + // x = r * 64 + // ------ + // 360 + + orientation *= 64; + orientation /= 360; + orientation %= 64; + + // Bit# 7 6 5 4 3 2 1 0 (LSB) + // Definition R5 R4 R3 R2 C F R1 R0 + + // R1 R0 R5 R4 R3 R2 + // 0 0 0 0 0 0 = 0 + // 0 0 0 0 0 1 = 1 + // 1 1 1 1 1 1 = 63 + + BYTE ordered = static_cast(orientation) & 0x3F; + + mEncoded[0] = RTP_PACK_BITS(frontFacingCamera ? 1 : 0, 0x1, 3) | + RTP_PACK_BITS(flip ? 1 : 0, 0x1, 2) | + RTP_PACK_BITS(RTP_GET_BITS(ordered, 0x3, 4), 0x3, 0) | + RTP_PACK_BITS(RTP_GET_BITS(ordered, 0xF, 0), 0xF, 4); + } - //------------------------------------------------------------------------- - bool RTPPacket::VideoOrientationHeaderExtension::frontFacing() const - { - if (NULL == mData) return false; - return (0 != RTP_GET_BITS(mData[0], 0x1, 3)); - } + //--------------------------------------------------------------------------- + RTPPacket::VideoOrientation6HeaderExtension::VideoOrientation6HeaderExtension( + const CounterClockwise &, + bool frontFacingCamera, + bool flip, + UINT orientation + ) : + VideoOrientation6HeaderExtension(Clockwise{}, frontFacingCamera, flip, 360-(orientation % 360)) + { + } - //------------------------------------------------------------------------- - bool RTPPacket::VideoOrientationHeaderExtension::backFacing() const - { - if (NULL == mData) return false; - return (0 == RTP_GET_BITS(mData[0], 0x1, 3)); - } + //--------------------------------------------------------------------------- + UINT RTPPacket::VideoOrientation6HeaderExtension::degreesClockwise() const + { + if (NULL == mData) return 0; - //------------------------------------------------------------------------- - bool RTPPacket::VideoOrientationHeaderExtension::flip() const - { - if (NULL == mData) return false; - return (0 == RTP_GET_BITS(mData[0], 0x1, 2)); - } + BYTE ordered = RTP_PACK_BITS(RTP_GET_BITS(mData[0], 0x3, 0), 0x3, 4) | + RTP_PACK_BITS(RTP_GET_BITS(mData[0], 0xF, 4), 0xF, 0); - //------------------------------------------------------------------------- - UINT RTPPacket::VideoOrientationHeaderExtension::degreesClockwise() const - { - if (NULL == mData) return 0; - UINT degrees = static_cast(RTP_GET_BITS(mData[0], 0x3, 0)); + UINT degrees = (static_cast(ordered)*360)/64; + return degrees % 360; + } - degrees *= 90; + //--------------------------------------------------------------------------- + UINT RTPPacket::VideoOrientation6HeaderExtension::degreesCounterClockwise() const + { + return (360-degreesClockwise())%360; + } + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket (public) + #pragma mark + + //--------------------------------------------------------------------------- + RTPPacket::RTPPacket( + const make_private &, + MediaChannelID mediaChannelID + ) : + mMediaChannelID(mediaChannelID) + { + } - return degrees; - } - - //------------------------------------------------------------------------- - UINT RTPPacket::VideoOrientationHeaderExtension::degreesCounterClockwise() const - { - return (360-degreesClockwise())%360; + //--------------------------------------------------------------------------- + RTPPacket::~RTPPacket() + { + if (mHeaderExtensions) { + delete [] mHeaderExtensions; + mHeaderExtensions = NULL; } + } - //------------------------------------------------------------------------- - ElementPtr RTPPacket::VideoOrientationHeaderExtension::toDebug() const - { - ElementPtr result = Element::create("ortc::RTPPacket::VideoOrientationHeaderExtension"); - - UseServicesHelper::debugAppend(result, "front facing", frontFacing()); - UseServicesHelper::debugAppend(result, "flip", flip()); - UseServicesHelper::debugAppend(result, "degrees", degreesClockwise()); + //--------------------------------------------------------------------------- + RTPPacketPtr RTPPacket::create( + const RTPPacket &packet, + MediaChannelID mediaChannelID + ) + { + RTPPacketPtr pThis(make_shared(make_private{}, mediaChannelID)); + pThis->generate(packet); + return pThis; + } - return result; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::VideoOrientation6HeaderExtension - #pragma mark + //--------------------------------------------------------------------------- + RTPPacketPtr RTPPacket::create(const CreationParams ¶ms) + { + RTPPacketPtr pThis(make_shared(make_private{}, params.mMediaChannelID)); + pThis->generate(params); + return pThis; + } - //------------------------------------------------------------------------- - RTPPacket::VideoOrientation6HeaderExtension::VideoOrientation6HeaderExtension(const HeaderExtension &header) : - VideoOrientationHeaderExtension(header) - { - } + //--------------------------------------------------------------------------- + RTPPacketPtr RTPPacket::create( + const BYTE *buffer, + size_t bufferLengthInBytes, + MediaChannelID mediaChannelID + ) + { + ORTC_THROW_INVALID_PARAMETERS_IF(!buffer) + ORTC_THROW_INVALID_PARAMETERS_IF(0 == bufferLengthInBytes) + return RTPPacket::create(UseServicesHelper::convertToBuffer(buffer, bufferLengthInBytes), mediaChannelID); + } - //------------------------------------------------------------------------- - RTPPacket::VideoOrientation6HeaderExtension::VideoOrientation6HeaderExtension( - const Clockwise &, - bool frontFacingCamera, - bool flip, - UINT orientation - ) : - VideoOrientationHeaderExtension(*this) - { - // find closest approximation to the video orientation for the 6 bit allowance - orientation %= 360; - - // r = x * 360 - // ------- - // 64 - // - // r * 64 = x * 360 - // - // x = r * 64 - // ------ - // 360 - - orientation *= 64; - orientation /= 360; - orientation %= 64; - - // Bit# 7 6 5 4 3 2 1 0 (LSB) - // Definition R5 R4 R3 R2 C F R1 R0 - - // R1 R0 R5 R4 R3 R2 - // 0 0 0 0 0 0 = 0 - // 0 0 0 0 0 1 = 1 - // 1 1 1 1 1 1 = 63 - - BYTE ordered = static_cast(orientation) & 0x3F; - - mEncoded[0] = RTP_PACK_BITS(frontFacingCamera ? 1 : 0, 0x1, 3) | - RTP_PACK_BITS(flip ? 1 : 0, 0x1, 2) | - RTP_PACK_BITS(RTP_GET_BITS(ordered, 0x3, 4), 0x3, 0) | - RTP_PACK_BITS(RTP_GET_BITS(ordered, 0xF, 0), 0xF, 4); - } + //--------------------------------------------------------------------------- + RTPPacketPtr RTPPacket::create( + const SecureByteBlock &buffer, + MediaChannelID mediaChannelID + ) + { + return RTPPacket::create(buffer.BytePtr(), buffer.SizeInBytes()); + } - //------------------------------------------------------------------------- - RTPPacket::VideoOrientation6HeaderExtension::VideoOrientation6HeaderExtension( - const CounterClockwise &, - bool frontFacingCamera, - bool flip, - UINT orientation - ) : - VideoOrientation6HeaderExtension(Clockwise{}, frontFacingCamera, flip, 360-(orientation % 360)) - { + //--------------------------------------------------------------------------- + RTPPacketPtr RTPPacket::create( + SecureByteBlockPtr buffer, + MediaChannelID mediaChannelID + ) + { + RTPPacketPtr pThis(make_shared(make_private{}, mediaChannelID)); + pThis->mBuffer = buffer; + if (!pThis->parse()) { + ZS_EVENTING_2(x, w, Debug, RTPPacketCreate, ol, RtpPacket, Start, puid, mediaChannelId, pThis->mMediaChannelID, string, message, "packet could not be parsed"); + return RTPPacketPtr(); } + return pThis; + } - //------------------------------------------------------------------------- - UINT RTPPacket::VideoOrientation6HeaderExtension::degreesClockwise() const - { - if (NULL == mData) return 0; - - BYTE ordered = RTP_PACK_BITS(RTP_GET_BITS(mData[0], 0x3, 0), 0x3, 4) | - RTP_PACK_BITS(RTP_GET_BITS(mData[0], 0xF, 4), 0xF, 0); - - UINT degrees = (static_cast(ordered)*360)/64; - return degrees % 360; - } + //--------------------------------------------------------------------------- + const BYTE *RTPPacket::ptr() const + { + return mBuffer->BytePtr(); + } - //------------------------------------------------------------------------- - UINT RTPPacket::VideoOrientation6HeaderExtension::degreesCounterClockwise() const - { - return (360-degreesClockwise())%360; - } + //--------------------------------------------------------------------------- + size_t RTPPacket::size() const + { + return mBuffer->SizeInBytes(); + } - //------------------------------------------------------------------------- - ElementPtr RTPPacket::VideoOrientation6HeaderExtension::toDebug() const - { - ElementPtr result = Element::create("ortc::RTPPacket::VideoOrientation6HeaderExtension"); + //--------------------------------------------------------------------------- + SecureByteBlockPtr RTPPacket::buffer() const + { + return mBuffer; + } - UseServicesHelper::debugAppend(result, "front facing", frontFacing()); - UseServicesHelper::debugAppend(result, "flip", flip()); - UseServicesHelper::debugAppend(result, "degrees", degreesClockwise()); + //--------------------------------------------------------------------------- + DWORD RTPPacket::getCSRC(size_t index) const + { + ASSERT(index < cc()) + return UseRTPUtils::getBE32(&((ptr())[internal::kMinRtpPacketLen + (sizeof(DWORD)*index)])); + } - return result; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket (public) - #pragma mark + //--------------------------------------------------------------------------- + const BYTE *RTPPacket::payload() const + { + if (0 == mPayloadSize) return NULL; + const BYTE *buffer = ptr(); + return &(buffer[mHeaderSize + mHeaderExtensionSize]); + } - //------------------------------------------------------------------------- - RTPPacket::RTPPacket(const make_private &) - { - } + //--------------------------------------------------------------------------- + RTPPacket::HeaderExtension *RTPPacket::getHeaderExtensionAtIndex(size_t index) const + { + if (index >= mTotalHeaderExtensions) return NULL; + return &(mHeaderExtensions[index]); + } - //------------------------------------------------------------------------- - RTPPacket::~RTPPacket() - { - if (mHeaderExtensions) { - delete [] mHeaderExtensions; - mHeaderExtensions = NULL; + //--------------------------------------------------------------------------- + void RTPPacket::trace(const char *message) const + { + if (ZS_EVENTING_IS_LOGGING(Insane)) { + ZS_EVENTING_20(x, i, Insane, RTPPacketTrace, ol, RtpPacket, Info, + string, message, message, + puid, mediaChannelID, mMediaChannelID, + binary, buffer, mBuffer ? mBuffer->BytePtr() : NULL, + size, size, mBuffer ? mBuffer->SizeInBytes() : 0, + byte, version, mVersion, + size_t, padding, mPadding, + byte, cc, mCC, + bool, m, mM, + byte, pt, mPT, + word, sequenceNumber, mSequenceNumber, + dword, timestamp, mTimestamp, + dword, ssrc, mSSRC, + size_t, headerSize, mHeaderSize, + size_t, headerExtensionSize, mHeaderExtensionSize, + size_t, payloadSize, mPayloadSize, + size_t, totalHeaderExtensions, mTotalHeaderExtensions, + byte, headerExtensionAppBits, mHeaderExtensionAppBits, + size_t, headerExtensionPrepaddedSize, mHeaderExtensionPrepaddedSize, + binary, headerExtensionParseStoppedPos, mHeaderExtensionParseStoppedPos, + size, headerExtensionParseStoppedSize, mHeaderExtensionParseStoppedSize + ); + + for (auto current = mHeaderExtensions; NULL != current; current = current->mNext) { + current->trace(message); } } + } - //------------------------------------------------------------------------- - RTPPacketPtr RTPPacket::create(const RTPPacket &packet) - { - RTPPacketPtr pThis(make_shared(make_private{})); - pThis->generate(packet); - return pThis; - } - - //------------------------------------------------------------------------- - RTPPacketPtr RTPPacket::create(const CreationParams ¶ms) - { - RTPPacketPtr pThis(make_shared(make_private{})); - pThis->generate(params); - return pThis; - } - - //------------------------------------------------------------------------- - RTPPacketPtr RTPPacket::create(const BYTE *buffer, size_t bufferLengthInBytes) - { - ORTC_THROW_INVALID_PARAMETERS_IF(!buffer) - ORTC_THROW_INVALID_PARAMETERS_IF(0 == bufferLengthInBytes) - return RTPPacket::create(UseServicesHelper::convertToBuffer(buffer, bufferLengthInBytes)); - } + //--------------------------------------------------------------------------- + static bool requiresTwoByteHeader( + RTPPacket::HeaderExtension *firstExtension, + BYTE headerExtensionAppBits + ) + { + typedef RTPPacket::HeaderExtension HeaderExtension; - //------------------------------------------------------------------------- - RTPPacketPtr RTPPacket::create(const SecureByteBlock &buffer) - { - return RTPPacket::create(buffer.BytePtr(), buffer.SizeInBytes()); - } + bool twoByteHeader = (0 != headerExtensionAppBits); + if (!twoByteHeader) { + for (HeaderExtension *current = firstExtension; NULL != current; current = current->mNext) { + ASSERT(0 != current->mID) // not legal - //------------------------------------------------------------------------- - RTPPacketPtr RTPPacket::create(SecureByteBlockPtr buffer) - { - RTPPacketPtr pThis(make_shared(make_private{})); - pThis->mBuffer = buffer; - if (!pThis->parse()) { - ZS_LOG_WARNING(Debug, pThis->log("packet could not be parsed")) - return RTPPacketPtr(); + if (current->mID > 14) { + twoByteHeader = true; + break; + } + if (0 == current->mDataSizeInBytes) { + twoByteHeader = true; + break; + } + if (current->mDataSizeInBytes > 16) { + ASSERT(current->mDataSizeInBytes < 255) + twoByteHeader = true; + break; + } } - return pThis; - } - - //------------------------------------------------------------------------- - const BYTE *RTPPacket::ptr() const - { - return mBuffer->BytePtr(); - } - - //------------------------------------------------------------------------- - size_t RTPPacket::size() const - { - return mBuffer->SizeInBytes(); - } - - //------------------------------------------------------------------------- - SecureByteBlockPtr RTPPacket::buffer() const - { - return mBuffer; - } - - //------------------------------------------------------------------------- - DWORD RTPPacket::getCSRC(size_t index) const - { - ASSERT(index < cc()) - return RTPUtils::getBE32(&((ptr())[kMinRtpPacketLen + (sizeof(DWORD)*index)])); } + return twoByteHeader; + } - //------------------------------------------------------------------------- - const BYTE *RTPPacket::payload() const - { - if (0 == mPayloadSize) return NULL; - const BYTE *buffer = ptr(); - return &(buffer[mHeaderSize + mHeaderExtensionSize]); - } + //--------------------------------------------------------------------------- + void RTPPacket::changeHeaderExtensions(HeaderExtension *firstExtension) + { + bool twoByteHeader = requiresTwoByteHeader(firstExtension, mHeaderExtensionAppBits); - //------------------------------------------------------------------------- - RTPPacket::HeaderExtension *RTPPacket::getHeaderExtensionAtIndex(size_t index) const - { - if (index >= mTotalHeaderExtensions) return NULL; - return &(mHeaderExtensions[index]); + if (twoByteHeader) { + ORTC_THROW_INVALID_STATE_IF(NULL != mHeaderExtensionParseStoppedPos) // requires a 1 byte header to append this data } - //------------------------------------------------------------------------- - ElementPtr RTPPacket::toDebug() const - { - ElementPtr objectEl = Element::create("ortc::RTPPacket"); - - UseServicesHelper::debugAppend(objectEl, "buffer", mBuffer ? mBuffer->SizeInBytes() : 0); - - UseServicesHelper::debugAppend(objectEl, "version", mVersion); - UseServicesHelper::debugAppend(objectEl, "padding", mPadding); - UseServicesHelper::debugAppend(objectEl, "cc", mCC); - UseServicesHelper::debugAppend(objectEl, "m", mM); - UseServicesHelper::debugAppend(objectEl, "pt", mPT); - UseServicesHelper::debugAppend(objectEl, "sequence number", mSequenceNumber); - UseServicesHelper::debugAppend(objectEl, "timestamp", mTimestamp); - UseServicesHelper::debugAppend(objectEl, "ssrc", mSSRC); - - UseServicesHelper::debugAppend(objectEl, "header size", mHeaderSize); - UseServicesHelper::debugAppend(objectEl, "extension header size", mHeaderExtensionSize); - UseServicesHelper::debugAppend(objectEl, "payload size", mPayloadSize); - - UseServicesHelper::debugAppend(objectEl, "total header extensions", mTotalHeaderExtensions); - - for (auto current = mHeaderExtensions; NULL != current; current = current->mNext) - { - ElementPtr extensionEl = Element::create("extension"); - UseServicesHelper::debugAppend(extensionEl, "id", current->mID); - UseServicesHelper::debugAppend(extensionEl, "size", current->mDataSizeInBytes); - UseServicesHelper::debugAppend(extensionEl, "data", (NULL != current->mData) ? UseServicesHelper::convertToHex(current->mData, current->mDataSizeInBytes) : String()); - UseServicesHelper::debugAppend(extensionEl, "padding", current->mPostPaddingSize); - UseServicesHelper::debugAppend(objectEl, extensionEl); - } - - UseServicesHelper::debugAppend(objectEl, "header extension appbits", mHeaderExtensionAppBits); + bool requiresExtension = internal::requiredExtension(firstExtension, mHeaderExtensionAppBits, mHeaderExtensionPrepaddedSize, mHeaderExtensionParseStoppedPos); - UseServicesHelper::debugAppend(objectEl, "header extension prepadding size", mHeaderExtensionPrepaddedSize); - UseServicesHelper::debugAppend(objectEl, "header extension parse stopped pos", (NULL != mHeaderExtensionParseStoppedPos) ? ((PTRNUMBER)(mHeaderExtensionParseStoppedPos - ptr())) : 0); - UseServicesHelper::debugAppend(objectEl, "header extension parse stopped size", mHeaderExtensionParseStoppedSize); + const BYTE *buffer = ptr(); - return objectEl; - } + ASSERT(NULL != buffer) - //------------------------------------------------------------------------- - static bool requiresTwoByteHeader( - RTPPacket::HeaderExtension *firstExtension, - BYTE headerExtensionAppBits - ) - { - typedef RTPPacket::HeaderExtension HeaderExtension; + size_t existingHeaderExtensionSize = mHeaderExtensionSize; + size_t postHeaderExtensionSize = mPayloadSize + mPadding; - bool twoByteHeader = (0 != headerExtensionAppBits); - if (!twoByteHeader) { - for (HeaderExtension *current = firstExtension; NULL != current; current = current->mNext) { - ASSERT(0 != current->mID) // not legal - - if (current->mID > 14) { - twoByteHeader = true; - break; - } - if (0 == current->mDataSizeInBytes) { - twoByteHeader = true; - break; - } - if (current->mDataSizeInBytes > 16) { - ASSERT(current->mDataSizeInBytes < 255) - twoByteHeader = true; - break; - } - } - } - return twoByteHeader; - } + ASSERT(size() == (mHeaderSize + existingHeaderExtensionSize + postHeaderExtensionSize)) - //------------------------------------------------------------------------- - void RTPPacket::changeHeaderExtensions(HeaderExtension *firstExtension) - { - bool twoByteHeader = requiresTwoByteHeader(firstExtension, mHeaderExtensionAppBits); + if (!requiresExtension) { + // going to strip the extension header out entirely - if (twoByteHeader) { - ORTC_THROW_INVALID_STATE_IF(NULL != mHeaderExtensionParseStoppedPos) // requires a 1 byte header to append this data + if (!RTP_HEADER_EXTENSION(buffer)) { + trace("no extension present (thus no need to strip extension from RTP packet)"); + return; } - bool requiresExtension = requiredExtension(firstExtension, mHeaderExtensionAppBits, mHeaderExtensionPrepaddedSize, mHeaderExtensionParseStoppedPos); - - const BYTE *buffer = ptr(); - - ASSERT(NULL != buffer) - - size_t existingHeaderExtensionSize = mHeaderExtensionSize; - size_t postHeaderExtensionSize = mPayloadSize + mPadding; - ASSERT(size() == (mHeaderSize + existingHeaderExtensionSize + postHeaderExtensionSize)) - if (!requiresExtension) { - // going to strip the extension header out entirely - - if (RTP_HEADER_EXTENSION(buffer)) { - ZS_LOG_INSANE(log("no extension present (thus no need to strip extension from RTP packet)")) - return; - } + size_t newSize = mHeaderSize + postHeaderExtensionSize; - ASSERT(size() == (mHeaderSize + existingHeaderExtensionSize + postHeaderExtensionSize)) + SecureByteBlockPtr tempBuffer(make_shared(newSize)); - size_t newSize = mHeaderSize + postHeaderExtensionSize; + BYTE *newBuffer = tempBuffer->BytePtr(); - SecureByteBlockPtr tempBuffer(make_shared(newSize)); + // copy the bytes before the extension header to the new buffer + memcpy(newBuffer, buffer, mHeaderSize); - BYTE *newBuffer = tempBuffer->BytePtr(); + // copy the bytes from after the extension header in the older buffer to the new buffer + memcpy(&(newBuffer[mHeaderSize]), &(buffer[mHeaderSize + existingHeaderExtensionSize]), postHeaderExtensionSize); - // copy the bytes before the extension header to the new buffer - memcpy(newBuffer, buffer, mHeaderSize); + // strip the extension bit + newBuffer[0] = newBuffer[0] & (0xFF ^ RTP_HEADER_EXTENSION_BIT); - // copy the bytes from after the extension header in the older buffer to the new buffer - memcpy(&(newBuffer[mHeaderSize]), &(buffer[mHeaderSize + existingHeaderExtensionSize]), postHeaderExtensionSize); + mBuffer = tempBuffer; - // strip the extension bit - newBuffer[0] = newBuffer[0] & (0xFF ^ RTP_HEADER_EXTENSION_BIT); + mHeaderExtensionSize = 0; - mBuffer = tempBuffer; + mTotalHeaderExtensions = 0; + if (mHeaderExtensions) { + delete [] mHeaderExtensions; + mHeaderExtensions = NULL; + } + mHeaderExtensionAppBits = 0; + mHeaderExtensionPrepaddedSize = 0; + mHeaderExtensionParseStoppedPos = NULL; + mHeaderExtensionParseStoppedSize = 0; - mHeaderExtensionSize = 0; + trace("stripped existing extension header"); + return; + } - mTotalHeaderExtensions = 0; - if (mHeaderExtensions) { - delete [] mHeaderExtensions; - mHeaderExtensions = NULL; - } - mHeaderExtensionAppBits = 0; - mHeaderExtensionPrepaddedSize = 0; - mHeaderExtensionParseStoppedPos = NULL; - mHeaderExtensionParseStoppedSize = 0; + mHeaderExtensionSize = 0; + mTotalHeaderExtensions = 0; + internal::getHeaderExtensionSize(firstExtension, twoByteHeader, mHeaderExtensionPrepaddedSize, mHeaderExtensionParseStoppedSize, mHeaderExtensionSize, mTotalHeaderExtensions); - ZS_LOG_INSANE(debug("stripped existing extension header")) - return; - } + size_t newSize = mHeaderSize + mHeaderExtensionSize + postHeaderExtensionSize; - mHeaderExtensionSize = 0; - mTotalHeaderExtensions = 0; - getHeaderExtensionSize(firstExtension, twoByteHeader, mHeaderExtensionPrepaddedSize, mHeaderExtensionParseStoppedSize, mHeaderExtensionSize, mTotalHeaderExtensions); + SecureByteBlockPtr oldBuffer = mBuffer; // temporary to keep previous allocation alive during swap - size_t newSize = mHeaderSize + mHeaderExtensionSize + postHeaderExtensionSize; + mBuffer = make_shared(newSize); - SecureByteBlockPtr oldBuffer = mBuffer; // temporary to keep previous allocation alive during swap + BYTE *newBuffer = mBuffer->BytePtr(); - mBuffer = make_shared(newSize); + // copy the bytes before the extension header to the new buffer + memcpy(newBuffer, buffer, mHeaderSize); - BYTE *newBuffer = mBuffer->BytePtr(); + // copy the bytes from after the extension header in the older buffer to the new buffer + memcpy(&(newBuffer[mHeaderSize + mHeaderExtensionSize]), &(buffer[mHeaderSize + existingHeaderExtensionSize]), postHeaderExtensionSize); - // copy the bytes before the extension header to the new buffer - memcpy(newBuffer, buffer, mHeaderSize); + writeHeaderExtensions(firstExtension, twoByteHeader); - // copy the bytes from after the extension header in the older buffer to the new buffer - memcpy(&(newBuffer[mHeaderSize + mHeaderExtensionSize]), &(buffer[mHeaderSize + existingHeaderExtensionSize]), postHeaderExtensionSize); + trace("header extension changed"); + } - writeHeaderExtensions(firstExtension, twoByteHeader); + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPPacket (internal) + #pragma mark - ZS_LOG_INSANE(debug("header extension changed")) + //--------------------------------------------------------------------------- + bool RTPPacket::parse() + { + const BYTE *buffer = mBuffer->BytePtr(); + size_t size = mBuffer->SizeInBytes(); + + if (size < internal::kMinRtpPacketLen) { + ZS_EVENTING_3(x, w, Trace, RTPPacketParseWarningPacketLengthTooShort, ol, RtpPacket, Parse, + string, message, "packet length is too short", + puid, mediaChannelID, mMediaChannelID, + size_t, length, size + ); + return false; } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket (internal) - #pragma mark - - //------------------------------------------------------------------------- - Log::Params RTPPacket::slog(const char *message) - { - ElementPtr objectEl = Element::create("ortc::RTPPacket"); - return Log::Params(message, objectEl); + mVersion = RTP_HEADER_VERSION(buffer); + if (mVersion != internal::kRtpVersion) { + ZS_EVENTING_2(x, w, Trace, RTPPacketParseWarning, ol, RtpPacket, Parse, + string, message, "not an RTP packet", + puid, mediaChannelID, mMediaChannelID + ); + return false; } - //------------------------------------------------------------------------- - Log::Params RTPPacket::log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::RTPPacket"); - return Log::Params(message, objectEl); + if (UseRTPUtils::isRTCPPacketType(buffer, size)) { + ZS_EVENTING_3(x, w, Trace, RTPPacketParseWarningPacketisRTCP, ol, RtpPacket, Parse, + string, message, "packet is RTCP not RTP", + puid, mediaChannelID, mMediaChannelID, + size_t, length, size + ); + return false; } - //------------------------------------------------------------------------- - Log::Params RTPPacket::debug(const char *message) const - { - return Log::Params(message, toDebug()); + bool hasPadding = RTP_HEADER_PADDING(buffer); + mCC = RTP_HEADER_CC(buffer); + mM = RTP_HEADER_M(buffer); + mPT = RTP_HEADER_PT(buffer); + mSequenceNumber = UseRTPUtils::getBE16(&(buffer[2])); + mTimestamp = UseRTPUtils::getBE32(&(buffer[4])); + mSSRC = UseRTPUtils::getBE32(&(buffer[8])); + + mHeaderSize = internal::kMinRtpPacketLen + (static_cast(mCC) * sizeof(DWORD)); + + if (size < mHeaderSize) { + ZS_EVENTING_2(x, w, Trace, RTPPacketParseWarning, ol, RtpPacket, Parse, + string, message, "illegal RTP packet (packet is not large enough to hold header)", + puid, mediaChannelID, mMediaChannelID + ); + return false; } - //------------------------------------------------------------------------- - bool RTPPacket::parse() - { - const BYTE *buffer = mBuffer->BytePtr(); - size_t size = mBuffer->SizeInBytes(); - - if (size < kMinRtpPacketLen) { - ZS_LOG_WARNING(Trace, log("packet length is too short") + ZS_PARAM("length", size)) + if (RTP_HEADER_EXTENSION(buffer)) { + if (size < (mHeaderSize + sizeof(DWORD))) { + ZS_EVENTING_2(x, w, Trace, RTPPacketParseWarning, ol, RtpPacket, Parse, + string, message, "illegal RTP packet (packet not large enough to hold data)", + puid, mediaChannelID, mMediaChannelID + ); return false; } - mVersion = RTP_HEADER_VERSION(buffer); - if (mVersion != kRtpVersion) { - ZS_LOG_WARNING(Trace, log("not an RTP packet")) + mHeaderExtensionSize = (static_cast(UseRTPUtils::getBE16(&(buffer[mHeaderSize + 2]))) * sizeof(DWORD)) + sizeof(DWORD); + if (size < (mHeaderSize + mHeaderExtensionSize)) { + ZS_EVENTING_2(x, w, Trace, RTPPacketParseWarning, ol, RtpPacket, Parse, + string, message, "illegal RTP packet (packet not large enough to hold extensions)", + puid, mediaChannelID, mMediaChannelID + ); return false; } + } - if (RTPUtils::isRTCPPacketType(buffer, size)) { - ZS_LOG_WARNING(Trace, log("packet is RTCP not RTP") + ZS_PARAM("length", size)) + if (hasPadding) { + mPadding = static_cast(buffer[size-1]); + if (0 == mPadding) { + ZS_EVENTING_2(x, w, Trace, RTPPacketParseWarning, ol, RtpPacket, Parse, + string, message, "illegal RTP packet (no padding size)", + puid, mediaChannelID, mMediaChannelID + ); return false; } - bool hasPadding = RTP_HEADER_PADDING(buffer); - mCC = RTP_HEADER_CC(buffer); - mM = RTP_HEADER_M(buffer); - mPT = RTP_HEADER_PT(buffer); - mSequenceNumber = RTPUtils::getBE16(&(buffer[2])); - mTimestamp = RTPUtils::getBE32(&(buffer[4])); - mSSRC = RTPUtils::getBE32(&(buffer[8])); - - mHeaderSize = kMinRtpPacketLen + (static_cast(mCC) * sizeof(DWORD)); - - if (size < mHeaderSize) { - ZS_LOG_WARNING(Trace, debug("illegal RTP packet")) + if (size < (mHeaderSize + mHeaderExtensionSize + mPadding)) { + ZS_EVENTING_2(x, w, Trace, RTPPacketParseWarning, ol, RtpPacket, Parse, + string, message, "illegal RTP packet (packet not large enough to hold padding)", + puid, mediaChannelID, mMediaChannelID + ); return false; } + } - if (RTP_HEADER_EXTENSION(buffer)) { - if (size < (mHeaderSize + sizeof(DWORD))) { - ZS_LOG_WARNING(Trace, debug("illegal RTP packet")) - return false; - } - - mHeaderExtensionSize = (static_cast(RTPUtils::getBE16(&(buffer[mHeaderSize + 2]))) * sizeof(DWORD)) + sizeof(DWORD); - if (size < (mHeaderSize + mHeaderExtensionSize)) { - ZS_LOG_WARNING(Trace, debug("illegal RTP packet")) - return false; - } - } - - if (hasPadding) { - mPadding = static_cast(buffer[size-1]); - if (0 == mPadding) { - ZS_LOG_WARNING(Trace, debug("illegal RTP packet (no padding size)")) - return false; - } - - if (size < (mHeaderSize + mHeaderExtensionSize + mPadding)) { - ZS_LOG_WARNING(Trace, debug("illegal RTP packet")) - return false; - } - } - - mPayloadSize = size - (mHeaderSize + mHeaderExtensionSize + mPadding); - - if (0 == mHeaderExtensionSize) { - // no extensions present - ZS_LOG_INSANE(debug("parsed")) - return true; - } + mPayloadSize = size - (mHeaderSize + mHeaderExtensionSize + mPadding); - const BYTE *profilePos = &(buffer[mHeaderSize]); + if (0 == mHeaderExtensionSize) { + // no extensions present + trace("parsed"); + return true; + } - bool oneByte = false; + const BYTE *profilePos = &(buffer[mHeaderSize]); - if ((0xBE == profilePos[0]) && - (0xDE == profilePos[1])) { - oneByte = true; - } else { - WORD twoByteHeader = RTPUtils::getBE16(profilePos); - mHeaderExtensionAppBits = (twoByteHeader & 0xF); + bool oneByte = false; - if (0x100 != ((twoByteHeader & 0xFFF0) >> 4)) { - ZS_LOG_WARNING(Trace, log("header extension profile is not understood") + ZS_PARAM("profile", twoByteHeader)) - return false; - } - } + if ((0xBE == profilePos[0]) && + (0xDE == profilePos[1])) { + oneByte = true; + } else { + WORD twoByteHeader = UseRTPUtils::getBE16(profilePos); + mHeaderExtensionAppBits = (twoByteHeader & 0xF); - size_t remaining = mHeaderExtensionSize - sizeof(DWORD); - if (0 == remaining) { - ZS_LOG_INSANE(debug("parsed")) - return true; + if (0x100 != ((twoByteHeader & 0xFFF0) >> 4)) { + ZS_EVENTING_3(x, w, Trace, RTPPacketParseWarningHeaderProfileNotUnderstood, ol, RtpPacket, Parse, + string, message, "illegal RTP packet (packet not large enough to hold padding)", + puid, mediaChannelID, mMediaChannelID, + word, profile, twoByteHeader + ); + return false; } + } - const BYTE *pos = &(profilePos[4]); + size_t remaining = mHeaderExtensionSize - sizeof(DWORD); + if (0 == remaining) { + trace("parsed"); + return true; + } - size_t totalPossibleHeaderExtensions = (remaining / sizeof(WORD)) + ((0 != (remaining % sizeof(WORD))) ? 1 : 0); + const BYTE *pos = &(profilePos[4]); - mHeaderExtensions = new HeaderExtension[totalPossibleHeaderExtensions] {}; + size_t totalPossibleHeaderExtensions = (remaining / sizeof(WORD)) + ((0 != (remaining % sizeof(WORD))) ? 1 : 0); - size_t totalFound = 0; + mHeaderExtensions = new HeaderExtension[totalPossibleHeaderExtensions] {}; - while ((remaining > 0) && - (totalFound < totalPossibleHeaderExtensions)) { + size_t totalFound = 0; - HeaderExtension *current = &(mHeaderExtensions[totalFound]); + while ((remaining > 0) && + (totalFound < totalPossibleHeaderExtensions)) { - if (0 == pos[0]) { - // see https://tools.ietf.org/html/rfc5285 4.1 + HeaderExtension *current = &(mHeaderExtensions[totalFound]); - // A sequence of extension elements, possibly with padding, forms the - // header extension defined in the RTP specification. There are as many - // extension elements as fit into the length as indicated in the RTP - // header extension length. Since this length is signaled in full 32- - // bit words, padding bytes are used to pad to a 32-bit boundary. The - // entire extension is parsed byte-by-byte to find each extension - // element (no alignment is required), and parsing stops at the earlier - // of the end of the entire header extension, or, in one-byte headers, - // on encountering an identifier with the reserved value of 15. + if (0 == pos[0]) { + // see https://tools.ietf.org/html/rfc5285 4.1 - // In both forms, padding bytes have the value of 0 (zero). They may be - // placed between extension elements, if desired for alignment, or after - // the last extension element, if needed for padding. A padding byte - // does not supply the ID of an element, nor the length field. When a - // padding byte is found, it is ignored and the parser moves on to - // interpreting the next byte. + // A sequence of extension elements, possibly with padding, forms the + // header extension defined in the RTP specification. There are as many + // extension elements as fit into the length as indicated in the RTP + // header extension length. Since this length is signaled in full 32- + // bit words, padding bytes are used to pad to a 32-bit boundary. The + // entire extension is parsed byte-by-byte to find each extension + // element (no alignment is required), and parsing stops at the earlier + // of the end of the entire header extension, or, in one-byte headers, + // on encountering an identifier with the reserved value of 15. - // skip padding byte - ++pos; - --remaining; - if (0 == totalFound) { - ++mHeaderExtensionPrepaddedSize; - } else { - ++(mHeaderExtensions[totalFound-1].mPostPaddingSize); - } - continue; - } + // In both forms, padding bytes have the value of 0 (zero). They may be + // placed between extension elements, if desired for alignment, or after + // the last extension element, if needed for padding. A padding byte + // does not supply the ID of an element, nor the length field. When a + // padding byte is found, it is ignored and the parser moves on to + // interpreting the next byte. - if (oneByte) { - BYTE id = ((pos[0] & 0xF0) >> 4); - if (id == 0xF) { - // see https://tools.ietf.org/html/rfc5285 4.2 - - // The local identifier value 15 is reserved for future extension and - // MUST NOT be used as an identifier. If the ID value 15 is - // encountered, its length field should be ignored, processing of the - // entire extension should terminate at that point, and only the - // extension elements present prior to the element with ID 15 - // considered. - mHeaderExtensionParseStoppedPos = pos; - mHeaderExtensionParseStoppedSize = remaining; - break; - } - - // The 4-bit length is the number minus one of data bytes of this header - // extension element following the one-byte header. Therefore, the - // value zero in this field indicates that one byte of data follows, and - // a value of 15 (the maximum) indicates element data of 16 bytes. - // (This permits carriage of 16-byte values, which is a common length of - // labels and identifiers, while losing the possibility of zero-length - // values -- which would often be padded anyway.) - - size_t length = static_cast((pos[0] & 0x0F) + 1); - - if (remaining < (1 + length)) { - ZS_LOG_WARNING(Trace, log("extension header is not valid") + ZS_PARAM("id", id) + ZS_PARAM("remaining", remaining) + ZS_PARAM("length", length)) - return false; - } - - current->mID = id; - current->mDataSizeInBytes = length; - current->mData = &(pos[1]); - if (0 != totalFound) { - mHeaderExtensions[totalFound-1].mNext = current; - } - - remaining -= (1 + length); - pos += (1 + length); - ++totalFound; - continue; + // skip padding byte + ++pos; + --remaining; + if (0 == totalFound) { + ++mHeaderExtensionPrepaddedSize; + } else { + ++(mHeaderExtensions[totalFound-1].mPostPaddingSize); } + continue; + } - // must be a two byte header format - - if (remaining < sizeof(WORD)) { - ZS_LOG_WARNING(Trace, log("extension header is not valid") + ZS_PARAM("remaining", remaining)) - return false; + if (oneByte) { + BYTE id = ((pos[0] & 0xF0) >> 4); + if (id == 0xF) { + // see https://tools.ietf.org/html/rfc5285 4.2 + + // The local identifier value 15 is reserved for future extension and + // MUST NOT be used as an identifier. If the ID value 15 is + // encountered, its length field should be ignored, processing of the + // entire extension should terminate at that point, and only the + // extension elements present prior to the element with ID 15 + // considered. + mHeaderExtensionParseStoppedPos = pos; + mHeaderExtensionParseStoppedSize = remaining; + break; } - BYTE id = (pos[0]); - size_t length = (pos[1]); - - if (remaining < (sizeof(WORD) + length)) { - ZS_LOG_WARNING(Trace, log("extension header is not valid") + ZS_PARAM("id", id) + ZS_PARAM("remaining", remaining) + ZS_PARAM("length", length)) + // The 4-bit length is the number minus one of data bytes of this header + // extension element following the one-byte header. Therefore, the + // value zero in this field indicates that one byte of data follows, and + // a value of 15 (the maximum) indicates element data of 16 bytes. + // (This permits carriage of 16-byte values, which is a common length of + // labels and identifiers, while losing the possibility of zero-length + // values -- which would often be padded anyway.) + + size_t length = static_cast((pos[0] & 0x0F) + 1); + + if (remaining < (1 + length)) { + ZS_EVENTING_4(x, w, Trace, RTPPacketParseWarningExtensionHeaderNotValid, ol, RtpPacket, Parse, + string, message, "extension header is not valid", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); return false; } current->mID = id; current->mDataSizeInBytes = length; - if (0 != length) { - current->mData = &(pos[2]); - } + current->mData = &(pos[1]); if (0 != totalFound) { mHeaderExtensions[totalFound-1].mNext = current; } - remaining -= (2 + length); - pos += (2 + length); + remaining -= (1 + length); + pos += (1 + length); ++totalFound; continue; } - mTotalHeaderExtensions = totalFound; - - ZS_LOG_INSANE(debug("parsed")) - return true; - } - - //------------------------------------------------------------------------- - void RTPPacket::writeHeaderExtensions( - HeaderExtension *firstExtension, - bool twoByteHeader - ) - { - ASSERT((bool)mBuffer) - ASSERT(0 != mBuffer->SizeInBytes()) - ASSERT(0 != mHeaderSize) - //ASSERT(mHeaderExtensionAppBits) // needs to be set (but no way to verify here) - //ASSERT(mTotalHeaderExtensions) // needs to be set (but no way to verify here) - //ASSERT(mHeaderExtensionPrepaddedSize) // needs to be set (but no way to verify here) - //ASSSRT(mHeaderExtensionParseStoppedSize) // needs to be set (but no way to verify here) - //ASSERT(mHeaderExtensionParseStoppedPos) // needs to be set (but no way to verify here) - ASSERT(0 != mHeaderExtensionSize) - + // must be a two byte header format - BYTE *newBuffer = mBuffer->BytePtr(); + if (remaining < sizeof(WORD)) { + ZS_EVENTING_4(x, w, Trace, RTPPacketParseWarningExtensionHeaderNotValid, ol, RtpPacket, Parse, + string, message, "extension header is not valid (must have room for two byte header)", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, 0 + ); + return false; + } - // set the extension bit - newBuffer[0] = newBuffer[0] | RTP_HEADER_EXTENSION_BIT; + BYTE id = (pos[0]); + size_t length = (pos[1]); - BYTE *newProfilePos = &(newBuffer[mHeaderSize]); + if (remaining < (sizeof(WORD) + length)) { + ZS_EVENTING_4(x, w, Trace, RTPPacketParseWarningExtensionHeaderNotValid, ol, RtpPacket, Parse, + string, message, "extension header is not valid (must have room for two byte header and length)", + puid, mediaChannelID, mMediaChannelID, + size_t, remaining, remaining, + size_t, length, length + ); + return false; + } - if (twoByteHeader) { - WORD profileType = (0x100 << 4) | (mHeaderExtensionAppBits & 0xF); - newProfilePos[0] = static_cast((profileType & 0xFF00) >> 8); - newProfilePos[1] = static_cast(profileType & 0xFF); - } else { - newProfilePos[0] = 0xBE; - newProfilePos[1] = 0xDE; + current->mID = id; + current->mDataSizeInBytes = length; + if (0 != length) { + current->mData = &(pos[2]); + } + if (0 != totalFound) { + mHeaderExtensions[totalFound-1].mNext = current; } - WORD totalDWORDsLength = static_cast(((mHeaderExtensionSize - sizeof(DWORD)) / sizeof(DWORD))); - newProfilePos[2] = static_cast((totalDWORDsLength & 0xFF00) >> 8); - newProfilePos[3] = static_cast(totalDWORDsLength & 0xFF); + remaining -= (2 + length); + pos += (2 + length); + ++totalFound; + continue; + } - BYTE *pos = &(newProfilePos[sizeof(DWORD)]) + mHeaderExtensionPrepaddedSize; + mTotalHeaderExtensions = totalFound; - HeaderExtension *newExtensions = NULL; - if (0 != mTotalHeaderExtensions) { - newExtensions = new HeaderExtension[mTotalHeaderExtensions] {}; - } + trace("parsed"); + return true; + } + + //--------------------------------------------------------------------------- + void RTPPacket::writeHeaderExtensions( + HeaderExtension *firstExtension, + bool twoByteHeader + ) + { + ASSERT((bool)mBuffer) + ASSERT(0 != mBuffer->SizeInBytes()) + ASSERT(0 != mHeaderSize) + //ASSERT(mHeaderExtensionAppBits) // needs to be set (but no way to verify here) + //ASSERT(mTotalHeaderExtensions) // needs to be set (but no way to verify here) + //ASSERT(mHeaderExtensionPrepaddedSize) // needs to be set (but no way to verify here) + //ASSSRT(mHeaderExtensionParseStoppedSize) // needs to be set (but no way to verify here) + //ASSERT(mHeaderExtensionParseStoppedPos) // needs to be set (but no way to verify here) + ASSERT(0 != mHeaderExtensionSize) + + + BYTE *newBuffer = mBuffer->BytePtr(); + + // set the extension bit + newBuffer[0] = newBuffer[0] | RTP_HEADER_EXTENSION_BIT; + + BYTE *newProfilePos = &(newBuffer[mHeaderSize]); + + if (twoByteHeader) { + WORD profileType = (0x100 << 4) | (mHeaderExtensionAppBits & 0xF); + newProfilePos[0] = static_cast((profileType & 0xFF00) >> 8); + newProfilePos[1] = static_cast(profileType & 0xFF); + } else { + newProfilePos[0] = 0xBE; + newProfilePos[1] = 0xDE; + } - size_t index = 0; - for (HeaderExtension *current = firstExtension; NULL != current; current = current->mNext, ++index) { - HeaderExtension *newCurrent = &(newExtensions[index]); - if (0 != index) { - newExtensions[index-1].mNext = newCurrent; - } + WORD totalDWORDsLength = static_cast(((mHeaderExtensionSize - sizeof(DWORD)) / sizeof(DWORD))); + newProfilePos[2] = static_cast((totalDWORDsLength & 0xFF00) >> 8); + newProfilePos[3] = static_cast(totalDWORDsLength & 0xFF); - if (twoByteHeader) { - pos[0] = current->mID; - pos[1] = static_cast(current->mDataSizeInBytes); - pos += 2; - } else { - pos[0] = ((current->mID) << 4) | ((current->mDataSizeInBytes - 1) & 0xF); - ++pos; - } + BYTE *pos = &(newProfilePos[sizeof(DWORD)]) + mHeaderExtensionPrepaddedSize; - newCurrent->mID = current->mID; - newCurrent->mData = pos; - newCurrent->mDataSizeInBytes = current->mDataSizeInBytes; - newCurrent->mPostPaddingSize = current->mPostPaddingSize; + HeaderExtension *newExtensions = NULL; + if (0 != mTotalHeaderExtensions) { + newExtensions = new HeaderExtension[mTotalHeaderExtensions] {}; + } - if (0 != current->mDataSizeInBytes) { - memcpy(pos, current->mData, current->mDataSizeInBytes); - pos += current->mDataSizeInBytes; - } - pos += current->mPostPaddingSize; + size_t index = 0; + for (HeaderExtension *current = firstExtension; NULL != current; current = current->mNext, ++index) { + HeaderExtension *newCurrent = &(newExtensions[index]); + if (0 != index) { + newExtensions[index-1].mNext = newCurrent; } - if (0 != mHeaderExtensionParseStoppedSize) { - ASSERT(NULL != mHeaderExtensionParseStoppedPos) - - memcpy(pos, mHeaderExtensionParseStoppedPos, mHeaderExtensionParseStoppedSize); - mHeaderExtensionParseStoppedPos = pos; + if (twoByteHeader) { + pos[0] = current->mID; + pos[1] = static_cast(current->mDataSizeInBytes); + pos += 2; } else { - mHeaderExtensionParseStoppedPos = NULL; + pos[0] = ((current->mID) << 4) | ((current->mDataSizeInBytes - 1) & 0xF); + ++pos; } - ASSERT(index == mTotalHeaderExtensions) + newCurrent->mID = current->mID; + newCurrent->mData = pos; + newCurrent->mDataSizeInBytes = current->mDataSizeInBytes; + newCurrent->mPostPaddingSize = current->mPostPaddingSize; - mTotalHeaderExtensions = index; - if (NULL != mHeaderExtensions) { - delete [] mHeaderExtensions; - mHeaderExtensions = NULL; + if (0 != current->mDataSizeInBytes) { + memcpy(pos, current->mData, current->mDataSizeInBytes); + pos += current->mDataSizeInBytes; } - mHeaderExtensions = newExtensions; + pos += current->mPostPaddingSize; } - //------------------------------------------------------------------------- - void RTPPacket::generate(const RTPPacket &packet) - { - CreationParams params; - - params.mVersion = packet.version(); - params.mPadding = packet.padding(); - params.mM = packet.m(); - params.mPT = packet.pt(); - params.mSequenceNumber = packet.sequenceNumber(); - params.mTimestamp = packet.timestamp(); - params.mSSRC = packet.ssrc(); - - params.mCC = packet.cc(); - params.mCC = (static_cast(packet.cc()) & 0xF); - - DWORD tmpCCList[0xF]; - if (params.mCC > 0) { - for (decltype(params.mCC) index = 0; index < params.mCC; ++index) { - tmpCCList[index] = packet.getCSRC(index); - } - params.mCSRCList = &(tmpCCList[0]); - } - - params.mPayload = packet.payload(); - params.mPayloadSize = packet.payloadSize(); - params.mFirstHeaderExtension = packet.firstHeaderExtension(); - params.mHeaderExtensionAppBits = packet.headerExtensionAppBits(); - - params.mHeaderExtensionPrepaddedSize = packet.headerExtensionPrepaddedSize(); - params.mHeaderExtensionStopParsePos = packet.headerExtensionParseStopped(); - params.mHeaderExtensionStopParseSize = packet.headerExtensionParseStoppedSize(); + if (0 != mHeaderExtensionParseStoppedSize) { + ASSERT(NULL != mHeaderExtensionParseStoppedPos) - generate(params); + memcpy(pos, mHeaderExtensionParseStoppedPos, mHeaderExtensionParseStoppedSize); + mHeaderExtensionParseStoppedPos = pos; + } else { + mHeaderExtensionParseStoppedPos = NULL; } - //------------------------------------------------------------------------- - void RTPPacket::generate(const CreationParams ¶ms) - { - ASSERT(params.mVersion <= 0x3) - ASSERT(params.mPadding <= 0xFF) - ASSERT(params.mCC <= 0xF) - ASSERT(params.mPT <= 0x7F) - - ASSERT(0 == params.mCC ? (NULL == params.mCSRCList) : (NULL != params.mCSRCList)) - ASSERT(0 == params.mPayloadSize ? (NULL == params.mPayload) : (NULL != params.mPayload)) - - mVersion = params.mVersion & 0x3; - mPadding = params.mPadding; - mCC = (static_cast(params.mCC) & 0xF); - mM = params.mM; - mPT = (params.mPT & 0x7F); - mSequenceNumber = params.mSequenceNumber; - mTimestamp = params.mTimestamp; - mSSRC = params.mSSRC; + ASSERT(index == mTotalHeaderExtensions) - mHeaderSize = kMinRtpPacketLen + (static_cast(mCC) * sizeof(DWORD)); - //mHeaderExtensionSize = 0; // filled in later - mPayloadSize = params.mPayloadSize; + mTotalHeaderExtensions = index; + if (NULL != mHeaderExtensions) { + delete [] mHeaderExtensions; + mHeaderExtensions = NULL; + } + mHeaderExtensions = newExtensions; + } - //mTotalHeaderExtensions (later) - //mHeaderExtensions (later) - mHeaderExtensionAppBits = params.mHeaderExtensionAppBits; + //--------------------------------------------------------------------------- + void RTPPacket::generate(const RTPPacket &packet) + { + CreationParams params; + + params.mMediaChannelID = packet.mMediaChannelID; + params.mVersion = packet.version(); + params.mPadding = packet.padding(); + params.mM = packet.m(); + params.mPT = packet.pt(); + params.mSequenceNumber = packet.sequenceNumber(); + params.mTimestamp = packet.timestamp(); + params.mSSRC = packet.ssrc(); + + params.mCC = packet.cc(); + params.mCC = (static_cast(packet.cc()) & 0xF); + + DWORD tmpCCList[0xF]; + if (params.mCC > 0) { + for (decltype(params.mCC) index = 0; index < params.mCC; ++index) { + tmpCCList[index] = packet.getCSRC(index); + } + params.mCSRCList = &(tmpCCList[0]); + } - mHeaderExtensionPrepaddedSize = params.mHeaderExtensionPrepaddedSize; - mHeaderExtensionParseStoppedPos = params.mHeaderExtensionStopParsePos; - mHeaderExtensionParseStoppedSize = params.mHeaderExtensionStopParseSize; + params.mPayload = packet.payload(); + params.mPayloadSize = packet.payloadSize(); + params.mFirstHeaderExtension = packet.firstHeaderExtension(); + params.mHeaderExtensionAppBits = packet.headerExtensionAppBits(); - bool twoByteHeader = requiresTwoByteHeader(params.mFirstHeaderExtension, mHeaderExtensionAppBits); + params.mHeaderExtensionPrepaddedSize = packet.headerExtensionPrepaddedSize(); + params.mHeaderExtensionStopParsePos = packet.headerExtensionParseStopped(); + params.mHeaderExtensionStopParseSize = packet.headerExtensionParseStoppedSize(); - if (twoByteHeader) { - ORTC_THROW_INVALID_STATE_IF(NULL != mHeaderExtensionParseStoppedPos) // requires a 1 byte header to append this data - } + generate(params); + } - bool requiresExtension = requiredExtension(params.mFirstHeaderExtension, mHeaderExtensionAppBits, mHeaderExtensionPrepaddedSize, mHeaderExtensionParseStoppedPos); + //--------------------------------------------------------------------------- + void RTPPacket::generate(const CreationParams ¶ms) + { + ASSERT(params.mVersion <= 0x3) + ASSERT(params.mPadding <= 0xFF) + ASSERT(params.mCC <= 0xF) + ASSERT(params.mPT <= 0x7F) + + ASSERT(0 == params.mCC ? (NULL == params.mCSRCList) : (NULL != params.mCSRCList)) + ASSERT(0 == params.mPayloadSize ? (NULL == params.mPayload) : (NULL != params.mPayload)) + + mVersion = params.mVersion & 0x3; + mPadding = params.mPadding; + mCC = (static_cast(params.mCC) & 0xF); + mM = params.mM; + mPT = (params.mPT & 0x7F); + mSequenceNumber = params.mSequenceNumber; + mTimestamp = params.mTimestamp; + mSSRC = params.mSSRC; + + mHeaderSize = internal::kMinRtpPacketLen + (static_cast(mCC) * sizeof(DWORD)); + //mHeaderExtensionSize = 0; // filled in later + mPayloadSize = params.mPayloadSize; + + //mTotalHeaderExtensions (later) + //mHeaderExtensions (later) + mHeaderExtensionAppBits = params.mHeaderExtensionAppBits; + + mHeaderExtensionPrepaddedSize = params.mHeaderExtensionPrepaddedSize; + mHeaderExtensionParseStoppedPos = params.mHeaderExtensionStopParsePos; + mHeaderExtensionParseStoppedSize = params.mHeaderExtensionStopParseSize; + + bool twoByteHeader = requiresTwoByteHeader(params.mFirstHeaderExtension, mHeaderExtensionAppBits); + + if (twoByteHeader) { + ORTC_THROW_INVALID_STATE_IF(NULL != mHeaderExtensionParseStoppedPos) // requires a 1 byte header to append this data + } - if (requiresExtension) { - mHeaderExtensionSize = 0; - mTotalHeaderExtensions = 0; - getHeaderExtensionSize(params.mFirstHeaderExtension, twoByteHeader, mHeaderExtensionPrepaddedSize, mHeaderExtensionParseStoppedSize, mHeaderExtensionSize, mTotalHeaderExtensions); - } + bool requiresExtension = internal::requiredExtension(params.mFirstHeaderExtension, mHeaderExtensionAppBits, mHeaderExtensionPrepaddedSize, mHeaderExtensionParseStoppedPos); - size_t postHeaderExtensionSize = mPayloadSize + mPadding; + if (requiresExtension) { + mHeaderExtensionSize = 0; + mTotalHeaderExtensions = 0; + internal::getHeaderExtensionSize(params.mFirstHeaderExtension, twoByteHeader, mHeaderExtensionPrepaddedSize, mHeaderExtensionParseStoppedSize, mHeaderExtensionSize, mTotalHeaderExtensions); + } - size_t newSize = mHeaderSize + mHeaderExtensionSize + postHeaderExtensionSize; + size_t postHeaderExtensionSize = mPayloadSize + mPadding; - mBuffer = make_shared(newSize); + size_t newSize = mHeaderSize + mHeaderExtensionSize + postHeaderExtensionSize; - BYTE *newBuffer = mBuffer->BytePtr(); + mBuffer = make_shared(newSize); - // fill standard header + BYTE *newBuffer = mBuffer->BytePtr(); - BYTE *pos = newBuffer; - pos[0] = RTP_PACK_BITS(mVersion, 0x3, 6) | - RTP_PACK_BITS(0 != mPadding ? 1 : 0, 0x1, 5) | - RTP_PACK_BITS(requiresExtension ? 1 : 0, 0x1, 4) | - RTP_PACK_BITS(mCC, 0xF, 0); - pos[1] = RTP_PACK_BITS(mM ? 1 : 0, 0x1, 7) | - RTP_PACK_BITS(mPT, 0x7F, 0); + // fill standard header - RTPUtils::setBE16(&(pos[2]), mSequenceNumber); - RTPUtils::setBE32(&(pos[4]), mTimestamp); - RTPUtils::setBE32(&(pos[8]), mSSRC); + BYTE *pos = newBuffer; + pos[0] = RTP_PACK_BITS(mVersion, 0x3, 6) | + RTP_PACK_BITS(0 != mPadding ? 1 : 0, 0x1, 5) | + RTP_PACK_BITS(requiresExtension ? 1 : 0, 0x1, 4) | + RTP_PACK_BITS(mCC, 0xF, 0); + pos[1] = RTP_PACK_BITS(mM ? 1 : 0, 0x1, 7) | + RTP_PACK_BITS(mPT, 0x7F, 0); - // write CSRC list (if any) - for (size_t index = 0; index < static_cast(mCC); ++index) { - RTPUtils::setBE32(&(pos[12+(sizeof(DWORD)*index)]), params.mCSRCList[index]); - } + UseRTPUtils::setBE16(&(pos[2]), mSequenceNumber); + UseRTPUtils::setBE32(&(pos[4]), mTimestamp); + UseRTPUtils::setBE32(&(pos[8]), mSSRC); - if (requiresExtension) { - writeHeaderExtensions(params.mFirstHeaderExtension, twoByteHeader); - } + // write CSRC list (if any) + for (size_t index = 0; index < static_cast(mCC); ++index) { + UseRTPUtils::setBE32(&(pos[12+(sizeof(DWORD)*index)]), params.mCSRCList[index]); + } - if (0 != mPayloadSize) { - memcpy(&(pos[mHeaderSize+mHeaderExtensionSize]), params.mPayload, mPayloadSize); - } + if (requiresExtension) { + writeHeaderExtensions(params.mFirstHeaderExtension, twoByteHeader); + } - if (0 != mPadding) { - newBuffer[newSize-1] = static_cast(mPadding); - } + if (0 != mPayloadSize) { + memcpy(&(pos[mHeaderSize+mHeaderExtensionSize]), params.mPayload, mPayloadSize); + } - ZS_LOG_INSANE(debug("generated RTP packet")) + if (0 != mPadding) { + newBuffer[newSize-1] = static_cast(mPadding); } + trace("generated"); } -} +} // namespace ortc diff --git a/ortc/cpp/ortc_RTPReceiver.cpp b/ortc/cpp/ortc_RTPReceiver.cpp index 2e618a0f..5061fffd 100644 --- a/ortc/cpp/ortc_RTPReceiver.cpp +++ b/ortc/cpp/ortc_RTPReceiver.cpp @@ -35,8 +35,6 @@ #include #include #include -#include -#include #include #include #include @@ -45,6 +43,8 @@ #include #include +#include +#include #include @@ -538,7 +538,9 @@ namespace ortc ZS_LOG_DEBUG(log("creating media stream track") + ZS_PARAM("kind", IMediaStreamTrack::toString(mKind))) +#if 0 mTrack = UseMediaStreamTrack::create(mKind); +#endif //0 ZS_LOG_DEBUG(log("created media stream track") + ZS_PARAM("kind", IMediaStreamTrack::toString(mKind)) + ZS_PARAM("track", mTrack ? mTrack->getID() : 0)); @@ -709,7 +711,7 @@ namespace ortc } //------------------------------------------------------------------------- - IMediaStreamTrackPtr RTPReceiver::track() const + ortc::IMediaStreamTrackPtr RTPReceiver::track() const { return IMediaStreamTrackPtr(MediaStreamTrack::convert(mTrack)); } @@ -1430,10 +1432,14 @@ namespace ortc { case SupportedCodec_VP8: case SupportedCodec_VP9: +#if 0 mTrack->setH264Rendering(false); +#endif //0 goto end_codec_loop; case SupportedCodec_H264: +#if 0 mTrack->setH264Rendering(true); +#endif //0 goto end_codec_loop; default: break; } @@ -1617,7 +1623,8 @@ namespace ortc ); - ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport)) + packet->toDebug()) + ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport))); + packet->trace("received packet"); ChannelHolderPtr channelHolder; @@ -1687,7 +1694,8 @@ namespace ortc size, size, packet->buffer()->SizeInBytes() ); - ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport)) + packet->toDebug()); + ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport))); + packet->trace("received packet"); ChannelWeakMapPtr channels; @@ -4025,7 +4033,9 @@ namespace ortc puid, trackId, mTrack->getID(), puid, channelObjectId, channelHolder->getID() ); +#if 0 mTrack->notifyActiveReceiverChannel(RTPReceiverChannel::convert(channelHolder->mChannel)); +#endif //0 } //------------------------------------------------------------------------- @@ -4042,8 +4052,9 @@ namespace ortc puid, trackId, mTrack->getID(), puid, channelObjectId, 0 ); - +#if 0 mTrack->notifyActiveReceiverChannel(RTPReceiverChannelPtr()); +#endif //0 } //------------------------------------------------------------------------- diff --git a/ortc/cpp/ortc_RTPReceiverChannel.cpp b/ortc/cpp/ortc_RTPReceiverChannel.cpp index e13fa108..b9c9c694 100644 --- a/ortc/cpp/ortc_RTPReceiverChannel.cpp +++ b/ortc/cpp/ortc_RTPReceiverChannel.cpp @@ -30,21 +30,19 @@ */ #include -#include -#include -#include #include #include #include #include -#include -#include #include #include #include #include #include +#include +#include + #include #include @@ -63,6 +61,7 @@ #define ASSERT(x) #endif //_DEBUG +#if 0 namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpreceiver) } @@ -767,3 +766,5 @@ namespace ortc } // internal namespace } + +#endif //0 diff --git a/ortc/cpp/ortc_RTPReceiverChannelAudio.cpp b/ortc/cpp/ortc_RTPReceiverChannelAudio.cpp deleted file mode 100644 index e2cd3c22..00000000 --- a/ortc/cpp/ortc_RTPReceiverChannelAudio.cpp +++ /dev/null @@ -1,845 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include - -#include - -#include - -#ifdef _DEBUG -#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) -#else -#define ASSERT(x) -#endif //_DEBUG - - -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpreceiver) } - -namespace ortc -{ - ZS_DECLARE_USING_PTR(zsLib, ISettings); - ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); - - namespace internal - { - ZS_DECLARE_CLASS_PTR(RTPReceiverChannelAudioSettingsDefaults); - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark (helpers) - #pragma mark - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudioSettingsDefaults - #pragma mark - - class RTPReceiverChannelAudioSettingsDefaults : public ISettingsApplyDefaultsDelegate - { - public: - //----------------------------------------------------------------------- - ~RTPReceiverChannelAudioSettingsDefaults() - { - ISettings::removeDefaults(*this); - } - - //----------------------------------------------------------------------- - static RTPReceiverChannelAudioSettingsDefaultsPtr singleton() - { - static SingletonLazySharedPtr singleton(create()); - return singleton.singleton(); - } - - //----------------------------------------------------------------------- - static RTPReceiverChannelAudioSettingsDefaultsPtr create() - { - auto pThis(make_shared()); - ISettings::installDefaults(pThis); - return pThis; - } - - //----------------------------------------------------------------------- - virtual void notifySettingsApplyDefaults() override - { - // UseSettings::setUInt(ORTC_SETTING_RTP_RECEIVER_CHANNEL_AUDIO_, 0); - } - - }; - - //------------------------------------------------------------------------- - void installRTPReceiverChannelAudioSettingsDefaults() - { - RTPReceiverChannelAudioSettingsDefaults::singleton(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelAudioForRTPReceiverChannel - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr IRTPReceiverChannelAudioForRTPReceiverChannel::toDebug(ForRTPReceiverChannelPtr object) - { - if (!object) return ElementPtr(); - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelAudio, object)->toDebug(); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudioPtr IRTPReceiverChannelAudioForRTPReceiverChannel::create( - RTPReceiverChannelPtr receiverChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - return internal::IRTPReceiverChannelAudioFactory::singleton().create(receiverChannel, track, params); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelAudioForMediaStreamTrack - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr IRTPReceiverChannelAudioForMediaStreamTrack::toDebug(ForMediaStreamTrackPtr object) - { - if (!object) return ElementPtr(); - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelAudio, object)->toDebug(); - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio - #pragma mark - - //--------------------------------------------------------------------------- - const char *RTPReceiverChannelAudio::toString(States state) - { - switch (state) { - case State_Pending: return "pending"; - case State_Ready: return "ready"; - case State_ShuttingDown: return "shutting down"; - case State_Shutdown: return "shutdown"; - } - return "UNDEFINED"; - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudio::RTPReceiverChannelAudio( - const make_private &, - IMessageQueuePtr queue, - UseChannelPtr receiverChannel, - UseMediaStreamTrackPtr track, - const Parameters ¶ms - ) : - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()), - mReceiverChannel(receiverChannel), - mTrack(track), - mParameters(make_shared(params)) - { - ZS_LOG_DETAIL(debug("created")) - - ORTC_THROW_INVALID_PARAMETERS_IF(!receiverChannel) - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::init() - { - AutoRecursiveLock lock(*this); - - mTransport = Transport::create(mThisWeak.lock()); - - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudio::~RTPReceiverChannelAudio() - { - if (isNoop()) return; - - ZS_LOG_DETAIL(log("destroyed")) - mThisWeak.reset(); - - cancel(); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudioPtr RTPReceiverChannelAudio::convert(ForReceiverChannelFromMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelAudio, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudioPtr RTPReceiverChannelAudio::convert(ForRTPReceiverChannelPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelAudio, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudioPtr RTPReceiverChannelAudio::convert(ForMediaStreamTrackFromMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelAudio, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudioPtr RTPReceiverChannelAudio::convert(ForMediaStreamTrackPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelAudio, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudioPtr RTPReceiverChannelAudio::convert(ForRTPMediaEnginePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelAudio, object); - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelMediaBaseForRTPReceiverChannel - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::notifyTransportState(ISecureTransportTypes::States state) - { - IRTPReceiverChannelAudioAsyncDelegateProxy::create(mThisWeak.lock())->onSecureTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::notifyUpdate(ParametersPtr params) - { - IRTPReceiverChannelAudioAsyncDelegateProxy::create(mThisWeak.lock())->onUpdate(params); - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::handlePacket(RTPPacketPtr packet) - { - UseChannelResourcePtr channelResource; - - { - AutoRecursiveLock lock(*this); - if (isShuttingDown() || isShutdown()) - return false; - channelResource = mChannelResource; - bool shouldQueue = false; - if (!channelResource) - shouldQueue = true; - if (mQueuedRTP.size() > 0) - shouldQueue = true; - if (shouldQueue) { - mQueuedRTP.push(packet); - if (1 == mQueuedRTP.size()) - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - return true; - } - } - - if (!channelResource) return true; - return channelResource->handlePacket(*packet); - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::handlePacket(RTCPPacketPtr packet) - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - if (mQueuedRTP.size() > 0) { - mQueuedRTCP.push(packet); - return true; - } - channelResource = mChannelResource; - } - - if (!channelResource) return false; - return channelResource->handlePacket(*packet); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - } - - if (!channelResource) { - promise->reject(); - return; - } - return channelResource->requestStats(promise, stats); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelAudioForRTPReceiverChannel - #pragma mark - - //------------------------------------------------------------------------- - RTPReceiverChannelAudioPtr RTPReceiverChannelAudio::create( - RTPReceiverChannelPtr receiverChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - RTPReceiverChannelAudioPtr pThis(make_shared(make_private {}, IORTCForInternal::queueORTC(), receiverChannel, track, params)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - int32_t RTPReceiverChannelAudio::getAudioSamples( - const size_t numberOfSamples, - const uint8_t numberOfChannels, - void *audioSamples, - size_t& numberOfSamplesOut - ) - { -#define TODO_IMPLEMENT_THIS 1 -#define TODO_IMPLEMENT_THIS 2 - return 0; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelAudioForMediaStreamTrack - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelMediaBaseForRTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IWakeDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::onWake() - { - ZS_LOG_DEBUG(log("wake")) - - AutoRecursiveLock lock(*this); - step(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => ITimerDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::onTimer(ITimerPtr timer) - { - ZS_LOG_DEBUG(log("timer") + ZS_PARAM("timer id", timer->getID())) - - AutoRecursiveLock lock(*this); -#define TODO 1 -#define TODO 2 - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IPromiseSettledDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::onPromiseSettled(PromisePtr promise) - { - ZS_LOG_DEBUG(log("promise settled") + ZS_PARAM("promise", promise->getID())) - - AutoRecursiveLock lock(*this); - step(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelAudioAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::onReceiverChannelAudioDeliverPackets() - { - RTPPacketQueue rtpPackets; - RTCPPacketQueue rtcpPackets; - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - rtpPackets = mQueuedRTP; - rtcpPackets = mQueuedRTCP; - mQueuedRTP = RTPPacketQueue(); - mQueuedRTCP = RTCPPacketQueue(); - channelResource = mChannelResource; - } - - if (!channelResource) - return; - - while (rtpPackets.size() > 0) { - auto packet = rtpPackets.front(); - channelResource->handlePacket(*packet); - rtpPackets.pop(); - } - - while (rtcpPackets.size() > 0) { - auto packet = rtcpPackets.front(); - channelResource->handlePacket(*packet); - rtcpPackets.pop(); - } - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::onSecureTransportState(ISecureTransport::States state) - { - ZS_LOG_TRACE(log("notified secure transport state") + ZS_PARAM("state", ISecureTransport::toString(state))) - - AutoRecursiveLock lock(*this); - - mTransportState = state; - - if (mChannelResource) - mChannelResource->notifyTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::onUpdate(ParametersPtr params) - { - ZS_LOG_TRACE(log("on update") + params->toDebug()) - - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - mParameters = make_shared(*params); - channelResource = mChannelResource; - } - - if (channelResource) - channelResource->notifyUpdate(params); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => friend Transport - #pragma mark - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::SendRtcp(const uint8_t* packet, size_t length) - { - auto channel = mReceiverChannel.lock(); - if (!channel) return false; - return channel->sendPacket(RTCPPacket::create(packet, length)); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio::Transport - #pragma mark - - //------------------------------------------------------------------------- - RTPReceiverChannelAudio::Transport::Transport( - const make_private &, - RTPReceiverChannelAudioPtr outer - ) : - mOuter(outer) - { - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudio::Transport::~Transport() - { - mThisWeak.reset(); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::Transport::init() - { - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudio::TransportPtr RTPReceiverChannelAudio::Transport::create(RTPReceiverChannelAudioPtr outer) - { - TransportPtr pThis(make_shared(make_private{}, outer)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio::Transport => webrtc::Transport - #pragma mark - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::Transport::SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) - { - return true; - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::Transport::SendRtcp(const uint8_t* packet, size_t length) - { - auto outer = mOuter.lock(); - if (!outer) return false; - return outer->SendRtcp(packet, length); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => (internal) - #pragma mark - - //------------------------------------------------------------------------- - Log::Params RTPReceiverChannelAudio::log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::RTPReceiverChannelAudio"); - IHelper::debugAppend(objectEl, "id", mID); - return Log::Params(message, objectEl); - } - - //------------------------------------------------------------------------- - Log::Params RTPReceiverChannelAudio::debug(const char *message) const - { - return Log::Params(message, toDebug()); - } - - //------------------------------------------------------------------------- - ElementPtr RTPReceiverChannelAudio::toDebug() const - { - AutoRecursiveLock lock(*this); - - ElementPtr resultEl = Element::create("ortc::RTPReceiverChannelAudio"); - - IHelper::debugAppend(resultEl, "id", mID); - - IHelper::debugAppend(resultEl, "graceful shutdown", (bool)mGracefulShutdownReference); - - IHelper::debugAppend(resultEl, "state", toString(mCurrentState)); - - IHelper::debugAppend(resultEl, "error", mLastError); - IHelper::debugAppend(resultEl, "error reason", mLastErrorReason); - - auto receiverChannel = mReceiverChannel.lock(); - IHelper::debugAppend(resultEl, "receiver channel", receiverChannel ? receiverChannel->getID() : 0); - - return resultEl; - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::isShuttingDown() const - { - return State_ShuttingDown == mCurrentState; - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::isShutdown() const - { - return State_Shutdown == mCurrentState; - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::step() - { - ZS_LOG_DEBUG(debug("step")) - - if ((isShuttingDown()) || - (isShutdown())) { - ZS_LOG_DEBUG(debug("step forwarding to cancel")) - cancel(); - return; - } - - // ... other steps here ... - if (!stepChannelPromise()) goto not_ready; - if (!stepSetupChannel()) goto not_ready; - // ... other steps here ... - - goto ready; - - not_ready: - { - ZS_LOG_TRACE(debug("not ready")) - return; - } - - ready: - { - ZS_LOG_TRACE(log("ready")) - setState(State_Ready); - } - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::stepChannelPromise() - { - if (mChannelResourceLifetimeHolderPromise) { - ZS_LOG_TRACE(log("already setup channel promise")) - return true; - } - - if (mQueuedRTP.size() < 1) { - ZS_LOG_TRACE(log("cannot setup channel promise until first packet is received")) - return false; - } - - auto packet = mQueuedRTP.front(); - - mChannelResourceLifetimeHolderPromise = UseMediaEngine::setupChannel( - mThisWeak.lock(), - mTransport, - MediaStreamTrack::convert(mTrack), - mParameters, - packet - ); - - mChannelResourceLifetimeHolderPromise->thenWeak(mThisWeak.lock()); - - return true; - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelAudio::stepSetupChannel() - { - if (mChannelResource) { - ZS_LOG_TRACE(log("already setup channel resource")) - return true; - } - - if (!mChannelResourceLifetimeHolderPromise->isSettled()) { - ZS_LOG_TRACE(log("waiting for setup channel promise to be set up")) - return false; - } - - if (mChannelResourceLifetimeHolderPromise->isRejected()) { - ZS_LOG_WARNING(Debug, log("media engine rejected channel setup")) - cancel(); - return false; - } - - mChannelResource = ZS_DYNAMIC_PTR_CAST(UseChannelResource, mChannelResourceLifetimeHolderPromise->value()); - - if (!mChannelResource) { - ZS_LOG_WARNING(Detail, log("failed to initialize channel resource")) - cancel(); - return false; - } - - ZS_LOG_DEBUG(log("media channel is setup") + ZS_PARAM("channel", mChannelResource->getID())) - - IRTPReceiverChannelAudioAsyncDelegateProxy::create(mThisWeak.lock())->onReceiverChannelAudioDeliverPackets(); - - mChannelResource->notifyTransportState(mTransportState); - - return true; - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::cancel() - { - //....................................................................... - // try to gracefully shutdown - - if (isShutdown()) return; - - setState(State_ShuttingDown); - - mQueuedRTP = RTPPacketQueue(); - mQueuedRTCP = RTCPPacketQueue(); - - if (!mGracefulShutdownReference) mGracefulShutdownReference = mThisWeak.lock(); - - if (!mCloseChannelPromise) { - if (mChannelResource) { - mCloseChannelPromise = mChannelResource->shutdown(); - mCloseChannelPromise->thenWeak(mGracefulShutdownReference); - } - } - - if (mGracefulShutdownReference) { - if (mCloseChannelPromise) { - if (!mCloseChannelPromise->isSettled()) { - ZS_LOG_DEBUG(log("waiting for close channel promise")) - return; - } - } - } - - //....................................................................... - // final cleanup - - setState(State_Shutdown); - - mChannelResourceLifetimeHolderPromise.reset(); - - mChannelResource.reset(); - mCloseChannelPromise.reset(); - - // make sure to cleanup any final reference to self - mGracefulShutdownReference.reset(); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::setState(States state) - { - if (state == mCurrentState) return; - - ZS_LOG_DETAIL(debug("state changed") + ZS_PARAM("new state", toString(state)) + ZS_PARAM("old state", toString(mCurrentState))) - - mCurrentState = state; - -// RTPReceiverChannelAudioPtr pThis = mThisWeak.lock(); -// if (pThis) { -// mSubscriptions.delegate()->onRTPReceiverChannelAudioStateChanged(pThis, mCurrentState); -// } - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelAudio::setError(WORD errorCode, const char *inReason) - { - String reason(inReason); - if (reason.isEmpty()) { - reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); - } - - if (0 != mLastError) { - ZS_LOG_WARNING(Detail, debug("error already set thus ignoring new error") + ZS_PARAM("new error", errorCode) + ZS_PARAM("new reason", reason)) - return; - } - - mLastError = errorCode; - mLastErrorReason = reason; - - ZS_LOG_WARNING(Detail, debug("error set") + ZS_PARAM("error", mLastError) + ZS_PARAM("reason", mLastErrorReason)) - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelAudioFactory - #pragma mark - - //------------------------------------------------------------------------- - IRTPReceiverChannelAudioFactory &IRTPReceiverChannelAudioFactory::singleton() - { - return RTPReceiverChannelAudioFactory::singleton(); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelAudioPtr IRTPReceiverChannelAudioFactory::create( - RTPReceiverChannelPtr receiverChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - if (this) {} - return internal::RTPReceiverChannelAudio::create(receiverChannel, track, params); - } - - } // internal namespace -} diff --git a/ortc/cpp/ortc_RTPReceiverChannelVideo.cpp b/ortc/cpp/ortc_RTPReceiverChannelVideo.cpp deleted file mode 100644 index a6db2a14..00000000 --- a/ortc/cpp/ortc_RTPReceiverChannelVideo.cpp +++ /dev/null @@ -1,828 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include - -#ifdef _DEBUG -#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) -#else -#define ASSERT(x) -#endif //_DEBUG - - -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpreceiver) } - -namespace ortc -{ - ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); - - namespace internal - { - ZS_DECLARE_CLASS_PTR(RTPReceiverChannelVideoSettingsDefaults); - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark (helpers) - #pragma mark - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark DTMFSenderSettingsDefaults - #pragma mark - - class RTPReceiverChannelVideoSettingsDefaults : public ISettingsApplyDefaultsDelegate - { - public: - //----------------------------------------------------------------------- - ~RTPReceiverChannelVideoSettingsDefaults() - { - ISettings::removeDefaults(*this); - } - - //----------------------------------------------------------------------- - static RTPReceiverChannelVideoSettingsDefaultsPtr singleton() - { - static SingletonLazySharedPtr singleton(create()); - return singleton.singleton(); - } - - //----------------------------------------------------------------------- - static RTPReceiverChannelVideoSettingsDefaultsPtr create() - { - auto pThis(make_shared()); - ISettings::installDefaults(pThis); - return pThis; - } - - //----------------------------------------------------------------------- - virtual void notifySettingsApplyDefaults() override - { - } - - }; - - //------------------------------------------------------------------------- - void installRTPReceiverChannelVideoSettingsDefaults() - { - RTPReceiverChannelVideoSettingsDefaults::singleton(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelVideoForRTPReceiverChannel - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr IRTPReceiverChannelVideoForRTPReceiverChannel::toDebug(ForRTPReceiverChannelPtr object) - { - if (!object) return ElementPtr(); - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelVideo, object)->toDebug(); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr IRTPReceiverChannelVideoForRTPReceiverChannel::create( - RTPReceiverChannelPtr receiverChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - return internal::IRTPReceiverChannelVideoFactory::singleton().create(receiverChannel, track, params); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelVideoForMediaStreamTrack - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr IRTPReceiverChannelVideoForMediaStreamTrack::toDebug(ForMediaStreamTrackPtr object) - { - if (!object) return ElementPtr(); - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelVideo, object)->toDebug(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo - #pragma mark - - //--------------------------------------------------------------------------- - const char *RTPReceiverChannelVideo::toString(States state) - { - switch (state) { - case State_Pending: return "pending"; - case State_Ready: return "ready"; - case State_ShuttingDown: return "shutting down"; - case State_Shutdown: return "shutdown"; - } - return "UNDEFINED"; - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideo::RTPReceiverChannelVideo( - const make_private &, - IMessageQueuePtr queue, - UseChannelPtr receiverChannel, - UseMediaStreamTrackPtr track, - const Parameters ¶ms - ) : - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()), - mReceiverChannel(receiverChannel), - mTrack(track), - mParameters(make_shared(params)) - { - ZS_LOG_DETAIL(debug("created")) - - ORTC_THROW_INVALID_PARAMETERS_IF(!receiverChannel) - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::init() - { - AutoRecursiveLock lock(*this); - - mTransport = Transport::create(mThisWeak.lock()); - - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideo::~RTPReceiverChannelVideo() - { - if (isNoop()) return; - - ZS_LOG_DETAIL(log("destroyed")) - mThisWeak.reset(); - - cancel(); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr RTPReceiverChannelVideo::convert(ForSettingsPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr RTPReceiverChannelVideo::convert(ForReceiverChannelFromMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr RTPReceiverChannelVideo::convert(ForRTPReceiverChannelPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr RTPReceiverChannelVideo::convert(ForMediaStreamTrackFromMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr RTPReceiverChannelVideo::convert(ForMediaStreamTrackPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr RTPReceiverChannelVideo::convert(ForRTPMediaEnginePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPReceiverChannelVideo, object); - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelMediaBaseForRTPReceiverChannel - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::notifyTransportState(ISecureTransportTypes::States state) - { - IRTPReceiverChannelVideoAsyncDelegateProxy::create(mThisWeak.lock())->onSecureTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::notifyUpdate(ParametersPtr params) - { - IRTPReceiverChannelVideoAsyncDelegateProxy::create(mThisWeak.lock())->onUpdate(params); - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::handlePacket(RTPPacketPtr packet) - { - UseChannelResourcePtr channelResource; - - { - AutoRecursiveLock lock(*this); - if (isShuttingDown() || isShutdown()) - return false; - channelResource = mChannelResource; - bool shouldQueue = false; - if (!channelResource) - shouldQueue = true; - if (mQueuedRTP.size() > 0) - shouldQueue = true; - if (shouldQueue) { - mQueuedRTP.push(packet); - if (1 == mQueuedRTP.size()) - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - return true; - } - } - - if (!channelResource) return false; - return channelResource->handlePacket(*packet); - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::handlePacket(RTCPPacketPtr packet) - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - if (mQueuedRTP.size() > 0) { - mQueuedRTCP.push(packet); - return true; - } - channelResource = mChannelResource; - } - - if (!channelResource) return false; - return channelResource->handlePacket(*packet); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - } - - if (!channelResource) { - promise->reject(); - return; - } - return channelResource->requestStats(promise, stats); - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelVideoForRTPReceiverChannel - #pragma mark - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr RTPReceiverChannelVideo::create( - RTPReceiverChannelPtr receiverChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - RTPReceiverChannelVideoPtr pThis(make_shared(make_private {}, IORTCForInternal::queueORTC(), receiverChannel, track, params)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelMediaBaseForRTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IWakeDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::onWake() - { - ZS_LOG_DEBUG(log("wake")) - - AutoRecursiveLock lock(*this); - step(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => ITimerDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::onTimer(ITimerPtr timer) - { - ZS_LOG_DEBUG(log("timer") + ZS_PARAM("timer id", timer->getID())) - - AutoRecursiveLock lock(*this); -#define TODO 1 -#define TODO 2 - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IPromiseSettledDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::onPromiseSettled(PromisePtr promise) - { - ZS_LOG_DEBUG(log("promise settled") + ZS_PARAM("promise", promise->getID())) - - AutoRecursiveLock lock(*this); - step(); - - if (ZS_DYNAMIC_PTR_CAST(PromiseWithRTPMediaEngineChannelResource, promise)) { - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelVideoAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::onReceiverChannelVideoDeliverPackets() - { - RTPPacketQueue rtpPackets; - RTCPPacketQueue rtcpPackets; - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - rtpPackets = mQueuedRTP; - rtcpPackets = mQueuedRTCP; - mQueuedRTP = RTPPacketQueue(); - mQueuedRTCP = RTCPPacketQueue(); - channelResource = mChannelResource; - } - - if (!channelResource) - return; - - while (rtpPackets.size() > 0) { - auto packet = rtpPackets.front(); - channelResource->handlePacket(*packet); - rtpPackets.pop(); - } - - while (rtcpPackets.size() > 0) { - auto packet = rtcpPackets.front(); - channelResource->handlePacket(*packet); - rtcpPackets.pop(); - } - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::onSecureTransportState(ISecureTransport::States state) - { - ZS_LOG_TRACE(log("notified secure transport state") + ZS_PARAM("state", ISecureTransport::toString(state))) - - AutoRecursiveLock lock(*this); - - mTransportState = state; - - if (mChannelResource) - mChannelResource->notifyTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::onUpdate(ParametersPtr params) - { - ZS_LOG_TRACE(log("on update") + params->toDebug()) - - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - mParameters = make_shared(*params); - channelResource = mChannelResource; - } - - if (channelResource) - channelResource->notifyUpdate(params); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => friend Transport - #pragma mark - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::SendRtcp(const uint8_t* packet, size_t length) - { - auto channel = mReceiverChannel.lock(); - if (!channel) return false; - return channel->sendPacket(RTCPPacket::create(packet, length)); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo::Transport - #pragma mark - - //------------------------------------------------------------------------- - RTPReceiverChannelVideo::Transport::Transport( - const make_private &, - RTPReceiverChannelVideoPtr outer - ) : - mOuter(outer) - { - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideo::Transport::~Transport() - { - mThisWeak.reset(); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::Transport::init() - { - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideo::TransportPtr RTPReceiverChannelVideo::Transport::create(RTPReceiverChannelVideoPtr outer) - { - TransportPtr pThis(make_shared(make_private{}, outer)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo::Transport => webrtc::Transport - #pragma mark - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::Transport::SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) - { - return true; - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::Transport::SendRtcp(const uint8_t* packet, size_t length) - { - auto outer = mOuter.lock(); - if (!outer) return false; - return outer->SendRtcp(packet, length); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => (internal) - #pragma mark - - //------------------------------------------------------------------------- - Log::Params RTPReceiverChannelVideo::log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::RTPReceiverChannelVideo"); - IHelper::debugAppend(objectEl, "id", mID); - return Log::Params(message, objectEl); - } - - //------------------------------------------------------------------------- - Log::Params RTPReceiverChannelVideo::debug(const char *message) const - { - return Log::Params(message, toDebug()); - } - - //------------------------------------------------------------------------- - ElementPtr RTPReceiverChannelVideo::toDebug() const - { - AutoRecursiveLock lock(*this); - - ElementPtr resultEl = Element::create("ortc::RTPReceiverChannelVideo"); - - IHelper::debugAppend(resultEl, "id", mID); - - IHelper::debugAppend(resultEl, "graceful shutdown", (bool)mGracefulShutdownReference); - - IHelper::debugAppend(resultEl, "state", toString(mCurrentState)); - - IHelper::debugAppend(resultEl, "error", mLastError); - IHelper::debugAppend(resultEl, "error reason", mLastErrorReason); - - auto receiverChannel = mReceiverChannel.lock(); - IHelper::debugAppend(resultEl, "receiver channel", receiverChannel ? receiverChannel->getID() : 0); - - return resultEl; - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::isShuttingDown() const - { - return State_ShuttingDown == mCurrentState; - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::isShutdown() const - { - return State_Shutdown == mCurrentState; - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::step() - { - ZS_LOG_DEBUG(debug("step")) - - if ((isShuttingDown()) || - (isShutdown())) { - ZS_LOG_DEBUG(debug("step forwarding to cancel")) - cancel(); - return; - } - - // ... other steps here ... - if (!stepChannelPromise()) goto not_ready; - if (!stepSetupChannel()) goto not_ready; - // ... other steps here ... - - goto ready; - - not_ready: - { - ZS_LOG_TRACE(debug("not ready")) - return; - } - - ready: - { - ZS_LOG_TRACE(log("ready")) - setState(State_Ready); - } - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::stepChannelPromise() - { - if (mChannelResourceLifetimeHolderPromise) { - ZS_LOG_TRACE(log("already setup channel promise")) - return true; - } - - if (mQueuedRTP.size() < 1) { - ZS_LOG_TRACE(log("cannot setup channel promise until first packet is received")) - return false; - } - - auto packet = mQueuedRTP.front(); - - mChannelResourceLifetimeHolderPromise = UseMediaEngine::setupChannel( - mThisWeak.lock(), - mTransport, - MediaStreamTrack::convert(mTrack), - mParameters, - packet - ); - - mChannelResourceLifetimeHolderPromise->thenWeak(mThisWeak.lock()); - - return true; - } - - //------------------------------------------------------------------------- - bool RTPReceiverChannelVideo::stepSetupChannel() - { - if (mChannelResource) { - ZS_LOG_TRACE(log("already setup channel resource")) - return true; - } - - if (!mChannelResourceLifetimeHolderPromise->isSettled()) { - ZS_LOG_TRACE(log("waiting for setup channel promise to be set up")) - return false; - } - - if (mChannelResourceLifetimeHolderPromise->isRejected()) { - ZS_LOG_WARNING(Debug, log("media engine rejected channel setup")) - cancel(); - return false; - } - - mChannelResource = ZS_DYNAMIC_PTR_CAST(UseChannelResource, mChannelResourceLifetimeHolderPromise->value()); - - if (!mChannelResource) { - ZS_LOG_WARNING(Detail, log("failed to initialize channel resource")) - cancel(); - return false; - } - - ZS_LOG_DEBUG(log("media channel is setup") + ZS_PARAM("channel", mChannelResource->getID())) - - IRTPReceiverChannelVideoAsyncDelegateProxy::create(mThisWeak.lock())->onReceiverChannelVideoDeliverPackets(); - - mChannelResource->notifyTransportState(mTransportState); - - return true; - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::cancel() - { - //....................................................................... - // try to gracefully shutdown - - if (isShutdown()) return; - - setState(State_ShuttingDown); - - mQueuedRTP = RTPPacketQueue(); - mQueuedRTCP = RTCPPacketQueue(); - - if (!mGracefulShutdownReference) mGracefulShutdownReference = mThisWeak.lock(); - - if (!mCloseChannelPromise) { - if (mChannelResource) { - mCloseChannelPromise = mChannelResource->shutdown(); - mCloseChannelPromise->thenWeak(mGracefulShutdownReference); - } - } - - if (mGracefulShutdownReference) { - if (mCloseChannelPromise) { - if (!mCloseChannelPromise->isSettled()) { - ZS_LOG_DEBUG(log("waiting for close channel promise")) - return; - } - } - } - - //....................................................................... - // final cleanup - - setState(State_Shutdown); - - mChannelResourceLifetimeHolderPromise.reset(); - - mChannelResource.reset(); - mCloseChannelPromise.reset(); - - // make sure to cleanup any final reference to self - mGracefulShutdownReference.reset(); - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::setState(States state) - { - if (state == mCurrentState) return; - - ZS_LOG_DETAIL(debug("state changed") + ZS_PARAM("new state", toString(state)) + ZS_PARAM("old state", toString(mCurrentState))) - - mCurrentState = state; - -// RTPReceiverChannelVideoPtr pThis = mThisWeak.lock(); -// if (pThis) { -// mSubscriptions.delegate()->onRTPReceiverChannelVideoStateChanged(pThis, mCurrentState); -// } - } - - //------------------------------------------------------------------------- - void RTPReceiverChannelVideo::setError(WORD errorCode, const char *inReason) - { - String reason(inReason); - if (reason.isEmpty()) { - reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); - } - - if (0 != mLastError) { - ZS_LOG_WARNING(Detail, debug("error already set thus ignoring new error") + ZS_PARAM("new error", errorCode) + ZS_PARAM("new reason", reason)) - return; - } - - mLastError = errorCode; - mLastErrorReason = reason; - - ZS_LOG_WARNING(Detail, debug("error set") + ZS_PARAM("error", mLastError) + ZS_PARAM("reason", mLastErrorReason)) - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelVideoFactory - #pragma mark - - //------------------------------------------------------------------------- - IRTPReceiverChannelVideoFactory &IRTPReceiverChannelVideoFactory::singleton() - { - return RTPReceiverChannelVideoFactory::singleton(); - } - - //------------------------------------------------------------------------- - RTPReceiverChannelVideoPtr IRTPReceiverChannelVideoFactory::create( - RTPReceiverChannelPtr receiverChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - if (this) {} - return internal::RTPReceiverChannelVideo::create(receiverChannel, track, params); - } - - } // internal namespace -} diff --git a/ortc/cpp/ortc_RTPSender.cpp b/ortc/cpp/ortc_RTPSender.cpp index 47069327..b32df6a7 100644 --- a/ortc/cpp/ortc_RTPSender.cpp +++ b/ortc/cpp/ortc_RTPSender.cpp @@ -36,8 +36,6 @@ #include #include #include -#include -#include #include #include #include @@ -46,6 +44,8 @@ #include #include +#include +#include #include @@ -345,7 +345,7 @@ namespace ortc const make_private &, IMessageQueuePtr queue, IRTPSenderDelegatePtr delegate, - IMediaStreamTrackPtr track, + ortc::IMediaStreamTrackPtr track, IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport ) : @@ -483,7 +483,7 @@ namespace ortc //------------------------------------------------------------------------- RTPSenderPtr RTPSender::create( IRTPSenderDelegatePtr delegate, - IMediaStreamTrackPtr track, + ortc::IMediaStreamTrackPtr track, IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport ) @@ -526,7 +526,7 @@ namespace ortc } //------------------------------------------------------------------------- - IMediaStreamTrackPtr RTPSender::track() const + ortc::IMediaStreamTrackPtr RTPSender::track() const { AutoRecursiveLock lock(*this); return MediaStreamTrack::convert(mTrack); @@ -633,7 +633,7 @@ namespace ortc } //------------------------------------------------------------------------- - PromisePtr RTPSender::setTrack(IMediaStreamTrackPtr inTrack) + PromisePtr RTPSender::setTrack(ortc::IMediaStreamTrackPtr inTrack) { UseMediaStreamTrackPtr track = MediaStreamTrack::convert(inTrack); @@ -676,7 +676,9 @@ namespace ortc puid, trackId, mTrack->getID(), puid, channelId, channel->getID() ); +#if 0 mTrack->notifyDetachSenderChannel(RTPSenderChannel::convert(channel->mChannel)); +#endif //0 } } @@ -691,7 +693,9 @@ namespace ortc puid, trackId, mTrack->getID(), puid, channelId, channel->getID() ); +#if 0 mTrack->notifyAttachSenderChannel(RTPSenderChannel::convert(channel->mChannel)); +#endif //0 } } @@ -876,7 +880,8 @@ namespace ortc size, size, packet->buffer()->SizeInBytes() ); - ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport)) + packet->toDebug()) + ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport))) + packet->trace("received packet"); ParametersToChannelHolderMapPtr channels; @@ -1329,7 +1334,9 @@ namespace ortc puid, trackId, mTrack->getID(), puid, channelId, existingChannel->getID() ); +#if 0 mTrack->notifyDetachSenderChannel(RTPSenderChannel::convert(existingChannel->mChannel)); +#endif //0 } replacementChannels->erase(current); @@ -1559,8 +1566,9 @@ namespace ortc puid, trackId, mTrack->getID(), puid, channelId, channel->getID() ); - +#if 0 mTrack->notifyAttachSenderChannel(RTPSenderChannel::convert(channel->mChannel)); +#endif //0 } ZS_EVENTING_2( x, i, Debug, RtpSenderAddChannel, ol, RtpSender, Info, @@ -1601,7 +1609,9 @@ namespace ortc puid, trackId, mTrack->getID(), puid, channelId, channel->getID() ); +#if 0 mTrack->notifyDetachSenderChannel(RTPSenderChannel::convert(channel->mChannel)); +#endif //0 } } @@ -1666,7 +1676,7 @@ namespace ortc //------------------------------------------------------------------------- RTPSenderPtr IRTPSenderFactory::create( IRTPSenderDelegatePtr delegate, - IMediaStreamTrackPtr track, + ortc::IMediaStreamTrackPtr track, IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport ) @@ -1717,7 +1727,7 @@ namespace ortc //--------------------------------------------------------------------------- IRTPSenderPtr IRTPSender::create( IRTPSenderDelegatePtr delegate, - IMediaStreamTrackPtr track, + ortc::IMediaStreamTrackPtr track, IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport ) diff --git a/ortc/cpp/ortc_RTPSenderChannel.cpp b/ortc/cpp/ortc_RTPSenderChannel.cpp index b8303af0..e66fa717 100644 --- a/ortc/cpp/ortc_RTPSenderChannel.cpp +++ b/ortc/cpp/ortc_RTPSenderChannel.cpp @@ -30,22 +30,20 @@ */ #include -#include -#include -#include #include #include #include #include #include -#include -#include #include #include #include #include #include +#include +#include + #include #include @@ -65,6 +63,7 @@ #define ASSERT(x) #endif //_DEBUG +#if 0 namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) } @@ -1062,3 +1061,5 @@ namespace ortc } // internal namespace } + +#endif //0 diff --git a/ortc/cpp/ortc_RTPSenderChannelAudio.cpp b/ortc/cpp/ortc_RTPSenderChannelAudio.cpp deleted file mode 100644 index 99ec2778..00000000 --- a/ortc/cpp/ortc_RTPSenderChannelAudio.cpp +++ /dev/null @@ -1,939 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include - -#include - -#ifdef _DEBUG -#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) -#else -#define ASSERT(x) -#endif //_DEBUG - - -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) } - -namespace ortc -{ - ZS_DECLARE_USING_PTR(zsLib, ISettings); - - ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); - - namespace internal - { - ZS_DECLARE_CLASS_PTR(RTPSenderChannelAudioSettingsDefaults); - - ZS_DECLARE_TYPEDEF_PTR(IStatsReportForInternal, UseStatsReport); - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark (helpers) - #pragma mark - - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudioSettingsDefaults - #pragma mark - - class RTPSenderChannelAudioSettingsDefaults : public ISettingsApplyDefaultsDelegate - { - public: - //----------------------------------------------------------------------- - ~RTPSenderChannelAudioSettingsDefaults() - { - ISettings::removeDefaults(*this); - } - - //----------------------------------------------------------------------- - static RTPSenderChannelAudioSettingsDefaultsPtr singleton() - { - static SingletonLazySharedPtr singleton(create()); - return singleton.singleton(); - } - - //----------------------------------------------------------------------- - static RTPSenderChannelAudioSettingsDefaultsPtr create() - { - auto pThis(make_shared()); - ISettings::installDefaults(pThis); - return pThis; - } - - //----------------------------------------------------------------------- - virtual void notifySettingsApplyDefaults() override - { - } - - }; - - //------------------------------------------------------------------------- - void installRTPSenderChannelAudioSettingsDefaults() - { - RTPSenderChannelAudioSettingsDefaults::singleton(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelAudioForRTPSenderChannel - #pragma mark - - //------------------------------------------------------------------------- - RTPSenderChannelAudioPtr IRTPSenderChannelAudioForRTPSenderChannel::create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - return internal::IRTPSenderChannelAudioFactory::singleton().create(senderChannel, track, params); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio::ToneInfo - #pragma mark - - //------------------------------------------------------------------------- - ElementPtr RTPSenderChannelAudio::ToneInfo::toDebug() const - { - ElementPtr resultEl = Element::create("ortc::RTPSenderChannelAudio::ToneInfo"); - - IHelper::debugAppend(resultEl, "tones", mTones); - IHelper::debugAppend(resultEl, "duration", mDuration); - IHelper::debugAppend(resultEl, "inter tone gap", mInterToneGap); - - return resultEl; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio - #pragma mark - - //------------------------------------------------------------------------- - const char *RTPSenderChannelAudio::toString(States state) - { - switch (state) { - case State_Pending: return "pending"; - case State_Ready: return "ready"; - case State_ShuttingDown: return "shutting down"; - case State_Shutdown: return "shutdown"; - } - return "UNDEFINED"; - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudio::RTPSenderChannelAudio( - const make_private &, - IMessageQueuePtr queue, - UseChannelPtr senderChannel, - UseMediaStreamTrackPtr track, - const Parameters ¶ms - ) : - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()), - mSenderChannel(senderChannel), - mTrack(track), - mParameters(make_shared(params)) - { - ZS_LOG_DETAIL(debug("created")) - - ORTC_THROW_INVALID_PARAMETERS_IF(!senderChannel) - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::init() - { - TransportPtr transport = Transport::create(mThisWeak.lock()); - - PromiseWithRTPMediaEngineChannelResourcePtr setupChannelPromise = UseMediaEngine::setupChannel( - mThisWeak.lock(), - transport, - MediaStreamTrack::convert(mTrack), - mParameters, - mThisWeak.lock() - ); - { - AutoRecursiveLock lock(*this); - mChannelResourceLifetimeHolderPromise = setupChannelPromise; - mTransport = transport; - } - setupChannelPromise->thenWeak(mThisWeak.lock()); - - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudio::~RTPSenderChannelAudio() - { - if (isNoop()) return; - - ZS_LOG_DETAIL(log("destroyed")) - mThisWeak.reset(); - - cancel(); - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudioPtr RTPSenderChannelAudio::convert(ForRTPSenderChannelFromMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelAudio, object); - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudioPtr RTPSenderChannelAudio::convert(ForRTPSenderChannelPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelAudio, object); - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudioPtr RTPSenderChannelAudio::convert(ForMediaStreamTrackFromMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelAudio, object); - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudioPtr RTPSenderChannelAudio::convert(ForMediaStreamTrackPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelAudio, object); - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudioPtr RTPSenderChannelAudio::convert(ForRTPMediaEnginePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelAudio, object); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelMediaBaseForRTPSenderChannel - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::onTrackChanged(UseBaseMediaStreamTrackPtr track) - { - AutoRecursiveLock lock(*this); - mTrack = MediaStreamTrack::convert(track); // NOTE: track might be NULL -#define TODO_HANDLE_CHANGE_IN_TRACK 1 -#define TODO_HANDLE_CHANGE_IN_TRACK 2 - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::notifyTransportState(ISecureTransportTypes::States state) - { - IRTPSenderChannelAudioAsyncDelegateProxy::create(mThisWeak.lock())->onSecureTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::notifyUpdate(ParametersPtr params) - { - IRTPSenderChannelAudioAsyncDelegateProxy::create(mThisWeak.lock())->onUpdate(params); - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelAudio::handlePacket(RTCPPacketPtr packet) - { - UseChannelResourcePtr channelResource; - - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - } - - if (!channelResource) return false; - return channelResource->handlePacket(*packet); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) - { - UseChannelResourcePtr channelResource; - - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - } - - if (!channelResource) { - promise->reject(); - return; - } - return channelResource->requestStats(promise, stats); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::insertDTMF( - const char *tones, - Milliseconds duration, - Milliseconds interToneGap - ) - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - - if ((!channelResource) || - (mPendingTones.size() > 0)) { - auto info = make_shared(); - info->mTones = String(tones); - info->mDuration = duration; - info->mInterToneGap = interToneGap; - mPendingTones.push_back(info); - return; - } - } - - channelResource->insertDTMF(tones, duration, interToneGap); - } - - //------------------------------------------------------------------------- - String RTPSenderChannelAudio::toneBuffer() const - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - - if (mPendingTones.size() > 0) { - auto info = mPendingTones.front(); - return info->mTones; - } - } - - if (!channelResource) return String(); - - return channelResource->toneBuffer(); - } - - //------------------------------------------------------------------------- - Milliseconds RTPSenderChannelAudio::duration() const - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - if (mPendingTones.size() > 0) { - auto info = mPendingTones.front(); - return info->mDuration; - } - } - - if (!channelResource) return Milliseconds(); - - return channelResource->duration(); - } - - //------------------------------------------------------------------------- - Milliseconds RTPSenderChannelAudio::interToneGap() const - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - if (mPendingTones.size() > 0) { - auto info = mPendingTones.front(); - return info->mInterToneGap; - } - } - - if (!channelResource) return Milliseconds(); - - return channelResource->interToneGap(); - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelAudioForRTPSenderChannel - #pragma mark - - //------------------------------------------------------------------------- - RTPSenderChannelAudioPtr RTPSenderChannelAudio::create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - RTPSenderChannelAudioPtr pThis(make_shared(make_private {}, IORTCForInternal::queueORTC(), senderChannel, track, params)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - int32_t RTPSenderChannelAudio::sendAudioSamples( - const void* audioSamples, - const size_t numberOfSamples, - const uint8_t numberOfChannels - ) - { -#define TODO_IMPLEMENT_THIS 1 -#define TODO_IMPLEMENT_THIS 2 - return 0; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelAudioForMediaStreamTrack - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelMediaBaseForRTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IWakeDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::onWake() - { - ZS_LOG_DEBUG(log("wake")); - - ToneInfoList pending; - UseChannelResourcePtr channelResource; - - { - AutoRecursiveLock lock(*this); - step(); - - if ((mChannelResource) && - (mPendingTones.size() > 0)) { - pending = mPendingTones; - mPendingTones.clear(); - - auto tempLockoutTones = make_shared(); - tempLockoutTones->mTones = ORTC_SENDER_CHANNEL_PENDING_TONE_LOCK_OUT_MAGIC_STRING; - - mPendingTones.push_back(tempLockoutTones); - - channelResource = mChannelResource; - } - } - - if (pending.size() > 0) - { - while (pending.size() > 0) - { - ToneInfoPtr tone = pending.front(); - pending.pop_front(); - - if (0 == tone->mTones.compare(ORTC_SENDER_CHANNEL_PENDING_TONE_LOCK_OUT_MAGIC_STRING)) continue; - - channelResource->insertDTMF(tone->mTones, tone->mDuration, tone->mInterToneGap); - } - - { - AutoRecursiveLock lock(*this); - - if (mPendingTones.size() > 1) { - // NOTE: a pending tone was inserted while the current tone was - // being played out thus attempt to deliver pending tones again - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - return; - } - - // NOTE: the only possible tone in the tone buffer is the lock out - /// tone thus clear out the pending tone - mPendingTones.clear(); - } - } - } - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IWakeDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::onDTMFSenderToneChanged( - IDTMFSenderPtr sender, - String tone - ) - { - auto senderChannel = mSenderChannel.lock(); - - if (!senderChannel) { - ZS_LOG_WARNING(Debug, log("cannot foreward tone event (sender channel is gone)")); - return; - } - - senderChannel->notifyDTMFSenderToneChanged(tone); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => ITimerDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::onTimer(ITimerPtr timer) - { - ZS_LOG_DEBUG(log("timer") + ZS_PARAM("timer id", timer->getID())) - - AutoRecursiveLock lock(*this); -#define TODO 1 -#define TODO 2 - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IPromiseSettledDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::onPromiseSettled(PromisePtr promise) - { - ZS_LOG_DEBUG(log("promise settled") + ZS_PARAM("promise", promise->getID())) - - AutoRecursiveLock lock(*this); - step(); - - if (ZS_DYNAMIC_PTR_CAST(PromiseWithRTPMediaEngineChannelResource, promise)) { - } - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelAudioAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::onSecureTransportState(ISecureTransport::States state) - { - ZS_LOG_TRACE(log("notified secure transport state") + ZS_PARAM("state", ISecureTransport::toString(state))) - - AutoRecursiveLock lock(*this); - - mTransportState = state; - - if (mChannelResource) - mChannelResource->notifyTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::onUpdate(ParametersPtr params) - { - ZS_LOG_TRACE(log("on update") + params->toDebug()) - - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - mParameters = make_shared(*params); - channelResource = mChannelResource; - } - - if (channelResource) - channelResource->notifyUpdate(params); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => friend Transport - #pragma mark - - //------------------------------------------------------------------------- - bool RTPSenderChannelAudio::SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) - { - auto channel = mSenderChannel.lock(); - if (!channel) return false; - return channel->sendPacket(RTPPacket::create(packet, length)); - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelAudio::SendRtcp(const uint8_t* packet, size_t length) - { - auto channel = mSenderChannel.lock(); - if (!channel) return false; - return channel->sendPacket(RTCPPacket::create(packet, length)); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio::Transport - #pragma mark - - //------------------------------------------------------------------------- - RTPSenderChannelAudio::Transport::Transport( - const make_private &, - RTPSenderChannelAudioPtr outer - ) : - mOuter(outer) - { - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudio::Transport::~Transport() - { - mThisWeak.reset(); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::Transport::init() - { - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudio::TransportPtr RTPSenderChannelAudio::Transport::create(RTPSenderChannelAudioPtr outer) - { - TransportPtr pThis(make_shared(make_private{}, outer)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio::Transport => webrtc::Transport - #pragma mark - - //------------------------------------------------------------------------- - bool RTPSenderChannelAudio::Transport::SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) - { - auto outer = mOuter.lock(); - if (!outer) return false; - return outer->SendRtp(packet, length, options); - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelAudio::Transport::SendRtcp(const uint8_t* packet, size_t length) - { - auto outer = mOuter.lock(); - if (!outer) return false; - return outer->SendRtcp(packet, length); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => (internal) - #pragma mark - - //------------------------------------------------------------------------- - Log::Params RTPSenderChannelAudio::log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::RTPSenderChannelAudio"); - IHelper::debugAppend(objectEl, "id", mID); - return Log::Params(message, objectEl); - } - - //------------------------------------------------------------------------- - Log::Params RTPSenderChannelAudio::debug(const char *message) const - { - return Log::Params(message, toDebug()); - } - - //------------------------------------------------------------------------- - ElementPtr RTPSenderChannelAudio::toDebug() const - { - AutoRecursiveLock lock(*this); - - ElementPtr resultEl = Element::create("ortc::RTPSenderChannelAudio"); - - IHelper::debugAppend(resultEl, "id", mID); - - IHelper::debugAppend(resultEl, "graceful shutdown", (bool)mGracefulShutdownReference); - - IHelper::debugAppend(resultEl, "state", toString(mCurrentState)); - - IHelper::debugAppend(resultEl, "error", mLastError); - IHelper::debugAppend(resultEl, "error reason", mLastErrorReason); - - auto senderChannel = mSenderChannel.lock(); - IHelper::debugAppend(resultEl, "sender channel", senderChannel ? senderChannel->getID() : 0); - - return resultEl; - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelAudio::isShuttingDown() const - { - return State_ShuttingDown == mCurrentState; - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelAudio::isShutdown() const - { - return State_Shutdown == mCurrentState; - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::step() - { - ZS_LOG_DEBUG(debug("step")) - - if ((isShuttingDown()) || - (isShutdown())) { - ZS_LOG_DEBUG(debug("step forwarding to cancel")) - cancel(); - return; - } - - // ... other steps here ... - if (!stepSetupChannel()) goto not_ready; - // ... other steps here ... - - goto ready; - - not_ready: - { - ZS_LOG_TRACE(debug("not ready")) - return; - } - - ready: - { - ZS_LOG_TRACE(log("ready")) - setState(State_Ready); - } - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelAudio::stepSetupChannel() - { - if (mChannelResource) { - ZS_LOG_TRACE(log("already setup channel resource")) - return true; - } - - if (!mChannelResourceLifetimeHolderPromise->isSettled()) { - ZS_LOG_TRACE(log("waiting for setup channel promise to be set up")) - return false; - } - - if (mChannelResourceLifetimeHolderPromise->isRejected()) { - ZS_LOG_WARNING(Debug, log("media engine rejected channel setup")) - cancel(); - return false; - } - - mChannelResource = ZS_DYNAMIC_PTR_CAST(UseChannelResource, mChannelResourceLifetimeHolderPromise->value()); - - if (!mChannelResource) { - ZS_LOG_WARNING(Detail, log("failed to initialize channel resource")) - cancel(); - return false; - } - - ZS_LOG_DEBUG(log("media channel is setup") + ZS_PARAM("channel", mChannelResource->getID())) - - mChannelResource->notifyTransportState(mTransportState); - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - return true; - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::cancel() - { - //....................................................................... - // try to gracefully shutdown - - if (isShutdown()) return; - - setState(State_ShuttingDown); - - if (!mGracefulShutdownReference) mGracefulShutdownReference = mThisWeak.lock(); - - if (!mCloseChannelPromise) { - if (mChannelResource) { - mCloseChannelPromise = mChannelResource->shutdown(); - mCloseChannelPromise->thenWeak(mGracefulShutdownReference); - } - } - - if (mGracefulShutdownReference) { - if (mCloseChannelPromise) { - if (!mCloseChannelPromise->isSettled()) { - ZS_LOG_DEBUG(log("waiting for close channel promise")) - return; - } - } - } - - //....................................................................... - // final cleanup - - setState(State_Shutdown); - - mChannelResourceLifetimeHolderPromise.reset(); - - mChannelResource.reset(); - mCloseChannelPromise.reset(); - - // make sure to cleanup any final reference to self - mGracefulShutdownReference.reset(); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::setState(States state) - { - if (state == mCurrentState) return; - - ZS_LOG_DETAIL(debug("state changed") + ZS_PARAM("new state", toString(state)) + ZS_PARAM("old state", toString(mCurrentState))) - - mCurrentState = state; - -// RTPSenderChannelAudioPtr pThis = mThisWeak.lock(); -// if (pThis) { -// mSubscriptions.delegate()->onRTPSenderChannelAudioStateChanged(pThis, mCurrentState); -// } - } - - //------------------------------------------------------------------------- - void RTPSenderChannelAudio::setError(WORD errorCode, const char *inReason) - { - String reason(inReason); - if (reason.isEmpty()) { - reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); - } - - if (0 != mLastError) { - ZS_LOG_WARNING(Detail, debug("error already set thus ignoring new error") + ZS_PARAM("new error", errorCode) + ZS_PARAM("new reason", reason)) - return; - } - - mLastError = errorCode; - mLastErrorReason = reason; - - ZS_LOG_WARNING(Detail, debug("error set") + ZS_PARAM("error", mLastError) + ZS_PARAM("reason", mLastErrorReason)) - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelAudioFactory - #pragma mark - - //------------------------------------------------------------------------- - IRTPSenderChannelAudioFactory &IRTPSenderChannelAudioFactory::singleton() - { - return RTPSenderChannelAudioFactory::singleton(); - } - - //------------------------------------------------------------------------- - RTPSenderChannelAudioPtr IRTPSenderChannelAudioFactory::create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - if (this) {} - return internal::RTPSenderChannelAudio::create(senderChannel, track, params); - } - - } // internal namespace - -} diff --git a/ortc/cpp/ortc_RTPSenderChannelVideo.cpp b/ortc/cpp/ortc_RTPSenderChannelVideo.cpp deleted file mode 100644 index a74c1ac3..00000000 --- a/ortc/cpp/ortc_RTPSenderChannelVideo.cpp +++ /dev/null @@ -1,763 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#ifdef _DEBUG -#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) -#else -#define ASSERT(x) -#endif //_DEBUG - - -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) } - -namespace ortc -{ - ZS_DECLARE_USING_PTR(zsLib, ISettings); - ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); - - namespace internal - { - ZS_DECLARE_CLASS_PTR(RTPSenderChannelVideoSettingsDefaults); - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark (helpers) - #pragma mark - - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideoSettingsDefaults - #pragma mark - - class RTPSenderChannelVideoSettingsDefaults : public ISettingsApplyDefaultsDelegate - { - public: - //----------------------------------------------------------------------- - ~RTPSenderChannelVideoSettingsDefaults() - { - ISettings::removeDefaults(*this); - } - - //----------------------------------------------------------------------- - static RTPSenderChannelVideoSettingsDefaultsPtr singleton() - { - static SingletonLazySharedPtr singleton(create()); - return singleton.singleton(); - } - - //----------------------------------------------------------------------- - static RTPSenderChannelVideoSettingsDefaultsPtr create() - { - auto pThis(make_shared()); - ISettings::installDefaults(pThis); - return pThis; - } - - //----------------------------------------------------------------------- - virtual void notifySettingsApplyDefaults() override - { - // ISettings::setUInt(ORTC_SETTING_RTP_SENDER_CHANNEL_VIDEO_, 0); - } - - }; - - //------------------------------------------------------------------------- - void installRTPSenderChannelVideoSettingsDefaults() - { - RTPSenderChannelVideoSettingsDefaults::singleton(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelVideoForRTPSenderChannel - #pragma mark - - //------------------------------------------------------------------------- - RTPSenderChannelVideoPtr IRTPSenderChannelVideoForRTPSenderChannel::create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - return internal::IRTPSenderChannelVideoFactory::singleton().create(senderChannel, track, params); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo - #pragma mark - - //------------------------------------------------------------------------- - const char *RTPSenderChannelVideo::toString(States state) - { - switch (state) { - case State_Pending: return "pending"; - case State_Ready: return "ready"; - case State_ShuttingDown: return "shutting down"; - case State_Shutdown: return "shutdown"; - } - return "UNDEFINED"; - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideo::RTPSenderChannelVideo( - const make_private &, - IMessageQueuePtr queue, - UseChannelPtr senderChannel, - UseMediaStreamTrackPtr track, - const Parameters ¶ms - ) : - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()), - mSenderChannel(senderChannel), - mTrack(track), - mParameters(make_shared(params)) - { - ZS_LOG_DETAIL(debug("created")) - - ORTC_THROW_INVALID_PARAMETERS_IF(!senderChannel) - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::init() - { - TransportPtr transport = Transport::create(mThisWeak.lock()); - - PromiseWithRTPMediaEngineChannelResourcePtr setupChannelPromise = UseMediaEngine::setupChannel( - mThisWeak.lock(), - transport, - MediaStreamTrack::convert(mTrack), - mParameters, - IDTMFSenderDelegatePtr() - ); - { - AutoRecursiveLock lock(*this); - mChannelResourceLifetimeHolderPromise = setupChannelPromise; - mTransport = transport; - } - - setupChannelPromise->thenWeak(mThisWeak.lock()); - - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideo::~RTPSenderChannelVideo() - { - if (isNoop()) return; - - ZS_LOG_DETAIL(log("destroyed")) - mThisWeak.reset(); - - cancel(); - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideoPtr RTPSenderChannelVideo::convert(ForRTPSenderChannelFromMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideoPtr RTPSenderChannelVideo::convert(ForRTPSenderChannelPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideoPtr RTPSenderChannelVideo::convert(ForMediaStreamTrackFromMediaBasePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideoPtr RTPSenderChannelVideo::convert(ForMediaStreamTrackPtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelVideo, object); - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideoPtr RTPSenderChannelVideo::convert(ForRTPMediaEnginePtr object) - { - return ZS_DYNAMIC_PTR_CAST(RTPSenderChannelVideo, object); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelMediaBaseForRTPSenderChannel - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::onTrackChanged(UseBaseMediaStreamTrackPtr track) - { - AutoRecursiveLock lock(*this); - mTrack = MediaStreamTrack::convert(track); // NOTE: track might be NULL -#define TODO_HANDLE_CHANGE_IN_TRACK 1 -#define TODO_HANDLE_CHANGE_IN_TRACK 2 - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::notifyTransportState(ISecureTransportTypes::States state) - { - IRTPSenderChannelVideoAsyncDelegateProxy::create(mThisWeak.lock())->onSecureTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::notifyUpdate(ParametersPtr params) - { - IRTPSenderChannelVideoAsyncDelegateProxy::create(mThisWeak.lock())->onUpdate(params); - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelVideo::handlePacket(RTCPPacketPtr packet) - { - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - } - - if (!channelResource) return true; - return channelResource->handlePacket(*packet); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) - { - UseChannelResourcePtr channelResource; - - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - } - - if (!channelResource) { - promise->reject(); - return; - } - return channelResource->requestStats(promise, stats); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelVideoForRTPSenderChannel - #pragma mark - - //------------------------------------------------------------------------- - RTPSenderChannelVideoPtr RTPSenderChannelVideo::create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - RTPSenderChannelVideoPtr pThis(make_shared(make_private {}, IORTCForInternal::queueORTC(), senderChannel, track, params)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelVideoForMediaStreamTrack - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::sendVideoFrame(VideoFramePtr videoFrame) - { - UseChannelResourcePtr channelResource; - - { - AutoRecursiveLock lock(*this); - channelResource = mChannelResource; - } - - if (!channelResource) return; - channelResource->sendVideoFrame(videoFrame); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelMediaBaseForRTPMediaEngine - #pragma mark - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IWakeDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::onWake() - { - ZS_LOG_DEBUG(log("wake")) - - AutoRecursiveLock lock(*this); - step(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => ITimerDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::onTimer(ITimerPtr timer) - { - ZS_LOG_DEBUG(log("timer") + ZS_PARAM("timer id", timer->getID())) - - AutoRecursiveLock lock(*this); -#define TODO 1 -#define TODO 2 - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IPromiseSettledDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::onPromiseSettled(PromisePtr promise) - { - ZS_LOG_DEBUG(log("promise settled") + ZS_PARAM("promise", promise->getID())) - - AutoRecursiveLock lock(*this); - step(); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelVideoAsyncDelegate - #pragma mark - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::onSecureTransportState(ISecureTransport::States state) - { - ZS_LOG_TRACE(log("notified secure transport state") + ZS_PARAM("state", ISecureTransport::toString(state))) - - AutoRecursiveLock lock(*this); - - mTransportState = state; - - if (mChannelResource) - mChannelResource->notifyTransportState(state); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::onUpdate(ParametersPtr params) - { - ZS_LOG_TRACE(log("on update") + params->toDebug()) - - UseChannelResourcePtr channelResource; - { - AutoRecursiveLock lock(*this); - mParameters = make_shared(*params); - channelResource = mChannelResource; - } - - if (channelResource) - channelResource->notifyUpdate(params); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => friend Transport - #pragma mark - - //------------------------------------------------------------------------- - bool RTPSenderChannelVideo::SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) - { - auto channel = mSenderChannel.lock(); - if (!channel) return false; - return channel->sendPacket(RTPPacket::create(packet, length)); - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelVideo::SendRtcp(const uint8_t* packet, size_t length) - { - auto channel = mSenderChannel.lock(); - if (!channel) return false; - return channel->sendPacket(RTCPPacket::create(packet, length)); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo::Transport - #pragma mark - - //------------------------------------------------------------------------- - RTPSenderChannelVideo::Transport::Transport( - const make_private &, - RTPSenderChannelVideoPtr outer - ) : - mOuter(outer) - { - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideo::Transport::~Transport() - { - mThisWeak.reset(); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::Transport::init() - { - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideo::TransportPtr RTPSenderChannelVideo::Transport::create(RTPSenderChannelVideoPtr outer) - { - TransportPtr pThis(make_shared(make_private{}, outer)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo::Transport => webrtc::Transport - #pragma mark - - //------------------------------------------------------------------------- - bool RTPSenderChannelVideo::Transport::SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) - { - auto outer = mOuter.lock(); - if (!outer) return false; - return outer->SendRtp(packet, length, options); - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelVideo::Transport::SendRtcp(const uint8_t* packet, size_t length) - { - auto outer = mOuter.lock(); - if (!outer) return false; - return outer->SendRtcp(packet, length); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => (internal) - #pragma mark - - //------------------------------------------------------------------------- - Log::Params RTPSenderChannelVideo::log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::RTPSenderChannelVideo"); - IHelper::debugAppend(objectEl, "id", mID); - return Log::Params(message, objectEl); - } - - //------------------------------------------------------------------------- - Log::Params RTPSenderChannelVideo::debug(const char *message) const - { - return Log::Params(message, toDebug()); - } - - //------------------------------------------------------------------------- - ElementPtr RTPSenderChannelVideo::toDebug() const - { - AutoRecursiveLock lock(*this); - - ElementPtr resultEl = Element::create("ortc::RTPSenderChannelVideo"); - - IHelper::debugAppend(resultEl, "id", mID); - - IHelper::debugAppend(resultEl, "graceful shutdown", (bool)mGracefulShutdownReference); - - IHelper::debugAppend(resultEl, "state", toString(mCurrentState)); - - IHelper::debugAppend(resultEl, "error", mLastError); - IHelper::debugAppend(resultEl, "error reason", mLastErrorReason); - - auto senderChannel = mSenderChannel.lock(); - IHelper::debugAppend(resultEl, "sender channel", senderChannel ? senderChannel->getID() : 0); - - return resultEl; - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelVideo::isShuttingDown() const - { - return State_ShuttingDown == mCurrentState; - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelVideo::isShutdown() const - { - return State_Shutdown == mCurrentState; - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::step() - { - ZS_LOG_DEBUG(debug("step")) - - if ((isShuttingDown()) || - (isShutdown())) { - ZS_LOG_DEBUG(debug("step forwarding to cancel")) - cancel(); - return; - } - - // ... other steps here ... - if (!stepSetupChannel()) goto not_ready; - // ... other steps here ... - - goto ready; - - not_ready: - { - ZS_LOG_TRACE(debug("not ready")) - return; - } - - ready: - { - ZS_LOG_TRACE(log("ready")) - setState(State_Ready); - } - } - - //------------------------------------------------------------------------- - bool RTPSenderChannelVideo::stepSetupChannel() - { - if (mChannelResource) { - ZS_LOG_TRACE(log("already setup channel resource")) - return true; - } - - if (!mChannelResourceLifetimeHolderPromise->isSettled()) { - ZS_LOG_TRACE(log("waiting for setup channel promise to be set up")) - return false; - } - - if (mChannelResourceLifetimeHolderPromise->isRejected()) { - ZS_LOG_WARNING(Debug, log("media engine rejected channel setup")) - cancel(); - return false; - } - - mChannelResource = ZS_DYNAMIC_PTR_CAST(UseChannelResource, mChannelResourceLifetimeHolderPromise->value()); - - if (!mChannelResource) { - ZS_LOG_WARNING(Detail, log("failed to initialize channel resource")) - cancel(); - return false; - } - - ZS_LOG_DEBUG(log("media channel is setup") + ZS_PARAM("channel", mChannelResource->getID())) - - mChannelResource->notifyTransportState(mTransportState); - - return true; - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::cancel() - { - //....................................................................... - // try to gracefully shutdown - - if (isShutdown()) return; - - setState(State_ShuttingDown); - - if (!mGracefulShutdownReference) mGracefulShutdownReference = mThisWeak.lock(); - - if (!mCloseChannelPromise) { - if (mChannelResource) { - mCloseChannelPromise = mChannelResource->shutdown(); - mCloseChannelPromise->thenWeak(mGracefulShutdownReference); - } - } - - if (mGracefulShutdownReference) { - if (mCloseChannelPromise) { - if (!mCloseChannelPromise->isSettled()) { - ZS_LOG_DEBUG(log("waiting for close channel promise")) - return; - } - } - } - - //....................................................................... - // final cleanup - - setState(State_Shutdown); - - mChannelResourceLifetimeHolderPromise.reset(); - - mChannelResource.reset(); - mCloseChannelPromise.reset(); - - // make sure to cleanup any final reference to self - mGracefulShutdownReference.reset(); - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::setState(States state) - { - if (state == mCurrentState) return; - - ZS_LOG_DETAIL(debug("state changed") + ZS_PARAM("new state", toString(state)) + ZS_PARAM("old state", toString(mCurrentState))) - - mCurrentState = state; - -// RTPSenderChannelVideoPtr pThis = mThisWeak.lock(); -// if (pThis) { -// mSubscriptions.delegate()->onRTPSenderChannelVideoStateChanged(pThis, mCurrentState); -// } - } - - //------------------------------------------------------------------------- - void RTPSenderChannelVideo::setError(WORD errorCode, const char *inReason) - { - String reason(inReason); - if (reason.isEmpty()) { - reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); - } - - if (0 != mLastError) { - ZS_LOG_WARNING(Detail, debug("error already set thus ignoring new error") + ZS_PARAM("new error", errorCode) + ZS_PARAM("new reason", reason)) - return; - } - - mLastError = errorCode; - mLastErrorReason = reason; - - ZS_LOG_WARNING(Detail, debug("error set") + ZS_PARAM("error", mLastError) + ZS_PARAM("reason", mLastErrorReason)) - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelVideoFactory - #pragma mark - - //------------------------------------------------------------------------- - IRTPSenderChannelVideoFactory &IRTPSenderChannelVideoFactory::singleton() - { - return RTPSenderChannelVideoFactory::singleton(); - } - - //------------------------------------------------------------------------- - RTPSenderChannelVideoPtr IRTPSenderChannelVideoFactory::create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ) - { - if (this) {} - return internal::RTPSenderChannelVideo::create(senderChannel, track, params); - } - - } // internal namespace - -} diff --git a/ortc/cpp/ortc_RTPTypes.cpp b/ortc/cpp/ortc_RTPTypes.cpp index dad6a724..b403e94e 100644 --- a/ortc/cpp/ortc_RTPTypes.cpp +++ b/ortc/cpp/ortc_RTPTypes.cpp @@ -33,11 +33,11 @@ #include #include #include -#include #include #include #include +#include #include diff --git a/ortc/internal/ortc.h b/ortc/internal/ortc.h index 9251f503..d68dee8d 100644 --- a/ortc/internal/ortc.h +++ b/ortc/internal/ortc.h @@ -42,21 +42,33 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include -#include #include #include -#include -#include -#include #include #include -#include -#include -#include #include -#include #include -#include #include diff --git a/ortc/cpp/ortc_RTPReceiverChannelMediaBase.cpp b/ortc/internal/ortc_IMediaDevice.h similarity index 54% rename from ortc/cpp/ortc_RTPReceiverChannelMediaBase.cpp rename to ortc/internal/ortc_IMediaDevice.h index 44986233..a5ef5469 100644 --- a/ortc/cpp/ortc_RTPReceiverChannelMediaBase.cpp +++ b/ortc/internal/ortc_IMediaDevice.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29,42 +29,19 @@ */ -#include -#include -#include -#include -#include +#pragma once -//#include -//#include -//#include +#include -//#include -//#include -//#include - -//#include - - -#ifdef _DEBUG -#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) -#else -#define ASSERT(x) -#endif //_DEBUG - - -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpreceiver) } +#include namespace ortc { -// ZS_DECLARE_TYPEDEF_PTR(ortc::services::ISettings, UseSettings) -// ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHelper, UseServicesHelper) -// ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP) -// -// typedef ortc::services::Hasher SHA1Hasher; - namespace internal { + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceForMediaEngine); + + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -73,59 +50,64 @@ namespace ortc #pragma mark (helpers) #pragma mark + IMediaStreamTrackTypes::SettingsPtr obtainBestMode( + const std::list &allConstraints, + const std::list &availableModes + ); //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark IRTPReceiverChannelVideoForRTPReceiverChannel + #pragma mark IMediaDevice #pragma mark - //------------------------------------------------------------------------- - ElementPtr IRTPReceiverChannelMediaBaseForRTPReceiverChannel::toDebug(ForRTPReceiverChannelPtr object) + interaction IMediaDevice { - if (!object) return ElementPtr(); + typedef PUID MediaDeviceObjectID; + enum States { - auto pThis = RTPReceiverChannelAudio::convert(object); - if (pThis) return pThis->toDebug(); - } + State_First, - { - auto pThis = RTPReceiverChannelVideo::convert(object); - if (pThis) return pThis->toDebug(); - } + State_Pending = State_First, + State_Active, + State_Reinitializing, + State_ShuttingDown, + State_Shutdown, - return ElementPtr(); - } + State_Last = State_Shutdown, + }; - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- + static const char *toString(States state); + + virtual MediaDeviceObjectID getID() const = 0; + virtual void cancel() = 0; + + virtual States getState() const = 0; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- #pragma mark - #pragma mark IRTPReceiverChannelVideoForMediaStreamTrack + #pragma mark IMediaDeviceForMediaEngine #pragma mark - //------------------------------------------------------------------------- - ElementPtr IRTPReceiverChannelMediaBaseForMediaStreamTrack::toDebug(ForMediaStreamTrackPtr object) + interaction IMediaDeviceForMediaEngine { - if (!object) return ElementPtr(); - - { - auto pThis = RTPReceiverChannelAudio::convert(object); - if (pThis) return pThis->toDebug(); - } - - { - auto pThis = RTPReceiverChannelVideo::convert(object); - if (pThis) return pThis->toDebug(); - } + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceForMediaEngine, ForMediaEngine); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::States, States); - return ElementPtr(); - } + virtual bool isDeviceIdle() = 0; + virtual void shutdown() = 0; + virtual States getState() const = 0; + bool isShuttingDown() const { return IMediaDevice::State_ShuttingDown == getState(); } + bool isShutdown() const { return IMediaDevice::State_Shutdown == getState(); } + }; - } // internal namespace + } } diff --git a/ortc/internal/ortc_IMediaDeviceCapture.h b/ortc/internal/ortc_IMediaDeviceCapture.h new file mode 100644 index 00000000..8be20cde --- /dev/null +++ b/ortc/internal/ortc_IMediaDeviceCapture.h @@ -0,0 +1,242 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include + +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCaptureForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCaptureAudioForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCaptureVideoForMediaEngine); + + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDevice); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceCapture); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceCaptureAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceCaptureVideo); + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCapture + #pragma mark + + interaction IMediaDeviceCapture : public IMediaDevice + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + + typedef zsLib::PromiseWithHolderPtr MediaDeviceCapturePromise; + ZS_DECLARE_PTR(MediaDeviceCapturePromise); + + static MediaDeviceCapturePromisePtr create( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ); + + virtual ~IMediaDeviceCapture() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureDelegate + #pragma mark + + interaction IMediaDeviceCaptureDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::States, States); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + virtual void notifyMediaDeviceCaptureAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void notifyMediaDeviceCaptureVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) = 0; + virtual void onMediaDeviceCaptureStateChanged( + IMediaDeviceCapturePtr device, + States state + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureSubscription + #pragma mark + + interaction IMediaDeviceCaptureSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureAudio + #pragma mark + + interaction IMediaDeviceCaptureAudio : public IMediaDeviceCapture + { + virtual ~IMediaDeviceCaptureAudio() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureVideo + #pragma mark + + interaction IMediaDeviceCaptureVideo : public IMediaDeviceCapture + { + virtual ~IMediaDeviceCaptureVideo() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureForMediaEngine + #pragma mark + + interaction IMediaDeviceCaptureForMediaEngine : public IMediaDeviceForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceCaptureForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::MediaDeviceObjectID, MediaDeviceObjectID); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + + typedef zsLib::PromiseWithHolderPtr MediaDeviceCapturePromise; + ZS_DECLARE_PTR(MediaDeviceCapturePromise); + + virtual void mediaDeviceCaptureSubscribe( + MediaDeviceCapturePromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) = 0; + }; + + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureAudioForMediaEngine + #pragma mark + + interaction IMediaDeviceCaptureAudioForMediaEngine : public IMediaDeviceCaptureForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceCaptureAudioForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceCaptureAudio, UseMediaEngine); + + static ForMediaEnginePtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + }; + + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureVideoForMediaEngine + #pragma mark + + interaction IMediaDeviceCaptureVideoForMediaEngine : public IMediaDeviceCaptureForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceCaptureVideoForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceCaptureVideo, UseMediaEngine); + + static ForMediaEnginePtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + }; + } +} + +ZS_DECLARE_PROXY_BEGIN(ortc::internal::IMediaDeviceCaptureDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IMediaDeviceCapturePtr, IMediaDeviceCapturePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IMediaDevice::States, States) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyMediaDeviceCaptureAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyMediaDeviceCaptureVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaDeviceCaptureStateChanged, IMediaDeviceCapturePtr, States) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::internal::IMediaDeviceCaptureDelegate, ortc::internal::IMediaDeviceCaptureSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IMediaDeviceCapturePtr, IMediaDeviceCapturePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IMediaDevice::States, States) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyMediaDeviceCaptureAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyMediaDeviceCaptureVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaDeviceCaptureStateChanged, IMediaDeviceCapturePtr, States) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() diff --git a/ortc/internal/ortc_IMediaDeviceRender.h b/ortc/internal/ortc_IMediaDeviceRender.h new file mode 100644 index 00000000..2aff982e --- /dev/null +++ b/ortc/internal/ortc_IMediaDeviceRender.h @@ -0,0 +1,209 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include + +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceRenderForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceRenderAudioForMediaEngine); + + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDevice); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceRender); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceRenderAudio); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRender + #pragma mark + + interaction IMediaDeviceRender : public IMediaDevice + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceRender, ForMediaStreamTrack); + + typedef IMediaStreamTrackTypes::MediaChannelID MediaChannelID; + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::MediaDeviceObjectID, MediaDeviceObjectID); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + typedef zsLib::PromiseWithHolderPtr MediaDeviceRenderPromise; + ZS_DECLARE_PTR(MediaDeviceRenderPromise); + + static MediaDeviceRenderPromisePtr create( + MediaDeviceObjectID repaceExistingDeviceObjectID, + const TrackConstraints &constraints, + IMediaDeviceRenderDelegatePtr delegate + ); + + virtual void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void notifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) = 0; + + virtual ~IMediaDeviceRender() {} + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRenderAudio + #pragma mark + + interaction IMediaDeviceRenderAudio : public IMediaDeviceRender + { + virtual void notifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override {} // ignored + + virtual ~IMediaDeviceRenderAudio(); + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRenderDelegate + #pragma mark + + interaction IMediaDeviceRenderDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::States, States); + + virtual void onMediaDeviceRenderStateChanged( + IMediaDeviceRenderPtr device, + States state + ) = 0; + + virtual ~IMediaDeviceRenderDelegate() {} + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRenderSubscription + #pragma mark + + interaction IMediaDeviceRenderSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRenderForMediaEngine + #pragma mark + + interaction IMediaDeviceRenderForMediaEngine : public IMediaDeviceForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceRenderForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::MediaDeviceObjectID, MediaDeviceObjectID); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + + typedef zsLib::PromiseWithHolderPtr MediaDeviceRenderPromise; + ZS_DECLARE_PTR(MediaDeviceRenderPromise); + + virtual void mediaDeviceRenderSubscribe( + MediaDeviceRenderPromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceRenderDelegatePtr delegate + ) = 0; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRenderAudioForMediaEngine + #pragma mark + + interaction IMediaDeviceRenderAudioForMediaEngine : public IMediaDeviceRenderForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceRenderAudioForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceRenderAudio, UseMediaEngine); + + static ForMediaEnginePtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + }; + + } +} + + +ZS_DECLARE_PROXY_BEGIN(ortc::internal::IMediaDeviceRenderDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IMediaDeviceRenderPtr, IMediaDeviceRenderPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IMediaDevice::States, States) +ZS_DECLARE_PROXY_METHOD_2(onMediaDeviceRenderStateChanged, IMediaDeviceRenderPtr, States) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::internal::IMediaDeviceRenderDelegate, ortc::internal::IMediaDeviceRenderSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IMediaDeviceRenderPtr, IMediaDeviceRenderPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IMediaDevice::States, States) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaDeviceRenderStateChanged, IMediaDeviceRenderPtr, States) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() diff --git a/ortc/internal/ortc_IMediaStreamTrack.h b/ortc/internal/ortc_IMediaStreamTrack.h new file mode 100644 index 00000000..0e7a7c71 --- /dev/null +++ b/ortc/internal/ortc_IMediaStreamTrack.h @@ -0,0 +1,277 @@ +/* + + Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrack); + ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackRTPDelegate); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackRTPSubscription); + + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForMediaStreamTrackChannel); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForMediaStreamTrackSubscriber); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForMediaStreamTrackSubscriberMedia); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForMediaStreamTrackSubscriberRTP); + + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelForMediaStreamTrack); + + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackSubscriberForMediaStreamTrack); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackSubscriberMediaForMediaStreamTrack); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackSubscriberRTPForMediaStreamTrack); + + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiver); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannel); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSender); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannel); + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrack + #pragma mark + + interaction IMediaStreamTrack : public ortc::IMediaStreamTrack + { + // WARNING: extreme caution must be done not to cause a deadlock or delaying media by blocking. Gather information + // needed within a lock but do any operations outside a lock as fast as possible. + virtual IMediaStreamTrackRTPSubscriptionPtr subscribeRTP( + const Parameters &rtpEncodingParams, + IMediaStreamTrackRTPDelegatePtr delegate + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackRTPDelegate + #pragma mark + + interaction IMediaStreamTrackRTPDelegate : public IMediaStreamTrackDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + + virtual void notifyMediaStreamTrackRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) = 0; + virtual void notifyMediaStreamTrackRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackRTPSubscription + #pragma mark + + interaction IMediaStreamTrackRTPSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForMediaStreamTrackChannel + #pragma mark + + interaction IMediaStreamTrackForMediaStreamTrackChannel + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackChannel, ForMediaStreamTrackChannel); + + virtual ~IMediaStreamTrackForMediaStreamTrackChannel(); + }; + + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForMediaStreamTrackSubscriber + #pragma mark + + interaction IMediaStreamTrackForMediaStreamTrackSubscriber + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackSubscriber, ForMediaStreamTrackSubscriber); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberForMediaStreamTrack, UseSubscriber); + + virtual void notifySubscriberCancelled(UseSubscriberPtr subscriber) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForMediaStreamTrackSubscriberMedia + #pragma mark + + interaction IMediaStreamTrackForMediaStreamTrackSubscriberMedia : public IMediaStreamTrackForMediaStreamTrackSubscriber + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackSubscriberMedia, ForMediaStreamTrackSubscriberMedia); + + virtual ~IMediaStreamTrackForMediaStreamTrackSubscriberMedia(); + }; + + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForMediaStreamTrackSubscriberRTP + #pragma mark + + interaction IMediaStreamTrackForMediaStreamTrackSubscriberRTP : public IMediaStreamTrackForMediaStreamTrackSubscriber + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackSubscriberRTP, ForMediaStreamTrackSubscriberRTP); + + virtual ~IMediaStreamTrackForMediaStreamTrackSubscriberRTP(); + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForRTPReceiver + #pragma mark + + interaction IMediaStreamTrackForRTPReceiver + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiver, ForReceiver); + + virtual PUID getID() const = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForRTPReceiverChannel + #pragma mark + + interaction IMediaStreamTrackForRTPReceiverChannel + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiverChannel, ForReceiverChannel); + + typedef IMediaStreamTrackTypes::Kinds Kinds; + + virtual PUID getID() const = 0; + virtual Kinds kind() const = 0; + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForRTPSender + #pragma mark + + interaction IMediaStreamTrackForRTPSender + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSender, ForSender); + + typedef IMediaStreamTrackTypes::Kinds Kinds; + + virtual PUID getID() const = 0; + virtual Kinds kind() const = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForRTPSenderChannel + #pragma mark + + interaction IMediaStreamTrackForRTPSenderChannel + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannel, ForSenderChannel); + + virtual PUID getID() const = 0; + }; + + } +} + +ZS_DECLARE_PROXY_BEGIN(ortc::internal::IMediaStreamTrackRTPDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::OverconstrainedErrorPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::RTPPacketPtr, RTPPacketPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::RTCPPacketPtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +ZS_DECLARE_PROXY_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyMediaStreamTrackRTPPacket, ImmutableMediaChannelTracePtr, RTPPacketPtr) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyMediaStreamTrackRTCPPacket, ImmutableMediaChannelTracePtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::internal::IMediaStreamTrackRTPDelegate, ortc::internal::IMediaStreamTrackRTPSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::OverconstrainedErrorPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::RTPPacketPtr, RTPPacketPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::RTCPPacketPtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_1(onMediaStreamTrackEnded, IMediaStreamTrackPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackOverConstrained, IMediaStreamTrackPtr, OverconstrainedErrorPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyMediaStreamTrackRTPPacket, ImmutableMediaChannelTracePtr, RTPPacketPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyMediaStreamTrackRTCPPacket, ImmutableMediaChannelTracePtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() diff --git a/ortc/internal/ortc_IMediaStreamTrackChannel.h b/ortc/internal/ortc_IMediaStreamTrackChannel.h new file mode 100644 index 00000000..224ea843 --- /dev/null +++ b/ortc/internal/ortc_IMediaStreamTrackChannel.h @@ -0,0 +1,231 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelDelegate); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelMediaDelegate); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelRTPDelegate); + + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelForMediaStreamTrack); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriber); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriberMedia); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriberRTP); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackChannelDelegate + #pragma mark + + interaction IMediaStreamTrackChannelDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + + virtual void notifyMediaChannelCancelled(ImmutableMediaChannelTracePtr trace) = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackChannelMediaDelegate + #pragma mark + + interaction IMediaStreamTrackChannelMediaDelegate : public IMediaStreamTrackChannelDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + virtual void notifyMediaChannelAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void notifyMediaChannelVideoFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackChannelRTPDelegate + #pragma mark + + interaction IMediaStreamTrackChannelRTPDelegate : public IMediaStreamTrackChannelDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + virtual void notifyMediaChannelRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) = 0; + virtual void notifyMediaChannelRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackChannelForMediaStreamTrack + #pragma mark + + interaction IMediaStreamTrackChannelForMediaStreamTrack + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrack, ForMediaStreamTrack); + + typedef PUID SubscriberObjectID; + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + static ForMediaStreamTrackPtr create( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace + ); + + virtual PUID getID() const = 0; + + virtual void shutdown() = 0; + + virtual void notifyAudioFrame( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void notifyVideoFrame( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) = 0; + + virtual void notifyRTPPacket( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) = 0; + virtual void notifyRTCPPacket( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) = 0; + + virtual void subscribeComplete() = 0; + + virtual bool shouldCancel(size_t cleanOlderThanTimeIndex) = 0; + + virtual void notifyMediaChannelGone(ImmutableMediaChannelTracePtr trace) = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackChannelForMediaStreamTrackSubscriber + #pragma mark + + interaction IMediaStreamTrackChannelForMediaStreamTrackSubscriber + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriber, ForMediaStreamTrackSubscriber); + + typedef PUID SubscriberObjectID; + + virtual void notifyCancelled(SubscriberObjectID subscriberID) = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackChannelForMediaStreamTrackSubscriberMedia + #pragma mark + + interaction IMediaStreamTrackChannelForMediaStreamTrackSubscriberMedia : public IMediaStreamTrackChannelForMediaStreamTrackSubscriber + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriberMedia, ForMediaStreamTrackSubscriberMedia); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + + virtual void subscribeMedia( + SubscriberObjectID subscriberID, + IMediaStreamTrackChannelMediaDelegatePtr delegate + ) = 0; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackChannelForMediaStreamTrackSubscriberRTP + #pragma mark + + interaction IMediaStreamTrackChannelForMediaStreamTrackSubscriberRTP : public IMediaStreamTrackChannelForMediaStreamTrackSubscriber + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriberRTP, ForMediaStreamTrackSubscriberRTP); + + typedef PUID SubscriberObjectID; + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::ImmutableParameters, ImmutableParameters); + + virtual void subscribeRTP( + SubscriberObjectID subscriberID, + ImmutableParametersPtr params, + IMediaStreamTrackChannelRTPDelegatePtr delegate + ) = 0; + }; + + + } // namespace internal +} // namespace ortc diff --git a/ortc/internal/ortc_IMediaStreamTrackMonitor.h b/ortc/internal/ortc_IMediaStreamTrackMonitor.h new file mode 100644 index 00000000..6a5e80d1 --- /dev/null +++ b/ortc/internal/ortc_IMediaStreamTrackMonitor.h @@ -0,0 +1,358 @@ +/* + + Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitor); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitorMediaChannel); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitorSubscriberMedia); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitorSubscriberRTP); + ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackMonitorDelegate); + + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitorMediaChannelDelegate); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitorMediaSubscriberMediaDelegate); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitorMediaSubscriberRTPDelegate); + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorTypes + #pragma mark + + interaction IMediaStreamTrackMonitorTypes + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::ImmutableParameters, ImmutableParameters); + + typedef PUID ChannelID; + typedef PUID SubscriberID; + + typedef PUID MonitorChannelID; + typedef PUID MonitorSubscriberMediaID; + typedef PUID MonitorSubscriberRTPID; + + typedef AnyPtr MonitorChannelContextPtr; + typedef AnyPtr MonitorSubscriberMediaContextPtr; + typedef AnyPtr MonitorSubscriberRTPContextPtr; + + struct NotifyMediaChannelAvailableInput + { + ChannelID channelID_ {}; + ImmutableMediaChannelTracePtr inMediaChannelTrace_; + IMediaStreamTrackMonitorMediaChannelDelegatePtr delegate; + }; + + struct NotifyMediaChannelAvailableOutput + { + MonitorChannelID id_ {}; + MonitorChannelContextPtr context_ {}; + IMediaStreamTrackMonitorMediaChannelPtr monitor_; + }; + + struct NotifyMediaChannelSubscribedMediaInput + { + SubscriberID subscriberID_ {}; + IMediaStreamTrackMonitorMediaSubscriberMediaDelegatePtr delegate_; + }; + + struct NotifyMediaChannelSubscribedMediaOutput + { + MonitorSubscriberMediaID id_ {}; + MonitorSubscriberMediaContextPtr context_ {}; + IMediaStreamTrackMonitorSubscriberMediaPtr monitor_; + }; + + struct NotifyMediaChannelSubscribedRTPInput + { + SubscriberID subscriberID_{}; + IMediaStreamTrackMonitorMediaSubscriberRTPDelegatePtr delegate_; + }; + + struct NotifyMediaChannelSubscribedRTPOutput + { + MonitorSubscriberRTPID id_ {}; + MonitorSubscriberRTPContextPtr context_ {}; + IMediaStreamTrackMonitorSubscriberRTPPtr monitor_; + }; + + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitor + #pragma mark + + interaction IMediaStreamTrackMonitor : public IMediaStreamTrackMonitorTypes + { + static IMediaStreamTrackMonitorPtr create(ortc::IMediaStreamTrackPtr track); + + virtual PUID getID() const = 0; + + virtual void stop() const = 0; + + virtual void notifyMediaChannelAvailable( + NotifyMediaChannelAvailableInput &input, + NotifyMediaChannelAvailableInput &output + ) = 0; + + virtual void notifyMediaChannelSubscribedMedia( + NotifyMediaChannelSubscribedMediaInput &input, + NotifyMediaChannelSubscribedMediaInput &output + ) = 0; + + virtual void notifyMediaChannelSubscribedRTP( + NotifyMediaChannelSubscribedRTPInput &input, + NotifyMediaChannelSubscribedRTPInput &output + ) = 0; + + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorDelegate + #pragma mark + + interaction IMediaStreamTrackMonitorDelegate + { + virtual ~IMediaStreamTrackMonitorDelegate() {} + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorSubscription + #pragma mark + + interaction IMediaStreamTrackMonitorSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorMediaChannel + #pragma mark + + interaction IMediaStreamTrackMonitorMediaChannel : public IMediaStreamTrackMonitorTypes + { + virtual void notifyMediaChannelGone( + MonitorChannelID id, + MonitorChannelContextPtr context + ) = 0; + + virtual void notifyMediaChannelRTPPacket( + MonitorChannelID id, + MonitorChannelContextPtr context, + RTPPacketPtr packet, + bool &outFilterPacket + ) = 0; + + virtual void notifyMediaChannelRTCPPacket( + MonitorChannelID id, + MonitorChannelContextPtr context, + RTCPPacketPtr packet, + bool &outFilterPacket + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorMediaChannelDelegate + #pragma mark + + interaction IMediaStreamTrackMonitorMediaChannelDelegate : public IMediaStreamTrackMonitorTypes + { + virtual void notifyMonitorMediaChannelRTPPacket( + MonitorChannelID id, + RTPPacketPtr packet + ) = 0; + virtual void notifyMonitorMediaChannelRTCPPacket( + MonitorChannelID id, + RTPPacketPtr packet + ) = 0; + }; + + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorSubscriberMedia + #pragma mark + + interaction IMediaStreamTrackMonitorSubscriberMedia : public IMediaStreamTrackMonitorTypes + { + virtual void notifyMonitorSubscriberMediaGone( + MonitorSubscriberMediaID id, + MonitorSubscriberMediaContextPtr context + ) = 0; + + virtual void notifyMonitorSubscriberMediaAudio( + MonitorSubscriberMediaID id, + MonitorSubscriberMediaContextPtr context, + AudioFramePtr frame, + bool &outFilterFrame + ) = 0; + + virtual void notifyMonitorSubscriberMediaVideo( + MonitorSubscriberMediaID id, + MonitorSubscriberMediaContextPtr context, + VideoFramePtr frame, + bool &outFilterFrame + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorSubscriberMediaDelegate + #pragma mark + + interaction IMediaStreamTrackMonitorSubscriberMediaDelegate : public IMediaStreamTrackMonitorTypes + { + virtual void notifyMonitorSubscriberMediaAudio( + MonitorSubscriberMediaID id, + AudioFramePtr frame + ) = 0; + virtual void notifyMonitorSubscriberMediaVideo( + MonitorSubscriberMediaID id, + VideoFramePtr frame + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorSubscriberRTP + #pragma mark + + interaction IMediaStreamTrackMonitorSubscriberRTP : public IMediaStreamTrackMonitorTypes + { + virtual void notifyMonitorSubscriberRTPGone( + MonitorSubscriberRTPID id, + MonitorSubscriberMediaContextPtr context + ) = 0; + + virtual void notifyMonitorSubscriberEncoderRTPPacket( + MonitorSubscriberRTPID id, + MonitorSubscriberMediaContextPtr context, + RTPPacketPtr packet, + bool &outFilterPacket + ) = 0; + + virtual void notifyMonitorSubscriberEncoderRTPRTCPPacket( + MonitorSubscriberRTPID id, + MonitorSubscriberMediaContextPtr context, + RTCPPacketPtr packet, + bool &outFilterPacket + ) = 0; + + virtual void notifyMonitorSubscriberRTPFeedback( + MonitorSubscriberRTPID id, + MonitorSubscriberMediaContextPtr context, + RTCPPacketPtr packet, + bool &outFilterPacket + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitorSubscriberRTPDelegate + #pragma mark + + interaction IMediaStreamTrackMonitorSubscriberRTPDelegate : public IMediaStreamTrackMonitorTypes + { + virtual void notifyMonitorSubscriberRTPEncoderRTPPacket( + MonitorSubscriberRTPID id, + RTPPacketPtr packet + ) = 0; + virtual void notifyMonitorSubscriberRTPEncoderRTCPPacket( + MonitorSubscriberRTPID id, + RTPPacketPtr packet + ) = 0; + + virtual void notifyMonitorSubscriberRTPFeedback( + MonitorSubscriberRTPID id, + RTPPacketPtr packet + ) = 0; + }; + } +} + +ZS_DECLARE_PROXY_BEGIN(ortc::internal::IMediaStreamTrackMonitorDelegate) +//ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +//ZS_DECLARE_PROXY_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::internal::IMediaStreamTrackMonitorDelegate, ortc::internal::IMediaStreamTrackMonitorSubscription) +//ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackPtr, IMediaStreamTrackPtr) +//ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onMediaStreamTrackMute, IMediaStreamTrackPtr, bool) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() diff --git a/ortc/internal/ortc_IMediaStreamTrackSubscriber.h b/ortc/internal/ortc_IMediaStreamTrackSubscriber.h new file mode 100644 index 00000000..382cd94e --- /dev/null +++ b/ortc/internal/ortc_IMediaStreamTrackSubscriber.h @@ -0,0 +1,143 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriber); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriberMedia); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriberRTP); + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSubscriberForMediaStreamTrack + #pragma mark + + interaction IMediaStreamTrackSubscriberForMediaStreamTrack + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberForMediaStreamTrack, ForMediaStreamTrack); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriber, UseMediaChannelBase); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::OverconstrainedError, OverconstrainedError); + + virtual PUID getID() const = 0; + + virtual void shutdown() = 0; + + virtual void notifyTrackMute(bool isMuted) = 0; + virtual void notifyTrackEnded() = 0; + virtual void notifyOverConstrained(OverconstrainedErrorPtr error) = 0; + + virtual void notifyChannel( + UseMediaChannelBasePtr mediaChannel, + ImmutableMediaChannelTracePtr trace + ) = 0; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSubscriberMediaForMediaStreamTrack + #pragma mark + + interaction IMediaStreamTrackSubscriberMediaForMediaStreamTrack : public IMediaStreamTrackSubscriberForMediaStreamTrack + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberMediaForMediaStreamTrack, ForMediaStreamTrack); + + static ForMediaStreamTrackPtr create( + IMediaStreamTrackMediaSubscriptionPtr &outSubscription, + IMediaStreamTrackSyncMediaDelegatePtr syncDelegate, + IMediaStreamTrackAsyncMediaDelegatePtr asyncDelegate + ); + + virtual ~IMediaStreamTrackSubscriberMediaForMediaStreamTrack(); + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSubscriberRTPForMediaStreamTrack + #pragma mark + + interaction IMediaStreamTrackSubscriberRTPForMediaStreamTrack : public IMediaStreamTrackSubscriberForMediaStreamTrack + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberRTPForMediaStreamTrack, ForMediaStreamTrack); + + static ForMediaStreamTrackPtr create( + IMediaStreamTrackMediaSubscriptionPtr &outSubscription, + IMediaStreamTrackRTPDelegatePtr delegate + ); + + virtual ~IMediaStreamTrackSubscriberRTPForMediaStreamTrack(); + }; + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSubscriberForMediaStreamTrackChannel + #pragma mark + + interaction IMediaStreamTrackSubscriberForMediaStreamTrackChannel + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberForMediaStreamTrackChannel, ForMediaStreamTrackChannel); + + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSubscriberMediaForMediaStreamTrackChannel + #pragma mark + + interaction IMediaStreamTrackSubscriberMediaForMediaStreamTrackChannel + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberMediaForMediaStreamTrackChannel, ForMediaStreamTrackChannel); + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSubscriberRTPForMediaStreamTrackChannel + #pragma mark + + interaction IMediaStreamTrackSubscriberRTPForMediaStreamTrackChannel + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberRTPForMediaStreamTrackChannel, ForMediaStreamTrackChannel); + }; + + } // namespace internal +} // namespace ortc diff --git a/ortc/internal/ortc_IRTP.h b/ortc/internal/ortc_IRTP.h new file mode 100644 index 00000000..ae2aa2b5 --- /dev/null +++ b/ortc/internal/ortc_IRTP.h @@ -0,0 +1,104 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IRTPForMediaEngine); + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTP + #pragma mark + + interaction IRTP + { + typedef PUID RTPObjectID; + + enum States + { + State_First, + + State_Pending = State_First, + State_Ready, + State_ShuttingDown, + State_Shutdown, + + State_Last = State_Shutdown, + }; + + static const char *toString(States state); + + virtual RTPObjectID getID() const = 0; + virtual void cancel() = 0; + + virtual States getState() const = 0; + + virtual ~IRTP() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderForMediaEngine + #pragma mark + + interaction IRTPForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IRTPForMediaEngine, ForMediaEngine); + + typedef IRTP::RTPObjectID RTPObjectID; + ZS_DECLARE_TYPEDEF_PTR(IRTP::States, States); + + virtual RTPObjectID getID() const = 0; + virtual void shutdown() = 0; + + virtual States getState() const = 0; + bool isShuttingDown() const { return IRTP::State_ShuttingDown == getState(); } + bool isShutdown() const { return IRTP::State_Shutdown == getState(); } + + virtual ~IRTPForMediaEngine() {} + }; + + } +} diff --git a/ortc/internal/ortc_IRTPDecoder.h b/ortc/internal/ortc_IRTPDecoder.h new file mode 100644 index 00000000..c1e9054d --- /dev/null +++ b/ortc/internal/ortc_IRTPDecoder.h @@ -0,0 +1,286 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IRTPDecoderForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPDecoderAudioForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPDecoderVideoForMediaEngine); + + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForRTPDecoderAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForRTPDecoderVideo); + + ZS_DECLARE_INTERACTION_PROXY(IRTPDecoderAysncDelegate); + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoder + #pragma mark + + interaction IRTPDecoder : public IRTP + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + + virtual void notifyRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) = 0; + virtual void notifyRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) = 0; + + virtual ~IRTPDecoder() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderAudio + #pragma mark + + interaction IRTPDecoderAudio : public IRTPDecoder + { + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderAudio); + + static PromiseWithRTPDecoderAudioPtr create( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ); + + virtual ~IRTPDecoderAudio() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderVideo + #pragma mark + + interaction IRTPDecoderVideo : public IRTPDecoder + { + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderVideo); + + static PromiseWithRTPDecoderVideoPtr create( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ); + + virtual ~IRTPDecoderVideo() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderDelegate + #pragma mark + + interaction IRTPDecoderDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IRTP::States, States); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + virtual void notifyRTPDecoderAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void notifyRTPDecoderVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) = 0; + + virtual void onRTPDecoderStateChanged( + IRTPDecoderPtr decoder, + States state + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderSubscription + #pragma mark + + interaction IRTPDecoderSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderForMediaEngine + #pragma mark + + interaction IRTPDecoderForMediaEngine : public IRTPForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IRTPDecoderForMediaEngine, ForMediaEngine); + + virtual ~IRTPDecoderForMediaEngine() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderAudioForMediaEngine + #pragma mark + + interaction IRTPDecoderAudioForMediaEngine : public IRTPDecoderForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IRTPDecoderAudioForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderAudio, UseMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderAudio); + + static ForMediaEnginePtr create( + PromiseWithRTPDecoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ); + + virtual ~IRTPDecoderAudioForMediaEngine() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderVideoForMediaEngine + #pragma mark + + interaction IRTPDecoderVideoForMediaEngine : public IRTPDecoderForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IRTPDecoderVideoForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderVideo, UseMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderVideo); + + static ForMediaEnginePtr create( + PromiseWithRTPDecoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ); + + virtual ~IRTPDecoderVideoForMediaEngine() {} + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderAsyncDelegate + #pragma mark + + interaction IRTPDecoderAysncDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + + virtual void onRTPDecoderRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) = 0; + virtual void onRTPDecoderRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) = 0; + }; + } +} + +ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPDecoderDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPDecoderPtr, IRTPDecoderPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTP::States, States) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyRTPDecoderAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyRTPDecoderVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_METHOD_2(onRTPDecoderStateChanged, IRTPDecoderPtr, States) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::internal::IRTPDecoderDelegate, ortc::internal::IRTPDecoderSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IRTPDecoderPtr, IRTPDecoderPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IRTP::States, States) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyRTPDecoderAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyRTPDecoderVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onRTPDecoderStateChanged, IRTPDecoderPtr, States) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() + + +ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPDecoderAysncDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::RTPPacketPtr, RTPPacketPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::RTCPPacketPtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_METHOD_2(onRTPDecoderRTPPacket, ImmutableMediaChannelTracePtr, RTPPacketPtr) +ZS_DECLARE_PROXY_METHOD_2(onRTPDecoderRTCPPacket, ImmutableMediaChannelTracePtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_IRTPEncoder.h b/ortc/internal/ortc_IRTPEncoder.h new file mode 100644 index 00000000..73ed0e53 --- /dev/null +++ b/ortc/internal/ortc_IRTPEncoder.h @@ -0,0 +1,294 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include + +#include + +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IRTPEncoderForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPEncoderAudioForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPEncoderVideoForMediaEngine); + + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForRTPEncoderAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForRTPEncoderVideo); + + ZS_DECLARE_INTERACTION_PROXY(IRTPEncoderAysncDelegate); + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoder + #pragma mark + + interaction IRTPEncoder : public IRTP + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + virtual void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void notifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) = 0; + + virtual ~IRTPEncoder() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderAudio + #pragma mark + + interaction IRTPEncoderAudio : public IRTPEncoder + { + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderAudio); + + static PromiseWithRTPEncoderAudioPtr create( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ); + + virtual ~IRTPEncoderAudio() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderVideo + #pragma mark + + interaction IRTPEncoderVideo : public IRTPEncoder + { + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderVideo); + + static PromiseWithRTPEncoderVideoPtr create( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ); + + virtual ~IRTPEncoderVideo() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderDelegate + #pragma mark + + interaction IRTPEncoderDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IRTP::States, States); + + virtual void notifyRTPEncoderRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) = 0; + virtual void notifyRTPEncoderRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) = 0; + + virtual void onRTPEncoderStateChanged( + IRTPEncoderPtr encoder, + States state + ) = 0; + }; + + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderSubscription + #pragma mark + + interaction IRTPEncoderSubscription + { + virtual PUID getID() const = 0; + + virtual void cancel() = 0; + + virtual void background() = 0; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderForMediaEngine + #pragma mark + + interaction IRTPEncoderForMediaEngine : public IRTPForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IRTPEncoderForMediaEngine, ForMediaEngine); + + virtual ~IRTPEncoderForMediaEngine() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderAudioForMediaEngine + #pragma mark + + interaction IRTPEncoderAudioForMediaEngine : public IRTPEncoderForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IRTPEncoderAudioForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderAudio, UseMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderAudio); + + static ForMediaEnginePtr create( + PromiseWithRTPEncoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ); + + virtual ~IRTPEncoderAudioForMediaEngine() {} + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderVideoForMediaEngine + #pragma mark + + interaction IRTPEncoderVideoForMediaEngine : public IRTPEncoderForMediaEngine + { + ZS_DECLARE_TYPEDEF_PTR(IRTPEncoderVideoForMediaEngine, ForMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderVideo, UseMediaEngine); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderVideo); + + static ForMediaEnginePtr create( + PromiseWithRTPEncoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ); + + virtual ~IRTPEncoderVideoForMediaEngine() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderAsyncDelegate + #pragma mark + + interaction IRTPEncoderAysncDelegate + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + virtual void onRTPEncoderAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) = 0; + virtual void onRTPEncoderVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) = 0; + }; + + } +} + + + +ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPEncoderDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::RTPPacketPtr, RTPPacketPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::RTCPPacketPtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPEncoderPtr, IRTPEncoderPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTP::States, States) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyRTPEncoderRTPPacket, ImmutableMediaChannelTracePtr, RTPPacketPtr) +ZS_DECLARE_PROXY_METHOD_SYNC_2(notifyRTPEncoderRTCPPacket, ImmutableMediaChannelTracePtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_METHOD_2(onRTPEncoderStateChanged, IRTPEncoderPtr, States) +ZS_DECLARE_PROXY_END() + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::internal::IRTPEncoderDelegate, ortc::internal::IRTPEncoderSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::RTPPacketPtr, RTPPacketPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::RTCPPacketPtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IRTPEncoderPtr, IRTPEncoderPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IRTPEncoderPtr, IRTPEncoderPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IRTP::States, States) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyRTPEncoderRTPPacket, ImmutableMediaChannelTracePtr, RTPPacketPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyRTPEncoderRTCPPacket, ImmutableMediaChannelTracePtr, RTCPPacketPtr) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_2(onRTPEncoderStateChanged, IRTPEncoderPtr, States) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_END() + +ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPEncoderAysncDelegate) +ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPEncoderAysncDelegate::AudioFramePtr, AudioFramePtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPEncoderAysncDelegate::VideoFramePtr, VideoFramePtr) +ZS_DECLARE_PROXY_METHOD_2(onRTPEncoderAudioFrame, ImmutableMediaChannelTracePtr, AudioFramePtr) +ZS_DECLARE_PROXY_METHOD_2(onRTPEncoderVideoFrame, ImmutableMediaChannelTracePtr, VideoFramePtr) +ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_MediaChannelTraceHelper.h b/ortc/internal/ortc_MediaChannelTraceHelper.h new file mode 100644 index 00000000..f6c09277 --- /dev/null +++ b/ortc/internal/ortc_MediaChannelTraceHelper.h @@ -0,0 +1,90 @@ +/* + + Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include + +#include + +#define ORTC_SETTING_MEDIA_CHANNEL_TRACE_HELPER_USAGE_INACTIVITY_AGE_PURGE_TIME_IN_SECONDS "ortc/media-channel-trace-helper/usage-inactivity-age-purge-time-in-seconds" +#define ORTC_SETTING_MEDIA_CHANNEL_TRACE_HELPER_USAGE_INACTIVITY_AGE_CHECK_MODULAS_VALUE "ortc/media-channel-trace-helper/usage-inactivity-age-check-modulas-value" + +namespace ortc +{ + namespace internal + { + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaChannelTraceHelper + #pragma mark + + class MediaChannelTraceHelper : public SharedRecursiveLock + { + public: + typedef IMediaStreamTrackTypes::MediaChannelID MediaChannelID; + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + + typedef uintptr_t TraceHandle; + + struct TraceSourceInfo + { + int lastUsageAt_ {}; + ImmutableMediaChannelTracePtr trace_; + }; + + typedef std::unordered_map TraceSourceInfoMap; + + public: + MediaChannelTraceHelper(MediaChannelID mediaChannelID); + + ImmutableMediaChannelTracePtr trace(ImmutableMediaChannelTracePtr sourceTrace); + + protected: + void doPurge(); + + protected: + AutoPUID id_; + MediaChannelID selfChannelID_ {}; + std::atomic lastUsageCount_ {}; + TraceSourceInfoMap traceSources_; + + Time lastAgeCountTimeAt_ {}; + int lastAgeCountValueAtTime_ {}; + Seconds agePurge_ {}; + int ageCheck_ {}; + }; + } +} diff --git a/ortc/internal/ortc_MediaDeviceCaptureAudio.h b/ortc/internal/ortc_MediaDeviceCaptureAudio.h new file mode 100644 index 00000000..cc3208e2 --- /dev/null +++ b/ortc/internal/ortc_MediaDeviceCaptureAudio.h @@ -0,0 +1,497 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include +#include + +#include + +namespace ortc +{ + namespace internal + { + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio (helpers) + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio + #pragma mark + + class MediaDeviceCaptureAudio : public Any, + public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaDeviceCaptureAudioForMediaEngine, + public zsLib::IWakeDelegate, + public zsLib::IPromiseSettledDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IMediaDeviceCaptureAudioForMediaEngine; + + ZS_DECLARE_CLASS_PTR(Media); + ZS_DECLARE_CLASS_PTR(MediaSubscriber); + + friend class Media; + friend class MediaSubscriber; + + typedef PUID ObjectID; + typedef std::map MediaSubscriberMap; + ZS_DECLARE_PTR(MediaSubscriberMap); + + typedef IMediaStreamTrackTypes::MediaChannelID MediaChannelID; + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::MediaChannelTrace, MediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, PromiseWithSettingsList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::States, States); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, UsePromiseWithSettingsList); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Settings, UseSettings); + ZS_DECLARE_TYPEDEF_PTR(std::list, SettingsList); + + ZS_DECLARE_TYPEDEF_PTR(std::list, TrackConstraintsList); + + struct PendingSubscriber + { + MediaDeviceCapturePromisePtr promise_; + MediaDeviceObjectID repaceExistingDeviceObjectID_ {}; + TrackConstraintsPtr constraints_; + IMediaDeviceCaptureDelegatePtr delegate_; + }; + + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingSubscriberList); + + public: + MediaDeviceCaptureAudio( + const make_private &, + IMessageQueuePtr queue, + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + + protected: + MediaDeviceCaptureAudio(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) + {} + + void init(); + + public: + virtual ~MediaDeviceCaptureAudio(); + + static MediaDeviceCaptureAudioPtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + + static MediaDeviceCaptureAudioPtr convert(ForMediaEnginePtr object); + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => (for Media) + #pragma mark + + void notifyMediaStateChanged(); + void notifyMediaFailure( + MediaPtr media, + WORD errorCode, + const char *reason + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => (for MediaSubscribers) + #pragma mark + + PUID getID() const { return id_; } + void notifySusbcriberGone(); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IMediaDeviceForMediaEngine + #pragma mark + + virtual bool isDeviceIdle() override; + virtual void shutdown() override; + + virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IMediaDeviceCaptureForMediaEngine + #pragma mark + + virtual void mediaDeviceCaptureSubscribe( + MediaDeviceCapturePromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IMediaDeviceCaptureAudioForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => IPromiseSettledDelegate + #pragma mark + + virtual void onPromiseSettled(PromisePtr promise) override; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => (internal) + #pragma mark + + bool isPending() const { return IMediaDevice::State_Pending == currentState_; } + bool isReady() const { return IMediaDevice::State_Active == currentState_; } + bool isReinitializing() const { return IMediaDevice::State_Reinitializing == currentState_; } + bool isShuttingDown() const { return IMediaDevice::State_ShuttingDown == currentState_; } + bool isShutdown() const { return IMediaDevice::State_Shutdown == currentState_; } + + void cancel(); + + bool stepShutdownPendingRequests(); + bool stepShutdownSubscribers(); + bool stepShutdownMedia(); + + void step(); + bool stepMediaReinitializationShutdown(); + bool stepDiscoverModes(); + bool stepFigureOutMode(); + bool stepWaitForMediaDevice(); + + void setState(States state); + void setError(PromisePtr promise); + void setError(WORD error, const char *inReason); + + public: + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media + #pragma mark + + class Media : public MessageQueueAssociator, + public SharedRecursiveLock, + public zsLib::IWakeDelegate + { + protected: + struct make_private {}; + + enum MediaStates + { + MediaState_Pending, + MediaState_Ready, + MediaState_ShuttingDown, + MediaState_Shutdown, + }; + + static const char *toString(MediaStates state); + + public: + ZS_DECLARE_TYPEDEF_PTR(MediaDeviceCaptureAudio, UseOuter); + + public: + Media( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ); + + protected: + void init(); + + public: + virtual ~Media(); + + static MediaPtr create( + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ); + + public: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media => (for MediaDeviceCaptureAudio) + #pragma mark + + MediaChannelID getID() const { return id_; } + + void shutdown(); + bool isReady() const; + bool isShuttingDown() const; + bool isShutdown() const; + + void notifySubscribersChanged(MediaSubscriberMapPtr subscribers); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media => (internal) + #pragma mark + + void cancel(); + void step(); + + void setState(MediaStates state); + void setError(PromisePtr promise); + void setError(WORD errorCode, const char *inReason); + + void internalNotifySubscribersOfFrame(AudioFramePtr frame); + + public: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::Media => (data) + #pragma mark + + AutoPUID id_; + MediaWeakPtr thisWeak_; + + MediaPtr gracefulShutdownReference_; + + UseOuterWeakPtr outer_; + MediaSubscriberMapPtr subscribers_; + String deviceID_; + UseSettingsPtr settings_; + MediaChannelTracePtr trace_; + + MediaStates currentState_ {MediaState_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber + #pragma mark + + class MediaSubscriber : public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaDeviceCaptureAudio + { + protected: + struct make_private {}; + + public: + ZS_DECLARE_TYPEDEF_PTR(MediaDeviceCaptureAudio, UseOuter); + + public: + MediaSubscriber( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ); + + protected: + void init(); + + public: + virtual ~MediaSubscriber(); + + static MediaSubscriberPtr create( + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ); + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => (for MediaDeviceCaptureAudio) + #pragma mark + + virtual MediaDeviceObjectID getID() const override { return id_; } + void shutdown(); + bool isShutdown() const; + void notifyStateChanged(States state); + TrackConstraintsPtr getConstraints() const { return constraints_; } + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => (for Media) + #pragma mark + + void notifyFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ); + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => IMediaDevice + #pragma mark + + // (duplicate) virtual MediaDeviceObjectID getID() const override { return id_; } + virtual void cancel() override; + + virtual States getState() const override; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => IMediaDeviceCapture + #pragma mark + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => IMediaDeviceCaptureAudio + #pragma mark + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => (internal) + #pragma mark + + void setState(States state); + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => (data) + #pragma mark + + AutoPUID id_; + MediaSubscriberWeakPtr thisWeak_; + + UseOuterWeakPtr outer_; + TrackConstraintsPtr constraints_; + + IMediaDeviceCaptureDelegateWeakPtr notifyDelegate_; + IMediaDeviceCaptureDelegatePtr delegate_; + + States lastReportedState_; + + MediaChannelTraceHelper traceHelper_; + }; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureAudio => (data) + #pragma mark + + AutoPUID id_; + MediaDeviceCaptureAudioWeakPtr thisWeak_; + + MediaDeviceCaptureAudioPtr gracefulShutdownReference_; + + UseMediaEngineWeakPtr mediaEngine_; + String deviceID_; + + States currentState_ {IMediaDevice::State_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + + PromiseWithSettingsListPtr deviceModesPromise_; + SettingsList deviceModes_; + + PendingSubscriberList pendingSubscribers_; + MediaSubscriberMapPtr subscribers_; + + std::atomic recheckMode_ {}; + UseSettingsPtr requiredSettings_; + MediaPtr media_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureAudioFactory + #pragma mark + + interaction IMediaDeviceCaptureAudioFactory + { + static IMediaDeviceCaptureAudioFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceCaptureAudio, UseMediaEngine); + + virtual MediaDeviceCaptureAudioPtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + }; + + class MediaDeviceCaptureAudioFactory : public IFactory {}; + } +} diff --git a/ortc/internal/ortc_MediaDeviceCaptureVideo.h b/ortc/internal/ortc_MediaDeviceCaptureVideo.h new file mode 100644 index 00000000..252ddc49 --- /dev/null +++ b/ortc/internal/ortc_MediaDeviceCaptureVideo.h @@ -0,0 +1,502 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include +#include + +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCaptureVideoForMediaEngine); + + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceCaptureVideo); + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo (helpers) + #pragma mark + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo + #pragma mark + + class MediaDeviceCaptureVideo : public Any, + public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaDeviceCaptureVideoForMediaEngine, + public zsLib::IWakeDelegate, + public zsLib::IPromiseSettledDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IMediaDeviceCaptureVideoForMediaEngine; + + ZS_DECLARE_CLASS_PTR(Media); + ZS_DECLARE_CLASS_PTR(MediaSubscriber); + + friend class Media; + friend class MediaSubscriber; + + typedef PUID ObjectID; + typedef std::map MediaSubscriberMap; + ZS_DECLARE_PTR(MediaSubscriberMap); + + typedef IMediaStreamTrackTypes::MediaChannelID MediaChannelID; + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::MediaChannelTrace, MediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, PromiseWithSettingsList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::States, States); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, UsePromiseWithSettingsList); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Settings, UseSettings); + ZS_DECLARE_TYPEDEF_PTR(std::list, SettingsList); + + ZS_DECLARE_TYPEDEF_PTR(std::list, TrackConstraintsList); + + struct PendingSubscriber + { + MediaDeviceCapturePromisePtr promise_; + MediaDeviceObjectID repaceExistingDeviceObjectID_ {}; + TrackConstraintsPtr constraints_; + IMediaDeviceCaptureDelegatePtr delegate_; + }; + + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingSubscriberList); + + public: + MediaDeviceCaptureVideo( + const make_private &, + IMessageQueuePtr queue, + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + + protected: + MediaDeviceCaptureVideo(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) + {} + + void init(); + + public: + virtual ~MediaDeviceCaptureVideo(); + + static MediaDeviceCaptureVideoPtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + + static MediaDeviceCaptureVideoPtr convert(ForMediaEnginePtr object); + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => (for Media) + #pragma mark + + void notifyMediaStateChanged(); + void notifyMediaFailure( + MediaPtr media, + WORD errorCode, + const char *reason + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => (for MediaSubscribers) + #pragma mark + + PUID getID() const { return id_; } + void notifySusbcriberGone(); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IMediaDeviceForMediaEngine + #pragma mark + + virtual bool isDeviceIdle() override; + virtual void shutdown() override; + + virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IMediaDeviceCaptureForMediaEngine + #pragma mark + + virtual void mediaDeviceCaptureSubscribe( + MediaDeviceCapturePromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IMediaDeviceCaptureVideoForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => IPromiseSettledDelegate + #pragma mark + + virtual void onPromiseSettled(PromisePtr promise) override; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => (internal) + #pragma mark + + bool isPending() const { return IMediaDevice::State_Pending == currentState_; } + bool isReady() const { return IMediaDevice::State_Active == currentState_; } + bool isReinitializing() const { return IMediaDevice::State_Reinitializing == currentState_; } + bool isShuttingDown() const { return IMediaDevice::State_ShuttingDown == currentState_; } + bool isShutdown() const { return IMediaDevice::State_Shutdown == currentState_; } + + void cancel(); + + bool stepShutdownPendingRequests(); + bool stepShutdownSubscribers(); + bool stepShutdownMedia(); + + void step(); + bool stepMediaReinitializationShutdown(); + bool stepDiscoverModes(); + bool stepFigureOutMode(); + bool stepWaitForMediaDevice(); + + void setState(States state); + void setError(PromisePtr promise); + void setError(WORD error, const char *inReason); + + public: + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media + #pragma mark + + class Media : public MessageQueueAssociator, + public SharedRecursiveLock, + public zsLib::IWakeDelegate + { + protected: + struct make_private {}; + + enum MediaStates + { + MediaState_Pending, + MediaState_Ready, + MediaState_ShuttingDown, + MediaState_Shutdown, + }; + + static const char *toString(MediaStates state); + + public: + ZS_DECLARE_TYPEDEF_PTR(MediaDeviceCaptureVideo, UseOuter); + + public: + Media( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ); + + protected: + void init(); + + public: + virtual ~Media(); + + static MediaPtr create( + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ); + + public: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media => (for MediaDeviceCaptureVideo) + #pragma mark + + MediaChannelID getID() const { return id_; } + + void shutdown(); + bool isReady() const; + bool isShuttingDown() const; + bool isShutdown() const; + + void notifySubscribersChanged(MediaSubscriberMapPtr subscribers); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media => (internal) + #pragma mark + + void cancel(); + void step(); + + void setState(MediaStates state); + void setError(PromisePtr promise); + void setError(WORD errorCode, const char *inReason); + + void internalNotifySubscribersOfFrame(VideoFramePtr frame); + + public: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::Media => (data) + #pragma mark + + AutoPUID id_; + MediaWeakPtr thisWeak_; + + MediaPtr gracefulShutdownReference_; + + UseOuterWeakPtr outer_; + MediaSubscriberMapPtr subscribers_; + String deviceID_; + UseSettingsPtr settings_; + MediaChannelTracePtr trace_; + + MediaStates currentState_ {MediaState_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber + #pragma mark + + class MediaSubscriber : public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaDeviceCaptureVideo + { + protected: + struct make_private {}; + + public: + ZS_DECLARE_TYPEDEF_PTR(MediaDeviceCaptureVideo, UseOuter); + + public: + MediaSubscriber( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ); + + protected: + void init(); + + public: + virtual ~MediaSubscriber(); + + static MediaSubscriberPtr create( + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ); + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => (for MediaDeviceCaptureVideo) + #pragma mark + + virtual MediaDeviceObjectID getID() const override { return id_; } + void shutdown(); + bool isShutdown() const; + void notifyStateChanged(States state); + TrackConstraintsPtr getConstraints() const { return constraints_; } + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => (for Media) + #pragma mark + + void notifyFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ); + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => IMediaDevice + #pragma mark + + // (duplicate) virtual MediaDeviceObjectID getID() const override { return id_; } + virtual void cancel() override; + + virtual States getState() const override; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => IMediaDeviceCapture + #pragma mark + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => IMediaDeviceCaptureVideo + #pragma mark + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => (internal) + #pragma mark + + void setState(States state); + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => (data) + #pragma mark + + AutoPUID id_; + MediaSubscriberWeakPtr thisWeak_; + + UseOuterWeakPtr outer_; + TrackConstraintsPtr constraints_; + + IMediaDeviceCaptureDelegateWeakPtr notifyDelegate_; + IMediaDeviceCaptureDelegatePtr delegate_; + + States lastReportedState_; + + MediaChannelTraceHelper traceHelper_; + }; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceCaptureVideo => (data) + #pragma mark + + AutoPUID id_; + MediaDeviceCaptureVideoWeakPtr thisWeak_; + + MediaDeviceCaptureVideoPtr gracefulShutdownReference_; + + UseMediaEngineWeakPtr mediaEngine_; + String deviceID_; + + States currentState_ {IMediaDevice::State_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + + PromiseWithSettingsListPtr deviceModesPromise_; + SettingsList deviceModes_; + + PendingSubscriberList pendingSubscribers_; + MediaSubscriberMapPtr subscribers_; + + std::atomic recheckMode_ {}; + UseSettingsPtr requiredSettings_; + MediaPtr media_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceCaptureVideoFactory + #pragma mark + + interaction IMediaDeviceCaptureVideoFactory + { + static IMediaDeviceCaptureVideoFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceCaptureVideo, UseMediaEngine); + + virtual MediaDeviceCaptureVideoPtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + }; + + class MediaDeviceCaptureVideoFactory : public IFactory {}; + } +} diff --git a/ortc/internal/ortc_MediaDeviceRenderAudio.h b/ortc/internal/ortc_MediaDeviceRenderAudio.h new file mode 100644 index 00000000..14eaf57e --- /dev/null +++ b/ortc/internal/ortc_MediaDeviceRenderAudio.h @@ -0,0 +1,502 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include +#include + +#include + +namespace ortc +{ + namespace internal + { + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio (helpers) + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio + #pragma mark + + class MediaDeviceRenderAudio : public Any, + public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaDeviceRenderAudioForMediaEngine, + public zsLib::IWakeDelegate, + public zsLib::IPromiseSettledDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IMediaDeviceRenderAudioForMediaEngine; + + ZS_DECLARE_CLASS_PTR(Media); + ZS_DECLARE_CLASS_PTR(MediaSubscriber); + + friend class Media; + friend class MediaSubscriber; + + typedef PUID ObjectID; + typedef std::map MediaSubscriberMap; + ZS_DECLARE_PTR(MediaSubscriberMap); + + typedef IMediaStreamTrackTypes::MediaChannelID MediaChannelID; + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, PromiseWithSettingsList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::States, States); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, UsePromiseWithSettingsList); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Settings, UseSettings); + ZS_DECLARE_TYPEDEF_PTR(std::list, SettingsList); + + ZS_DECLARE_TYPEDEF_PTR(std::list, TrackConstraintsList); + + struct PendingSubscriber + { + MediaDeviceRenderPromisePtr promise_; + MediaDeviceObjectID repaceExistingDeviceObjectID_ {}; + TrackConstraintsPtr constraints_; + IMediaDeviceRenderDelegatePtr delegate_; + }; + + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingSubscriberList); + + public: + MediaDeviceRenderAudio( + const make_private &, + IMessageQueuePtr queue, + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + + protected: + MediaDeviceRenderAudio(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) + {} + + void init(); + + public: + virtual ~MediaDeviceRenderAudio(); + + static MediaDeviceRenderAudioPtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + + static MediaDeviceRenderAudioPtr convert(ForMediaEnginePtr object); + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => (for Media) + #pragma mark + + void notifyMediaStateChanged(); + void notifyMediaFailure( + MediaPtr media, + WORD errorCode, + const char *reason + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => (for MediaSubscribers) + #pragma mark + + PUID getID() const { return id_; } + void notifySusbcriberGone(); + void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IMediaDeviceForMediaEngine + #pragma mark + + virtual bool isDeviceIdle() override; + virtual void shutdown() override; + + virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IMediaDeviceRenderForMediaEngine + #pragma mark + + virtual void mediaDeviceRenderSubscribe( + MediaDeviceRenderPromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceRenderDelegatePtr delegate + ) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IMediaDeviceRenderAudioForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => IPromiseSettledDelegate + #pragma mark + + virtual void onPromiseSettled(PromisePtr promise) override; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => (internal) + #pragma mark + + bool isPending() const { return IMediaDevice::State_Pending == currentState_; } + bool isReady() const { return IMediaDevice::State_Active == currentState_; } + bool isReinitializing() const { return IMediaDevice::State_Reinitializing == currentState_; } + bool isShuttingDown() const { return IMediaDevice::State_ShuttingDown == currentState_; } + bool isShutdown() const { return IMediaDevice::State_Shutdown == currentState_; } + + void cancel(); + + bool stepShutdownPendingRequests(); + bool stepShutdownSubscribers(); + bool stepShutdownMedia(); + + void step(); + bool stepMediaReinitializationShutdown(); + bool stepDiscoverModes(); + bool stepFigureOutMode(); + bool stepWaitForMediaDevice(); + + void setState(States state); + void setError(PromisePtr promise); + void setError(WORD error, const char *inReason); + + public: + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media + #pragma mark + + class Media : public MessageQueueAssociator, + public SharedRecursiveLock, + public zsLib::IWakeDelegate + { + protected: + struct make_private {}; + + enum MediaStates + { + MediaState_Pending, + MediaState_Ready, + MediaState_ShuttingDown, + MediaState_Shutdown, + }; + + static const char *toString(MediaStates state); + + public: + ZS_DECLARE_TYPEDEF_PTR(MediaDeviceRenderAudio, UseOuter); + + public: + Media( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ); + + protected: + void init(); + + public: + virtual ~Media(); + + static MediaPtr create( + IMessageQueuePtr queue, + UseOuterPtr outer, + const String &deviceID, + UseSettingsPtr settings + ); + + public: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media => (for MediaDeviceRenderAudio) + #pragma mark + + MediaChannelID getID() const { return id_; } + + void shutdown(); + bool isReady() const; + bool isShuttingDown() const; + bool isShutdown() const; + + void notifySubscribersChanged(MediaSubscriberMapPtr subscribers); + + void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media => (internal) + #pragma mark + + void cancel(); + void step(); + + void setState(MediaStates state); + void setError(PromisePtr promise); + void setError(WORD errorCode, const char *inReason); + + public: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::Media => (data) + #pragma mark + + AutoPUID id_; + MediaWeakPtr thisWeak_; + + MediaPtr gracefulShutdownReference_; + + UseOuterWeakPtr outer_; + MediaSubscriberMapPtr subscribers_; + String deviceID_; + UseSettingsPtr settings_; + + MediaStates currentState_ {MediaState_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber + #pragma mark + + class MediaSubscriber : public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaDeviceRenderAudio + { + protected: + struct make_private {}; + + public: + ZS_DECLARE_TYPEDEF_PTR(MediaDeviceRenderAudio, UseOuter); + + public: + MediaSubscriber( + const make_private &, + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceRenderDelegatePtr delegate + ); + + protected: + void init(); + + public: + virtual ~MediaSubscriber(); + + static MediaSubscriberPtr create( + IMessageQueuePtr queue, + UseOuterPtr outer, + TrackConstraintsPtr constraints, + IMediaDeviceRenderDelegatePtr delegate + ); + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => (for MediaDeviceRenderAudio) + #pragma mark + + virtual MediaDeviceObjectID getID() const override { return id_; } + void shutdown(); + bool isShutdown() const; + void notifyStateChanged(States state); + TrackConstraintsPtr getConstraints() const { return constraints_; } + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => (for Media) + #pragma mark + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => IMediaDevice + #pragma mark + + // (duplicate) virtual MediaDeviceObjectID getID() const override { return id_; } + virtual void cancel() override; + + virtual States getState() const override; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => IMediaDeviceRender + #pragma mark + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => IMediaDeviceRenderAudio + #pragma mark + + virtual void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => (internal) + #pragma mark + + void setState(States state); + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio::MediaSubscriber => (data) + #pragma mark + + AutoPUID id_; + MediaSubscriberWeakPtr thisWeak_; + + UseOuterWeakPtr outer_; + TrackConstraintsPtr constraints_; + + IMediaDeviceRenderDelegateWeakPtr notifyDelegate_; + IMediaDeviceRenderDelegatePtr delegate_; + + States lastReportedState_; + MediaChannelTraceHelper traceHelper_; + }; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaDeviceRenderAudio => (data) + #pragma mark + + AutoPUID id_; + MediaDeviceRenderAudioWeakPtr thisWeak_; + + MediaDeviceRenderAudioPtr gracefulShutdownReference_; + + UseMediaEngineWeakPtr mediaEngine_; + String deviceID_; + + States currentState_ {IMediaDevice::State_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + + PromiseWithSettingsListPtr deviceModesPromise_; + SettingsList deviceModes_; + + PendingSubscriberList pendingSubscribers_; + MediaSubscriberMapPtr subscribers_; + + std::atomic recheckMode_ {}; + UseSettingsPtr requiredSettings_; + MediaPtr media_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaDeviceRenderAudioFactory + #pragma mark + + interaction IMediaDeviceRenderAudioFactory + { + static IMediaDeviceRenderAudioFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceRenderAudio, UseMediaEngine); + + virtual MediaDeviceRenderAudioPtr create( + UseMediaEnginePtr mediaEngine, + const String &deviceID + ); + }; + + class MediaDeviceRenderAudioFactory : public IFactory {}; + } +} diff --git a/ortc/internal/ortc_MediaDevices.h b/ortc/internal/ortc_MediaDevices.h index a695d8da..966dddd8 100644 --- a/ortc/internal/ortc_MediaDevices.h +++ b/ortc/internal/ortc_MediaDevices.h @@ -58,11 +58,13 @@ namespace ortc interaction IMediaDevicesAsyncDelegate { - ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::Constraints, Constraints) - ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithDeviceList, PromiseWithDeviceList) - ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithMediaStreamTrackListPtr, PromiseWithMediaStreamTrackListPtr) + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::Constraints, Constraints); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithDeviceList, PromiseWithDeviceList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithMediaStreamTrackList, PromiseWithMediaStreamTrackList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, PromiseWithSettingsList); virtual void onEnumerateDevices(PromiseWithDeviceListPtr promise) = 0; + virtual void onEnumerateDefaultModes(PromiseWithSettingsListPtr promise, const char *deviceID) = 0; virtual void onGetUserMedia(PromiseWithMediaStreamTrackListPtr promise, ConstraintsPtr constraints) = 0; }; @@ -100,9 +102,10 @@ namespace ortc }; static const char *toString(States state); - ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::Constraints, Constraints) - ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithDeviceList, PromiseWithDeviceList) - ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithMediaStreamTrackList, PromiseWithMediaStreamTrackList) + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::Constraints, Constraints); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithDeviceList, PromiseWithDeviceList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithMediaStreamTrackList, PromiseWithMediaStreamTrackList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, PromiseWithSettingsList); public: MediaDevices( @@ -138,6 +141,7 @@ namespace ortc static SupportedConstraintsPtr getSupportedConstraints(); static PromiseWithDeviceListPtr enumerateDevices(); + static PromiseWithSettingsListPtr enumerateDefaultModes(const char *deviceID); static PromiseWithMediaStreamTrackListPtr getUserMedia(const Constraints &constraints = Constraints()); @@ -163,6 +167,10 @@ namespace ortc #pragma mark virtual void onEnumerateDevices(PromiseWithDeviceListPtr promise) override; + virtual void onEnumerateDefaultModes( + PromiseWithSettingsListPtr promise, + const char *deviceID + ) override; virtual void onGetUserMedia(PromiseWithMediaStreamTrackListPtr promise, ConstraintsPtr constraints) override; @@ -223,10 +231,11 @@ namespace ortc interaction IMediaDevicesFactory { - typedef IMediaDevicesTypes::Constraints Constraints; - typedef IMediaDevicesTypes::SupportedConstraintsPtr SupportedConstraintsPtr; - typedef IMediaDevicesTypes::PromiseWithDeviceListPtr PromiseWithDeviceListPtr; - typedef IMediaDevicesTypes::PromiseWithMediaStreamTrackListPtr PromiseWithMediaStreamTrackListPtr; + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::Constraints, Constraints); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::SupportedConstraints, SupportedConstraints); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithDeviceList, PromiseWithDeviceList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithMediaStreamTrackList, PromiseWithMediaStreamTrackList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithSettingsList, PromiseWithSettingsList); static IMediaDevicesFactory &singleton(); @@ -237,6 +246,7 @@ namespace ortc virtual SupportedConstraintsPtr getSupportedConstraints(); virtual PromiseWithDeviceListPtr enumerateDevices(); + virtual PromiseWithSettingsListPtr enumerateDefaultModes(const char *deviceID); virtual PromiseWithMediaStreamTrackListPtr getUserMedia(const Constraints &constraints = Constraints()); @@ -252,6 +262,7 @@ ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaDevicesTypes::ConstraintsPtr, ConstraintsPt ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IMediaDevicesAsyncDelegate::PromiseWithDeviceListPtr, PromiseWithDeviceListPtr) ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IMediaDevicesAsyncDelegate::PromiseWithMediaStreamTrackListPtr, PromiseWithMediaStreamTrackListPtr) ZS_DECLARE_PROXY_METHOD_1(onEnumerateDevices, PromiseWithDeviceListPtr) +ZS_DECLARE_PROXY_METHOD_2(onEnumerateDefaultModes, PromiseWithSettingsListPtr, const char *) ZS_DECLARE_PROXY_METHOD_2(onGetUserMedia, PromiseWithMediaStreamTrackListPtr, ConstraintsPtr) ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_MediaEngine.h b/ortc/internal/ortc_MediaEngine.h new file mode 100644 index 00000000..929b79f4 --- /dev/null +++ b/ortc/internal/ortc_MediaEngine.h @@ -0,0 +1,976 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include + +namespace ortc +{ + namespace internal + { + ZS_DECLARE_INTERACTION_PTR(IMediaEngineFactory); + + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceCapture); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceCaptureAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceCaptureVideo); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceRender); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaDeviceRenderAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForRTPSenderChannelAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForRTPSenderChannelVideo); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForRTPReceiverChannelAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForRTPReceiverChannelVideo); + + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCaptureAudioForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCaptureVideoForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceRenderAudioForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPEncoderForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPEncoderAudioForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPEncoderVideoForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPDecoderForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPDecoderAudioForMediaEngine); + ZS_DECLARE_INTERACTION_PTR(IRTPDecoderVideoForMediaEngine); + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForORTC + #pragma mark + + interaction IMediaEngineForORTC + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForORTC, ForORTC); + + static void setLogLevel(Log::Level level); + static void ntpServerTime(const Milliseconds &value); + static void startMediaTracing(); + static void stopMediaTracing(); + static bool isMediaTracing(); + static bool saveMediaTrace(String filename); + static bool saveMediaTrace(String host, int port); + + virtual ~IMediaEngineForORTC() {} + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDevice + #pragma mark + + interaction IMediaEngineForMediaDevice + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDevice, ForDevice); + + virtual void notifyDeviceIsIdleOrShutdownStateChanged() = 0; + + virtual ~IMediaEngineForMediaDevice() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDeviceCapture + #pragma mark + + interaction IMediaEngineForMediaDeviceCapture : public IMediaEngineForMediaDevice + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::MediaDeviceObjectID, MediaDeviceObjectID); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceCapture, ForMediaDeviceCapture); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + + typedef zsLib::PromiseWithHolderPtr MediaDeviceCapturePromise; + ZS_DECLARE_PTR(MediaDeviceCapturePromise); + + static MediaDeviceCapturePromisePtr createMediaDeviceCapture( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ); + + virtual ~IMediaEngineForMediaDeviceCapture() {} + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDeviceCaptureAudio + #pragma mark + + interaction IMediaEngineForMediaDeviceCaptureAudio : public IMediaEngineForMediaDeviceCapture + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceCaptureAudio, ForMediaDeviceCaptureAudio); + + virtual ~IMediaEngineForMediaDeviceCaptureAudio() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDeviceCaptureVideo + #pragma mark + + interaction IMediaEngineForMediaDeviceCaptureVideo : public IMediaEngineForMediaDeviceCapture + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceCaptureVideo, ForMediaDeviceCaptureVideo); + + virtual ~IMediaEngineForMediaDeviceCaptureVideo() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDeviceRender + #pragma mark + + interaction IMediaEngineForMediaDeviceRender : public IMediaEngineForMediaDevice + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceRender, ForMediaDeviceRender); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::MediaDeviceObjectID, MediaDeviceObjectID); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + + typedef zsLib::PromiseWithHolderPtr MediaDeviceRenderPromise; + ZS_DECLARE_PTR(MediaDeviceRenderPromise); + + static MediaDeviceRenderPromisePtr createMediaDeviceRender( + MediaDeviceObjectID repaceExistingDeviceObjectID, + const TrackConstraints &constraints, + IMediaDeviceRenderDelegatePtr delegate + ); + + virtual ~IMediaEngineForMediaDeviceRender() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForMediaDeviceRenderAudio : public IMediaEngineForMediaDeviceRender + #pragma mark + + interaction IMediaEngineForMediaDeviceRenderAudio : public IMediaEngineForMediaDeviceRender + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaDeviceRenderAudio, ForMediaDeviceRenderAudio); + + virtual ~IMediaEngineForMediaDeviceRenderAudio() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTP + #pragma mark + + interaction IMediaEngineForRTP + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTP, ForRTP); + + virtual void notifyRTPShutdownStateChanged() = 0; + + virtual ~IMediaEngineForRTP() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPDecoder + #pragma mark + + interaction IMediaEngineForRTPDecoder : public IMediaEngineForRTP + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoder, ForRTPDecode); + + virtual ~IMediaEngineForRTPDecoder() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPDecoderAudio + #pragma mark + + interaction IMediaEngineForRTPDecoderAudio : public IMediaEngineForRTPDecoder + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderAudio, ForRTPDecodeAudio); + + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderAudio); + + static PromiseWithRTPDecoderAudioPtr createRTPDecoderAudio( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ); + + virtual ~IMediaEngineForRTPDecoderAudio() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPDecoderVideo + #pragma mark + + interaction IMediaEngineForRTPDecoderVideo : public IMediaEngineForRTPDecoder + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderVideo, ForRTPDecodeVideo); + + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderVideo); + + static PromiseWithRTPDecoderVideoPtr createRTPDecoderVideo( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ); + + virtual ~IMediaEngineForRTPDecoderVideo() {} + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPEncoder + #pragma mark + + interaction IMediaEngineForRTPEncoder : public IMediaEngineForRTP + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoder, ForRTPEncode); + + virtual ~IMediaEngineForRTPEncoder() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPEncoderAudio + #pragma mark + + interaction IMediaEngineForRTPEncoderAudio : public IMediaEngineForRTPEncoder + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderAudio, ForRTPEncodeAudio); + + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderAudio); + + static PromiseWithRTPEncoderAudioPtr createRTPEncoderAudio( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ); + + virtual ~IMediaEngineForRTPEncoderAudio() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineForRTPEncoderVideo + #pragma mark + + interaction IMediaEngineForRTPEncoderVideo : public IMediaEngineForRTPEncoder + { + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderVideo, ForRTPEncodeVideo); + + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderVideo); + + static PromiseWithRTPEncoderVideoPtr createRTPEncoderVideo( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ); + + virtual ~IMediaEngineForRTPEncoderVideo() {} + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine + #pragma mark + + class MediaEngine : public Any, + public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaEngineForORTC, + public IMediaEngineForMediaDeviceCaptureAudio, + public IMediaEngineForMediaDeviceCaptureVideo, + public IMediaEngineForMediaDeviceRenderAudio, + public IMediaEngineForRTPDecoderAudio, + public IMediaEngineForRTPDecoderVideo, + public IMediaEngineForRTPEncoderAudio, + public IMediaEngineForRTPEncoderVideo, + public IMediaDevicesDelegate, + public zsLib::IWakeDelegate, + public zsLib::ITimerDelegate, + public zsLib::IPromiseSettledDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IMediaEngineFactory; + friend interaction IMediaEngineForORTC; + friend interaction IMediaEngineForMediaDeviceCapture; + friend interaction IMediaEngineForMediaDeviceCaptureAudio; + friend interaction IMediaEngineForMediaDeviceCaptureVideo; + friend interaction IMediaEngineForMediaDeviceRender; + friend interaction IMediaEngineForMediaDeviceRenderAudio; + friend interaction IMediaEngineForRTPSenderChannelAudio; + friend interaction IMediaEngineForRTPSenderChannelVideo; + friend interaction IMediaEngineForRTPReceiverChannelAudio; + friend interaction IMediaEngineForRTPReceiverChannelVideo; + friend interaction IMediaEngineForRTPDecoder; + friend interaction IMediaEngineForRTPDecoderAudio; + friend interaction IMediaEngineForRTPDecoderVideo; + friend interaction IMediaEngineForRTPEncoder; + friend interaction IMediaEngineForRTPEncoderAudio; + friend interaction IMediaEngineForRTPEncoderVideo; + + enum States + { + State_First, + + State_Pending = State_First, + State_WakingUp, + State_Ready, + State_GoingToSleep, + State_Sleeping, + State_ShuttingDown, + State_Shutdown, + + State_Last = State_Shutdown, + }; + + static const char *toString(States state); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::MediaDeviceObjectID, MediaDeviceObjectID); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::PromiseWithDeviceList, PromiseWithDeviceList); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevicesTypes::DeviceList, DeviceList); + ZS_DECLARE_TYPEDEF_PTR(std::list, StringList); + + struct PendingForMediaDeviceCapture + { + MediaDeviceObjectID repaceExistingDeviceObjectID_ {}; + Kinds kind_ { IMediaStreamTrackTypes::Kind_Audio}; + MediaDeviceCapturePromisePtr promise_; + TrackConstraintsPtr constraints_; + IMediaDeviceCaptureDelegatePtr delegate_; + }; + + struct PendingForMediaDeviceRenderInfo + { + MediaDeviceObjectID repaceExistingDeviceObjectID_{}; + MediaDeviceRenderPromisePtr promise_; + TrackConstraintsPtr constraints_; + IMediaDeviceRenderDelegatePtr delegate_; + }; + + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingForMediaDeviceCaptureList); + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingForMediaDeviceRenderList); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderAudio); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderVideo); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderAudio); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderVideo); + + struct PendingForRTPDecodeAudio + { + PromiseWithRTPDecoderAudioPtr promise_; + ParametersPtr parameters_; + IRTPDecoderDelegatePtr delegate_; + }; + + struct PendingForRTPDecodeVideo + { + PromiseWithRTPDecoderVideoPtr promise_; + ParametersPtr parameters_; + IRTPDecoderDelegatePtr delegate_; + }; + + struct PendingForRTPEncodeAudio + { + PromiseWithRTPEncoderAudioPtr promise_; + ParametersPtr parameters_; + IRTPEncoderDelegatePtr delegate_; + }; + + struct PendingForRTPEncodeVideo + { + PromiseWithRTPEncoderVideoPtr promise_; + ParametersPtr parameters_; + IRTPEncoderDelegatePtr delegate_; + }; + + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingForRTPDecodeAudioList); + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingForRTPDecodeVideoList); + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingForRTPEncodeAudioList); + ZS_DECLARE_TYPEDEF_PTR(std::list, PendingForRTPEncodeVideoList); + + ZS_DECLARE_TYPEDEF_PTR(ortc::services::IHTTP, UseHTTP); + ZS_DECLARE_TYPEDEF_PTR(IMediaDevices, UseMediaDevices); + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceCaptureForMediaEngine, UseMediaDeviceCapture); + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceCaptureAudioForMediaEngine, UseMediaDeviceCaptureAudio); + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceCaptureVideoForMediaEngine, UseMediaDeviceCaptureVideo); + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceRenderForMediaEngine, UseMediaDeviceRender); + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceRenderAudioForMediaEngine, UseMediaDeviceRenderAudio); + ZS_DECLARE_TYPEDEF_PTR(IRTPForMediaEngine, UseRTP); + ZS_DECLARE_TYPEDEF_PTR(IRTPEncoderForMediaEngine, UseRTPEncoder); + ZS_DECLARE_TYPEDEF_PTR(IRTPEncoderAudioForMediaEngine, UseRTPEncoderAudio); + ZS_DECLARE_TYPEDEF_PTR(IRTPEncoderVideoForMediaEngine, UseRTPEncoderVideo); + ZS_DECLARE_TYPEDEF_PTR(IRTPDecoderForMediaEngine, UseRTPDecoder); + ZS_DECLARE_TYPEDEF_PTR(IRTPDecoderAudioForMediaEngine, UseRTPDecoderAudio); + ZS_DECLARE_TYPEDEF_PTR(IRTPDecoderVideoForMediaEngine, UseRTPDecoderVideo); + + typedef String DeviceID; + typedef std::map DeviceCaptureMap; + typedef std::map DeviceRenderMap; + + typedef PUID ObjectID; + typedef std::map RTPDecoderMap; + typedef std::map RTPEncoderMap; + + typedef PUID PromiseID; + typedef std::map PromiseMap; + + public: + MediaEngine( + const make_private &, + IMessageQueuePtr queue + ); + + protected: + MediaEngine(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) + {} + + void init(); + + public: + virtual ~MediaEngine(); + + static MediaEnginePtr singleton(); + static MediaEnginePtr create(); + + static MediaEnginePtr convert(ForORTCPtr object); + static MediaEnginePtr convert(ForMediaDeviceCapturePtr object); + static MediaEnginePtr convert(ForMediaDeviceRenderPtr object); + static MediaEnginePtr convert(ForMediaDeviceRenderAudioPtr object); + static MediaEnginePtr convert(ForMediaDeviceCaptureAudioPtr object); + static MediaEnginePtr convert(ForMediaDeviceCaptureVideoPtr object); + static MediaEnginePtr convert(ForRTPPtr object); + static MediaEnginePtr convert(ForRTPDecodePtr object); + static MediaEnginePtr convert(ForRTPDecodeAudioPtr object); + static MediaEnginePtr convert(ForRTPDecodeVideoPtr object); + static MediaEnginePtr convert(ForRTPEncodePtr object); + static MediaEnginePtr convert(ForRTPEncodeAudioPtr object); + static MediaEnginePtr convert(ForRTPEncodeVideoPtr object); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForORTC + #pragma mark + + static void setLogLevel(Log::Level level) { auto engine = singleton(); if (!engine) return; engine->internalSetLogLevel(level); } + static void ntpServerTime(const Milliseconds &value) { auto engine = singleton(); if (!engine) return; engine->internalNTPServerTime(value); } + static void startMediaTracing() { auto engine = singleton(); if (!engine) return; engine->internalStartMediaTracing(); } + static void stopMediaTracing() { auto engine = singleton(); if (!engine) return; engine->internalStopMediaTracing(); } + static bool isMediaTracing() { auto engine = singleton(); if (!engine) return false; return engine->internalIsMediaTracing(); } + static bool saveMediaTrace(String filename) { auto engine = singleton(); if (!engine) return false; return engine->internalSaveMediaTrace(filename); } + static bool saveMediaTrace(String host, int port) { auto engine = singleton(); if (!engine) return false; return engine->internalSaveMediaTrace(host, port); } + + virtual void internalSetLogLevel(Log::Level level); + virtual void internalNTPServerTime(const Milliseconds &value); + virtual void internalStartMediaTracing(); + virtual void internalStopMediaTracing(); + virtual bool internalIsMediaTracing(); + virtual bool internalSaveMediaTrace(String filename); + virtual bool internalSaveMediaTrace(String host, int port); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDevice + #pragma mark + + virtual void notifyDeviceIsIdleOrShutdownStateChanged() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceCapture + #pragma mark + + static MediaDeviceCapturePromisePtr createMediaDeviceCapture( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) { auto engine = singleton(); if (!engine) return MediaDeviceCapturePromise::createRejected(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "singleton gone"), IORTCForInternal::queueDelegate()); return engine->innerCreateMediaDeviceCapture(repaceExistingDeviceObjectID, kind, constraints, delegate); } + + virtual MediaDeviceCapturePromisePtr innerCreateMediaDeviceCapture( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ); + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceCaptureAudio + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceCaptureVideo + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceRender + #pragma mark + + + static MediaDeviceRenderPromisePtr createMediaDeviceRender( + MediaDeviceObjectID repaceExistingDeviceObjectID, + const TrackConstraints &constraints, + IMediaDeviceRenderDelegatePtr delegate + ) { auto engine = singleton(); if (!engine) return MediaDeviceRenderPromise::createRejected(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "singleton gone"), IORTCForInternal::queueDelegate()); return engine->innerCreateMediaDeviceRender(repaceExistingDeviceObjectID, constraints, delegate); } + + virtual MediaDeviceRenderPromisePtr innerCreateMediaDeviceRender( + MediaDeviceObjectID repaceExistingDeviceObjectID, + const TrackConstraints &constraints, + IMediaDeviceRenderDelegatePtr delegate + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForMediaDeviceRenderAudio + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTP + #pragma mark + + virtual void notifyRTPShutdownStateChanged() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPDecoder + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPDecoderAudio + #pragma mark + + static PromiseWithRTPDecoderAudioPtr createRTPDecoderAudio( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) { auto engine = singleton(); if (!engine) return PromiseWithRTPDecoderAudio::createRejected(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "singleton gone"), IORTCForInternal::queueDelegate()); return engine->innerCreateRTPDecoderAudio(parameters, delegate); } + + virtual PromiseWithRTPDecoderAudioPtr innerCreateRTPDecoderAudio( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPDecoderVideo + #pragma mark + + static PromiseWithRTPDecoderVideoPtr createRTPDecoderVideo( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ) { auto engine = singleton(); if (!engine) return PromiseWithRTPDecoderVideo::createRejected(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "singleton gone"), IORTCForInternal::queueDelegate()); return engine->innerCreateRTPDecoderVideo(parameters, delegate); } + + virtual PromiseWithRTPDecoderVideoPtr innerCreateRTPDecoderVideo( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ); + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPEncoder + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPEncoderAudio + #pragma mark + + static PromiseWithRTPEncoderAudioPtr createRTPEncoderAudio( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) { auto engine = singleton(); if (!engine) return PromiseWithRTPEncoderAudio::createRejected(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "singleton gone"), IORTCForInternal::queueDelegate()); return engine->createRTPEncoderAudio(parameters, delegate); } + + virtual PromiseWithRTPEncoderAudioPtr innerCreateRTPEncoderAudio( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaEngineForRTPEncoderVideo + #pragma mark + + static PromiseWithRTPEncoderVideoPtr createRTPEncoderVideo( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ) { auto engine = singleton(); if (!engine) return PromiseWithRTPEncoderVideo::createRejected(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "singleton gone"), IORTCForInternal::queueDelegate()); return engine->innerCreateRTPEncoderVideo(parameters, delegate); } + + virtual PromiseWithRTPEncoderVideoPtr innerCreateRTPEncoderVideo( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ); + + protected: + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IMediaDevicesDelegate + #pragma mark + + //----------------------------------------------------------------------- + virtual void onMediaDevicesChanged() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => ITimerDelegate + #pragma mark + + virtual void onTimer(ITimerPtr timer) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => IPromiseSettledDelegate + #pragma mark + + virtual void onPromiseSettled(PromisePtr promise) override; + + protected: + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine::WebRtcTraceCallback + #pragma mark + + class WebRtcTraceCallback : public webrtc::TraceCallback + { + public: + virtual void Print(webrtc::TraceLevel level, const char* message, int length) override; + }; + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine::WebRtcTraceCallback + #pragma mark + + class WebRtcLogSink : public rtc::LogSink + { + public: + virtual void OnLogMessage(const std::string& message) override; + }; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaEngine => webrtc::SetupEventTracer + #pragma mark + +#if defined(WINRT) + static const unsigned char *GetCategoryGroupEnabled(const char *categoryGroup); + + static void __cdecl AddTraceEvent( + char phase, + const unsigned char *categoryGroupEnabled, + const char *name, + uint64 id, + int numArgs, + const char **argNames, + const unsigned char *argTypes, + const uint64 *argValues, + unsigned char flags + ); +#endif //defined(WINRT) + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark (internal) + #pragma mark + +#if defined(WINRT) + virtual void internalAddTraceEvent( + char phase, + const unsigned char *categoryGroupEnabled, + const char *name, + uint64_t id, + int numArgs, + const char **argNames, + const unsigned char *argTypes, + const uint64_t *argValues, + unsigned char flags + ); +#endif //defined(WINRT) + + bool isPending() const { return State_Pending == currentState_; } + bool isWakingUp() const { return State_WakingUp == currentState_; } + bool isReady() const { return State_Ready == currentState_; } + bool isGoingToSleep() const { return State_GoingToSleep == currentState_; } + bool isSleeping() const { return State_Sleeping == currentState_; } + bool isShuttingDown() const { return State_ShuttingDown == currentState_; } + bool isShutdown() const { return State_Shutdown == currentState_; } + + void cancel(); + bool stepShutdownPendingRequests(); + bool stepShutdownDevicesAndRTP(); + + void step(); + + bool stepPendingPromises(); + + bool stepRefreshDeviceList(); + + void stepFixState(); + + bool stepWakeUp1(); + void onStepWakeUp1(PromisePtr promise); + + bool stepGoingToSleep1(); + void onStepGoingToSleep1(PromisePtr promise); + + bool stepShutdownDevices(); + bool stepShutdownRTP(); + bool stepStartPendingDevices(); + bool stepStartPendingRTP(); + bool stepReady1(); + void onReady1(PromisePtr promise); + + void performAsync(std::function func); + + template + PromisePtr performAsyncClosure(const Closure &closure) { auto promise = Promise::create(); pendingPromises_[promise->getID()] = promise; postClosure([promise, closure] { closure(); promise->resolve(); }); return promise; } + + template + void performAsyncClosure(PromisePtr promise, const Closure &closure) { pendingPromises_[promise->getID()] = promise; postClosure([closure] { closure(); }); } + + void setState(States state); + void setError(PromisePtr promise); + void setError(WORD errorCode, const char *inReason); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark (data) + #pragma mark + + AutoPUID id_; + MediaEngineWeakPtr thisWeak_; + + MediaEnginePtr gracefulShutdownReference_; + + std::unique_ptr traceCallback_; + std::unique_ptr logSink_; + rtc::TraceLog traceLog_; + + States currentState_ {State_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + + bool refreshDevicesList_ {true}; + IMediaDevicesSubscriptionPtr devicesSubscription_; + PromiseWithDeviceListPtr devicesListPromise_; + DeviceListPtr mediaDevices_; + + PendingForMediaDeviceCaptureList pendingForMediaDeviceCaptures_; + PendingForMediaDeviceRenderList pendingForMediaDeviceRenders_; + + PendingForRTPDecodeAudioList pendingForRTPDecodeAudios_; + PendingForRTPDecodeVideoList pendingForRTPDecodeVideos_; + PendingForRTPEncodeAudioList pendingForRTPEncodeAudios_; + PendingForRTPEncodeVideoList pendingForRTPEncodeVideos_; + + std::atomic checkForIdleDevices_ {}; + std::atomic shuttingDownIdleDevices_ {}; + DeviceCaptureMap captureDevices_; + DeviceRenderMap renderDevices_; + + std::atomic checkForShutdownRTP_ {}; + RTPEncoderMap rtpEncoders_; + RTPDecoderMap rtpDecoders_; + + std::atomic completedWakeUp1_ {}; + + std::atomic completedGoingToSleep1_ {}; + + PromiseMap pendingPromises_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaEngineFactory + #pragma mark + + interaction IMediaEngineFactory + { + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceCapture::MediaDeviceCapturePromise, MediaDeviceCapturePromise); + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceRender::MediaDeviceRenderPromise, MediaDeviceRenderPromise); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderAudio::PromiseWithRTPDecoderAudio, PromiseWithRTPDecoderAudio); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderVideo::PromiseWithRTPDecoderVideo, PromiseWithRTPDecoderVideo); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderAudio::PromiseWithRTPEncoderAudio, PromiseWithRTPEncoderAudio); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderVideo::PromiseWithRTPEncoderVideo, PromiseWithRTPEncoderVideo); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDevice::MediaDeviceObjectID, MediaDeviceObjectID); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + + static IMediaEngineFactory &singleton(); + + virtual MediaEnginePtr create(); + + virtual void setLogLevel(Log::Level level); + virtual void ntpServerTime(const Milliseconds &value); + virtual void startMediaTracing(); + virtual void stopMediaTracing(); + virtual bool isMediaTracing(); + virtual bool saveMediaTrace(String filename); + virtual bool saveMediaTrace(String host, int port); + + virtual MediaDeviceCapturePromisePtr createMediaDeviceCapture( + MediaDeviceObjectID repaceExistingDeviceObjectID, + Kinds kind, + const TrackConstraints &constraints, + IMediaDeviceCaptureDelegatePtr delegate + ); + + virtual MediaDeviceRenderPromisePtr createMediaDeviceRender( + MediaDeviceObjectID repaceExistingDeviceObjectID, + const TrackConstraints &constraints, + IMediaDeviceRenderDelegatePtr delegate + ); + + virtual PromiseWithRTPDecoderAudioPtr createRTPDecoderAudio( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ); + virtual PromiseWithRTPDecoderVideoPtr createRTPDecoderVideo( + const Parameters ¶meters, + IRTPDecoderDelegatePtr delegate + ); + + virtual PromiseWithRTPEncoderAudioPtr createRTPEncoderAudio( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ); + virtual PromiseWithRTPEncoderVideoPtr createRTPEncoderVideo( + const Parameters ¶meters, + IRTPEncoderDelegatePtr delegate + ); + }; + + class MediaEngineFactory : public IFactory {}; + } +} diff --git a/ortc/internal/ortc_MediaStreamTrack.h b/ortc/internal/ortc_MediaStreamTrack.h index f8c14ab2..bc8348b3 100644 --- a/ortc/internal/ortc_MediaStreamTrack.h +++ b/ortc/internal/ortc_MediaStreamTrack.h @@ -33,257 +33,33 @@ #include -#include -#include +#include +#include +#include +#include + +#include #include #include #include -#include +#include namespace ortc { namespace internal { ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForSettings); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSender); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannel); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannelAudio); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannelVideo); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiver); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannel); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannelMediaBase); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannelAudio); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannelVideo); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForMediaDevices); - - ZS_DECLARE_INTERACTION_PTR(IRTPSenderForMediaStreamTrack); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelForMediaStreamTrack); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverForMediaStreamTrack); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForMediaStreamTrack); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForMediaStreamTrack); + ZS_DECLARE_INTERACTION_PTR(IMediaEngineForMediaStreamTrack); ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackAsyncDelegate); - - using zsLib::FLOAT; - using zsLib::INT; - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPSender - #pragma mark - - interaction IMediaStreamTrackForRTPSender - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSender, ForSender) - - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds) - - virtual PUID getID() const = 0; - - virtual void setSender(IRTPSenderPtr sender) = 0; - - virtual Kinds kind() const = 0; - - virtual void notifyAttachSenderChannel(RTPSenderChannelPtr channel) = 0; - virtual void notifyDetachSenderChannel(RTPSenderChannelPtr channel) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPSenderChannel - #pragma mark - - interaction IMediaStreamTrackForRTPSenderChannel - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannel, ForSenderChannel) - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPSenderChannelMediaBase - #pragma mark - interaction IMediaStreamTrackForRTPSenderChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase, ForSenderChannelMediaBase) - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPSenderChannelAudio - #pragma mark - - interaction IMediaStreamTrackForRTPSenderChannelAudio : public IMediaStreamTrackForRTPSenderChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelAudio, ForSenderChannelAudio) - - virtual ~IMediaStreamTrackForRTPSenderChannelAudio() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPSenderChannelVideo - #pragma mark - - interaction IMediaStreamTrackForRTPSenderChannelVideo : public IMediaStreamTrackForRTPSenderChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelVideo, ForSenderChannelVideo) + ZS_DECLARE_INTERACTION_PTR(IMediaChannelForMediaStreamTrack); - virtual ~IMediaStreamTrackForRTPSenderChannelVideo() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPReceiver - #pragma mark - - interaction IMediaStreamTrackForRTPReceiver - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiver, ForReceiver) - - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds) - - static MediaStreamTrackPtr create(Kinds kind); - - virtual PUID getID() const = 0; - - virtual void setReceiver(IRTPReceiverPtr receiver) = 0; - - virtual void notifyActiveReceiverChannel(RTPReceiverChannelPtr channel) = 0; - - virtual void setH264Rendering(bool h264Rendering) = 0; - virtual bool isH264Rendering() = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPReceiverChannel - #pragma mark - - interaction IMediaStreamTrackForRTPReceiverChannel - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiverChannel, ForReceiverChannel) - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPReceiverChannelMediabase - #pragma mark - - interaction IMediaStreamTrackForRTPReceiverChannelMediabase - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiverChannelMediabase, ForReceiverChannelMediaBase) - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPReceiverChannelAudio - #pragma mark - - interaction IMediaStreamTrackForRTPReceiverChannelAudio : public IMediaStreamTrackForRTPReceiverChannelMediabase - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiverChannelAudio, ForReceiverChannelAudio) - - virtual ~IMediaStreamTrackForRTPReceiverChannelAudio() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPReceiverChannelVideo - #pragma mark - - interaction IMediaStreamTrackForRTPReceiverChannelVideo : public IMediaStreamTrackForRTPReceiverChannelMediabase - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiverChannelVideo, ForReceiverChannelVideo) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - virtual void renderVideoFrame(VideoFramePtr videoFrame) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForMediaDevices - #pragma mark - - interaction IMediaStreamTrackForMediaDevices - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaDevices, ForMediaDevices) - - virtual ~IMediaStreamTrackForMediaDevices() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IMediaStreamTrackForRTPMediaEngine - #pragma mark - - interaction IMediaStreamTrackForRTPMediaEngine - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPMediaEngine, ForMediaEngine) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Settings, Settings) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame) - - virtual Kinds kind() const = 0; - virtual String id() const = 0; - virtual bool remote() const = 0; - - virtual TrackConstraintsPtr getConstraints() const = 0; - virtual SettingsPtr getSettings() const = 0; - - virtual void renderVideoFrame(VideoFramePtr videoFrame) = 0; - virtual void sendCapturedVideoFrame(VideoFramePtr videoFrame) = 0; - }; + using zsLib::FLOAT; + using zsLib::INT; //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -306,7 +82,6 @@ namespace ortc virtual ElementPtr toDebug() const = 0; }; - //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -318,8 +93,6 @@ namespace ortc interaction IMediaStreamTrackAsyncDelegate { ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelForMediaStreamTrack, UseReceiverChannel); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelForMediaStreamTrack, UseSenderChannel); virtual void onResolveStatsPromise(IStatsProvider::PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) = 0; @@ -327,11 +100,6 @@ namespace ortc PromisePtr promise, TrackConstraintsPtr constraints ) = 0; - - virtual void onSetActiveReceiverChannel(UseReceiverChannelPtr channel) = 0; - - virtual void onAttachSenderChannel(UseSenderChannelPtr channel) = 0; - virtual void onDetachSenderChannel(UseSenderChannelPtr channel) = 0; }; //------------------------------------------------------------------------- @@ -345,18 +113,15 @@ namespace ortc class MediaStreamTrack : public Noop, public MessageQueueAssociator, public SharedRecursiveLock, - public IMediaStreamTrack, - public IMediaStreamTrackForRTPSender, - public IMediaStreamTrackForRTPSenderChannel, - public IMediaStreamTrackForRTPSenderChannelAudio, - public IMediaStreamTrackForRTPSenderChannelVideo, + public internal::IMediaStreamTrack, + public IMediaStreamTrackForMediaStream, + public IMediaStreamTrackForMediaStreamTrackChannel, + public IMediaStreamTrackForMediaStreamTrackSubscriberMedia, + public IMediaStreamTrackForMediaStreamTrackSubscriberRTP, public IMediaStreamTrackForRTPReceiver, public IMediaStreamTrackForRTPReceiverChannel, - public IMediaStreamTrackForRTPReceiverChannelAudio, - public IMediaStreamTrackForRTPReceiverChannelVideo, - public IMediaStreamTrackForMediaDevices, - public IMediaStreamTrackForRTPMediaEngine, - public IMediaStreamTrackForMediaStream, + public IMediaStreamTrackForRTPSender, + public IMediaStreamTrackForRTPSenderChannel, public IWakeDelegate, public zsLib::ITimerDelegate, public zsLib::IPromiseSettledDelegate, @@ -366,37 +131,55 @@ namespace ortc struct make_private {}; public: - friend interaction IMediaStreamTrack; + friend interaction ortc::IMediaStreamTrack; + friend interaction internal::IMediaStreamTrack; friend interaction IMediaStreamTrackFactory; - friend interaction IMediaStreamTrackForRTPSender; - friend interaction IMediaStreamTrackForRTPSenderChannel; - friend interaction IMediaStreamTrackForRTPSenderChannelAudio; - friend interaction IMediaStreamTrackForRTPSenderChannelVideo; + friend interaction IMediaStreamTrackForMediaStream; + friend interaction IMediaStreamTrackForMediaStreamTrackChannel; + friend interaction IMediaStreamTrackForMediaStreamTrackSubscriberMedia; + friend interaction IMediaStreamTrackForMediaStreamTrackSubscriberRTP; friend interaction IMediaStreamTrackForRTPReceiver; friend interaction IMediaStreamTrackForRTPReceiverChannel; - friend interaction IMediaStreamTrackForRTPReceiverChannelMediaBase; - friend interaction IMediaStreamTrackForRTPReceiverChannelAudio; - friend interaction IMediaStreamTrackForRTPReceiverChannelVideo; - friend interaction IMediaStreamTrackForMediaDevices; - friend interaction IMediaStreamTrackForRTPMediaEngine; - friend interaction IMediaStreamTrackForMediaStream; + friend interaction IMediaStreamTrackForRTPSender; + friend interaction IMediaStreamTrackForRTPSenderChannel; + + enum MediaStreamTrackTypes + { + MediaStreamTrackType_First, + + MediaStreamTrackType_Capture = MediaStreamTrackType_First, + MediaStreamTrackType_Receiver, + MediaStreamTrackType_Selector, - ZS_DECLARE_CLASS_PTR(Transport) - friend class Transport; + MediaStreamTrackType_Last = MediaStreamTrackType_Selector, + }; + + const char *toString(MediaStreamTrackTypes type); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderForMediaStreamTrack, UseSender) - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelForMediaStreamTrack, UseSenderChannel) - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverForMediaStreamTrack, UseReceiver) - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelForMediaStreamTrack, UseReceiverChannel) - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForMediaStreamTrack, UseMediaEngine) - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineDeviceResource, UseDeviceResource) + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaStreamTrack, UseMediaEngine); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Constraints, Constraints) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Settings, Settings) + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Constraints, Constraints); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Settings, Settings); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrack, UseChannel); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberForMediaStreamTrack, UseSubscriber); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberMediaForMediaStreamTrack, UseSubscriberMedia); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberRTPForMediaStreamTrack, UseSubscriberRTP); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds); + + ZS_DECLARE_TYPEDEF_PTR(IMediaDeviceCapture::MediaDeviceCapturePromise, MediaDeviceCapturePromise); + + typedef std::unordered_map SubscriberMap; + ZS_DECLARE_PTR(SubscriberMap); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame) + typedef std::unordered_map ChannelMap; + ZS_DECLARE_PTR(ChannelMap); public: MediaStreamTrack( @@ -421,24 +204,21 @@ namespace ortc static MediaStreamTrackPtr create( Kinds kind, - bool remote, + MediaStreamTrackTypes type, TrackConstraintsPtr constraints ); - static MediaStreamTrackPtr convert(IMediaStreamTrackPtr object); - static MediaStreamTrackPtr convert(ForSenderPtr object); - static MediaStreamTrackPtr convert(ForSenderChannelPtr object); - static MediaStreamTrackPtr convert(ForSenderChannelMediaBasePtr object); - static MediaStreamTrackPtr convert(ForSenderChannelAudioPtr object); - static MediaStreamTrackPtr convert(ForSenderChannelVideoPtr object); + static MediaStreamTrackPtr convert(ortc::IMediaStreamTrackPtr object); + static MediaStreamTrackPtr convert(internal::IMediaStreamTrackPtr object); + static MediaStreamTrackPtr convert(ForMediaStreamPtr object); + static MediaStreamTrackPtr convert(ForMediaStreamTrackChannelPtr object); + static MediaStreamTrackPtr convert(ForMediaStreamTrackSubscriberPtr object); + static MediaStreamTrackPtr convert(ForMediaStreamTrackSubscriberMediaPtr object); + static MediaStreamTrackPtr convert(ForMediaStreamTrackSubscriberRTPPtr object); static MediaStreamTrackPtr convert(ForReceiverPtr object); static MediaStreamTrackPtr convert(ForReceiverChannelPtr object); - static MediaStreamTrackPtr convert(ForReceiverChannelMediaBasePtr object); - static MediaStreamTrackPtr convert(ForReceiverChannelAudioPtr object); - static MediaStreamTrackPtr convert(ForReceiverChannelVideoPtr object); - static MediaStreamTrackPtr convert(ForMediaDevicesPtr object); - static MediaStreamTrackPtr convert(ForMediaEnginePtr object); - static MediaStreamTrackPtr convert(ForMediaStreamPtr object); + static MediaStreamTrackPtr convert(ForSenderPtr object); + static MediaStreamTrackPtr convert(ForSenderChannelPtr object); protected: //----------------------------------------------------------------------- @@ -450,10 +230,13 @@ namespace ortc //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrack + #pragma mark MediaStreamTrack => ortc::IMediaStreamTrack #pragma mark - static ElementPtr toDebug(MediaStreamTrackPtr object); + static void trace( + IMediaStreamTrackPtr object, + const char *message = NULL + ); virtual PUID getID() const override {return mID;} @@ -470,7 +253,7 @@ namespace ortc virtual bool remote() const override; virtual States readyState() const override; - virtual IMediaStreamTrackPtr clone() const override; + virtual ortc::IMediaStreamTrackPtr clone() const override; virtual void stop() override; @@ -480,69 +263,65 @@ namespace ortc virtual PromisePtr applyConstraints(const TrackConstraints &constraints) override; - virtual void setVideoRenderCallback(IMediaStreamTrackRenderCallbackPtr callback) override; - virtual void setH264Rendering(bool h264Rendering) override; - virtual bool isH264Rendering() override; + virtual IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackSyncMediaDelegatePtr delegate) override; + + virtual IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackAsyncMediaDelegatePtr delegate) override; + + virtual IMediaStreamTrackRTPSubscriptionPtr subscribeRTP( + const Parameters &rtpEncodingParams, + IMediaStreamTrackRTPDelegatePtr delegate + ) override; //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForSettings + #pragma mark MediaStreamTrack => internal::IMediaStreamTrack #pragma mark //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSender + #pragma mark MediaStreamTrack => IMediaStreamTrackForSettings #pragma mark - // (duplicate) virtual PUID getID() const = 0; + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStream + #pragma mark + virtual bool isEnded() const override; // (duplicate) virtual Kinds kind() const = 0; - - virtual void setSender(IRTPSenderPtr sender) override; - - virtual void notifyAttachSenderChannel(RTPSenderChannelPtr channel) override; - virtual void notifyDetachSenderChannel(RTPSenderChannelPtr channel) override; + // (duplicate) virtual String id() const = 0; + // (duplicate) virtual ElementPtr toDebug() const = 0; //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannel + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackChannel #pragma mark - // (duplicate) virtual PUID getID() const = 0; - //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannelMediaBase + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSubscriber #pragma mark - // (duplicate) virtual PUID getID() const = 0; + virtual void notifySubscriberCancelled(UseSubscriberPtr subscriber) override; //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannelAudio + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSubscriberMedia #pragma mark //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannelVideo + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSubscriberRTP #pragma mark + //----------------------------------------------------------------------- #pragma mark #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiver #pragma mark - static MediaStreamTrackPtr create(Kinds kind); - // (duplicate) virtual PUID getID() const = 0; - virtual void setReceiver(IRTPReceiverPtr receiver) override; - - virtual void notifyActiveReceiverChannel(RTPReceiverChannelPtr channel) override; - - // (duplicate) virtual void setH264Rendering(bool h264Rendering) = 0; - // (duplicate) virtual bool isH264Rendering() = 0; - //----------------------------------------------------------------------- #pragma mark #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannel @@ -552,53 +331,19 @@ namespace ortc //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannelMediaBase + #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSender #pragma mark - + // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannelAudio - #pragma mark - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannelVideo - #pragma mark - - virtual void renderVideoFrame(VideoFramePtr videoFrame) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaDevices - #pragma mark - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaEngine - #pragma mark - // (duplicate) virtual Kinds kind() const = 0; - // (duplicate) virtual String id() const = 0; - // (duplicate) virtual bool remote() const = 0; - - // (duplicate) virtual TrackConstraintsPtr getConstraints() const = 0; - // (duplicate) virtual SettingsPtr getSettings() const = 0; - - // (duplicate) virtual void renderVideoFrame(const webrtc::VideoFrame& videoFrame) = 0; - - virtual void sendCapturedVideoFrame(VideoFramePtr videoFrame) override; //----------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPMediaEngine + #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannel #pragma mark - - virtual bool isEnded() const override; + + // (duplicate) virtual PUID getID() const = 0; // (duplicate) virtual Kinds kind() const = 0; - // (duplicate) virtual String id() const = 0; - // (duplicate) virtual ElementPtr toDebug() const = 0; //----------------------------------------------------------------------- #pragma mark @@ -633,22 +378,12 @@ namespace ortc TrackConstraintsPtr constraints ) override; - virtual void onSetActiveReceiverChannel(UseReceiverChannelPtr channel) override; - - virtual void onAttachSenderChannel(UseSenderChannelPtr channel) override; - virtual void onDetachSenderChannel(UseSenderChannelPtr channel) override; - protected: //----------------------------------------------------------------------- #pragma mark #pragma mark MediaStreamTrack => (internal) #pragma mark - Log::Params log(const char *message) const; - static Log::Params slog(const char *message); - Log::Params debug(const char *message) const; - virtual ElementPtr toDebug() const override; - bool isShuttingDown() const; bool isShutdown() const; @@ -660,7 +395,7 @@ namespace ortc void setState(States state); void setError(WORD error, const char *reason = NULL); - + protected: //----------------------------------------------------------------------- #pragma mark @@ -673,33 +408,26 @@ namespace ortc IMediaStreamTrackDelegateSubscriptions mSubscriptions; - States mCurrentState {State_Live}; - - WORD mLastError {}; - String mLastErrorReason; - - String mTrackID; - Kinds mKind {Kind_First}; - bool mRemote {false}; - String mDeviceID; - bool mH264Rendering {false}; + States currentState_ {State_Live}; - UseSenderWeakPtr mSender; - UseSenderChannelWeakPtr mSenderChannel; - UseReceiverWeakPtr mReceiver; - UseReceiverChannelWeakPtr mReceiverChannel; + WORD lastError_ {}; + String lastErrorReason_; - CapabilitiesPtr mCapabilities; - TrackConstraintsPtr mConstraints; - SettingsPtr mSettings; + String trackID_; + String label_; + Kinds kind_ {Kind_First}; + bool muted_ {false}; + MediaStreamTrackTypes type_ {}; + String deviceID_; - PromiseWithRTPMediaEngineDeviceResourcePtr mDeviceResourceLifetimeHolderPromise; - UseDeviceResourcePtr mDeviceResource; - IMediaStreamTrackRenderCallbackPtr mVideoRendererCallback; + CapabilitiesPtr capabilities_; + TrackConstraintsPtr constraints_; + SettingsPtr settings_; - PromisePtr mCloseDevicePromise; + SubscriberMapPtr subscribers_; + ChannelMapPtr channels_; - ITimerPtr mStatsTimer; + ITimerPtr statsTimer_; }; //------------------------------------------------------------------------- @@ -733,11 +461,6 @@ ZS_DECLARE_PROXY_TYPEDEF(ortc::IStatsProvider::PromiseWithStatsReportPtr, Promis ZS_DECLARE_PROXY_TYPEDEF(ortc::IStatsReportTypes::StatsTypeSet, StatsTypeSet) ZS_DECLARE_PROXY_TYPEDEF(zsLib::PromisePtr, PromisePtr) ZS_DECLARE_PROXY_TYPEDEF(ortc::IMediaStreamTrackTypes::TrackConstraintsPtr, TrackConstraintsPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IMediaStreamTrackAsyncDelegate::UseReceiverChannelPtr, UseReceiverChannelPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IMediaStreamTrackAsyncDelegate::UseSenderChannelPtr, UseSenderChannelPtr) ZS_DECLARE_PROXY_METHOD_2(onResolveStatsPromise, PromiseWithStatsReportPtr, StatsTypeSet) ZS_DECLARE_PROXY_METHOD_2(onApplyConstraints, PromisePtr, TrackConstraintsPtr) -ZS_DECLARE_PROXY_METHOD_1(onSetActiveReceiverChannel, UseReceiverChannelPtr) -ZS_DECLARE_PROXY_METHOD_1(onAttachSenderChannel, UseSenderChannelPtr) -ZS_DECLARE_PROXY_METHOD_1(onDetachSenderChannel, UseSenderChannelPtr) ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_MediaStreamTrackChannel.h b/ortc/internal/ortc_MediaStreamTrackChannel.h new file mode 100644 index 00000000..bc617e80 --- /dev/null +++ b/ortc/internal/ortc_MediaStreamTrackChannel.h @@ -0,0 +1,236 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include +#include + +#include + +#include + +#include + +#include + +namespace ortc +{ + namespace internal + { + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackChannel + #pragma mark + + class MediaStreamTrackChannel : public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaStreamTrackChannelForMediaStreamTrack, + public IMediaStreamTrackChannelForMediaStreamTrackSubscriberMedia, + public IMediaStreamTrackChannelForMediaStreamTrackSubscriberRTP + { + protected: + struct make_private {}; + + public: + friend interaction IMediaStreamTrackChannelForMediaStreamTrack; + friend interaction IMediaStreamTrackChannelForMediaStreamTrackSubscriber; + friend interaction IMediaStreamTrackChannelForMediaStreamTrackSubscriberMedia; + friend interaction IMediaStreamTrackChannelForMediaStreamTrackSubscriberRTP; + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriber, ForMediaStreamTrackSubscriber); + + typedef PUID SubscriberObjectID; + + typedef std::map MediaDelegateMap; + typedef std::map RTPDelegateMap; + + typedef std::queue RTPPacketQueue; + typedef std::queue RTCPPacketQueue; + typedef std::queue AudioFrameQueue; + typedef std::queue VideoFrameQueue; + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::ImmutableParameters, ImmutableParameters); + + ZS_DECLARE_PTR(MediaDelegateMap); + ZS_DECLARE_PTR(RTPDelegateMap); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackChannel, UseMediaStreamTrack); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberForMediaStreamTrackChannel, UseMediaStreamTrackSubscriber); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberMediaForMediaStreamTrackChannel, UseMediaStreamTrackSubscriberMedia); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberRTPForMediaStreamTrackChannel, UseMediaStreamTrackSubscriberRTP); + + public: + MediaStreamTrackChannel( + const make_private &, + IMessageQueuePtr queue + ); + + MediaStreamTrackChannel(Noop, IMessageQueuePtr queue) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) + {} + + protected: + void init(); + + public: + ~MediaStreamTrackChannel(); + + MediaStreamTrackChannelPtr convert(ForMediaStreamTrackPtr object); + MediaStreamTrackChannelPtr convert(ForMediaStreamTrackSubscriberPtr object); + MediaStreamTrackChannelPtr convert(ForMediaStreamTrackSubscriberMediaPtr object); + MediaStreamTrackChannelPtr convert(ForMediaStreamTrackSubscriberRTPPtr object); + + protected: + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaChannel (for MediaStreamTrack) + #pragma mark + + static ForMediaStreamTrackPtr create( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace + ); + + virtual PUID getID() const override { return id_; } + + virtual void shutdown() override; + + virtual void notifyAudioFrame( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + virtual void notifyVideoFrame( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override; + + virtual void notifyRTPPacket( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + virtual void notifyRTCPPacket( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + + virtual void subscribeComplete() override; + + virtual bool shouldCancel(size_t cleanOlderThanTimeIndex) override; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaChannel (ForMediaStreamTrackSubscriber) + #pragma mark + + virtual void notifyCancelled(SubscriberObjectID subscriberID) = 0; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaChannel (ForMediaStreamTrackSubscriberMedia) + #pragma mark + + virtual void subscribeMedia( + SubscriberObjectID subscriberID, + IMediaStreamTrackChannelMediaDelegatePtr delegate + ) override; + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaChannel (ForMediaStreamTrackSubscriberRTP) + #pragma mark + + virtual void subscribeRTP( + SubscriberObjectID subscriberID, + ImmutableParametersPtr params, + IMediaStreamTrackChannelRTPDelegatePtr delegate + ) override; + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrack::RTPSubscriber => (data) + #pragma mark + + AutoPUID id_; + MediaStreamTrackChannelWeakPtr thisWeak_; + + bool shutdown_{ false }; + + ImmutableMediaChannelTracePtr trace_; + + size_t lastUsageTimeIndex_ {}; + + MediaDelegateMap mediaSubscribers_; + RTPDelegateMap rtpSubscribers_; + + RTPPacketQueue rtpQueue_; + RTCPPacketQueue rtcpQueue_; + AudioFrameQueue audioFrames_; + VideoFrameQueue videoFrames_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackChannelFactory + #pragma mark + + interaction IMediaStreamTrackChannelFactory + { + static IMediaStreamTrackChannelFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrack, ForMediaStreamTrack); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + + virtual ForMediaStreamTrackPtr create( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace + ); + }; + + class MediaStreamTrackChannelFactory : public IFactory {}; + + } // namespace internal +} // namespace ortc diff --git a/ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h b/ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h new file mode 100644 index 00000000..16f52a75 --- /dev/null +++ b/ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h @@ -0,0 +1,268 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include +#include + +#include + +#include + +#include + +namespace ortc +{ + namespace internal + { + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia + #pragma mark + + class MediaStreamTrackSubscriberMedia : public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaStreamTrackSubscriberMediaForMediaStreamTrack, + public IMediaStreamTrackSubscriberMediaForMediaStreamTrackChannel, + public IMediaStreamTrackChannelMediaDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IMediaStreamTrackSubscriberForMediaStreamTrack; + friend interaction IMediaStreamTrackSubscriberMediaForMediaStreamTrack; + friend interaction IMediaStreamTrackSubscriberForMediaStreamTrackChannel; + friend interaction IMediaStreamTrackSubscriberMediaForMediaStreamTrackChannel; + + ZS_DECLARE_CLASS_PTR(Subscriber); + + + ZS_DECLARE_TYPEDEF_PTR(MediaStreamTrackSubscriberMedia, UseOuter); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriber, UseMediaChannelBase); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriberMedia, UseMediaChannel); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::OverconstrainedError, OverconstrainedError); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + + public: + MediaStreamTrackSubscriberMedia( + IMessageQueuePtr queue + ); + + MediaStreamTrackSubscriberMedia(Noop, IMessageQueuePtr queue) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) + {} + + protected: + void init(); + + public: + ~MediaStreamTrackSubscriberMedia(); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia => IMediaStreamTrackSubscriberForMediaStreamTrack + #pragma mark + + virtual PUID getID() const override { return id_; } + + virtual void shutdown() override; + + virtual void notifyChannel( + UseMediaChannelBasePtr mediaChannel, + ImmutableMediaChannelTracePtr trace + ) override; + + virtual void notifyTrackMute(bool isMuted) override; + virtual void notifyTrackEnded() override; + virtual void notifyOverConstrained(OverconstrainedErrorPtr error) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia => IMediaStreamTrackSubscriberMediaForMediaStreamTrack + #pragma mark + + static ForMediaStreamTrackPtr create( + IMediaStreamTrackMediaSubscriptionPtr &outSubscription, + IMediaStreamTrackSyncMediaDelegatePtr syncDelegate, + IMediaStreamTrackAsyncMediaDelegatePtr asyncDelegate + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia => IMediaStreamTrackSubscriberForMediaStreamTrackChannel + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia => IMediaStreamTrackSubscriberMediaForMediaStreamTrackChannel + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackChannelDelegate + #pragma mark + + virtual void notifyMediaChannelCancelled(ImmutableMediaChannelTracePtr trace) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackChannelMediaDelegate + #pragma mark + + + virtual void notifyMediaChannelAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + virtual void notifyMediaChannelVideoFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia (for Subscriber) + #pragma mark + + void notifySubscriberCancel(); + + public: + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia::Subscriber + #pragma mark + + class Subscriber : public IMediaStreamTrackMediaSubscription, + public SharedRecursiveLock + { + public: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia::Subscriber => (for MediaSubscriber) + #pragma mark + + static SubscriberPtr create(const SharedRecursiveLock &lock); + + void shutdown(); + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia::Subscriber => IMediaStreamTrackMediaSubscription + #pragma mark + + virtual PUID getID() const { return id_; } + + virtual void cancel(); + + virtual void background(); + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia::Subscriber => (internal) + #pragma mark + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia::Subscriber => (data) + #pragma mark + + AutoPUID id_; + SubscriberWeakPtr thisWeak_; + + bool shutdown_ {false}; + + UseOuterPtr outer_; + + SubscriberPtr backgroundReference_; + }; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberMedia => (data) + #pragma mark + + AutoPUID id_; + MediaStreamTrackSubscriberMediaWeakPtr thisWeak_; + + bool shutdown_{ false }; + + SubscriberWeakPtr subscriber_; + + IMediaStreamTrackSyncMediaDelegatePtr syncDelegate_; + IMediaStreamTrackAsyncMediaDelegatePtr asyncDelegate_; + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSubscriberMediaFactory + #pragma mark + + interaction IMediaStreamTrackSubscriberMediaFactory + { + static IMediaStreamTrackSubscriberMediaFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberMediaForMediaStreamTrack, ForMediaStreamTrack); + + static ForMediaStreamTrackPtr create( + IMediaStreamTrackMediaSubscriptionPtr &outSubscription, + IMediaStreamTrackSyncMediaDelegatePtr syncDelegate, + IMediaStreamTrackAsyncMediaDelegatePtr asyncDelegate + ); + }; + + class MediaStreamTrackSubscriberMediaFactory : public IFactory {}; + + } // namespace internal +} // namespace ortc diff --git a/ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h b/ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h new file mode 100644 index 00000000..af4d072b --- /dev/null +++ b/ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h @@ -0,0 +1,283 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include +#include +#include + +#include + +#include + +#include + +namespace ortc +{ + namespace internal + { + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP + #pragma mark + + class MediaStreamTrackSubscriberRTP : public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IMediaStreamTrackSubscriberRTPForMediaStreamTrack, + public IMediaStreamTrackSubscriberRTPForMediaStreamTrackChannel, + public IMediaStreamTrackChannelMediaDelegate, + public IMediaStreamTrackChannelRTPDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IMediaStreamTrackSubscriberForMediaStreamTrack; + friend interaction IMediaStreamTrackSubscriberRTPForMediaStreamTrack; + friend interaction IMediaStreamTrackSubscriberForMediaStreamTrackChannel; + friend interaction IMediaStreamTrackSubscriberRTPForMediaStreamTrackChannel; + + ZS_DECLARE_CLASS_PTR(Subscriber); + + ZS_DECLARE_TYPEDEF_PTR(MediaStreamTrackSubscriberRTP, UseOuter); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriber, UseMediaChannelBase); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackChannelForMediaStreamTrackSubscriberRTP, UseMediaChannel); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::OverconstrainedError, OverconstrainedError); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + + public: + MediaStreamTrackSubscriberRTP( + IMessageQueuePtr queue + ); + + MediaStreamTrackSubscriberRTP(Noop, IMessageQueuePtr queue) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) + {} + + protected: + void init(); + + public: + ~MediaStreamTrackSubscriberRTP(); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackSubscriberForMediaStreamTrack + #pragma mark + + virtual PUID getID() const override { return id_; } + + virtual void shutdown() override; + + virtual void notifyChannel( + UseMediaChannelBasePtr mediaChannel, + ImmutableMediaChannelTracePtr trace + ) override; + + virtual void notifyTrackMute(bool isMuted) override; + virtual void notifyTrackEnded() override; + virtual void notifyOverConstrained(OverconstrainedErrorPtr error) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackSubscriberRTPForMediaStreamTrack + #pragma mark + + static ForMediaStreamTrackPtr create( + IMediaStreamTrackMediaSubscriptionPtr &outSubscription, + IMediaStreamTrackRTPDelegatePtr delegate + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackSubscriberForMediaStreamTrackChannel + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackSubscriberRTPForMediaStreamTrackChannel + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackChannelDelegate + #pragma mark + + virtual void notifyMediaChannelCancelled(ImmutableMediaChannelTracePtr trace) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackChannelMediaDelegate + #pragma mark + + + virtual void notifyMediaChannelAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + virtual void notifyMediaChannelVideoFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackChannelRTPDelegate + #pragma mark + + + virtual void notifyMediaChannelRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + virtual void notifyMediaChannelRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => (for Subscriber) + #pragma mark + + void notifySubscriberCancel(); + + public: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP::Subscriber + #pragma mark + + class Subscriber : public IMediaStreamTrackMediaSubscription, + public SharedRecursiveLock + { + public: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP::Subscriber => (for MediaSubscriber) + #pragma mark + + static SubscriberPtr create(const SharedRecursiveLock &lock); + + void shutdown(); + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP::Subscriber => IMediaStreamTrackMediaSubscription + #pragma mark + + virtual PUID getID() const { return id_; } + + virtual void cancel(); + + virtual void background(); + + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP::Subscriber => (internal) + #pragma mark + + protected: + //--------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP::Subscriber => (data) + #pragma mark + + AutoPUID id_; + SubscriberWeakPtr thisWeak_; + + bool shutdown_ {false}; + + UseOuterPtr outer_; + + SubscriberPtr backgroundReference_; + }; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackSubscriberRTP => (data) + #pragma mark + + AutoPUID id_; + MediaStreamTrackSubscriberRTPWeakPtr thisWeak_; + + bool shutdown_{ false }; + + SubscriberWeakPtr subscriber_; + + IMediaStreamTrackRTPDelegatePtr delegate_; + + ParametersPtr parameters_; + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackSubscriberRTPFactory + #pragma mark + + interaction IMediaStreamTrackSubscriberRTPFactory + { + static IMediaStreamTrackSubscriberRTPFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackSubscriberRTPForMediaStreamTrack, ForMediaStreamTrack); + + static ForMediaStreamTrackPtr create( + IMediaStreamTrackMediaSubscriptionPtr &outSubscription, + IMediaStreamTrackRTPDelegatePtr delegate + ); + }; + + class MediaStreamTrackSubscriberRTPFactory : public IFactory {}; + + + } // namespace internal +} // namespace ortc diff --git a/ortc/internal/ortc_ORTC.h b/ortc/internal/ortc_ORTC.h index 0b3458b7..babf6e62 100644 --- a/ortc/internal/ortc_ORTC.h +++ b/ortc/internal/ortc_ORTC.h @@ -34,11 +34,18 @@ #include #include -#define ORTC_QUEUE_MAIN_THREAD_NAME "org.ortc.ortcLibMainThread" -#define ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME "org.ortc.ortcLibBlockingMedia" -#define ORTC_QUEUE_CERTIFICATE_GENERATION_NAME "org.ortc.ortcLibCertificateGeneration" -#define ORTC_QUEUE_PACKET_THREAD_NAME "org.ortc.ortcLibPacketThread." -#define ORTC_QUEUE_TOTAL_PACKET_THREADS 4 +#define ORTC_QUEUE_MAIN_THREAD_NAME "org.ortc.ortcLib.MainThread" +#define ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME "org.ortc.ortcLib.BlockingMedia" +#define ORTC_QUEUE_CERTIFICATE_GENERATION_NAME "org.ortc.ortcLib.CertificateGeneration" +#define ORTC_QUEUE_MEDIA_DEVICE_THREAD_NAME "org.ortc.ortcLib.MediaDeviceThread." +#define ORTC_QUEUE_RTP_THREAD_NAME "org.ortc.ortcLib.RTP." +#define ORTC_QUEUE_TOTAL_MEDIA_DEVICE_THREADS 4 +#define ORTC_QUEUE_TOTAL_RTP_THREADS 4 + +#define ORTC_SETTING_ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME "ortc/ortc/" ORTC_QUEUE_BLOCKING_MEDIA_STARTUP_THREAD_NAME +#define ORTC_SETTING_ORTC_QUEUE_CERTIFICATE_GENERATION_NAME "ortc/ortc/" ORTC_QUEUE_CERTIFICATE_GENERATION_NAME +#define ORTC_SETTING_ORTC_QUEUE_MEDIA_DEVICE_THREAD_NAME "ortc/ortc/" ORTC_QUEUE_MEDIA_DEVICE_THREAD_NAME +#define ORTC_SETTING_ORTC_QUEUE_RTP_THREAD_NAME "ortc/ortc/" ORTC_QUEUE_RTP_THREAD_NAME namespace ortc { @@ -59,8 +66,9 @@ namespace ortc static void overrideQueueDelegate(IMessageQueuePtr queue); static IMessageQueuePtr queueDelegate(); static IMessageQueuePtr queueORTC(); - static IMessageQueuePtr queuePacket(); static IMessageQueuePtr queueBlockingMediaStartStopThread(); + static IMessageQueuePtr queueMediaDevices(); + static IMessageQueuePtr queueRTP(); static IMessageQueuePtr queueCertificateGeneration(); static Optional webrtcLogLevel(); @@ -132,7 +140,8 @@ namespace ortc virtual void overrideQueueDelegate(IMessageQueuePtr queue); virtual IMessageQueuePtr queueDelegate() const; virtual IMessageQueuePtr queueORTC() const; - virtual IMessageQueuePtr queuePacket() const; + virtual IMessageQueuePtr queueMediaDevices() const; + virtual IMessageQueuePtr queueRTP() const; virtual IMessageQueuePtr queueBlockingMediaStartStopThread() const; virtual IMessageQueuePtr queueCertificateGeneration() const; @@ -146,6 +155,8 @@ namespace ortc Log::Params log(const char *message) const; static Log::Params slog(const char *message); + void internalSetup(); + protected: //--------------------------------------------------------------------- #pragma mark @@ -161,8 +172,10 @@ namespace ortc mutable IMessageQueuePtr mBlockingMediaStartStopThread; mutable IMessageQueuePtr mCertificateGeneration; - mutable IMessageQueuePtr mPacketQueues[ORTC_QUEUE_TOTAL_PACKET_THREADS]; - mutable size_t mNextPacketQueueThread {}; + mutable IMessageQueuePtr mMediaDeviceQueues[ORTC_QUEUE_TOTAL_MEDIA_DEVICE_THREADS]; + mutable IMessageQueuePtr mRTPQueues[ORTC_QUEUE_TOTAL_RTP_THREADS]; + mutable size_t mNextMediaQueueThread {}; + mutable size_t mNextRTPQueueThread {}; Milliseconds mNTPServerTime {}; diff --git a/ortc/internal/ortc_RTCPPacket.h b/ortc/internal/ortc_RTCPPacket.h deleted file mode 100644 index 7fd5ba8e..00000000 --- a/ortc/internal/ortc_RTCPPacket.h +++ /dev/null @@ -1,1594 +0,0 @@ -/* - - Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include - -#include - -namespace ortc -{ - namespace internal - { - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket - #pragma mark - - class RTCPPacket - { - protected: - struct make_private {}; - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::Report - #pragma mark - - struct Report - { - Report *next() const {return mNext;} - - const BYTE *ptr() const {return mPtr;} - size_t size() const {return mSize;} - - BYTE version() const {return mVersion;} - size_t padding() const {return static_cast(mPadding);} - BYTE reportSpecific() const {return mReportSpecific;} - - BYTE pt() const {return mPT;} - static const char *ptToString(BYTE pt); - const char *ptToString() const {return ptToString(mPT);} - - public: - Report *mNext {}; - - const BYTE *mPtr {}; - size_t mSize {}; - - BYTE mVersion {}; - BYTE mPadding {}; - BYTE mReportSpecific {}; - - BYTE mPT {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SenderReceiverCommonReport - #pragma mark - - struct SenderReceiverCommonReport : public Report - { - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SenderReceiverCommonReport::ReportBlock - #pragma mark - - struct ReportBlock - { - ReportBlock *next() const {return mNext;} - - DWORD ssrc() const {return mSSRC;} - BYTE fractionLost() const {return mFractionLost;} - DWORD cumulativeNumberOfPacketsLost() const {return mCumulativeNumberOfPacketsLost;} - DWORD extendedHighestSequenceNumberReceived() const {return mExtendedHighestSequenceNumberReceived;} - DWORD interarrivalJitter() const {return mInterarrivalJitter;} - DWORD lsr() const {return mLSR;} - DWORD dlsr() const {return mDLSR;} - - public: - ReportBlock *mNext {}; - - DWORD mSSRC {}; - BYTE mFractionLost {}; - DWORD mCumulativeNumberOfPacketsLost {}; - DWORD mExtendedHighestSequenceNumberReceived {}; - DWORD mInterarrivalJitter {}; - DWORD mLSR {}; // last SR timestamp - DWORD mDLSR {}; // delay since last SR - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SenderReceiverCommonReport (public) - #pragma mark - - size_t rc() const {return static_cast(mReportSpecific);} - DWORD ssrcOfSender() const {return mSSRCOfSender;} - - ReportBlock *firstReportBlock() const {return mFirstReportBlock;} - - const BYTE *extension() const {return mExtension;} - size_t extensionSize() const {return mExtensionSize;} - - public: - DWORD mSSRCOfSender {}; - - const BYTE *mExtension {}; - size_t mExtensionSize {}; - - ReportBlock *mFirstReportBlock {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SenderReport - #pragma mark - - struct SenderReport : public SenderReceiverCommonReport - { - // https://tools.ietf.org/html/rfc3550#section-6.4.1 - - static const BYTE kPayloadType {200}; - - SenderReport *nextSenderReport() const {return mNextSenderReport;} - - DWORD ntpTimestampMS() const {return mNTPTimestampMS;} - DWORD ntpTimestampLS() const {return mNTPTimestampLS;} - Time ntpTimestamp() const; - DWORD rtpTimestamp() const {return mRTPTimestamp;} - DWORD senderPacketCount() const {return mSenderPacketCount;} - DWORD senderOctetCount() const {return mSenderOctetCount;} - - public: - SenderReport *mNextSenderReport {}; - - DWORD mNTPTimestampMS {}; - DWORD mNTPTimestampLS {}; - DWORD mRTPTimestamp {}; - DWORD mSenderPacketCount {}; - DWORD mSenderOctetCount {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::ReceiverReport - #pragma mark - - struct ReceiverReport : public SenderReceiverCommonReport - { - // https://tools.ietf.org/html/rfc3550#section-6.4.2 - - static const BYTE kPayloadType {201}; - - ReceiverReport *nextReceiverReport() const {return mNextReceiverReport;} - - DWORD ssrcOfPacketSender() const {return mSSRCOfSender;} - - public: - ReceiverReport *mNextReceiverReport {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES - #pragma mark - - struct SDES : public Report - { - // https://tools.ietf.org/html/rfc3550#section-6.5 - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk - #pragma mark - - struct Chunk - { - static const BYTE kEndOfItemsType = 0; - - struct StringItem - { - BYTE type() const {return mType;} - size_t length() const {return mLength;} - const char *value() const {return mValue;} - - static const char *typeToString(BYTE type); - const char *typeToString() const {return typeToString(mType);} - - public: - StringItem *mNext {}; - - BYTE mType {}; - size_t mLength {}; - const char *mValue {}; - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::CName - #pragma mark - - struct CName : public StringItem - { - // https://tools.ietf.org/html/rfc3550#section-6.5.1 - - static const BYTE kItemType = 1; - - CName *next() const {return static_cast(mNext);} - - const char *userAndDomainName() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Name - #pragma mark - - struct Name : public StringItem - { - // https://tools.ietf.org/html/rfc3550#section-6.5.2 - - static const BYTE kItemType = 2; - - Name *next() const {return static_cast(mNext);} - - const char *commonName() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Email - #pragma mark - - struct Email : public StringItem - { - // https://tools.ietf.org/html/rfc3550#section-6.5.3 - - static const BYTE kItemType = 3; - - Email *next() const {return static_cast(mNext);} - - const char *emailAddress() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Phone - #pragma mark - - struct Phone : public StringItem - { - // https://tools.ietf.org/html/rfc3550#section-6.5.4 - - static const BYTE kItemType = 4; - - Phone *next() const {return static_cast(mNext);} - - const char *phoneNumber() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Loc - #pragma mark - - struct Loc : public StringItem - { - // https://tools.ietf.org/html/rfc3550#section-6.5.5 - - static const BYTE kItemType = 5; - - Loc *next() const {return static_cast(mNext);} - - const char *geographicLocation() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Tool - #pragma mark - - struct Tool : public StringItem - { - // https://tools.ietf.org/html/rfc3550#section-6.5.6 - - static const BYTE kItemType = 6; - - Tool *next() const {return static_cast(mNext);} - - const char *nameVersion() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Note - #pragma mark - - struct Note : public StringItem - { - // https://tools.ietf.org/html/rfc3550#section-6.5.7 - - static const BYTE kItemType = 7; - - Note *next() const {return static_cast(mNext);} - - const char *note() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Priv - #pragma mark - - struct Priv : public StringItem - { - // https://tools.ietf.org/html/rfc3550#section-6.5.8 - - static const BYTE kItemType = 8; - - Priv *next() const {return static_cast(mNext);} - - size_t prefixLength() const {return mPrefixLength;} - const char *prefix() const {return mPrefix;} - - public: - size_t mPrefixLength {}; - const char *mPrefix {}; - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Unknown - #pragma mark - - struct Unknown : public StringItem - { - Unknown *next() const {return static_cast(mNext);} - - const BYTE *ptr() const {return reinterpret_cast(value());} - size_t size() const {return length();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Mid - #pragma mark - - struct Mid : public StringItem - { - // https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-23#section-14.2 - static const BYTE kItemType = 12; // TBD - - Mid *next() const {return static_cast(mNext);} - - const char *mid() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk::Rid - #pragma mark - - struct Rid : public StringItem - { - // https://tools.ietf.org/html/draft-roach-avtext-rid-02#section-4.1 - static const BYTE kItemType = 13; // TBD - - Rid *next() const {return static_cast(mNext);} - - const char *rid() const {return value();} - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::SDES::Chunk - #pragma mark - - Chunk *next() const {return mNext;} - - DWORD ssrc() const {return mSSRC;} - - size_t count() const {return mCount;} - - CName *firstCName() const {return mFirstCName;} - Name *firstName() const {return mFirstName;} - Email *firstEmail() const {return mFirstEmail;} - Phone *firstPhone() const {return mFirstPhone;} - Loc *firstLoc() const {return mFirstLoc;} - Tool *firstTool() const {return mFirstTool;} - Note *firstNote() const {return mFirstNote;} - Priv *firstPriv() const {return mFirstPriv;} - Mid *firstMid() const {return mFirstMid;} - Rid *firstRid() const {return mFirstRid;} - Unknown *firstUnknown() const {return mFirstUnknown;} - - size_t cNameCount() const {return mCNameCount;} - size_t nameCount() const {return mNameCount;} - size_t emailCount() const {return mEmailCount;} - size_t phoneCount() const {return mPhoneCount;} - size_t locCount() const {return mLocCount;} - size_t toolCount() const {return mToolCount;} - size_t noteCount() const {return mNoteCount;} - size_t privCount() const {return mPrivCount;} - size_t midCount() const {return mMidCount;} - size_t ridCount() const {return mRidCount;} - size_t unknownCount() const {return mUnknownCount;} - - CName *cNameAtIndex(size_t index) const; - Name *nameAtIndex(size_t index) const; - Email *emailAtIndex(size_t index) const; - Phone *phoneAtIndex(size_t index) const; - Loc *locAtIndex(size_t index) const; - Tool *toolAtIndex(size_t index) const; - Note *noteAtIndex(size_t index) const; - Priv *privAtIndex(size_t index) const; - Mid *midAtIndex(size_t index) const; - Rid *ridAtIndex(size_t index) const; - Unknown *unknownAtIndex(size_t index) const; - - public: - Chunk *mNext {}; - - DWORD mSSRC {}; - - size_t mCount {}; - - size_t mCNameCount {}; - size_t mNameCount {}; - size_t mEmailCount {}; - size_t mPhoneCount {}; - size_t mLocCount {}; - size_t mToolCount {}; - size_t mNoteCount {}; - size_t mPrivCount {}; - size_t mMidCount {}; - size_t mRidCount {}; - size_t mUnknownCount {}; - - CName *mFirstCName {}; - Name *mFirstName {}; - Email *mFirstEmail {}; - Phone *mFirstPhone {}; - Loc *mFirstLoc {}; - Tool *mFirstTool {}; - Note *mFirstNote {}; - Priv *mFirstPriv {}; - Mid *mFirstMid {}; - Rid *mFirstRid {}; - Unknown *mFirstUnknown {}; - }; - - static const BYTE kPayloadType {202}; - - SDES *nextSDES() const {return mNextSDES;} - - size_t sc() const {return static_cast(mReportSpecific);} - - Chunk *firstChunk() const {return mFirstChunk;} - - public: - SDES *mNextSDES {}; - - Chunk *mFirstChunk {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::Bye - #pragma mark - - struct Bye : public Report - { - // https://tools.ietf.org/html/rfc3550#section-6.6 - - static const BYTE kPayloadType {203}; - - Bye *nextBye() const {return mNextBye;} - - size_t sc() const {return static_cast(mReportSpecific);} - - DWORD ssrc(size_t index) const; - - const char *reasonForLeaving() const {return mReasonForLeaving;} - - public: - Bye *mNextBye {}; - - const char *mReasonForLeaving {}; - - DWORD *mSSRCs {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::App - #pragma mark - - struct App : public Report - { - // https://tools.ietf.org/html/rfc3550#section-6.7 - - static const BYTE kPayloadType {204}; - - App *nextApp() const {return mNextApp;} - - BYTE subtype() const {return mReportSpecific;} - - DWORD ssrc() const {return mSSRC;} - const char *name() const {return &(mName[0]);} - - const BYTE *data() const {return mData;} - size_t dataSize() const {return mDataSize;} - - public: - App *mNextApp {}; - - DWORD mSSRC {}; - char mName[sizeof(DWORD)+1] {}; - - const BYTE *mData {}; - size_t mDataSize {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::FeedbackMessage - #pragma mark - - struct FeedbackMessage : public Report - { - // https://tools.ietf.org/html/rfc4585#section-6.1 - - BYTE fmt() const {return mReportSpecific;} - - DWORD ssrcOfPacketSender() const {return mSSRCOfPacketSender;} - DWORD ssrcOfMediaSource() const {return mSSRCOfMediaSource;} - - const BYTE *fci() const {return mFCI;} - size_t fciSize() const {return mFCISize;} - - static const char *fmtToString(BYTE pt, BYTE fmt, DWORD subFmt = 0); - const char *fmtToString() const; - - public: - DWORD mSSRCOfPacketSender {}; - DWORD mSSRCOfMediaSource {}; - - const BYTE *mFCI {}; - size_t mFCISize {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::TransportLayerFeedbackMessage - #pragma mark - - struct TransportLayerFeedbackMessage : public FeedbackMessage - { - // https://tools.ietf.org/html/rfc4585#section-6.2 - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::TransportLayerFeedbackMessage::GenericNACK - #pragma mark - - struct GenericNACK - { - // https://tools.ietf.org/html/rfc4585#section-6.2.1 - - static const BYTE kFmt {1}; - - WORD pid() const {return mPID;} - WORD blp() const {return mBLP;} - - public: - WORD mPID {}; - WORD mBLP {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::TransportLayerFeedbackMessage::TMMBRCommon - #pragma mark - - struct TMMBRCommon - { - DWORD ssrc() const {return mSSRC;} - - BYTE mxTBRExp() const {return mMxTBRExp;} - DWORD mxTBRMantissa() const {return mMxTBRMantissa;} - WORD measuredOverhead() const {return mMeasuredOverhead;} - - public: - DWORD mSSRC {}; - - BYTE mMxTBRExp {}; - DWORD mMxTBRMantissa {}; - WORD mMeasuredOverhead {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::TransportLayerFeedbackMessage::TMMBR - #pragma mark - - struct TMMBR : public TMMBRCommon - { - // http://tools.ietf.org/html/rfc5104#section-4.2.1.1 - - static const BYTE kFmt {3}; - - public: - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::TransportLayerFeedbackMessage::TMMBN - #pragma mark - - struct TMMBN : public TMMBRCommon - { - // http://tools.ietf.org/html/rfc5104#section-4.2.2.1 - - static const BYTE kFmt {4}; - - public: - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::TransportLayerFeedbackMessage (public) - #pragma mark - - static const BYTE kPayloadType {205}; - - TransportLayerFeedbackMessage *nextTransportLayerFeedbackMessage() const {return mNextTransportLayerFeedbackMessage;} - - size_t genericNACKCount() const {return mGenericNACKCount;} - GenericNACK *genericNACKAtIndex(size_t index) const; - - size_t tmmbrCount() const {return mTMMBRCount;} - TMMBR *tmmbrAtIndex(size_t index) const; - - size_t tmmbnCount() const {return mTMMBNCount;} - TMMBN *tmmbnAtIndex(size_t index) const; - - TransportLayerFeedbackMessage *unknown() const {return mUnknown;} - - public: - TransportLayerFeedbackMessage *mNextTransportLayerFeedbackMessage {}; - - size_t mGenericNACKCount {}; - GenericNACK *mFirstGenericNACK {}; - - size_t mTMMBRCount {}; - TMMBR *mFirstTMMBR {}; - - size_t mTMMBNCount {}; - TMMBN *mFirstTMMBN {}; - - TransportLayerFeedbackMessage *mUnknown {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage - #pragma mark - - struct PayloadSpecificFeedbackMessage : public FeedbackMessage - { - // https://tools.ietf.org/html/rfc4585#section-6.3 - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::PLI - #pragma mark - - struct PLI - { - // https://tools.ietf.org/html/rfc4585#section-6.3.1 - - static const BYTE kFmt {1}; - public: - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::SLI - #pragma mark - - struct SLI - { - // https://tools.ietf.org/html/rfc4585#section-6.3.2 - - static const BYTE kFmt {2}; - - WORD first() const {return mFirst;} - WORD number() const {return mNumber;} - BYTE pictureID() const {return mPictureID;} - - public: - WORD mFirst {}; - WORD mNumber {}; - BYTE mPictureID {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::RPSI - #pragma mark - - struct RPSI - { - // https://tools.ietf.org/html/rfc4585#section-6.3.3 - - static const BYTE kFmt {3}; - - BYTE zeroBit() const {return mZeroBit;} - BYTE payloadType() const {return mPayloadType;} - - const BYTE *nativeRPSIBitString() const {return mNativeRPSIBitString;} - size_t nativeRPSIBitStringSizeInBits() const {return mNativeRPSIBitStringSizeInBits;} - - public: - BYTE mZeroBit {}; - BYTE mPayloadType {}; - - const BYTE *mNativeRPSIBitString {}; - size_t mNativeRPSIBitStringSizeInBits {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::FIR - #pragma mark - - struct CodecControlCommon - { - DWORD ssrc() const {return mSSRC;} - BYTE seqNr() const {return mSeqNr;} - DWORD reserved() const {return mReserved;} - - public: - DWORD mSSRC {}; - BYTE mSeqNr {}; - DWORD mReserved {}; - DWORD mControlSpecific {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::FIR - #pragma mark - - struct FIR : public CodecControlCommon - { - // http://tools.ietf.org/html/rfc5104#section-4.3.1.1 - - static const BYTE kFmt {4}; - - public: - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::TSTR - #pragma mark - - struct TSTR : public CodecControlCommon - { - // http://tools.ietf.org/html/rfc5104#section-4.3.2.1 - - static const BYTE kFmt {5}; - - BYTE index() const {return static_cast(mControlSpecific);} - - public: - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::TSTN - #pragma mark - - struct TSTN : public CodecControlCommon - { - // http://tools.ietf.org/html/rfc5104#section-4.3.3.1 - - static const BYTE kFmt {6}; - - BYTE index() const {return static_cast(mControlSpecific);} - - public: - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::VBCM - #pragma mark - - struct VBCM : public CodecControlCommon - { - // http://tools.ietf.org/html/rfc5104#section-4.3.4.1 - - static const BYTE kFmt {7}; - - BYTE zeroBit() const; - BYTE payloadType() const; - - const BYTE *vbcmOctetString() const {return mVBCMOctetString;} - size_t vbcmOctetStringSize() const; - - public: - const BYTE *mVBCMOctetString {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::AFB - #pragma mark - - struct AFB - { - // https://tools.ietf.org/html/rfc4585#section-6.4 - - static const BYTE kFmt {15}; - - const BYTE *data() const {return mData;} - size_t dataSize() const {return mDataSize;} - - public: - const BYTE *mData {}; - size_t mDataSize {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage::REMB - #pragma mark - - struct REMB - { - // https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03#section-2.2 - - static const BYTE kFmt {15}; - - size_t numSSRC() const {return static_cast(mNumSSRC);} - BYTE brExp() const {return mBRExp;} - DWORD brMantissa() const {return mBRMantissa;} - - DWORD ssrcAtIndex(size_t index) const; - - public: - BYTE mNumSSRC {}; - BYTE mBRExp {}; - DWORD mBRMantissa {}; - DWORD *mSSRCs {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::PayloadSpecificFeedbackMessage (public) - #pragma mark - - static const BYTE kPayloadType {206}; - - PayloadSpecificFeedbackMessage *nextPayloadSpecificFeedbackMessage() const {return mNextPayloadSpecificFeedbackMessage;} - - size_t sliCount() const {return mSLICount;} - size_t firCount() const {return mFIRCount;} - size_t tstrCount() const {return mTSTRCount;} - size_t tstnCount() const {return mTSTNCount;} - size_t vbcmCount() const {return mVBCMCount;} - - PLI *pli() const; - SLI *sliAtIndex(size_t index) const; - RPSI *rpsi() const; - FIR *firAtIndex(size_t index) const; - TSTR *tstrAtIndex(size_t index) const; - TSTN *tstnAtIndex(size_t index) const; - VBCM *vbcmAtIndex(size_t index) const; - AFB *afb() const; - REMB *remb() const; - PayloadSpecificFeedbackMessage *unknown() const {return mUnknown;} - - public: - PayloadSpecificFeedbackMessage *mNextPayloadSpecificFeedbackMessage {}; - - PLI mPLI {}; - size_t mSLICount {}; - SLI *mFirstSLI {}; - RPSI mRPSI {}; - size_t mFIRCount {}; - FIR *mFirstFIR {}; - size_t mTSTRCount {}; - TSTR *mFirstTSTR {}; - size_t mTSTNCount {}; - TSTN *mFirstTSTN {}; - size_t mVBCMCount {}; - VBCM *mFirstVBCM {}; - AFB mAFB {}; - bool mHasREMB {false}; - REMB mREMB {}; - - PayloadSpecificFeedbackMessage *mUnknown {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR - #pragma mark - - struct XR : public Report - { - // https://tools.ietf.org/html/rfc3611#section-2 - // https://tools.ietf.org/html/rfc3611#section-3 - - typedef WORD RLEChunk; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::ReportBlock - #pragma mark - - struct ReportBlock - { - ReportBlock *next() const {return mNext;} - - BYTE blockType() const {return mBlockType;} - BYTE typeSpecific() const {return mTypeSpecific;} - - const BYTE *typeSpecificContents() const {return mTypeSpecificContents;} - size_t typeSpecificContentSize() const {return mTypeSpecificContentSize;} - - static const char *blockTypeToString(BYTE blockType); - const char *blockTypeToString() const {return blockTypeToString(mBlockType);} - - public: - ReportBlock *mNext {}; - - BYTE mBlockType {}; - BYTE mTypeSpecific {}; - - const BYTE *mTypeSpecificContents {}; - size_t mTypeSpecificContentSize {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::ReportBlockRange - #pragma mark - - struct ReportBlockRange : public ReportBlock - { - BYTE reserved() const; - BYTE thinning() const; - - DWORD ssrcOfSource() const {return mSSRCOfSource;} - WORD beginSeq() const {return mBeginSeq;} - WORD endSeq() const {return mEndSeq;} - - public: - DWORD mSSRCOfSource {}; - WORD mBeginSeq {}; - WORD mEndSeq {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::RLEReportBlock - #pragma mark - - struct RLEReportBlock : public ReportBlockRange - { - size_t chunkCount() const {return mChunkCount;} - RLEChunk chunkAtIndex(size_t index) const; - - public: - size_t mChunkCount {}; - RLEChunk *mChunks {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::LossRLEReportBlock - #pragma mark - - struct LossRLEReportBlock : public RLEReportBlock - { - // https://tools.ietf.org/html/rfc3611#section-4.1 - - static const BYTE kBlockType {1}; - - LossRLEReportBlock *nextLossRLE() const {return mNextLossRLE;} - - public: - LossRLEReportBlock *mNextLossRLE {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::DuplicateRLEReportBlock - #pragma mark - - struct DuplicateRLEReportBlock : public RLEReportBlock - { - // https://tools.ietf.org/html/rfc3611#section-4.2 - - static const BYTE kBlockType {2}; - - DuplicateRLEReportBlock *nextDuplicateRLE() const {return mNextDuplicateRLE;} - - public: - DuplicateRLEReportBlock *mNextDuplicateRLE {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::PacketReceiptTimesReportBlock - #pragma mark - - struct PacketReceiptTimesReportBlock : public ReportBlockRange - { - // https://tools.ietf.org/html/rfc3611#section-4.3 - - static const BYTE kBlockType {3}; - - PacketReceiptTimesReportBlock *nextPacketReceiptTimesReportBlock() const {return mNextPacketReceiptTimesReportBlock;} - - size_t receiptTimeCount() const {return mReceiptTimeCount;} - DWORD receiptTimeAtIndex(size_t index) const; - - public: - PacketReceiptTimesReportBlock *mNextPacketReceiptTimesReportBlock {}; - - size_t mReceiptTimeCount {}; - DWORD *mReceiptTimes {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::ReceiverReferenceTimeReportBlock - #pragma mark - - struct ReceiverReferenceTimeReportBlock : public ReportBlock - { - // https://tools.ietf.org/html/rfc3611#section-4.4 - - static const BYTE kBlockType {4}; - - ReceiverReferenceTimeReportBlock *nextReceiverReferenceTimeReportBlock() const {return mNextReceiverReferenceTimeReportBlock;} - - DWORD ntpTimestampMS() const {return mNTPTimestampMS;} - DWORD ntpTimestampLS() const {return mNTPTimestampLS;} - Time ntpTimestamp() const; - - public: - ReceiverReferenceTimeReportBlock *mNextReceiverReferenceTimeReportBlock {}; - - DWORD mNTPTimestampMS {}; - DWORD mNTPTimestampLS {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::DLRRReportBlock - #pragma mark - - struct DLRRReportBlock : public ReportBlock - { - // https://tools.ietf.org/html/rfc3611#section-4.5 - - static const BYTE kBlockType {5}; - - struct SubBlock - { - DWORD ssrc() const {return mSSRC;} - DWORD lrr() const {return mLRR;} - DWORD dlrr() const {return mDLRR;} - - DWORD mSSRC {}; - DWORD mLRR {}; - DWORD mDLRR {}; - }; - - DLRRReportBlock *nextDLRRReportBlock() const {return mNextDLRRReportBlock;} - - size_t subBlockCount() const {return mSubBlockCount;} - SubBlock *subBlockAtIndex(size_t index) const; - - public: - DLRRReportBlock *mNextDLRRReportBlock {}; - - size_t mSubBlockCount {}; - SubBlock *mSubBlocks {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::StatisticsSummaryReportBlock - #pragma mark - - struct StatisticsSummaryReportBlock : public ReportBlockRange - { - // https://tools.ietf.org/html/rfc3611#section-4.6 - - static const BYTE kBlockType {6}; - - StatisticsSummaryReportBlock *nextStatisticsSummaryReportBlock() const {return mNextStatisticsSummaryReportBlock;} - - bool lossReportFlag() const; - bool duplicateReportFlag() const; - bool jitterFlag() const; - bool ttlFlag() const; - bool hopLimitFlag() const; - - DWORD lostPackets() const {return mLostPackets;} - DWORD dupPackets() const {return mDupPackets;} - - DWORD minJitter() const {return mMinJitter;} - DWORD maxJitter() const {return mMaxJitter;} - DWORD meanJitter() const {return mMeanJitter;} - DWORD devJitter() const {return mDevJitter;} - - BYTE minTTL() const {return mMinTTLOrHL;} - BYTE maxTTL() const {return mMaxTTLOrHL;} - BYTE meanTTL() const {return mMeanTTLOrHL;} - BYTE devTTL() const {return mDevTTLOrHL;} - - BYTE minHopLimit() const {return mMinTTLOrHL;} - BYTE maxHopLimit() const {return mMaxTTLOrHL;} - BYTE meanHopLimit() const {return mMeanTTLOrHL;} - BYTE devHopLimit() const {return mDevTTLOrHL;} - - public: - StatisticsSummaryReportBlock *mNextStatisticsSummaryReportBlock {}; - - DWORD mLostPackets {}; - DWORD mDupPackets {}; - DWORD mMinJitter {}; - DWORD mMaxJitter {}; - DWORD mMeanJitter {}; - DWORD mDevJitter {}; - - BYTE mMinTTLOrHL {}; - BYTE mMaxTTLOrHL {}; - BYTE mMeanTTLOrHL {}; - BYTE mDevTTLOrHL {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::VoIPMetricsReportBlock - #pragma mark - - struct VoIPMetricsReportBlock : public ReportBlock - { - // https://tools.ietf.org/html/rfc3611#section-4.7 - - static const BYTE kBlockType {7}; - - VoIPMetricsReportBlock *nextVoIPMetricsReportBlock() const {return mNextVoIPMetricsReportBlock;} - - DWORD ssrcOfSource() const {return mSSRCOfSource;} - - BYTE lossRate() const {return mLossRate;} - BYTE discardRate() const {return mDiscardRate;} - BYTE burstDensity() const {return mBurstDensity;} - BYTE gapDensity() const {return mGapDensity;} - - WORD burstDuration() const {return mBurstDuration;} - WORD gapDuration() const {return mGapDuration;} - - WORD roundTripDelay() const {return mRoundTripDelay;} - WORD endSystemDelay() const {return mEndSystemDelay;} - - BYTE signalLevel() const {return mSignalLevel;} - BYTE noiseLevel() const {return mNoiseLevel;} - BYTE rerl() const {return mRERL;} - BYTE Gmin() const {return mGmin;} - - BYTE rFactor() const {return mRFactor;} - BYTE extRFactor() const {return mExtRFactor;} - BYTE mosLQ() const {return mMOSLQ;} - BYTE mosCQ() const {return mMOSCQ;} - - BYTE rxConfig() const {return mRXConfig;} - BYTE plc() const; - BYTE jba() const; - BYTE jbRate() const; - - WORD jbNominal() const {return mJBNominal;} - WORD jbMaximum() const {return mJBMaximum;} - WORD jbAbsMax() const {return mJBAbsMax;} - - public: - VoIPMetricsReportBlock *mNextVoIPMetricsReportBlock {}; - - DWORD mSSRCOfSource {}; - - BYTE mLossRate {}; - BYTE mDiscardRate {}; - BYTE mBurstDensity {}; - BYTE mGapDensity {}; - - WORD mBurstDuration {}; - WORD mGapDuration {}; - - WORD mRoundTripDelay {}; - WORD mEndSystemDelay {}; - - BYTE mSignalLevel {}; - BYTE mNoiseLevel {}; - BYTE mRERL {}; - BYTE mGmin {}; - - BYTE mRFactor {}; - BYTE mExtRFactor {}; - BYTE mMOSLQ {}; - BYTE mMOSCQ {}; - - BYTE mRXConfig {}; - BYTE mReservedVoIP {}; - - WORD mJBNominal {}; - WORD mJBMaximum {}; - WORD mJBAbsMax {}; - }; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::UnknownReportBlock - #pragma mark - - struct UnknownReportBlock : public ReportBlock - { - UnknownReportBlock *nextUnknownReportBlock() const {return mNextUnknownReportBlock;} - - public: - UnknownReportBlock *mNextUnknownReportBlock {}; - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::RunLength - #pragma mark - - struct RunLength - { - // https://tools.ietf.org/html/rfc3611#section-4.1.1 - - RunLength(RLEChunk chunk); - - BYTE runType() const {return mRunType;} - size_t runLength() const {return static_cast(mRunLength);} - - public: - BYTE mRunType {}; // Zero indicates a run of 0s. One indicates a run of 1s. - WORD mRunLength {}; // A value between 1 and 16,383. - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR::BitVector - #pragma mark - - struct BitVector - { - // https://tools.ietf.org/html/rfc3611#section-4.1.2 - - BitVector(RLEChunk chunk); - - BYTE bitAtIndex(size_t index) const; // Zero indicates loss. - - public: - WORD mBitVector {}; - }; - - //------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::XR - #pragma mark - - static const BYTE kPayloadType {207}; - - XR *nextXR() const {return mNextXR;} - - BYTE reserved() const {return mReportSpecific;} - - DWORD ssrc() const {return mSSRC;} - - ReportBlock *firstReportBlock() const {return mFirstReportBlock;} - - LossRLEReportBlock *firstLossRLEReportBlock() const {return mFirstLossRLEReportBlock;} - DuplicateRLEReportBlock *firstDuplicateRLEReportBlock() const {return mFirstDuplicateRLEReportBlock;} - PacketReceiptTimesReportBlock *firstPacketReceiptTimesReportBlock() const {return mFirstPacketReceiptTimesReportBlock;} - ReceiverReferenceTimeReportBlock *firstReceiverReferenceTimeReportBlock() const {return mFirstReceiverReferenceTimeReportBlock;} - DLRRReportBlock *firstDLRRReportBlock() const {return mFirstDLRRReportBlock;} - StatisticsSummaryReportBlock *firstStatisticsSummaryReportBlock() const {return mFirstStatisticsSummaryReportBlock;} - VoIPMetricsReportBlock *firstVoIPMetricsReportBlock() const {return mFirstVoIPMetricsReportBlock;} - UnknownReportBlock *firstUnknownReportBlock() const {return mFirstUnknownReportBlock;} - - size_t reportBlockCount() const {return mReportBlockCount;} - - size_t lossRLEReportBlockCount() const {return mLossRLEReportBlockCount;} - size_t duplicateRLEReportBlockCount() const {return mDuplicateRLEReportBlockCount;} - size_t packetReceiptTimesReportBlockCount() const {return mPacketReceiptTimesReportBlockCount;} - size_t receiverReferenceTimeReportBlockCount() const {return mReceiverReferenceTimeReportBlockCount;} - size_t dlrrReportBlockCount() const {return mDLRRReportBlockCount;} - size_t statisticsSummaryReportBlockCount() const {return mStatisticsSummaryReportBlockCount;} - size_t voIPMetricsReportBlockCount() const {return mVoIPMetricsReportBlockCount;} - size_t unknownReportBlockCount() const {return mUnknownReportBlockCount;} - - LossRLEReportBlock *lossRLEReportBlockAtIndex(size_t index) const; - DuplicateRLEReportBlock *duplicateRLEReportBlockAtIndex(size_t index) const; - PacketReceiptTimesReportBlock *packetReceiptTimesReportBlockAtIndex(size_t index) const; - ReceiverReferenceTimeReportBlock *receiverReferenceTimeReportBlockAtIndex(size_t index) const; - DLRRReportBlock *dlrrReportBlockAtIndex(size_t index) const; - StatisticsSummaryReportBlock *statisticsSummaryReportBlockAtIndex(size_t index) const; - VoIPMetricsReportBlock *voIPMetricsReportBlockAtIndex(size_t index) const; - UnknownReportBlock *unknownReportBlockAtIndex(size_t index) const; - - static bool isRunLengthChunk(RLEChunk chunk); - static bool isBitVectorChunk(RLEChunk chunk); - - static RunLength runLength(RLEChunk chunk) {return RunLength(chunk);} - static BitVector bitVector(RLEChunk chunk) {return BitVector(chunk);} - - public: - XR *mNextXR {}; - - DWORD mSSRC {}; - - size_t mReportBlockCount {}; - - size_t mLossRLEReportBlockCount {}; - size_t mDuplicateRLEReportBlockCount {}; - size_t mPacketReceiptTimesReportBlockCount {}; - size_t mReceiverReferenceTimeReportBlockCount {}; - size_t mDLRRReportBlockCount {}; - size_t mStatisticsSummaryReportBlockCount {}; - size_t mVoIPMetricsReportBlockCount {}; - size_t mUnknownReportBlockCount {}; - - ReportBlock *mFirstReportBlock {}; - - LossRLEReportBlock *mFirstLossRLEReportBlock {}; - DuplicateRLEReportBlock *mFirstDuplicateRLEReportBlock {}; - PacketReceiptTimesReportBlock *mFirstPacketReceiptTimesReportBlock {}; - ReceiverReferenceTimeReportBlock *mFirstReceiverReferenceTimeReportBlock {}; - DLRRReportBlock *mFirstDLRRReportBlock {}; - StatisticsSummaryReportBlock *mFirstStatisticsSummaryReportBlock {}; - VoIPMetricsReportBlock *mFirstVoIPMetricsReportBlock {}; - UnknownReportBlock *mFirstUnknownReportBlock {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTCPPacket::UnknownReport - #pragma mark - - struct UnknownReport : public Report - { - UnknownReport *nextUnknown() const {return mNextUnknown;} - - public: - UnknownReport *mNextUnknown {}; - }; - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark (public) - #pragma mark - - RTCPPacket(const make_private &); - ~RTCPPacket(); - - static RTCPPacketPtr create(const BYTE *buffer, size_t bufferLengthInBytes); - static RTCPPacketPtr create(const SecureByteBlock &buffer); - static RTCPPacketPtr create(SecureByteBlockPtr buffer); // NOTE: ownership of buffer is taken - static RTCPPacketPtr create(const Report *first); - static SecureByteBlockPtr generateFrom(const Report *first); - - const BYTE *ptr() const; - size_t size() const; - SecureByteBlockPtr buffer() const; - - Report *first() const {return mFirst;} - - SenderReport *firstSenderReport() const {return mFirstSenderReport;} - ReceiverReport *firstReceiverReport() const {return mFirstReceiverReport;} - SDES *firstSDES() const {return mFirstSDES;} - Bye *firstBye() const {return mFirstBye;} - App *firstApp() const {return mFirstApp;} - TransportLayerFeedbackMessage *firstTransportLayerFeedbackMessage() const {return mFirstTransportLayerFeedbackMessage;} - PayloadSpecificFeedbackMessage *firstPayloadSpecificFeedbackMessage() const {return mFirstPayloadSpecificFeedbackMessage;} - XR *firstXR() const {return mFirstXR;} - UnknownReport *firstUnknownReport() const {return mFirstUnknownReport;} - - size_t count() const {return mCount;} - - size_t senderReportCount() const {return mSenderReportCount;} - size_t receiverReportCount() const {return mReceiverReportCount;} - size_t sdesCount() const {return mSDESCount;} - size_t byeCount() const {return mByeCount;} - size_t appCount() const {return mAppCount;} - size_t transportLayerFeedbackMessageCount() const {return mTransportLayerFeedbackMessageCount;} - size_t payloadSpecificFeedbackMessage() const {return mPayloadSpecificFeedbackMessageCount;} - size_t xrCount() const {return mXRCount;} - size_t unknownReportCount() const {return mUnknownReportCount;} - - SenderReport *senderReportAtIndex(size_t index) const; - ReceiverReport *receiverReportAtIndex(size_t index) const; - SDES *sdesAtIndex(size_t index) const; - Bye *byeAtIndex(size_t index) const; - App *appAtIndex(size_t index) const; - TransportLayerFeedbackMessage *transportLayerFeedbackReportAtIndex(size_t index) const; - PayloadSpecificFeedbackMessage *payloadSpecificFeedbackReportAtIndex(size_t index) const; - XR *xrAtIndex(size_t index) const; - UnknownReport *unknownAtIndex(size_t index) const; - - ElementPtr toDebug() const; - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark (internal) - #pragma mark - - static Log::Params slog(const char *message); - Log::Params log(const char *message) const; - Log::Params debug(const char *message) const; - - bool parse(); - - bool getAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, BYTE pt, const BYTE *contents, size_t contentSize); - bool getSenderReportAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - bool getReceiverReportAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - bool getSDESAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - bool getByeAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - bool getAppAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - bool getTransportLayerFeedbackMessageAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - bool getXRAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - bool getUnknownReportAllocationSize(BYTE version, BYTE padding, BYTE reportSpecific, const BYTE *contents, size_t contentSize); - - bool getTransportLayerFeedbackMessageGenericNACKAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getTransportLayerFeedbackMessageTMMBRAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getTransportLayerFeedbackMessageTMMBNAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - - bool getPayloadSpecificFeedbackMessagePLIAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageSLIAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageRPSIAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageFIRAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageTSTRAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageTSTNAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageVBCMAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageAFBAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - bool getPayloadSpecificFeedbackMessageREMBAllocationSize(BYTE fmt, const BYTE *contents, size_t contentSize); - - bool getXRLossRLEReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); - bool getXRDuplicateRLEReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); - bool getXRPacketReceiptTimesReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); - bool getXRReceiverReferenceTimeReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); - bool getXRDLRRReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); - bool getXRStatisticsSummaryReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); - bool getXRVoIPMetricsReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); - bool getXRUnknownReportBlockAllocationSize(BYTE typeSpecific, const BYTE *contents, size_t contentSize); - - bool parse(Report * &ioLastReport, BYTE version, BYTE padding, BYTE reportSpecific, BYTE pt, const BYTE *contents, size_t contentSize); - void fill(Report *report, BYTE version, BYTE padding, BYTE reportSpecific, BYTE pt, const BYTE *contents, size_t contentSize); - - bool parseCommon( - SenderReceiverCommonReport *report, - size_t detailedHeaderSize - ); - bool parse(SenderReport *report); - bool parse(ReceiverReport *report); - bool parse(SDES *report); - bool parse(Bye *report); - bool parse(App *report); - bool parse(TransportLayerFeedbackMessage *report); - bool parse(PayloadSpecificFeedbackMessage *report); - bool parse(XR *report); - bool parse(UnknownReport *report); - - void fill(FeedbackMessage *report, const BYTE *contents, size_t contentSize); - void fill(XR *report, XR::ReportBlock *reportBlock, XR::ReportBlock * &ioPreviousReportBlock, BYTE blockType, BYTE typeSpecific, const BYTE *contents, size_t contentSize); - - bool parseGenericNACK(TransportLayerFeedbackMessage *report); - void fillTMMBRCommon(TransportLayerFeedbackMessage *report, TransportLayerFeedbackMessage::TMMBRCommon *common, const BYTE *pos); - bool parseTMMBR(TransportLayerFeedbackMessage *report); - bool parseTMMBN(TransportLayerFeedbackMessage *report); - bool parseUnknown(TransportLayerFeedbackMessage *report); - - //CodecControlCommon - bool parsePLI(PayloadSpecificFeedbackMessage *report); - bool parseSLI(PayloadSpecificFeedbackMessage *report); - bool parseRPSI(PayloadSpecificFeedbackMessage *report); - void fillCodecControlCommon(PayloadSpecificFeedbackMessage *report, PayloadSpecificFeedbackMessage::CodecControlCommon *common, const BYTE *pos); - bool parseFIR(PayloadSpecificFeedbackMessage *report); - bool parseTSTR(PayloadSpecificFeedbackMessage *report); - bool parseTSTN(PayloadSpecificFeedbackMessage *report); - bool parseVBCM(PayloadSpecificFeedbackMessage *report); - bool parseAFB(PayloadSpecificFeedbackMessage *report); - bool parseREMB(PayloadSpecificFeedbackMessage *report); - bool parseUnknown(PayloadSpecificFeedbackMessage *report); - - bool parseCommonRange(XR *xr, XR::ReportBlockRange *reportBlock); - bool parseCommonRLE(XR *xr, XR::RLEReportBlock *reportBlock); - bool parse(XR *xr, XR::LossRLEReportBlock *reportBlock); - bool parse(XR *xr, XR::DuplicateRLEReportBlock *reportBlock); - bool parse(XR *xr, XR::PacketReceiptTimesReportBlock *reportBlock); - bool parse(XR *xr, XR::ReceiverReferenceTimeReportBlock *reportBlock); - bool parse(XR *xr, XR::DLRRReportBlock *reportBlock); - bool parse(XR *xr, XR::StatisticsSummaryReportBlock *reportBlock); - bool parse(XR *xr, XR::VoIPMetricsReportBlock *reportBlock); - bool parse(XR *xr, XR::UnknownReportBlock *reportBlock); - - void *allocateBuffer(size_t size); - - static size_t getPacketSize(const Report *first); - static void writePacket(const Report *first, BYTE * &ioPos, size_t &ioRemaining); - - public: - SecureByteBlockPtr mBuffer; - SecureByteBlockPtr mAllocationBuffer; - - BYTE *mAllocationPos {}; - size_t mAllocationSize {}; - - Report *mFirst {}; - - size_t mCount {}; - - size_t mSenderReportCount {}; - size_t mReceiverReportCount {}; - size_t mSDESCount {}; - size_t mByeCount {}; - size_t mAppCount {}; - size_t mTransportLayerFeedbackMessageCount {}; - size_t mPayloadSpecificFeedbackMessageCount {}; - size_t mXRCount {}; - size_t mUnknownReportCount {}; - - SenderReport *mFirstSenderReport {}; - ReceiverReport *mFirstReceiverReport {}; - SDES *mFirstSDES {}; - Bye *mFirstBye {}; - App *mFirstApp {}; - TransportLayerFeedbackMessage *mFirstTransportLayerFeedbackMessage {}; - PayloadSpecificFeedbackMessage *mFirstPayloadSpecificFeedbackMessage {}; - XR *mFirstXR {}; - UnknownReport *mFirstUnknownReport {}; - }; - - } -} - diff --git a/ortc/internal/ortc_RTPDecoderAudio.h b/ortc/internal/ortc_RTPDecoderAudio.h new file mode 100644 index 00000000..c9e5532f --- /dev/null +++ b/ortc/internal/ortc_RTPDecoderAudio.h @@ -0,0 +1,293 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include + +#include +#include +#include + +#include + +namespace ortc +{ + namespace internal + { + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio (helpers) + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio + #pragma mark + + class RTPDecoderAudio : public Any, + public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IRTPDecoderAudio, + public IRTPDecoderAudioForMediaEngine, + public zsLib::IWakeDelegate, + public zsLib::IPromiseSettledDelegate, + public IRTPDecoderAysncDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IRTPDecoderAudioForMediaEngine; + friend interaction IRTPDecoderAysncDelegate; + + typedef IRTP::RTPObjectID RTPObjectID; + typedef IRTP::States States; + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderAudio); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderAudio, UseMediaEngine); + + public: + RTPDecoderAudio( + const make_private &, + IMessageQueuePtr queue, + PromiseWithRTPDecoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ); + + protected: + RTPDecoderAudio(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + traceHelper_(id_) + {} + + void init(); + + public: + virtual ~RTPDecoderAudio(); + + static RTPDecoderAudioPtr create( + PromiseWithRTPDecoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ); + + static RTPDecoderAudioPtr convert(ForMediaEnginePtr object); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTP + #pragma mark + + virtual RTPObjectID getID() const override { return id_; } + virtual void cancel() override; + + virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoder + #pragma mark + + virtual void notifyRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + virtual void notifyRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoderAudio + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPForMediaEngine + #pragma mark + + // (duplicate) virtual RTPObjectID getID() const = 0; + virtual void shutdown() override; + + // (duplciate) virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoderForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoderAudioForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IPromiseSettledDelegate + #pragma mark + + virtual void onPromiseSettled(PromisePtr promise) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => IRTPDecoderAysncDelegate + #pragma mark + + virtual void onRTPDecoderRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + virtual void onRTPDecoderRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) override; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => (internal) + #pragma mark + + bool isPending() const { return IRTP::State_Pending == currentState_; } + bool isReady() const { return IRTP::State_Ready == currentState_; } + bool isShuttingDown() const { return IRTP::State_ShuttingDown == currentState_; } + bool isShutdown() const { return IRTP::State_Shutdown == currentState_; } + + void innerCancel(); + + bool stepShutdownPendingPromise(); + bool stepShutdownCoder(); + + void step(); + bool stepSetup(); + bool stepResolve(); + + void setState(States state); + void setError(PromisePtr promise); + void setError(WORD error, const char *inReason); + + void innerNotifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ); + void innerNotifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) {} // ignored + + public: + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderAudio => (data) + #pragma mark + + AutoPUID id_; + RTPDecoderAudioWeakPtr thisWeak_; + + RTPDecoderAudioPtr gracefulShutdownReference_; + + UseMediaEngineWeakPtr mediaEngine_; + + States currentState_ {IRTP::State_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + + PromiseWithRTPDecoderAudioPtr promise_; + ParametersPtr parameters_; + IRTPDecoderDelegateWeakPtr notifyDelegate_; + IRTPDecoderDelegatePtr delegate_; + + IRTPDecoderAysncDelegatePtr asyncThisDelegate_; + + MediaChannelTraceHelper traceHelper_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderAudioFactory + #pragma mark + + interaction IRTPDecoderAudioFactory + { + static IRTPDecoderAudioFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderAudio); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderAudio, UseMediaEngine); + + virtual RTPDecoderAudioPtr create( + PromiseWithRTPDecoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ); + }; + + class RTPDecoderAudioFactory : public IFactory {}; + } +} + diff --git a/ortc/internal/ortc_RTPDecoderVideo.h b/ortc/internal/ortc_RTPDecoderVideo.h new file mode 100644 index 00000000..2a3a0f01 --- /dev/null +++ b/ortc/internal/ortc_RTPDecoderVideo.h @@ -0,0 +1,292 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include + +#include +#include +#include + +#include + +namespace ortc +{ + namespace internal + { + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo (helpers) + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo + #pragma mark + + class RTPDecoderVideo : public Any, + public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IRTPDecoderVideo, + public IRTPDecoderVideoForMediaEngine, + public zsLib::IWakeDelegate, + public zsLib::IPromiseSettledDelegate, + public IRTPDecoderAysncDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IRTPDecoderVideoForMediaEngine; + friend interaction IRTPDecoderAysncDelegate; + + typedef IRTP::RTPObjectID RTPObjectID; + typedef IRTP::States States; + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderVideo); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderVideo, UseMediaEngine); + + public: + RTPDecoderVideo( + const make_private &, + IMessageQueuePtr queue, + PromiseWithRTPDecoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ); + + protected: + RTPDecoderVideo(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + traceHelper_(id_) + {} + + void init(); + + public: + virtual ~RTPDecoderVideo(); + + static RTPDecoderVideoPtr create( + PromiseWithRTPDecoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ); + + static RTPDecoderVideoPtr convert(ForMediaEnginePtr object); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTP + #pragma mark + + virtual RTPObjectID getID() const override { return id_; } + virtual void cancel() override; + + virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoder + #pragma mark + + virtual void notifyRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + virtual void notifyRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoderVideo + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPForMediaEngine + #pragma mark + + // (duplicate) virtual RTPObjectID getID() const = 0; + virtual void shutdown() override; + + // (duplciate) virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoderForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoderVideoForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IPromiseSettledDelegate + #pragma mark + + virtual void onPromiseSettled(PromisePtr promise) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => IRTPDecoderAysncDelegate + #pragma mark + + virtual void onRTPDecoderRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + virtual void onRTPDecoderRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) override; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => (internal) + #pragma mark + + bool isPending() const { return IRTP::State_Pending == currentState_; } + bool isReady() const { return IRTP::State_Ready == currentState_; } + bool isShuttingDown() const { return IRTP::State_ShuttingDown == currentState_; } + bool isShutdown() const { return IRTP::State_Shutdown == currentState_; } + + void innerCancel(); + + bool stepShutdownPendingPromise(); + bool stepShutdownCoder(); + + void step(); + bool stepSetup(); + bool stepResolve(); + + void setState(States state); + void setError(PromisePtr promise); + void setError(WORD error, const char *inReason); + + void innerNotifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) {} // ignored + void innerNotifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ); + + public: + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPDecoderVideo => (data) + #pragma mark + + AutoPUID id_; + RTPDecoderVideoWeakPtr thisWeak_; + + RTPDecoderVideoPtr gracefulShutdownReference_; + + UseMediaEngineWeakPtr mediaEngine_; + + States currentState_ {IRTP::State_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + + PromiseWithRTPDecoderVideoPtr promise_; + ParametersPtr parameters_; + IRTPDecoderDelegateWeakPtr notifyDelegate_; + IRTPDecoderDelegatePtr delegate_; + + IRTPDecoderAysncDelegatePtr asyncThisDelegate_; + MediaChannelTraceHelper traceHelper_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPDecoderVideoFactory + #pragma mark + + interaction IRTPDecoderVideoFactory + { + static IRTPDecoderVideoFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPDecoderVideo); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPDecoderVideo, UseMediaEngine); + + virtual RTPDecoderVideoPtr create( + PromiseWithRTPDecoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPDecoderDelegatePtr delegate + ); + }; + + class RTPDecoderVideoFactory : public IFactory {}; + } +} + diff --git a/ortc/internal/ortc_RTPEncoderAudio.h b/ortc/internal/ortc_RTPEncoderAudio.h new file mode 100644 index 00000000..98f5624e --- /dev/null +++ b/ortc/internal/ortc_RTPEncoderAudio.h @@ -0,0 +1,292 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include + +#include +#include +#include + +#include + +namespace ortc +{ + namespace internal + { + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio (helpers) + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio + #pragma mark + + class RTPEncoderAudio : public Any, + public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IRTPEncoderAudio, + public IRTPEncoderAudioForMediaEngine, + public zsLib::IWakeDelegate, + public zsLib::IPromiseSettledDelegate, + public IRTPEncoderAysncDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IRTPEncoderAudioForMediaEngine; + friend interaction IRTPEncoderAysncDelegate; + + typedef IRTP::RTPObjectID RTPObjectID; + typedef IRTP::States States; + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderAudio); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderAudio, UseMediaEngine); + + public: + RTPEncoderAudio( + const make_private &, + IMessageQueuePtr queue, + PromiseWithRTPEncoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ); + + protected: + RTPEncoderAudio(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + traceHelper_(id_) + {} + + void init(); + + public: + virtual ~RTPEncoderAudio(); + + static RTPEncoderAudioPtr create( + PromiseWithRTPEncoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ); + + static RTPEncoderAudioPtr convert(ForMediaEnginePtr object); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTP + #pragma mark + + virtual RTPObjectID getID() const override { return id_; } + virtual void cancel() override; + + virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoder + #pragma mark + + virtual void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + virtual void notifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override {} + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoderAudio + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPForMediaEngine + #pragma mark + + // (duplicate) virtual RTPObjectID getID() const = 0; + virtual void shutdown() override; + + // (duplciate) virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoderForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoderAudioForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IPromiseSettledDelegate + #pragma mark + + virtual void onPromiseSettled(PromisePtr promise) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => IRTPEncoderAysncDelegate + #pragma mark + + virtual void onRTPEncoderAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + virtual void onRTPEncoderVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override {} // ignored + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => (internal) + #pragma mark + + bool isPending() const { return IRTP::State_Pending == currentState_; } + bool isReady() const { return IRTP::State_Ready == currentState_; } + bool isShuttingDown() const { return IRTP::State_ShuttingDown == currentState_; } + bool isShutdown() const { return IRTP::State_Shutdown == currentState_; } + + void innerCancel(); + + bool stepShutdownPendingPromise(); + bool stepShutdownCoder(); + + void step(); + bool stepSetup(); + bool stepResolve(); + + void setState(States state); + void setError(PromisePtr promise); + void setError(WORD error, const char *inReason); + + void innerNotifyRTP( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ); + void innerNotifyRTCP( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ); + + public: + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderAudio => (data) + #pragma mark + + AutoPUID id_; + RTPEncoderAudioWeakPtr thisWeak_; + + RTPEncoderAudioPtr gracefulShutdownReference_; + + UseMediaEngineWeakPtr mediaEngine_; + + States currentState_ {IRTP::State_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + + PromiseWithRTPEncoderAudioPtr promise_; + ParametersPtr parameters_; + IRTPEncoderDelegateWeakPtr notifyDelegate_; + IRTPEncoderDelegatePtr delegate_; + + IRTPEncoderAysncDelegatePtr asyncThisDelegate_; + MediaChannelTraceHelper traceHelper_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderAudioFactory + #pragma mark + + interaction IRTPEncoderAudioFactory + { + static IRTPEncoderAudioFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderAudio); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderAudio, UseMediaEngine); + + virtual RTPEncoderAudioPtr create( + PromiseWithRTPEncoderAudioPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ); + }; + + class RTPEncoderAudioFactory : public IFactory {}; + } +} + diff --git a/ortc/internal/ortc_RTPEncoderVideo.h b/ortc/internal/ortc_RTPEncoderVideo.h new file mode 100644 index 00000000..0bacd478 --- /dev/null +++ b/ortc/internal/ortc_RTPEncoderVideo.h @@ -0,0 +1,293 @@ +/* + + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +#include + +#include +#include + +#include +#include + +#include + +#include + +namespace ortc +{ + namespace internal + { + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo (helpers) + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo + #pragma mark + + class RTPEncoderVideo : public Any, + public Noop, + public MessageQueueAssociator, + public SharedRecursiveLock, + public IRTPEncoderVideo, + public IRTPEncoderVideoForMediaEngine, + public zsLib::IWakeDelegate, + public zsLib::IPromiseSettledDelegate, + public IRTPEncoderAysncDelegate + { + protected: + struct make_private {}; + + public: + friend interaction IRTPEncoderVideoForMediaEngine; + friend interaction IRTPEncoderAysncDelegate; + + typedef IRTP::RTPObjectID RTPObjectID; + typedef IRTP::States States; + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderVideo); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::AudioFrame, AudioFrame); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::VideoFrame, VideoFrame); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderVideo, UseMediaEngine); + + public: + RTPEncoderVideo( + const make_private &, + IMessageQueuePtr queue, + PromiseWithRTPEncoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ); + + protected: + RTPEncoderVideo(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : + Noop(true), + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()), + traceHelper_(id_) + {} + + void init(); + + public: + virtual ~RTPEncoderVideo(); + + static RTPEncoderVideoPtr create( + PromiseWithRTPEncoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ); + + static RTPEncoderVideoPtr convert(ForMediaEnginePtr object); + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTP + #pragma mark + + virtual RTPObjectID getID() const override { return id_; } + virtual void cancel() override; + + virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoder + #pragma mark + + virtual void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override {} + virtual void notifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoderVideo + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPForMediaEngine + #pragma mark + + // (duplicate) virtual RTPObjectID getID() const = 0; + virtual void shutdown() override; + + // (duplciate) virtual States getState() const override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoderForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoderVideoForMediaEngine + #pragma mark + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IWakeDelegate + #pragma mark + + virtual void onWake() override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IPromiseSettledDelegate + #pragma mark + + virtual void onPromiseSettled(PromisePtr promise) override; + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => IRTPEncoderAysncDelegate + #pragma mark + + virtual void onRTPEncoderAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override {} // ignored + virtual void onRTPEncoderVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override; + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => (internal) + #pragma mark + + bool isPending() const { return IRTP::State_Pending == currentState_; } + bool isReady() const { return IRTP::State_Ready == currentState_; } + bool isShuttingDown() const { return IRTP::State_ShuttingDown == currentState_; } + bool isShutdown() const { return IRTP::State_Shutdown == currentState_; } + + void innerCancel(); + + bool stepShutdownPendingPromise(); + bool stepShutdownCoder(); + + void step(); + bool stepSetup(); + bool stepResolve(); + + void setState(States state); + void setError(PromisePtr promise); + void setError(WORD error, const char *inReason); + + void innerNotifyRTP( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ); + void innerNotifyRTCP( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ); + + public: + + protected: + //----------------------------------------------------------------------- + #pragma mark + #pragma mark RTPEncoderVideo => (data) + #pragma mark + + AutoPUID id_; + RTPEncoderVideoWeakPtr thisWeak_; + + RTPEncoderVideoPtr gracefulShutdownReference_; + + UseMediaEngineWeakPtr mediaEngine_; + + States currentState_ {IRTP::State_Pending}; + WORD lastError_ {}; + String lastErrorReason_; + + PromiseWithRTPEncoderVideoPtr promise_; + ParametersPtr parameters_; + IRTPEncoderDelegateWeakPtr notifyDelegate_; + IRTPEncoderDelegatePtr delegate_; + + IRTPEncoderAysncDelegatePtr asyncThisDelegate_; + MediaChannelTraceHelper traceHelper_; + }; + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPEncoderVideoFactory + #pragma mark + + interaction IRTPEncoderVideoFactory + { + static IRTPEncoderVideoFactory &singleton(); + + ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWithHolderPtr, PromiseWithRTPEncoderVideo); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForRTPEncoderVideo, UseMediaEngine); + + virtual RTPEncoderVideoPtr create( + PromiseWithRTPEncoderVideoPtr promise, + UseMediaEnginePtr mediaEngine, + ParametersPtr parameters, + IRTPEncoderDelegatePtr delegate + ); + }; + + class RTPEncoderVideoFactory : public IFactory {}; + } +} + diff --git a/ortc/internal/ortc_RTPListener.h b/ortc/internal/ortc_RTPListener.h index 9e31f094..7cfcfeb6 100644 --- a/ortc/internal/ortc_RTPListener.h +++ b/ortc/internal/ortc_RTPListener.h @@ -676,7 +676,7 @@ namespace ortc ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPListenerAsyncDelegate) ZS_DECLARE_PROXY_TYPEDEF(ortc::IICETypes::Components, Components) ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPListenerAsyncDelegate::UseRTPReceiverPtr, UseRTPReceiverPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::RTPPacketPtr, RTPPacketPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::RTPPacketPtr, RTPPacketPtr) ZS_DECLARE_PROXY_METHOD_3(onDeliverPacket, Components, UseRTPReceiverPtr, RTPPacketPtr) ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_RTPMediaEngine.h b/ortc/internal/ortc_RTPMediaEngine.h deleted file mode 100644 index 0448e341..00000000 --- a/ortc/internal/ortc_RTPMediaEngine.h +++ /dev/null @@ -1,2077 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#define ORTC_SETTING_SCTP_TRANSPORT_MAX_MESSAGE_SIZE "ortc/sctp/max-message-size" - -namespace ortc -{ - namespace internal - { - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineRegistration); - - // resource based interfaces - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineDeviceResource); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineChannelResource); - ZS_DECLARE_INTERACTION_PROXY(IRTPMediaEngineDeviceResourceAsyncDelegate); - ZS_DECLARE_INTERACTION_PTR(IDeviceResourceForRTPMediaEngine); - ZS_DECLARE_INTERACTION_PROXY(IRTPMediaEngineChannelResourceAsyncDelegate); - ZS_DECLARE_INTERACTION_PTR(IChannelResourceForRTPMediaEngine); - - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForORTC); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForSettings); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForSingleton); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForRTPReceiverChannel); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForRTPReceiverChannelMediaBase); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForRTPReceiverChannelAudio); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForRTPReceiverChannelVideo); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForRTPSenderChannel); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForRTPSenderChannelMediaBase); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForRTPSenderChannelAudio); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForRTPSenderChannelVideo); - ZS_DECLARE_INTERACTION_PTR(IRTPMediaEngineForMediaStreamTrack); - - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPMediaEngine); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelMediaBaseForRTPMediaEngine); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelAudioForRTPMediaEngine); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelVideoForRTPMediaEngine); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelMediaBaseForRTPMediaEngine); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelAudioForRTPMediaEngine); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelVideoForRTPMediaEngine); - - ZS_DECLARE_INTERACTION_PROXY(IRTPMediaEngineAsyncDelegate); - ZS_DECLARE_INTERACTION_PROXY(IRTPMediaEngineHandlePacketAsyncDelegate); - - ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith, PromiseWithRTPMediaEngine); - ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith, PromiseWithRTPMediaEngineDeviceResource); - ZS_DECLARE_TYPEDEF_PTR(zsLib::PromiseWith, PromiseWithRTPMediaEngineChannelResource); - - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrack::TrackConstraints, TrackConstraints); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrack::Settings, TrackSettings); - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark VoiceEngineDeleter - #pragma mark - - struct VoiceEngineDeleter { - VoiceEngineDeleter() {} - inline void operator()(webrtc::VoiceEngine* ptr) const { - webrtc::VoiceEngine::Delete(ptr); - } - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineRegistration - #pragma mark - - interaction IRTPMediaEngineRegistration : public Any - { - template - std::shared_ptr engine() const {return ZS_DYNAMIC_PTR_CAST(data_type, getRTPEngine());} - - virtual RTPMediaEnginePtr getRTPEngine() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineDeviceResource - #pragma mark - - interaction IRTPMediaEngineDeviceResource : public Any - { - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - virtual PUID getID() const = 0; - virtual String getDeviceID() const = 0; - - virtual PromisePtr shutdown() = 0; - - virtual void stop() = 0; - - virtual void updateConstraints(PromisePtr promise, TrackConstraintsPtr constraints) = 0; - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) = 0; - - virtual void setVideoRenderCallback(IMediaStreamTrackRenderCallbackPtr callback) = 0; - - virtual void renderVideoFrame(VideoFramePtr videoFrame) = 0; - - virtual void setFrameCount() = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineChannelResource - #pragma mark - - interaction IRTPMediaEngineChannelResource : public Any - { - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - - virtual PUID getID() const = 0; - - virtual PromisePtr shutdown() = 0; - - virtual void notifyTransportState(ISecureTransportTypes::States state) = 0; - - virtual void notifyUpdate(ParametersPtr params) = 0; - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineDeviceResourceAsyncDelegate - #pragma mark - - interaction IRTPMediaEngineDeviceResourceAsyncDelegate - { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrack::TrackConstraints, TrackConstraints); - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - virtual void onUpdateConstraints(PromisePtr promise, TrackConstraintsPtr constraints) = 0; - virtual void onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) = 0; - virtual void onCapturedVideoFrame(VideoFramePtr frame) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IDeviceResourceForRTPMediaEngine - #pragma mark - - interaction IDeviceResourceForRTPMediaEngine - { - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - interaction IRTPMediaEngineChannelResourceAsyncDelegate - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - - virtual void onSecureTransportState(ISecureTransport::States state) = 0; - virtual void onUpdate(ParametersPtr params) = 0; - virtual void onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) = 0; - virtual void onSendDTMFTone() = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IChannelResourceForRTPMediaEngine - #pragma mark - - interaction IChannelResourceForRTPMediaEngine - { - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineAudioReceiverChannelResource - #pragma mark - - interaction IRTPMediaEngineAudioReceiverChannelResource : public IRTPMediaEngineChannelResource - { - virtual bool handlePacket(const RTPPacket &packet) = 0; - virtual bool handlePacket(const RTCPPacket &packet) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineAudioSenderChannelResource - #pragma mark - - interaction IRTPMediaEngineAudioSenderChannelResource : public IRTPMediaEngineChannelResource - { - virtual bool handlePacket(const RTCPPacket &packet) = 0; - - virtual void insertDTMF( - const char *tones, - Milliseconds duration, - Milliseconds interToneGap - ) = 0; - - virtual String toneBuffer() const = 0; - virtual Milliseconds duration() const = 0; - virtual Milliseconds interToneGap() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineVideoReceiverChannelResource - #pragma mark - - interaction IRTPMediaEngineVideoReceiverChannelResource : public IRTPMediaEngineChannelResource - { - virtual bool handlePacket(const RTPPacket &packet) = 0; - virtual bool handlePacket(const RTCPPacket &packet) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineVideoSenderChannelResource - #pragma mark - - interaction IRTPMediaEngineVideoSenderChannelResource : public IRTPMediaEngineChannelResource - { - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - virtual bool handlePacket(const RTCPPacket &packet) = 0; - virtual void sendVideoFrame(VideoFramePtr videoFrame) = 0; - }; - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForORTC - #pragma mark - - interaction IRTPMediaEngineForORTC - { - static void setLogLevel(Log::Level level); - static void ntpServerTime(const Milliseconds &value); - static void startMediaTracing(); - static void stopMediaTracing(); - static bool isMediaTracing(); - static bool saveMediaTrace(String filename); - static bool saveMediaTrace(String host, int port); - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForSettings - #pragma mark - - interaction IRTPMediaEngineForSettings - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForSettings, ForSettings) - - static void applyDefaults(); - - virtual ~IRTPMediaEngineForSettings() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForSingleton - #pragma mark - - interaction IRTPMediaEngineForSingleton - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForSingleton, ForSingleton) - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPReceiverChannel - #pragma mark - - interaction IRTPMediaEngineForRTPReceiverChannel - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPReceiverChannel, ForRTPReceiverChannel) - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPReceiverChannelMediaBase - #pragma mark - - interaction IRTPMediaEngineForRTPReceiverChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPReceiverChannelMediaBase, ForRTPReceiverChannelMediaBase) - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForRTPMediaEngine, UseReceiverChannelMediaBase) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPMediaEngine, UseMediaStreamTrack) - ZS_DECLARE_TYPEDEF_PTR(webrtc::Transport, Transport) - - ElementPtr toDebug(ForRTPReceiverChannelMediaBasePtr object); - - static PromiseWithRTPMediaEnginePtr create(); - - static PromiseWithRTPMediaEngineChannelResourcePtr setupChannel( - UseReceiverChannelMediaBasePtr channel, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPReceiverChannelAudio - #pragma mark - - interaction IRTPMediaEngineForRTPReceiverChannelAudio : public IRTPMediaEngineForRTPReceiverChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPReceiverChannelAudio, ForRTPReceiverChannelAudio) - - virtual ~IRTPMediaEngineForRTPReceiverChannelAudio() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPReceiverChannelVideo - #pragma mark - - interaction IRTPMediaEngineForRTPReceiverChannelVideo : public IRTPMediaEngineForRTPReceiverChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPReceiverChannelVideo, ForRTPReceiverChannelVideo) - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPSenderChannel - #pragma mark - - interaction IRTPMediaEngineForRTPSenderChannel - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPSenderChannel, ForRTPSenderChannel) - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPSenderChannelMediaBase - #pragma mark - - interaction IRTPMediaEngineForRTPSenderChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPSenderChannelMediaBase, ForRTPSenderChannelMediaBase); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForRTPMediaEngine, UseSenderChannelMediaBase); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPMediaEngine, UseMediaStreamTrack); - ZS_DECLARE_TYPEDEF_PTR(webrtc::Transport, Transport); - - ElementPtr toDebug(ForRTPSenderChannelMediaBasePtr object); - - static PromiseWithRTPMediaEnginePtr create(); - - static PromiseWithRTPMediaEngineChannelResourcePtr setupChannel( - UseSenderChannelMediaBasePtr channel, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - IDTMFSenderDelegatePtr dtmfDelegate - ); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPSenderChannelAudio - #pragma mark - - interaction IRTPMediaEngineForRTPSenderChannelAudio : public IRTPMediaEngineForRTPSenderChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPSenderChannelAudio, ForRTPSenderChannelAudio) - - virtual ~IRTPMediaEngineForRTPSenderChannelAudio() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForRTPSenderChannelVideo - #pragma mark - - interaction IRTPMediaEngineForRTPSenderChannelVideo : public IRTPMediaEngineForRTPSenderChannelMediaBase - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPSenderChannelVideo, ForRTPSenderChannelVideo) - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForMediaStreamTrack - #pragma mark - - interaction IRTPMediaEngineForMediaStreamTrack - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForMediaStreamTrack, ForMediaStreamTrack) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPMediaEngine, UseMediaStreamTrack) - - ElementPtr toDebug(ForMediaStreamTrackPtr object); - - static PromiseWithRTPMediaEnginePtr create(); - - static PromiseWithRTPMediaEngineDeviceResourcePtr setupDevice(UseMediaStreamTrackPtr track); - - virtual ~IRTPMediaEngineForMediaStreamTrack() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForDeviceResource - #pragma mark - - interaction IRTPMediaEngineForDeviceResource - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForDeviceResource, ForDeviceResource) - - virtual void notifyResourceGone(IDeviceResourceForRTPMediaEngine &resource) = 0; - - virtual webrtc::VoiceEngine *getVoiceEngine() = 0; - virtual const SharedRecursiveLock &getSharedLock() const = 0; - virtual IMessageQueuePtr getMessageQueue() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineForChannelResource - #pragma mark - - interaction IRTPMediaEngineForChannelResource - { - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForChannelResource, ForChannelResource) - - virtual void notifyResourceGone(IChannelResourceForRTPMediaEngine &resource) = 0; - - virtual webrtc::VoiceEngine *getVoiceEngine() = 0; - virtual rtc::scoped_refptr getAudioDecoderFactory() = 0; - virtual rtc::scoped_refptr getAudioState() = 0; - virtual const SharedRecursiveLock &getSharedLock() const = 0; - virtual IMessageQueuePtr getMessageQueue() const = 0; - }; - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineAsyncDelegate - #pragma mark - - interaction IRTPMediaEngineAsyncDelegate - { - ZS_DECLARE_STRUCT_PTR(SetupSenderChannel); - ZS_DECLARE_STRUCT_PTR(SetupReceiverChannel); - ZS_DECLARE_STRUCT_PTR(SetupDevice); - - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForRTPMediaEngine, UseReceiverChannelMediaBase); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForRTPMediaEngine, UseSenderChannelMediaBase); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPMediaEngine, UseMediaStreamTrack); - ZS_DECLARE_TYPEDEF_PTR(webrtc::Transport, Transport); - - struct SetupResource - { - IRTPMediaEngineRegistrationPtr mRegistration; - }; - - struct SetupChannel : public SetupResource - { - PromiseWithRTPMediaEngineChannelResourcePtr mPromise; - TransportPtr mTransport; - UseMediaStreamTrackPtr mTrack; - ParametersPtr mParameters; - }; - - struct SetupSenderChannel : public SetupChannel - { - UseSenderChannelMediaBasePtr mChannel; - IDTMFSenderDelegatePtr mDTMFDelegate; - }; - - struct SetupReceiverChannel : public SetupChannel - { - UseReceiverChannelMediaBasePtr mChannel; - RTPPacketPtr mPacket; - }; - - struct SetupDevice : public SetupResource - { - PromiseWithRTPMediaEngineDeviceResourcePtr mPromise; - UseMediaStreamTrackPtr mTrack; - }; - - virtual void onSetupSenderChannel(SetupSenderChannelPtr channel) = 0; - virtual void onSetupReceiverChannel(SetupReceiverChannelPtr channel) = 0; - virtual void onSetupDevice(SetupDevicePtr device) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - interaction IRTPMediaEngineHandlePacketAsyncDelegate - { - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - virtual void onHandleRTPPacket(DWORD timestamp, SecureByteBlockPtr buffer) = 0; - virtual void onHandleRTCPPacket(SecureByteBlockPtr buffer) = 0; - virtual void onSendVideoFrame(VideoFramePtr videoFrame) = 0; - }; - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine - #pragma mark - - class RTPMediaEngine : public Any, - public Noop, - public MessageQueueAssociator, - public SharedRecursiveLock, - public IRTPMediaEngineForORTC, - public IRTPMediaEngineForSettings, - public IRTPMediaEngineForSingleton, - public IRTPMediaEngineForRTPReceiverChannel, - public IRTPMediaEngineForRTPReceiverChannelAudio, - public IRTPMediaEngineForRTPReceiverChannelVideo, - public IRTPMediaEngineForRTPSenderChannel, - public IRTPMediaEngineForRTPSenderChannelAudio, - public IRTPMediaEngineForRTPSenderChannelVideo, - public IRTPMediaEngineForMediaStreamTrack, - public IRTPMediaEngineForDeviceResource, - public IRTPMediaEngineForChannelResource, - public IWakeDelegate, - public zsLib::ITimerDelegate, - public IRTPMediaEngineAsyncDelegate - { - protected: - struct make_private {}; - - public: - friend class RTPMediaEngineRegistration; - - friend interaction IRTPMediaEngine; - friend interaction IRTPMediaEngineFactory; - friend interaction IRTPMediaEngineForORTC; - friend interaction IRTPMediaEngineForSettings; - friend interaction IRTPMediaEngineForSingleton; - friend interaction IRTPMediaEngineForRTPReceiverChannel; - friend interaction IRTPMediaEngineForRTPReceiverChannelMediaBase; - friend interaction IRTPMediaEngineForRTPReceiverChannelAudio; - friend interaction IRTPMediaEngineForRTPReceiverChannelVideo; - friend interaction IRTPMediaEngineForRTPSenderChannel; - friend interaction IRTPMediaEngineForRTPSenderChannelMediaBase; - friend interaction IRTPMediaEngineForRTPSenderChannelAudio; - friend interaction IRTPMediaEngineForRTPSenderChannelVideo; - friend interaction IRTPMediaEngineForMediaStreamTrack; - friend interaction IRTPMediaEngineForDeviceResource; - friend interaction IRTPMediaEngineForChannelResource; - - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForRTPMediaEngine, UseReceiverChannelMediaBase); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForRTPMediaEngine, UseSenderChannelMediaBase); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPMediaEngine, UseMediaStreamTrack); - ZS_DECLARE_TYPEDEF_PTR(webrtc::Transport, Transport); - - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ConstraintSet, ConstraintSet); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ConstrainLongRange, ConstrainLongRange); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ConstrainDoubleRange, ConstrainDoubleRange); - - ZS_DECLARE_CLASS_PTR(BaseResource); - ZS_DECLARE_CLASS_PTR(DeviceResource); - ZS_DECLARE_CLASS_PTR(ChannelResource); - ZS_DECLARE_CLASS_PTR(AudioReceiverChannelResource); - ZS_DECLARE_CLASS_PTR(AudioSenderChannelResource); - ZS_DECLARE_CLASS_PTR(VideoReceiverChannelResource); - ZS_DECLARE_CLASS_PTR(VideoSenderChannelResource); - - struct VideoCaptureCapabilityWithDistance - { - webrtc::VideoCaptureCapability mCapability; - zsLib::FLOAT mDistance; - }; - - enum States - { - State_Pending, - State_Ready, - State_ShuttingDown, - State_Shutdown, - }; - static const char *toString(States state); - - ZS_DECLARE_TYPEDEF_PTR(std::list, PromiseWithRTPMediaEngineList) - - typedef std::map DeviceResourceWeakMap; - typedef std::list DeviceResourceList; - typedef std::map ChannelResourceWeakMap; - typedef std::list ChannelResourceList; - - public: - RTPMediaEngine( - const make_private &, - IMessageQueuePtr queue, - IRTPMediaEngineRegistrationPtr registration - ); - - protected: - RTPMediaEngine(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : - Noop(true), - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()) - {} - - void init(); - - public: - virtual ~RTPMediaEngine(); - - static RTPMediaEnginePtr convert(ForSettingsPtr object); - static RTPMediaEnginePtr convert(ForRTPReceiverChannelPtr object); - static RTPMediaEnginePtr convert(ForRTPReceiverChannelMediaBasePtr object); - static RTPMediaEnginePtr convert(ForRTPReceiverChannelAudioPtr object); - static RTPMediaEnginePtr convert(ForRTPReceiverChannelVideoPtr object); - static RTPMediaEnginePtr convert(ForRTPSenderChannelMediaBasePtr object); - static RTPMediaEnginePtr convert(ForRTPSenderChannelAudioPtr object); - static RTPMediaEnginePtr convert(ForRTPSenderChannelVideoPtr object); - static RTPMediaEnginePtr convert(ForMediaStreamTrackPtr object); - static RTPMediaEnginePtr convert(ForDeviceResourcePtr object); - static RTPMediaEnginePtr convert(ForChannelResourcePtr object); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => RTPMediaEngineRegistration - #pragma mark - - static PromiseWithRTPMediaEnginePtr createEnginePromise(); - - static RTPMediaEnginePtr create(IRTPMediaEngineRegistrationPtr registration); - - void notify(PromiseWithRTPMediaEnginePtr promise); - - void shutdown(); - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForORTC - #pragma mark - - static void ntpServerTime(const Milliseconds &value); - static void setLogLevel(Log::Level level); - static void startMediaTracing(); - static void stopMediaTracing(); - static bool isMediaTracing(); - static bool saveMediaTrace(String filename); - static bool saveMediaTrace(String host, int port); - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPReceiverChannel - #pragma mark - - virtual PUID getID() const override {return mID;} - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPReceiverChannelMediaBase - #pragma mark - - PromiseWithRTPMediaEngineChannelResourcePtr setupChannel( - UseReceiverChannelMediaBasePtr channel, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPReceiverChannelAudio - #pragma mark - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPReceiverChannelVideo - #pragma mark - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPSenderChannel - #pragma mark - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPSenderChannelMediaBase - #pragma mark - - PromiseWithRTPMediaEngineChannelResourcePtr setupChannel( - UseSenderChannelMediaBasePtr channel, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - IDTMFSenderDelegatePtr dtmfDelegate - ); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPSenderChannelAudio - #pragma mark - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForRTPSenderChannelVideo - #pragma mark - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForMediaStreamTrack - #pragma mark - - PromiseWithRTPMediaEngineDeviceResourcePtr setupDevice(UseMediaStreamTrackPtr track); - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForDeviceResource - #pragma mark - - virtual void notifyResourceGone(IDeviceResourceForRTPMediaEngine &resource) override; - - virtual webrtc::VoiceEngine *getVoiceEngine() override; - - virtual const SharedRecursiveLock &getSharedLock() const override { return *this; } - virtual IMessageQueuePtr getMessageQueue() const override { return getAssociatedMessageQueue(); } - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineForChannelResource - #pragma mark - - virtual void notifyResourceGone(IChannelResourceForRTPMediaEngine &resource) override; - - // (duplicate) virtual webrtc::VoiceEngine *getVoiceEngine() = 0; - - virtual rtc::scoped_refptr getAudioDecoderFactory() override; - - virtual rtc::scoped_refptr getAudioState() override; - - // (duplicate) virtual const SharedRecursiveLock &getSharedLock() const = 0; - // (duplicate) virtual IMessageQueuePtr getMessageQueue() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IWakeDelegate - #pragma mark - - virtual void onWake() override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => ITimerDelegate - #pragma mark - - virtual void onTimer(ITimerPtr timer) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => IRTPMediaEngineAsyncDelegate - #pragma mark - - virtual void onSetupSenderChannel(SetupSenderChannelPtr setup) override; - virtual void onSetupReceiverChannel(SetupReceiverChannelPtr setup) override; - virtual void onSetupDevice(SetupDevicePtr setup) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => (friend DeviceResource) - #pragma mark - - void shutdownDeviceResource(DeviceResourcePtr deviceResource); - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => webrtc::SetupEventTracer - #pragma mark - -#if defined(WINRT) - static const unsigned char *GetCategoryGroupEnabled(const char *categoryGroup); - - static void __cdecl AddTraceEvent( - char phase, - const unsigned char *categoryGroupEnabled, - const char *name, - uint64 id, - int numArgs, - const char **argNames, - const unsigned char *argTypes, - const uint64 *argValues, - unsigned char flags - ); -#endif - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => (friend ChannelResource) - #pragma mark - - void shutdownChannelResource(ChannelResourcePtr channelResource); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => (internal) - #pragma mark - - Log::Params log(const char *message) const; - Log::Params debug(const char *message) const; - virtual ElementPtr toDebug() const; - - virtual void internalSetLogLevel(Log::Level level); - virtual void internalStartMediaTracing(); - virtual void internalStopMediaTracing(); - virtual bool internalIsMediaTracing(); - virtual bool internalSaveMediaTrace(String filename); - virtual bool internalSaveMediaTrace(String host, int port); - virtual void internalAddTraceEvent( - char phase, - const unsigned char *categoryGroupEnabled, - const char *name, - uint64_t id, - int numArgs, - const char **argNames, - const unsigned char *argTypes, - const uint64_t *argValues, - unsigned char flags - ); - - bool isReady() const; - bool isShuttingDown() const; - bool isShutdown() const; - - void step(); - bool stepSetup(); - bool stepSetupDevices(); - bool stepCloseDevices(); - bool stepSetupChannels(); - bool stepCloseChannels(); - - void cancel(); - void stepCancel(); - - void setState(States state); - void setError(WORD error, const char *reason = NULL); - - public: - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::WebRtcTraceCallback - #pragma mark - - class WebRtcTraceCallback : public webrtc::TraceCallback - { - public: - virtual void Print(webrtc::TraceLevel level, const char* message, int length) override; - }; - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::WebRtcTraceCallback - #pragma mark - - class WebRtcLogSink : public rtc::LogSink - { - public: - virtual void OnLogMessage(const std::string& message) override; - }; - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::BaseResource - #pragma mark - - class BaseResource : public Any, - public SharedRecursiveLock, - public MessageQueueAssociator - { - protected: - struct make_private {}; - - public: - typedef std::list PendingPromiseList; - - ZS_DECLARE_STRUCT_PTR(LifetimeHolder); - - struct LifetimeHolder : public Any - { - BaseResourcePtr mResource; - - LifetimeHolder(BaseResourcePtr resource) : mResource(resource) {} - virtual ~LifetimeHolder() { if (!mResource) return; mResource->lifetimeHolderGone(); } - }; - - public: - BaseResource( - const make_private &, - IRTPMediaEngineRegistrationPtr registration, - RTPMediaEnginePtr engine - ); - virtual ~BaseResource(); - - void notifyPromisesResolve(); - void notifyPromisesReject(); - - //std::shared_ptr createPromise() { return internalSetupPromise(Promise::create(delegateQueue())); } - - //template - //static std::shared_ptr > createPromise() {return ZS_DYNAMIC_PTR_CAST(PromiseWith, internalSetupPromise(PromiseWith::create(delegateQueue())));} - - void registerPromise(PromisePtr promise) {internalSetupPromise(promise);} - - template - std::shared_ptr getThis() const {return ZS_DYNAMIC_PTR_CAST(self_type, mThisWeak.lock());} - - template - std::shared_ptr getEngine() const {return mMediaEngine.lock();} - - virtual void lifetimeHolderGone() {} - - protected: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::BaseResource => (internal) - #pragma mark - - static IMessageQueuePtr delegateQueue(); - PromisePtr internalSetupPromise(PromisePtr promise); - void internalFixState(); - - protected: - AutoPUID mID; - BaseResourceWeakPtr mThisWeak; - - bool mNotifiedReady {false}; - bool mNotifiedRejected {false}; - PendingPromiseList mPendingPromises; - - IRTPMediaEngineRegistrationPtr mRegistration; - RTPMediaEngineWeakPtr mMediaEngine; - }; - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource - #pragma mark - - class DeviceResource : public IRTPMediaEngineDeviceResource, - public BaseResource, - public IDeviceResourceForRTPMediaEngine, - public IRTPMediaEngineDeviceResourceAsyncDelegate - { - public: - ZS_DECLARE_CLASS_PTR(VideoCaptureTransport) - friend class VideoCaptureTransport; - - typedef std::list PromiseList; - - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::Kinds, Kinds) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForDeviceResource, UseEngine) - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet); - - struct AutoIncrementLock - { - AutoIncrementLock(std::atomic &accessFromNonLockedMethods) : mAccessFromNonLockedMethods(accessFromNonLockedMethods) { ++mAccessFromNonLockedMethods; } - ~AutoIncrementLock() { --mAccessFromNonLockedMethods; } - - std::atomic &mAccessFromNonLockedMethods; - }; - - public: - DeviceResource( - const make_private &priv, - IRTPMediaEngineRegistrationPtr registration, - UseMediaStreamTrackPtr track - ); - virtual ~DeviceResource(); - - static DeviceResourcePtr create( - IRTPMediaEngineRegistrationPtr registration, - UseMediaStreamTrackPtr track - ); - - virtual void lifetimeHolderGone() override; - - protected: - void init(); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => IRTPMediaEngineDeviceResource - #pragma mark - - virtual PUID getID() const override { return mID; } - virtual String getDeviceID() const override; - virtual PromisePtr shutdown() override; - virtual void stop() override; - virtual void updateConstraints(PromisePtr promise, TrackConstraintsPtr constraints) override; - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; - - virtual void setVideoRenderCallback(IMediaStreamTrackRenderCallbackPtr callback) override; - - virtual void renderVideoFrame(VideoFramePtr videoFrame) override; - - virtual void setFrameCount() override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => IRTPMediaEngineDeviceResourceAsyncDelegate - #pragma mark - - virtual void onUpdateConstraints(PromisePtr promise, TrackConstraintsPtr constraints) override; - - virtual void onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) override; - - virtual void onCapturedVideoFrame(VideoFramePtr frame) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => (friend RTPMediaEngine) - #pragma mark - - virtual void stepSetup(); - virtual void stepShutdown(); - - protected: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => (internal friend derived) - #pragma mark - - bool isShuttingDown() const { return mShuttingDown; } - bool isShutdown() const { return mShutdown; } - void notifyPromisesShutdown(); - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => friend VideoCaptureTransport - #pragma mark - - virtual void OnIncomingCapturedFrame(const int32_t id, const webrtc::VideoFrame& videoFrame); - - virtual void OnCaptureDelayChanged(const int32_t id, const int32_t delay); - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource::VideoCaptureTransport - #pragma mark - - class VideoCaptureTransport : public webrtc::VideoCaptureDataCallback - { - struct make_private {}; - - protected: - void init(); - - public: - VideoCaptureTransport( - const make_private &, - DeviceResourcePtr outer - ); - - ~VideoCaptureTransport(); - - static VideoCaptureTransportPtr create(DeviceResourcePtr outer); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource::Transport => webrtc::VideoCaptureDataCallback - #pragma mark - - virtual void OnIncomingCapturedFrame(const int32_t id, const webrtc::VideoFrame& videoFrame) override; - - virtual void OnCaptureDelayChanged(const int32_t id, const int32_t delay) override; - - private: - VideoCaptureTransportWeakPtr mThisWeak; - DeviceResourceWeakPtr mOuter; - }; - - protected: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::DeviceResource => (internal) - #pragma mark - - PromisePtr getShutdownPromise(); - - int getAudioDeviceIndex(webrtc::VoiceEngine *voiceEngine, String deviceID); - - zsLib::FLOAT calculateSizeDistance( - ConstrainLongRange width, - ConstrainLongRange height, - webrtc::VideoCaptureCapability capability - ); - zsLib::FLOAT calculateFrameRateDistance( - ConstrainDoubleRange frameRate, - webrtc::VideoCaptureCapability capability - ); - zsLib::FLOAT calculateAspectRatioDistance( - ConstrainDoubleRange aspectRatio, - webrtc::VideoCaptureCapability capability - ); - zsLib::FLOAT calculateFormatDistance(webrtc::VideoCaptureCapability capability); - - protected: - String mDeviceID; - - bool mShuttingDown {false}; - bool mShutdown {false}; - PromiseList mShutdownPromises; - - IMessageQueuePtr mHandleDataQueue; - std::atomic mAccessFromNonLockedMethods {}; - std::atomic mDenyNonLockedAccess {}; - - UseMediaStreamTrackWeakPtr mTrack; - - VideoCaptureTransportPtr mTransport; // keep lifetime of webrtc callback separate from this object - - rtc::scoped_refptr mVideoCaptureModule; - IMediaStreamTrackRenderCallback* mVideoRendererCallback {NULL}; - IMediaStreamTrackRenderCallbackPtr mVideoRenderCallbackReferenceHolder; - - std::atomic mFramesSent {}; - std::atomic mFramesReceived {}; - WeightedMovingAverageUsingTotalDouble mAverageFramesSent; - WeightedMovingAverageUsingTotalDouble mAverageFramesReceived; - }; - - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource - #pragma mark - - class ChannelResource : public BaseResource, - public IRTPMediaEngineHandlePacketAsyncDelegate, - public IChannelResourceForRTPMediaEngine, - public IRTPMediaEngineChannelResourceAsyncDelegate - { - public: - typedef std::list PromiseList; - - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForChannelResource, UseEngine); - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet); - - struct AutoIncrementLock - { - AutoIncrementLock(std::atomic &accessFromNonLockedMethods) : mAccessFromNonLockedMethods(accessFromNonLockedMethods) { ++mAccessFromNonLockedMethods; } - ~AutoIncrementLock() { --mAccessFromNonLockedMethods; } - - std::atomic &mAccessFromNonLockedMethods; - }; - - public: - ChannelResource( - const make_private &priv, - IRTPMediaEngineRegistrationPtr registration - ); - - virtual ~ChannelResource(); - - virtual void lifetimeHolderGone() override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - virtual PUID getID() const override { return mID; } - virtual PromisePtr shutdown(); - virtual void notifyTransportState(ISecureTransportTypes::States state); - virtual void notifyUpdate(ParametersPtr params); - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats); - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - virtual void onSendDTMFTone() override { } - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource => (friend RTPMediaEngine) - #pragma mark - - virtual void stepSetup() = 0; - virtual void stepShutdown() = 0; - - protected: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource => (internal friend derived) - #pragma mark - - bool isShuttingDown() const {return mShuttingDown;} - bool isShutdown() const {return mShutdown;} - void notifyPromisesShutdown(); - - protected: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::ChannelResource => (internal) - #pragma mark - - PromisePtr getShutdownPromise(); - - protected: - String mCodecPayloadName; - BYTE mCodecPayloadType {0}; - UINT mCurrentTargetBitrate {0}; - - std::unique_ptr mModuleProcessThread; - std::unique_ptr mPacerThread; - webrtc::Clock *mClock; - webrtc::VieRemb mRemb; - std::unique_ptr mCallStats; - std::unique_ptr mCongestionController; - std::unique_ptr mBitrateAllocator; - std::unique_ptr mEventLog; - - bool mShuttingDown {false}; - bool mShutdown {false}; - PromiseList mShutdownPromises; - - IMessageQueuePtr mHandlePacketQueue; - std::atomic mAccessFromNonLockedMethods {}; - std::atomic mDenyNonLockedAccess {}; - }; - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource - #pragma mark - - class AudioReceiverChannelResource : public IRTPMediaEngineAudioReceiverChannelResource, - public ChannelResource, - public webrtc::CongestionController::Observer, - public webrtc::BitrateAllocator::LimitObserver - { - public: - friend class RTPMediaEngine; - - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - - public: - AudioReceiverChannelResource( - const make_private &, - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ); - virtual ~AudioReceiverChannelResource(); - - static AudioReceiverChannelResourcePtr create( - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ); - - protected: - void init(); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - virtual PUID getID() const override {return ChannelResource::getID();} - - virtual PromisePtr shutdown() override {return ChannelResource::shutdown();} - - virtual void notifyTransportState(ISecureTransportTypes::States state) override { return ChannelResource::notifyTransportState(state); } - - virtual void notifyUpdate(ParametersPtr params) override { return ChannelResource::notifyUpdate(params); } - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override { return ChannelResource::requestStats(promise, stats); } - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - virtual void onSecureTransportState(ISecureTransport::States state) override; - - virtual void onUpdate(ParametersPtr params) override; - - virtual void onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => IRTPMediaEngineAudioReceiverChannelResource - #pragma mark - - virtual bool handlePacket(const RTPPacket &packet) override; - virtual bool handlePacket(const RTCPPacket &packet) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - virtual void onHandleRTPPacket(DWORD timestamp, SecureByteBlockPtr buffer) override; - virtual void onHandleRTCPPacket(SecureByteBlockPtr buffer) override; - virtual void onSendVideoFrame(VideoFramePtr videoFrame) override {} - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => webrtc::CongestionController::Observer - #pragma mark - - virtual void OnNetworkChanged(uint32_t targetBitrateBps, uint8_t fractionLoss, int64_t rttMs) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => webrtc::BitrateAllocator::LimitObserver - #pragma mark - - virtual void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, uint32_t max_padding_bitrate_bps) override; - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => friend RTPMediaEngine - #pragma mark - - virtual void stepSetup() override; - virtual void stepShutdown() override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioReceiverChannelResource => (internal) - #pragma mark - - int getChannel() const; - webrtc::CodecInst getAudioCodec( - webrtc::VoiceEngine *voiceEngine, - String payloadName - ); - - protected: - int mChannel {}; - - TransportPtr mTransport; - std::atomic mTransportState { ISecureTransport::State_Pending }; - - UseMediaStreamTrackWeakPtr mTrack; - - ParametersPtr mParameters; - - RTPPacketPtr mInitPacket; - - webrtc::AudioReceiveStream *mReceiveStream { NULL }; - - int mDTMFPayloadType{ 0 }; - }; - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource - #pragma mark - - class AudioSenderChannelResource : public IRTPMediaEngineAudioSenderChannelResource, - public ChannelResource, - public zsLib::ITimerDelegate, - public webrtc::CongestionController::Observer, - public webrtc::BitrateAllocator::LimitObserver - { - public: - friend class RTPMediaEngine; - - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - - const int dtmfTwoSecondsDelayCode = -1; - const int dtmfTwoSecondInMs = 2000; - const char dtmfValidTones[22] = ",0123456789*#ABCDabcd"; - const char dtmfTonesTable[18] = ",0123456789*#ABCD"; - - public: - AudioSenderChannelResource( - const make_private &, - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - IDTMFSenderDelegatePtr dtmfDelegate - ); - virtual ~AudioSenderChannelResource(); - - static AudioSenderChannelResourcePtr create( - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - IDTMFSenderDelegatePtr dtmfDelegate - ); - - protected: - void init(); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - virtual PUID getID() const override {return ChannelResource::getID();} - - virtual PromisePtr shutdown() override {return ChannelResource::shutdown();} - - virtual void notifyTransportState(ISecureTransportTypes::States state) override { return ChannelResource::notifyTransportState(state); } - - virtual void notifyUpdate(ParametersPtr params) override { return ChannelResource::notifyUpdate(params); } - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override { return ChannelResource::requestStats(promise, stats); } - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - virtual void onSecureTransportState(ISecureTransport::States state) override; - - virtual void onUpdate(ParametersPtr params) override; - - virtual void onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) override; - - virtual void onSendDTMFTone() override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => IRTPMediaEngineAudioSenderChannelResource - #pragma mark - - virtual bool handlePacket(const RTCPPacket &packet) override; - - virtual void insertDTMF( - const char *tones, - Milliseconds duration, - Milliseconds interToneGap - ) override; - - virtual String toneBuffer() const override; - virtual Milliseconds duration() const override; - virtual Milliseconds interToneGap() const override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - virtual void onHandleRTPPacket(DWORD timestamp, SecureByteBlockPtr buffer) override {} - virtual void onHandleRTCPPacket(SecureByteBlockPtr buffer) override; - virtual void onSendVideoFrame(VideoFramePtr videoFrame) override {} - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => ITimerDelegate - #pragma mark - - virtual void onTimer(ITimerPtr timer) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => webrtc::CongestionController::Observer - #pragma mark - - virtual void OnNetworkChanged(uint32_t targetBitrateBps, uint8_t fractionLoss, int64_t rttMs) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => webrtc::BitrateAllocator::LimitObserver - #pragma mark - - virtual void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, uint32_t max_padding_bitrate_bps) override; - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => friend RTPMediaEngine - #pragma mark - - virtual void stepSetup() override; - virtual void stepShutdown() override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::AudioSenderChannelResource => (internal) - #pragma mark - - webrtc::CodecInst getAudioCodec( - webrtc::VoiceEngine *voiceEngine, - String payloadName - ); - - void notifyToneEvent(const char *tone); - - protected: - int mChannel{}; - - TransportPtr mTransport; - std::atomic mTransportState { ISecureTransport::State_Pending }; - - UseMediaStreamTrackWeakPtr mTrack; - - ParametersPtr mParameters; - - String mSendCodecPayloadName; - BYTE mSendCodecPayloadType {0}; - - rtc::TaskQueue mWorkerQueue; - webrtc::AudioSendStream *mSendStream { NULL }; - - int mDTMFPayloadType {0}; - IDTMFSenderDelegatePtr mDTMFSenderDelegate; - ITimerPtr mDTMFTimer; - String mDTMFTones; - Milliseconds mDTMFDuration; - Milliseconds mDTMFInterToneGap; - }; - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource - #pragma mark - - class VideoReceiverChannelResource : public IRTPMediaEngineVideoReceiverChannelResource, - public ChannelResource, - public webrtc::CongestionController::Observer, - public webrtc::BitrateAllocator::LimitObserver - { - public: - friend class RTPMediaEngine; - - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - - class ReceiverVideoRenderer : public rtc::VideoSinkInterface - { - public: - void setMediaStreamTrack(UseMediaStreamTrackPtr videoTrack); - - virtual void OnFrame(const webrtc::VideoFrame& frame) override; - - private: - UseMediaStreamTrackWeakPtr mVideoTrack; - }; - - public: - VideoReceiverChannelResource( - const make_private &, - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ); - virtual ~VideoReceiverChannelResource(); - - static VideoReceiverChannelResourcePtr create( - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters, - RTPPacketPtr packet - ); - - protected: - void init(); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - virtual PUID getID() const override {return ChannelResource::getID();} - - virtual PromisePtr shutdown() override {return ChannelResource::shutdown();} - - virtual void notifyTransportState(ISecureTransportTypes::States state) override { return ChannelResource::notifyTransportState(state); } - - virtual void notifyUpdate(ParametersPtr params) override { return ChannelResource::notifyUpdate(params); } - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override { return ChannelResource::requestStats(promise, stats); } - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - virtual void onSecureTransportState(ISecureTransport::States state) override; - - virtual void onUpdate(ParametersPtr params) override; - - virtual void onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => IRTPMediaEngineVideoReceiverChannelResource - #pragma mark - - virtual bool handlePacket(const RTPPacket &packet) override; - virtual bool handlePacket(const RTCPPacket &packet) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - virtual void onHandleRTPPacket(DWORD timestamp, SecureByteBlockPtr buffer) override; - virtual void onHandleRTCPPacket(SecureByteBlockPtr buffer) override; - virtual void onSendVideoFrame(VideoFramePtr videoFrame) override {} - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => friend RTPMediaEngine - #pragma mark - - virtual void stepSetup() override; - virtual void stepShutdown() override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => webrtc::CongestionController::Observer - #pragma mark - - virtual void OnNetworkChanged(uint32_t targetBitrateBps, uint8_t fractionLoss, int64_t rttMs) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoReceiverChannelResource => webrtc::BitrateAllocator::LimitObserver - #pragma mark - - virtual void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, uint32_t max_padding_bitrate_bps) override; - - protected: - TransportPtr mTransport; - std::atomic mTransportState { ISecureTransport::State_Pending }; - - UseMediaStreamTrackWeakPtr mTrack; - - ParametersPtr mParameters; - - RTPPacketPtr mInitPacket; - - String mReceiveCodecPayloadName; - BYTE mReceiveCodecPayloadType; - - webrtc::VideoReceiveStream *mReceiveStream { NULL }; - ReceiverVideoRenderer mReceiverVideoRenderer; - }; - - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource - #pragma mark - - class VideoSenderChannelResource : public IRTPMediaEngineVideoSenderChannelResource, - public ChannelResource, - public webrtc::CongestionController::Observer, - public webrtc::BitrateAllocator::LimitObserver - { - public: - friend class RTPMediaEngine; - - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - union VideoEncoderSettings { - webrtc::VideoCodecVP8 mVp8; - webrtc::VideoCodecVP9 mVp9; - webrtc::VideoCodecH264 mH264; - }; - - public: - VideoSenderChannelResource( - const make_private &, - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters - ); - virtual ~VideoSenderChannelResource(); - - static VideoSenderChannelResourcePtr create( - IRTPMediaEngineRegistrationPtr registration, - TransportPtr transport, - UseMediaStreamTrackPtr track, - ParametersPtr parameters - ); - - protected: - void init(); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => IRTPMediaEngineChannelResource - #pragma mark - - virtual PUID getID() const override { return ChannelResource::getID(); } - - virtual PromisePtr shutdown() override { return ChannelResource::shutdown(); } - - virtual void notifyTransportState(ISecureTransportTypes::States state) override { return ChannelResource::notifyTransportState(state); } - - virtual void notifyUpdate(ParametersPtr params) override { return ChannelResource::notifyUpdate(params); } - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override { return ChannelResource::requestStats(promise, stats); } - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => IRTPMediaEngineChannelResourceAsyncDelegate - #pragma mark - - virtual void onSecureTransportState(ISecureTransport::States state) override; - - virtual void onUpdate(ParametersPtr params) override; - - virtual void onProvideStats(PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => IRTPMediaEngineVideoSenderChannelResource - #pragma mark - - virtual bool handlePacket(const RTCPPacket &packet) override; - virtual void sendVideoFrame(VideoFramePtr videoFrame) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => IRTPMediaEngineHandlePacketAsyncDelegate - #pragma mark - - virtual void onHandleRTPPacket(DWORD timestamp, SecureByteBlockPtr buffer) override {} - virtual void onHandleRTCPPacket(SecureByteBlockPtr buffer) override; - virtual void onSendVideoFrame(VideoFramePtr videoFrame) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => friend RTPMediaEngine - #pragma mark - - virtual void stepSetup() override; - virtual void stepShutdown() override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => webrtc::CongestionController::Observer - #pragma mark - - virtual void OnNetworkChanged(uint32_t targetBitrateBps, uint8_t fractionLoss, int64_t rttMs) override; - - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine::VideoSenderChannelResource => webrtc::BitrateAllocator::LimitObserver - #pragma mark - - virtual void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, uint32_t max_padding_bitrate_bps) override; - - protected: - TransportPtr mTransport; - std::atomic mTransportState{ ISecureTransport::State_Pending }; - - UseMediaStreamTrackWeakPtr mTrack; - - ParametersPtr mParameters; - - String mSendCodecPayloadName; - BYTE mSendCodecPayloadType{ 0 }; - - rtc::TaskQueue mWorkerQueue; - webrtc::VideoSendStream *mSendStream { NULL }; - VideoEncoderSettings mVideoEncoderSettings; - const std::unique_ptr mVideoSendDelayStats; - }; - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPMediaEngine => (data) - #pragma mark - - AutoPUID mID; - RTPMediaEngineWeakPtr mThisWeak; - RTPMediaEnginePtr mGracefulShutdownReference; - - States mCurrentState {State_Pending}; - - WORD mLastError {}; - String mLastErrorReason; - - IRTPMediaEngineRegistrationWeakPtr mRegistration; - PromiseWithRTPMediaEngineList mPendingReady; - - DeviceResourceWeakMap mDeviceResources; - DeviceResourceList mPendingSetupDeviceResources; - DeviceResourceList mPendingCloseDeviceResources; - - ChannelResourceWeakMap mChannelResources; - ChannelResourceList mPendingSetupChannelResources; - ChannelResourceList mPendingCloseChannelResources; - - rtc::scoped_refptr mAudioState; - rtc::scoped_refptr mAudioDecoderFactory; - std::unique_ptr mVoiceEngine; - - std::unique_ptr mTraceCallback; - std::unique_ptr mLogSink; - rtc::TraceLog mTraceLog; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPMediaEngineFactory - #pragma mark - - interaction IRTPMediaEngineFactory - { - static IRTPMediaEngineFactory &singleton(); - - virtual RTPMediaEnginePtr create(IRTPMediaEngineRegistrationPtr registration); - }; - - class RTPMediaEngineFactory : public IFactory {}; - } -} - -ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPMediaEngineDeviceResourceAsyncDelegate) -ZS_DECLARE_PROXY_TYPEDEF(ortc::IStatsProviderTypes::PromiseWithStatsReportPtr, PromiseWithStatsReportPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::IStatsReportTypes::StatsTypeSet, StatsTypeSet) -ZS_DECLARE_PROXY_METHOD_2(onUpdateConstraints, PromisePtr, TrackConstraintsPtr) -ZS_DECLARE_PROXY_METHOD_2(onProvideStats, PromiseWithStatsReportPtr, StatsTypeSet) -ZS_DECLARE_PROXY_METHOD_1(onCapturedVideoFrame, VideoFramePtr) -ZS_DECLARE_PROXY_END() - -ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPMediaEngineChannelResourceAsyncDelegate) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::ISecureTransport::States, States) -ZS_DECLARE_PROXY_TYPEDEF(ortc::IStatsProviderTypes::PromiseWithStatsReportPtr, PromiseWithStatsReportPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::IStatsReportTypes::StatsTypeSet, StatsTypeSet) -ZS_DECLARE_PROXY_METHOD_1(onSecureTransportState, States) -ZS_DECLARE_PROXY_METHOD_1(onUpdate, ParametersPtr) -ZS_DECLARE_PROXY_METHOD_2(onProvideStats, PromiseWithStatsReportPtr, StatsTypeSet) -ZS_DECLARE_PROXY_METHOD_0(onSendDTMFTone) -ZS_DECLARE_PROXY_END() - -ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPMediaEngineAsyncDelegate) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPMediaEngineAsyncDelegate::SetupSenderChannelPtr, SetupSenderChannelPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPMediaEngineAsyncDelegate::SetupReceiverChannelPtr, SetupReceiverChannelPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPMediaEngineAsyncDelegate::SetupDevicePtr, SetupDevicePtr) -ZS_DECLARE_PROXY_METHOD_1(onSetupSenderChannel, SetupSenderChannelPtr) -ZS_DECLARE_PROXY_METHOD_1(onSetupReceiverChannel, SetupReceiverChannelPtr) -ZS_DECLARE_PROXY_METHOD_1(onSetupDevice, SetupDevicePtr) -ZS_DECLARE_PROXY_END() - -ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPMediaEngineHandlePacketAsyncDelegate) -ZS_DECLARE_PROXY_TYPEDEF(ortc::services::SecureByteBlockPtr, SecureByteBlockPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPMediaEngineHandlePacketAsyncDelegate::VideoFramePtr, VideoFramePtr) -ZS_DECLARE_PROXY_METHOD_2(onHandleRTPPacket, DWORD, SecureByteBlockPtr) -ZS_DECLARE_PROXY_METHOD_1(onHandleRTCPPacket, SecureByteBlockPtr) -ZS_DECLARE_PROXY_METHOD_1(onSendVideoFrame, VideoFramePtr) -ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_RTPPacket.h b/ortc/internal/ortc_RTPPacket.h deleted file mode 100644 index 9b16846f..00000000 --- a/ortc/internal/ortc_RTPPacket.h +++ /dev/null @@ -1,421 +0,0 @@ -/* - - Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include - -#include - -namespace ortc -{ - namespace internal - { - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket - #pragma mark - - class RTPPacket - { - protected: - struct make_private {}; - - public: - struct HeaderExtension; - struct VideoOrientationHeaderExtension; - struct VideoOrientation6HeaderExtension; - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::CreationParams - #pragma mark - - struct CreationParams - { - BYTE mVersion {2}; - size_t mPadding {}; - bool mM {}; - BYTE mPT {}; - WORD mSequenceNumber {}; - DWORD mTimestamp {}; - DWORD mSSRC {}; - - size_t mCC {}; - DWORD *mCSRCList {}; - - const BYTE *mPayload {}; - size_t mPayloadSize {}; - - HeaderExtension *mFirstHeaderExtension {}; - BYTE mHeaderExtensionAppBits {}; - - size_t mHeaderExtensionPrepaddedSize {}; - const BYTE *mHeaderExtensionStopParsePos {}; - size_t mHeaderExtensionStopParseSize {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::Extension - #pragma mark - - struct HeaderExtension - { - // see https://tools.ietf.org/html/rfc5285 - - BYTE mID {}; - - const BYTE *mData {}; - size_t mDataSizeInBytes {}; - size_t mPostPaddingSize {}; - - HeaderExtension *mNext {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::ClientToMixerExtension - #pragma mark - - struct ClientToMixerExtension : public HeaderExtension - { - // see https://tools.ietf.org/html/rfc6464 - - ClientToMixerExtension(const HeaderExtension &header); - ClientToMixerExtension( - BYTE id, - bool voiceActivity, - BYTE level - ); - - bool voiceActivity() const; - BYTE level() const; - - public: - BYTE mLevelBuffer {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::MixerToClientExtension - #pragma mark - - struct MixerToClientExtension : public HeaderExtension - { - // see https://tools.ietf.org/html/rfc6464 - - static const size_t kMaxLevelCount {0xF}; - - MixerToClientExtension(const HeaderExtension &header); - MixerToClientExtension( - BYTE id, - BYTE *levels, - size_t count - ); - - size_t levelsCount() const; - - BYTE unusedBit(size_t index) const; - BYTE level(size_t index) const; - - public: - BYTE mLevelBuffer[kMaxLevelCount] {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::StringHeaderExtension - #pragma mark - - struct StringHeaderExtension : public HeaderExtension - { - static const size_t kMaxStringLength {0xFF}; - - StringHeaderExtension(const HeaderExtension &header); - StringHeaderExtension( - BYTE id, - const char *str - ); - - const char *str() const; - - ElementPtr toDebug() const; - - public: - BYTE mStringBuffer[kMaxStringLength+sizeof(char)] {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::NumberHeaderExtension - #pragma mark - - struct NumberHeaderExtension : public HeaderExtension - { - static const size_t kMaxNumberByteLength {0xFF}; - - NumberHeaderExtension(const HeaderExtension &header); - NumberHeaderExtension( - BYTE id, - const BYTE *number, - size_t lengthInBytes - ); - NumberHeaderExtension( - BYTE id, - const char *valueInBase10 - ); - - const BYTE *number() const; - size_t length() const; - - String str() const; - - ElementPtr toDebug() const; - - public: - BYTE mNumberBuffer[kMaxNumberByteLength] {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::MidHeaderExtension - #pragma mark - - struct MidHeaderExtension : public StringHeaderExtension - { - // https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-23#section-14.3 - - static const size_t kMaxMidLength = kMaxStringLength; - - MidHeaderExtension(const HeaderExtension &header) : StringHeaderExtension(header) {} - MidHeaderExtension( - BYTE id, - const char *mid - ) : StringHeaderExtension(id, mid) {} - - const char *mid() const {return str();} - - ElementPtr toDebug() const; - - public: - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::RidHeaderExtension - #pragma mark - - struct RidHeaderExtension : public StringHeaderExtension - { - // https://tools.ietf.org/html/draft-pthatcher-mmusic-rid-00 - - static const size_t kMaxMidLength = kMaxStringLength; - - RidHeaderExtension(const HeaderExtension &header) : StringHeaderExtension(header) {} - RidHeaderExtension( - BYTE id, - const char *rid - ) : StringHeaderExtension(id, rid) {} - - const char *rid() const {return str();} - - ElementPtr toDebug() const; - - public: - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::VideoOrientationHeaderExtension - #pragma mark - - struct VideoOrientationHeaderExtension : public HeaderExtension - { - struct Clockwise {}; - struct CounterClockwise {}; - - VideoOrientationHeaderExtension(const HeaderExtension &header); - VideoOrientationHeaderExtension(const VideoOrientation6HeaderExtension &); - VideoOrientationHeaderExtension( - const Clockwise &, - bool frontFacingCamera, // true = front facing, false = backfacing - bool flip, // horizontal left-right flip (mirro) - UINT orientation - ); - VideoOrientationHeaderExtension( - const CounterClockwise &, - bool frontFacingCamera, // true = front facing, false = backfacing - bool flip, // horizontal left-right flip (mirro) - UINT orientation - ); - - bool frontFacing() const; - bool backFacing() const; - bool flip() const; - UINT degreesClockwise() const; - UINT degreesCounterClockwise() const; - - ElementPtr toDebug() const; - - public: - BYTE mEncoded[1] {}; - }; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPPacket::VideoOrientationHeaderExtension - #pragma mark - - struct VideoOrientation6HeaderExtension : public VideoOrientationHeaderExtension - { - VideoOrientation6HeaderExtension(const HeaderExtension &header); - VideoOrientation6HeaderExtension( - const Clockwise &, - bool frontFacingCamera, // true = front facing, false = backfacing - bool flip, // horizontal left-right flip (mirro) - UINT orientation - ); - VideoOrientation6HeaderExtension( - const CounterClockwise &, - bool frontFacingCamera, // true = front facing, false = backfacing - bool flip, // horizontal left-right flip (mirro) - UINT orientation - ); - - UINT degreesClockwise() const; - UINT degreesCounterClockwise() const; - - ElementPtr toDebug() const; - - public: - }; - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark (public) - #pragma mark - - RTPPacket(const make_private &); - ~RTPPacket(); - - static RTPPacketPtr create(const RTPPacket &packet); - static RTPPacketPtr create(const CreationParams ¶ms); - static RTPPacketPtr create(const BYTE *buffer, size_t bufferLengthInBytes); - static RTPPacketPtr create(const SecureByteBlock &buffer); - static RTPPacketPtr create(SecureByteBlockPtr buffer); // NOTE: ownership of buffer is taken - - const BYTE *ptr() const; - size_t size() const; - SecureByteBlockPtr buffer() const; - - BYTE version() const {return mVersion;} - size_t padding() const {return mPadding;} - size_t cc() const {return static_cast(mCC);} - bool m() const {return mM;} - BYTE pt() const {return mPT;} - WORD sequenceNumber() const {return mSequenceNumber;} - DWORD timestamp() const {return mTimestamp;} - DWORD ssrc() const {return mSSRC;} - - size_t headerSize() {return mHeaderSize;} - size_t headerExtensionSize() {return mHeaderExtensionSize;} - size_t payloadSize() {return mPayloadSize;} - - DWORD getCSRC(size_t index) const; - const BYTE *payload() const; - size_t payloadSize() const {return mPayloadSize;} - - size_t totalHeaderExtensions() const {return mTotalHeaderExtensions;} - HeaderExtension *firstHeaderExtension() const {return mHeaderExtensions;} - HeaderExtension *getHeaderExtensionAtIndex(size_t index) const; - BYTE headerExtensionAppBits() const {return mHeaderExtensionAppBits;} - - size_t headerExtensionPrepaddedSize() const {return mHeaderExtensionPrepaddedSize;} - const BYTE *headerExtensionParseStopped() const {return mHeaderExtensionParseStoppedPos;} - size_t headerExtensionParseStoppedSize() const {return mHeaderExtensionParseStoppedSize;} - - void changeHeaderExtensions(HeaderExtension *firstExtension); - - ElementPtr toDebug() const; - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark (internal) - #pragma mark - - static Log::Params slog(const char *message); - Log::Params log(const char *message) const; - Log::Params debug(const char *message) const; - - bool parse(); - - void writeHeaderExtensions( - HeaderExtension *firstExtension, - bool twoByteHeader - ); - void generate(const RTPPacket ¶ms); - void generate(const CreationParams ¶ms); - - public: - SecureByteBlockPtr mBuffer; - - BYTE mVersion {}; - size_t mPadding {}; - BYTE mCC {}; - bool mM {}; - BYTE mPT {}; - WORD mSequenceNumber {}; - DWORD mTimestamp {}; - DWORD mSSRC {}; - - size_t mHeaderSize {}; - size_t mHeaderExtensionSize {}; - size_t mPayloadSize {}; - - size_t mTotalHeaderExtensions {}; - HeaderExtension *mHeaderExtensions {}; - BYTE mHeaderExtensionAppBits {}; - - size_t mHeaderExtensionPrepaddedSize {}; - const BYTE *mHeaderExtensionParseStoppedPos {}; - size_t mHeaderExtensionParseStoppedSize {}; - }; - - } -} - diff --git a/ortc/internal/ortc_RTPReceiver.h b/ortc/internal/ortc_RTPReceiver.h index de3158b7..f609c640 100644 --- a/ortc/internal/ortc_RTPReceiver.h +++ b/ortc/internal/ortc_RTPReceiver.h @@ -430,7 +430,7 @@ namespace ortc virtual IRTPReceiverSubscriptionPtr subscribe(IRTPReceiverDelegatePtr delegate) override; - virtual IMediaStreamTrackPtr track() const override; + virtual ortc::IMediaStreamTrackPtr track() const override; virtual IRTPTransportPtr transport() const override; virtual IRTCPTransportPtr rtcpTransport() const override; diff --git a/ortc/internal/ortc_RTPReceiverChannel.h b/ortc/internal/ortc_RTPReceiverChannel.h index 2f475497..c16fab6c 100644 --- a/ortc/internal/ortc_RTPReceiverChannel.h +++ b/ortc/internal/ortc_RTPReceiverChannel.h @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -52,15 +53,8 @@ namespace ortc { ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForRTPReceiver); ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForMediaStreamTrack); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForRTPReceiverChannelMediaBase); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForRTPReceiverChannelAudio); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForRTPReceiverChannelVideo); ZS_DECLARE_INTERACTION_PTR(IRTPReceiverForRTPReceiverChannel); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelMediaBaseForRTPReceiverChannel); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelAudioForRTPReceiverChannel); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelVideoForRTPReceiverChannel); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannel); ZS_DECLARE_INTERACTION_PROXY(IRTPReceiverChannelAsyncDelegate); @@ -236,10 +230,6 @@ namespace ortc ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverForRTPReceiverChannel, UseReceiver) ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiverChannel, UseMediaStreamTrack) - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForRTPReceiverChannel, UseMediaBase) - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelAudioForRTPReceiverChannel, UseAudio) - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelVideoForRTPReceiverChannel, UseVideo) - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) typedef std::list RTCPPacketList; ZS_DECLARE_PTR(RTCPPacketList) @@ -419,10 +409,12 @@ namespace ortc Optional mKind; UseMediaStreamTrackPtr mTrack; - // NO lockk is needed: + // NO lock is needed: +#if 0 UseMediaBasePtr mMediaBase; // valid UseAudioPtr mAudio; // either UseVideoPtr mVideo; // or valid +#endif //0 }; //------------------------------------------------------------------------- @@ -455,7 +447,7 @@ namespace ortc ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPReceiverChannelAsyncDelegate) ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::ISecureTransport::States, States) ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPReceiverChannelAsyncDelegate::RTCPPacketListPtr, RTCPPacketListPtr) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::RTPPacketPtr, RTPPacketPtr) +ZS_DECLARE_PROXY_TYPEDEF(ortc::RTPPacketPtr, RTPPacketPtr) ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::IRTPReceiverChannelAsyncDelegate::ParametersPtr, ParametersPtr) ZS_DECLARE_PROXY_METHOD_1(onSecureTransportState, States) ZS_DECLARE_PROXY_METHOD_1(onNotifyPacket, RTPPacketPtr) diff --git a/ortc/internal/ortc_RTPReceiverChannelAudio.h b/ortc/internal/ortc_RTPReceiverChannelAudio.h deleted file mode 100644 index 4b271e87..00000000 --- a/ortc/internal/ortc_RTPReceiverChannelAudio.h +++ /dev/null @@ -1,465 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include - -//#define ORTC_SETTING_SCTP_TRANSPORT_MAX_MESSAGE_SIZE "ortc/sctp/max-message-size" - -namespace ortc -{ - namespace internal - { - ZS_DECLARE_USING_PTR(zsLib, Event) - - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelAudioForRTPReceiverChannel); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelAudioForMediaStreamTrack); - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelAudioForRTPMediaEngine); - - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForRTPReceiverChannelAudio); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannelAudio); - - ZS_DECLARE_INTERACTION_PROXY(IRTPReceiverChannelAudioAsyncDelegate); - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelAudioForRTPReceiverChannel - #pragma mark - - interaction IRTPReceiverChannelAudioForRTPReceiverChannel : public IRTPReceiverChannelMediaBaseForRTPReceiverChannel - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelAudioForRTPReceiverChannel, ForRTPReceiverChannel) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static ElementPtr toDebug(ForRTPReceiverChannelPtr object); - - static RTPReceiverChannelAudioPtr create( - RTPReceiverChannelPtr receiver, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - - virtual int32_t getAudioSamples( - const size_t numberOfSamples, - const uint8_t numberOfChannels, - void *audioSamples, - size_t& numberOfSamplesOut - ) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelAudioForMediaStreamTrack - #pragma mark - - interaction IRTPReceiverChannelAudioForMediaStreamTrack : public IRTPReceiverChannelMediaBaseForMediaStreamTrack - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelAudioForMediaStreamTrack, ForMediaStreamTrack) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelAudioForRTPMediaEngine - #pragma mark - - interaction IRTPReceiverChannelAudioForRTPMediaEngine : public IRTPReceiverChannelMediaBaseForRTPMediaEngine - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelAudioForRTPMediaEngine, ForRTPMediaEngine) - - static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelAudioAsyncDelegate - #pragma mark - - interaction IRTPReceiverChannelAudioAsyncDelegate - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - virtual void onReceiverChannelAudioDeliverPackets() = 0; - virtual void onSecureTransportState(ISecureTransport::States state) = 0; - virtual void onUpdate(ParametersPtr params) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio - #pragma mark - - class RTPReceiverChannelAudio : public Noop, - public MessageQueueAssociator, - public SharedRecursiveLock, - public IRTPReceiverChannelAudioForRTPReceiverChannel, - public IRTPReceiverChannelAudioForMediaStreamTrack, - public IRTPReceiverChannelAudioForRTPMediaEngine, - public IWakeDelegate, - public zsLib::ITimerDelegate, - public zsLib::IPromiseSettledDelegate, - public IRTPReceiverChannelAudioAsyncDelegate - { - protected: - struct make_private {}; - - public: - friend interaction IRTPReceiverChannelAudio; - friend interaction IRTPReceiverChannelAudioFactory; - friend interaction IRTPReceiverChannelMediaBaseForRTPReceiverChannel; - friend interaction IRTPReceiverChannelAudioForRTPReceiverChannel; - friend interaction IRTPReceiverChannelMediaBaseForMediaStreamTrack; - friend interaction IRTPReceiverChannelAudioForMediaStreamTrack; - friend interaction IRTPReceiverChannelAudioForRTPMediaEngine; - - ZS_DECLARE_CLASS_PTR(Transport) - friend class Transport; - - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelForRTPReceiverChannelAudio, UseChannel) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiverChannelAudio, UseMediaStreamTrack) - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPReceiverChannelAudio, UseMediaEngine) - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineDeviceResource, UseDeviceResource) - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineAudioReceiverChannelResource, UseChannelResource) - - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForRTPReceiverChannel, ForReceiverChannelFromMediaBase) - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForMediaStreamTrack, ForMediaStreamTrackFromMediaBase) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - typedef std::list RTCPPacketList; - ZS_DECLARE_PTR(RTCPPacketList) - typedef std::queue RTPPacketQueue; - typedef std::queue RTCPPacketQueue; - - enum States - { - State_Pending, - State_Ready, - State_ShuttingDown, - State_Shutdown, - }; - static const char *toString(States state); - - struct VoiceEngineDeleter { - VoiceEngineDeleter() {} - inline void operator()(webrtc::VoiceEngine* ptr) const { - webrtc::VoiceEngine::Delete(ptr); - } - }; - - public: - RTPReceiverChannelAudio( - const make_private &, - IMessageQueuePtr queue, - UseChannelPtr receiverChannel, - UseMediaStreamTrackPtr track, - const Parameters ¶ms - ); - - protected: - RTPReceiverChannelAudio(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : - Noop(true), - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()) - {} - - void init(); - - public: - virtual ~RTPReceiverChannelAudio(); - - static RTPReceiverChannelAudioPtr convert(ForReceiverChannelFromMediaBasePtr object); - static RTPReceiverChannelAudioPtr convert(ForRTPReceiverChannelPtr object); - static RTPReceiverChannelAudioPtr convert(ForMediaStreamTrackFromMediaBasePtr object); - static RTPReceiverChannelAudioPtr convert(ForMediaStreamTrackPtr object); - static RTPReceiverChannelAudioPtr convert(ForRTPMediaEnginePtr object); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelMediaBaseForRTPReceiverChannel - #pragma mark - - virtual PUID getID() const override {return mID;} - - virtual void notifyTransportState(ISecureTransportTypes::States state) override; - - virtual void notifyUpdate(ParametersPtr params) override; - - virtual bool handlePacket(RTPPacketPtr packet) override; - - virtual bool handlePacket(RTCPPacketPtr packet) override; - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelAudioForRTPReceiverChannel - #pragma mark - - static RTPReceiverChannelAudioPtr create( - RTPReceiverChannelPtr receiver, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - - virtual int32_t getAudioSamples( - const size_t numberOfSamples, - const uint8_t numberOfChannels, - void *audioSamples, - size_t& numberOfSamplesOut - ) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelAudioForMediaStreamTrack - #pragma mark - - // (duplicate) static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelMediaBaseForRTPMediaEngine - #pragma mark - - // (duplicate) static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IWakeDelegate - #pragma mark - - virtual void onWake() override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => ITimerDelegate - #pragma mark - - virtual void onTimer(ITimerPtr timer) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IPromiseSettledDelegate - #pragma mark - - virtual void onPromiseSettled(PromisePtr promise) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IRTPReceiverChannelAudioAsyncDelegate - #pragma mark - - virtual void onReceiverChannelAudioDeliverPackets() override; - - virtual void onSecureTransportState(ISecureTransport::States state) override; - - virtual void onUpdate(ParametersPtr params) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => friend Transport - #pragma mark - - virtual bool SendRtcp(const uint8_t* packet, size_t length); - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio::Transport - #pragma mark - - class Transport : public webrtc::Transport - { - struct make_private {}; - - protected: - void init(); - - public: - Transport( - const make_private &, - RTPReceiverChannelAudioPtr outer - ); - - ~Transport(); - - static TransportPtr create(RTPReceiverChannelAudioPtr outer); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio::Transport => webrtc::Transport - #pragma mark - - virtual bool SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) override; - - virtual bool SendRtcp(const uint8_t* packet, size_t length) override; - - private: - TransportWeakPtr mThisWeak; - RTPReceiverChannelAudioWeakPtr mOuter; - }; - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => (internal) - #pragma mark - - Log::Params log(const char *message) const; - Log::Params debug(const char *message) const; - virtual ElementPtr toDebug() const; - - bool isShuttingDown() const; - bool isShutdown() const; - - void step(); - bool stepChannelPromise(); - bool stepSetupChannel(); - - void cancel(); - - void setState(States state); - void setError(WORD error, const char *reason = NULL); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => (data) - #pragma mark - - AutoPUID mID; - RTPReceiverChannelAudioWeakPtr mThisWeak; - RTPReceiverChannelAudioPtr mGracefulShutdownReference; - - States mCurrentState {State_Pending}; - - WORD mLastError {}; - String mLastErrorReason; - - UseChannelWeakPtr mReceiverChannel; - - ParametersPtr mParameters; - - PromiseWithRTPMediaEngineChannelResourcePtr mChannelResourceLifetimeHolderPromise; - UseChannelResourcePtr mChannelResource; - - PromisePtr mCloseChannelPromise; - - Optional mKind; - UseMediaStreamTrackPtr mTrack; - - TransportPtr mTransport; // allow lifetime of callback to exist separate from "this" object - std::atomic mTransportState { ISecureTransport::State_Pending }; - - RTPPacketQueue mQueuedRTP; - RTCPPacketQueue mQueuedRTCP; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelAudioFactory - #pragma mark - - interaction IRTPReceiverChannelAudioFactory - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static IRTPReceiverChannelAudioFactory &singleton(); - - virtual RTPReceiverChannelAudioPtr create( - RTPReceiverChannelPtr receiverChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - }; - - class RTPReceiverChannelAudioFactory : public IFactory {}; - } -} - -ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPReceiverChannelAudioAsyncDelegate) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::ISecureTransport::States, States) -ZS_DECLARE_PROXY_METHOD_0(onReceiverChannelAudioDeliverPackets) -ZS_DECLARE_PROXY_METHOD_1(onSecureTransportState, States) -ZS_DECLARE_PROXY_METHOD_1(onUpdate, ParametersPtr) -ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_RTPReceiverChannelMediaBase.h b/ortc/internal/ortc_RTPReceiverChannelMediaBase.h deleted file mode 100644 index 1ad9b726..00000000 --- a/ortc/internal/ortc_RTPReceiverChannelMediaBase.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include -#include - -#include -#include -#include -#include - -#include -#include - - -//#define ORTC_SETTING_SCTP_TRANSPORT_MAX_MESSAGE_SIZE "ortc/sctp/max-message-size" - -namespace ortc -{ - namespace internal - { - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelMediaBaseForRTPReceiverChannel) - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelMediaBaseForMediaStreamTrack) - - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForRTPReceiverChannelMediaBase) - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannelMediaBase) - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelMediaBaseForRTPReceiverChannel - #pragma mark - - interaction IRTPReceiverChannelMediaBaseForRTPReceiverChannel - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForRTPReceiverChannel, ForRTPReceiverChannel); - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - - static ElementPtr toDebug(ForRTPReceiverChannelPtr object); - - virtual PUID getID() const = 0; - - virtual void notifyTransportState(ISecureTransportTypes::States state) = 0; - - virtual void notifyUpdate(ParametersPtr params) = 0; - - virtual bool handlePacket(RTPPacketPtr packet) = 0; - - virtual bool handlePacket(RTCPPacketPtr packet) = 0; - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelMediaBaseForMediaStreamTrack - #pragma mark - - interaction IRTPReceiverChannelMediaBaseForMediaStreamTrack - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForMediaStreamTrack, ForMediaStreamTrack) - - static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelMediaBaseForRTPMediaEngine - #pragma mark - - interaction IRTPReceiverChannelMediaBaseForRTPMediaEngine - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForRTPMediaEngine, ForRTPMediaEngine) - - static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - virtual PUID getID() const = 0; - }; - - } -} diff --git a/ortc/internal/ortc_RTPReceiverChannelVideo.h b/ortc/internal/ortc_RTPReceiverChannelVideo.h deleted file mode 100644 index f458f809..00000000 --- a/ortc/internal/ortc_RTPReceiverChannelVideo.h +++ /dev/null @@ -1,466 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include - -//#define ORTC_SETTING_SCTP_TRANSPORT_MAX_MESSAGE_SIZE "ortc/sctp/max-message-size" - -namespace ortc -{ - namespace internal - { - ZS_DECLARE_USING_PTR(zsLib, Event) - - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelVideoForSettings) - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelVideoForRTPReceiverChannel) - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelVideoForMediaStreamTrack) - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelVideoForRTPMediaEngine) - - ZS_DECLARE_INTERACTION_PTR(IRTPReceiverChannelForRTPReceiverChannelVideo) - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPReceiverChannelVideo) - - ZS_DECLARE_INTERACTION_PROXY(IRTPReceiverChannelVideoAsyncDelegate) - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelVideoForSettings - #pragma mark - - interaction IRTPReceiverChannelVideoForSettings - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelVideoForSettings, ForSettings) - - static void applyDefaults(); - - virtual ~IRTPReceiverChannelVideoForSettings() {} - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelVideoForRTPReceiverChannel - #pragma mark - - interaction IRTPReceiverChannelVideoForRTPReceiverChannel : public IRTPReceiverChannelMediaBaseForRTPReceiverChannel - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelVideoForRTPReceiverChannel, ForRTPReceiverChannel) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static ElementPtr toDebug(ForRTPReceiverChannelPtr object); - - static RTPReceiverChannelVideoPtr create( - RTPReceiverChannelPtr receiver, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelVideoForMediaStreamTrack - #pragma mark - - interaction IRTPReceiverChannelVideoForMediaStreamTrack : public IRTPReceiverChannelMediaBaseForMediaStreamTrack - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelVideoForMediaStreamTrack, ForMediaStreamTrack) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelAudioForRTPMediaEngine - #pragma mark - - interaction IRTPReceiverChannelVideoForRTPMediaEngine : public IRTPReceiverChannelMediaBaseForRTPMediaEngine - { - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelVideoForRTPMediaEngine, ForRTPMediaEngine) - - static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelVideoAsyncDelegate - #pragma mark - - interaction IRTPReceiverChannelVideoAsyncDelegate - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - virtual void onReceiverChannelVideoDeliverPackets() = 0; - virtual void onSecureTransportState(ISecureTransport::States state) = 0; - virtual void onUpdate(ParametersPtr params) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo - #pragma mark - - class RTPReceiverChannelVideo : public Noop, - public MessageQueueAssociator, - public SharedRecursiveLock, - public IRTPReceiverChannelVideoForSettings, - public IRTPReceiverChannelVideoForRTPReceiverChannel, - public IRTPReceiverChannelVideoForMediaStreamTrack, - public IRTPReceiverChannelVideoForRTPMediaEngine, - public IWakeDelegate, - public zsLib::ITimerDelegate, - public zsLib::IPromiseSettledDelegate, - public IRTPReceiverChannelVideoAsyncDelegate - { - protected: - struct make_private {}; - - public: - friend interaction IRTPReceiverChannelVideo; - friend interaction IRTPReceiverChannelVideoFactory; - friend interaction IRTPReceiverChannelVideoForSettings; - friend interaction IRTPReceiverChannelMediaBaseForRTPReceiverChannel; - friend interaction IRTPReceiverChannelVideoForRTPReceiverChannel; - friend interaction IRTPReceiverChannelMediaBaseForMediaStreamTrack; - friend interaction IRTPReceiverChannelVideoForMediaStreamTrack; - friend interaction IRTPReceiverChannelVideoForRTPMediaEngine; - - ZS_DECLARE_CLASS_PTR(Transport) - friend class Transport; - - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelForRTPReceiverChannelVideo, UseChannel) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiverChannelVideo, UseMediaStreamTrack) - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPReceiverChannelVideo, UseMediaEngine) - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineDeviceResource, UseDeviceResource) - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineVideoReceiverChannelResource, UseChannelResource) - - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForRTPReceiverChannel, ForReceiverChannelFromMediaBase) - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverChannelMediaBaseForMediaStreamTrack, ForMediaStreamTrackFromMediaBase) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - typedef std::list RTCPPacketList; - ZS_DECLARE_PTR(RTCPPacketList) - typedef std::queue RTPPacketQueue; - typedef std::queue RTCPPacketQueue; - - enum States - { - State_Pending, - State_Ready, - State_ShuttingDown, - State_Shutdown, - }; - static const char *toString(States state); - - public: - RTPReceiverChannelVideo( - const make_private &, - IMessageQueuePtr queue, - UseChannelPtr receiverChannel, - UseMediaStreamTrackPtr track, - const Parameters ¶ms - ); - - protected: - RTPReceiverChannelVideo(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : - Noop(true), - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()) - {} - - void init(); - - public: - virtual ~RTPReceiverChannelVideo(); - - static RTPReceiverChannelVideoPtr convert(ForSettingsPtr object); - static RTPReceiverChannelVideoPtr convert(ForReceiverChannelFromMediaBasePtr object); - static RTPReceiverChannelVideoPtr convert(ForRTPReceiverChannelPtr object); - static RTPReceiverChannelVideoPtr convert(ForMediaStreamTrackFromMediaBasePtr object); - static RTPReceiverChannelVideoPtr convert(ForMediaStreamTrackPtr object); - static RTPReceiverChannelVideoPtr convert(ForRTPMediaEnginePtr object); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelMediaBaseForRTPReceiverChannel - #pragma mark - - virtual PUID getID() const override {return mID;} - - virtual void notifyTransportState(ISecureTransportTypes::States state) override; - - virtual void notifyUpdate(ParametersPtr params) override; - - virtual bool handlePacket(RTPPacketPtr packet) override; - - virtual bool handlePacket(RTCPPacketPtr packet) override; - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelVideoForRTPReceiverChannel - #pragma mark - - static RTPReceiverChannelVideoPtr create( - RTPReceiverChannelPtr receiver, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelVideoForMediaStreamTrack - #pragma mark - - // (duplicate) static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelMediaBaseForRTPMediaEngine - #pragma mark - - // (duplicate) static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IWakeDelegate - #pragma mark - - virtual void onWake() override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => ITimerDelegate - #pragma mark - - virtual void onTimer(ITimerPtr timer) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IPromiseSettledDelegate - #pragma mark - - virtual void onPromiseSettled(PromisePtr promise) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => IRTPReceiverChannelVideoAsyncDelegate - #pragma mark - - virtual void onReceiverChannelVideoDeliverPackets() override; - - virtual void onSecureTransportState(ISecureTransport::States state) override; - - virtual void onUpdate(ParametersPtr params) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => friend Transport - #pragma mark - - virtual bool SendRtcp(const uint8_t* packet, size_t length); - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo::Transport - #pragma mark - - class Transport : public webrtc::Transport - { - struct make_private {}; - - protected: - void init(); - - public: - Transport( - const make_private &, - RTPReceiverChannelVideoPtr outer - ); - - ~Transport(); - - static TransportPtr create(RTPReceiverChannelVideoPtr outer); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo::Transport => webrtc::Transport - #pragma mark - - virtual bool SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) override; - - virtual bool SendRtcp(const uint8_t* packet, size_t length) override; - - private: - TransportWeakPtr mThisWeak; - RTPReceiverChannelVideoWeakPtr mOuter; - }; - - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => (internal) - #pragma mark - - Log::Params log(const char *message) const; - Log::Params debug(const char *message) const; - virtual ElementPtr toDebug() const; - - bool isShuttingDown() const; - bool isShutdown() const; - - void step(); - bool stepChannelPromise(); - bool stepSetupChannel(); - - void cancel(); - - void setState(States state); - void setError(WORD error, const char *reason = NULL); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelVideo => (data) - #pragma mark - - AutoPUID mID; - RTPReceiverChannelVideoWeakPtr mThisWeak; - RTPReceiverChannelVideoPtr mGracefulShutdownReference; - - States mCurrentState {State_Pending}; - - WORD mLastError {}; - String mLastErrorReason; - - UseChannelWeakPtr mReceiverChannel; - - ParametersPtr mParameters; - - PromiseWithRTPMediaEngineChannelResourcePtr mChannelResourceLifetimeHolderPromise; - UseChannelResourcePtr mChannelResource; - - PromisePtr mCloseChannelPromise; - - Optional mKind; - UseMediaStreamTrackPtr mTrack; - - TransportPtr mTransport; // allow lifetime of callback to exist separate from "this" object - std::atomic mTransportState { ISecureTransport::State_Pending }; - - RTPPacketQueue mQueuedRTP; - RTCPPacketQueue mQueuedRTCP; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPReceiverChannelVideoFactory - #pragma mark - - interaction IRTPReceiverChannelVideoFactory - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static IRTPReceiverChannelVideoFactory &singleton(); - - virtual RTPReceiverChannelVideoPtr create( - RTPReceiverChannelPtr receiverChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - }; - - class RTPReceiverChannelVideoFactory : public IFactory {}; - } -} - -ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPReceiverChannelVideoAsyncDelegate) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::ISecureTransport::States, States) -ZS_DECLARE_PROXY_METHOD_0(onReceiverChannelVideoDeliverPackets) -ZS_DECLARE_PROXY_METHOD_1(onSecureTransportState, States) -ZS_DECLARE_PROXY_METHOD_1(onUpdate, ParametersPtr) -ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_RTPSender.h b/ortc/internal/ortc_RTPSender.h index de822802..b6fbfcee 100644 --- a/ortc/internal/ortc_RTPSender.h +++ b/ortc/internal/ortc_RTPSender.h @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -58,7 +59,6 @@ namespace ortc ZS_DECLARE_INTERACTION_PTR(ISecureTransportForRTPSender); ZS_DECLARE_INTERACTION_PTR(IRTPListenerForRTPSender); ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelForRTPSender); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSender); ZS_DECLARE_INTERACTION_PROXY(IRTPSenderAsyncDelegate) @@ -292,7 +292,7 @@ namespace ortc const make_private &, IMessageQueuePtr queue, IRTPSenderDelegatePtr delegate, - IMediaStreamTrackPtr track, + ortc::IMediaStreamTrackPtr track, IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() ); @@ -333,7 +333,7 @@ namespace ortc static RTPSenderPtr create( IRTPSenderDelegatePtr delegate, - IMediaStreamTrackPtr track, + ortc::IMediaStreamTrackPtr track, IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() ); @@ -342,7 +342,7 @@ namespace ortc virtual IRTPSenderSubscriptionPtr subscribe(IRTPSenderDelegatePtr delegate) override; - virtual IMediaStreamTrackPtr track() const override; + virtual ortc::IMediaStreamTrackPtr track() const override; virtual IRTPTransportPtr transport() const override; virtual IRTCPTransportPtr rtcpTransport() const override; @@ -350,7 +350,7 @@ namespace ortc IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() ) override; - virtual PromisePtr setTrack(IMediaStreamTrackPtr track) override; + virtual PromisePtr setTrack(ortc::IMediaStreamTrackPtr track) override; static CapabilitiesPtr getCapabilities(Optional kind); @@ -562,7 +562,7 @@ namespace ortc virtual RTPSenderPtr create( IRTPSenderDelegatePtr delegate, - IMediaStreamTrackPtr track, + ortc::IMediaStreamTrackPtr track, IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() ); diff --git a/ortc/internal/ortc_RTPSenderChannel.h b/ortc/internal/ortc_RTPSenderChannel.h index 4b38a51b..860792a5 100644 --- a/ortc/internal/ortc_RTPSenderChannel.h +++ b/ortc/internal/ortc_RTPSenderChannel.h @@ -33,13 +33,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include @@ -478,7 +478,7 @@ namespace ortc Optional mKind; UseMediaStreamTrackPtr mTrack; - // NO lockk is needed: + // NO lock is needed: UseMediaBasePtr mMediaBase; // valid UseAudioPtr mAudio; // either UseVideoPtr mVideo; // or valid diff --git a/ortc/internal/ortc_RTPSenderChannelAudio.h b/ortc/internal/ortc_RTPSenderChannelAudio.h deleted file mode 100644 index a5383f92..00000000 --- a/ortc/internal/ortc_RTPSenderChannelAudio.h +++ /dev/null @@ -1,492 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include - -//#define ORTC_SETTING_SCTP_TRANSPORT_MAX_MESSAGE_SIZE "ortc/sctp/max-message-size" - -#define ORTC_SENDER_CHANNEL_PENDING_TONE_LOCK_OUT_MAGIC_STRING "PENDING" - -namespace ortc -{ - namespace internal - { - ZS_DECLARE_USING_PTR(zsLib, Event) - - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelAudioForSettings) - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelMediaBaseForRTPSenderChannel) - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelAudioForRTPSenderChannel) - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelMediaBaseForMediaStreamTrack) - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelAudioForMediaStreamTrack) - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelAudioForRTPMediaEngine) - - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelForRTPSenderChannelMediaBase) - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelForRTPSenderChannelAudio) - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase) - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannelAudio) - - ZS_DECLARE_INTERACTION_PROXY(IRTPSenderChannelAudioAsyncDelegate) - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelAudioForRTPSenderChannel - #pragma mark - - interaction IRTPSenderChannelAudioForRTPSenderChannel : public IRTPSenderChannelMediaBaseForRTPSenderChannel - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelAudioForRTPSenderChannel, ForRTPSenderChannel) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static RTPSenderChannelAudioPtr create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - - virtual int32_t sendAudioSamples( - const void* audioSamples, - const size_t numberOfSamples, - const uint8_t numberOfChannels - ) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelAudioForMediaStreamTrack - #pragma mark - - interaction IRTPSenderChannelAudioForMediaStreamTrack : public IRTPSenderChannelMediaBaseForMediaStreamTrack - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelAudioForMediaStreamTrack, ForMediaStreamTrack) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelAudioForRTPMediaEngine - #pragma mark - - interaction IRTPSenderChannelAudioForRTPMediaEngine : public IRTPSenderChannelMediaBaseForRTPMediaEngine - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelAudioForRTPMediaEngine, ForRTPMediaEngine) - - static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelAudioAsyncDelegate - #pragma mark - - interaction IRTPSenderChannelAudioAsyncDelegate - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); - - virtual void onSecureTransportState(ISecureTransport::States state) = 0; - virtual void onUpdate(ParametersPtr params) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio - #pragma mark - - class RTPSenderChannelAudio : public Noop, - public MessageQueueAssociator, - public SharedRecursiveLock, - public IRTPSenderChannelAudioForRTPSenderChannel, - public IRTPSenderChannelAudioForMediaStreamTrack, - public IRTPSenderChannelAudioForRTPMediaEngine, - public IWakeDelegate, - public IDTMFSenderDelegate, - public zsLib::ITimerDelegate, - public zsLib::IPromiseSettledDelegate, - public IRTPSenderChannelAudioAsyncDelegate - { - protected: - struct make_private {}; - - public: - friend interaction IRTPSenderChannelAudio; - friend interaction IRTPSenderChannelAudioFactory; - friend interaction IRTPSenderChannelMediaBaseForRTPSenderChannel; - friend interaction IRTPSenderChannelAudioForRTPSenderChannel; - friend interaction IRTPSenderChannelMediaBaseForMediaStreamTrack; - friend interaction IRTPSenderChannelAudioForMediaStreamTrack; - friend interaction IRTPSenderChannelAudioForRTPMediaEngine; - - ZS_DECLARE_CLASS_PTR(Transport) - friend class Transport; - - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelForRTPSenderChannelAudio, UseChannel); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase, UseBaseMediaStreamTrack); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelAudio, UseMediaStreamTrack); - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPSenderChannelAudio, UseMediaEngine); - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineDeviceResource, UseDeviceResource); - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineAudioSenderChannelResource, UseChannelResource); - - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForRTPSenderChannel, ForRTPSenderChannelFromMediaBase); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForMediaStreamTrack, ForMediaStreamTrackFromMediaBase); - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); - typedef std::list RTCPPacketList; - ZS_DECLARE_PTR(RTCPPacketList); - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - - enum States - { - State_Pending, - State_Ready, - State_ShuttingDown, - State_Shutdown, - }; - static const char *toString(States state); - - ZS_DECLARE_STRUCT_PTR(ToneInfo); - - struct ToneInfo - { - String mTones; - Milliseconds mDuration {}; - Milliseconds mInterToneGap {}; - - ElementPtr toDebug() const; - }; - - typedef std::list ToneInfoList; - - public: - RTPSenderChannelAudio( - const make_private &, - IMessageQueuePtr queue, - UseChannelPtr senderChannel, - UseMediaStreamTrackPtr track, - const Parameters ¶ms - ); - - protected: - RTPSenderChannelAudio(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : - Noop(true), - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()) - {} - - void init(); - - public: - virtual ~RTPSenderChannelAudio(); - - static RTPSenderChannelAudioPtr convert(ForRTPSenderChannelFromMediaBasePtr object); - static RTPSenderChannelAudioPtr convert(ForRTPSenderChannelPtr object); - static RTPSenderChannelAudioPtr convert(ForMediaStreamTrackFromMediaBasePtr object); - static RTPSenderChannelAudioPtr convert(ForMediaStreamTrackPtr object); - static RTPSenderChannelAudioPtr convert(ForRTPMediaEnginePtr object); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelMediaBaseForRTPSenderChannel - #pragma mark - - virtual PUID getID() const override {return mID;} - - virtual void onTrackChanged(UseBaseMediaStreamTrackPtr track) override; - - virtual void notifyTransportState(ISecureTransportTypes::States state) override; - - virtual void notifyUpdate(ParametersPtr params) override; - - virtual bool handlePacket(RTCPPacketPtr packet) override; - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; - - virtual void insertDTMF( - const char *tones, - Milliseconds duration, - Milliseconds interToneGap - ) override; - - virtual String toneBuffer() const override; - virtual Milliseconds duration() const override; - virtual Milliseconds interToneGap() const override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelAudioForRTPSenderChannel - #pragma mark - - static RTPSenderChannelAudioPtr create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - - virtual int32_t sendAudioSamples( - const void* audioSamples, - const size_t numberOfSamples, - const uint8_t numberOfChannels - ) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelAudioForMediaStreamTrack - #pragma mark - - // (duplicate) static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelMediaBaseForRTPMediaEngine - #pragma mark - - // (duplicate) static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IWakeDelegate - #pragma mark - - virtual void onWake() override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IDTMFSenderDelegate - #pragma mark - - virtual void onDTMFSenderToneChanged( - IDTMFSenderPtr sender, - String tone - ) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => ITimerDelegate - #pragma mark - - virtual void onTimer(ITimerPtr timer) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPReceiverChannelAudio => IPromiseSettledDelegate - #pragma mark - - virtual void onPromiseSettled(PromisePtr promise) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => IRTPSenderChannelAudioAsyncDelegate - #pragma mark - - virtual void onSecureTransportState(ISecureTransport::States state) override; - - virtual void onUpdate(ParametersPtr params) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => friend Transport - #pragma mark - - virtual bool SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ); - - virtual bool SendRtcp(const uint8_t* packet, size_t length); - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio::Transport - #pragma mark - - class Transport : public webrtc::Transport - { - struct make_private {}; - - protected: - void init(); - - public: - Transport( - const make_private &, - RTPSenderChannelAudioPtr outer - ); - - ~Transport(); - - static TransportPtr create(RTPSenderChannelAudioPtr outer); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio::Transport => webrtc::Transport - #pragma mark - - virtual bool SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) override; - - virtual bool SendRtcp(const uint8_t* packet, size_t length) override; - - private: - TransportWeakPtr mThisWeak; - RTPSenderChannelAudioWeakPtr mOuter; - }; - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => (internal) - #pragma mark - - Log::Params log(const char *message) const; - Log::Params debug(const char *message) const; - virtual ElementPtr toDebug() const; - - bool isShuttingDown() const; - bool isShutdown() const; - - void step(); - bool stepSetupChannel(); - - void cancel(); - - void setState(States state); - void setError(WORD error, const char *reason = NULL); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelAudio => (data) - #pragma mark - - AutoPUID mID; - RTPSenderChannelAudioWeakPtr mThisWeak; - RTPSenderChannelAudioPtr mGracefulShutdownReference; - - States mCurrentState {State_Pending}; - - WORD mLastError {}; - String mLastErrorReason; - - UseChannelWeakPtr mSenderChannel; - - ParametersPtr mParameters; - - PromiseWithRTPMediaEngineChannelResourcePtr mChannelResourceLifetimeHolderPromise; - UseChannelResourcePtr mChannelResource; - - PromisePtr mCloseChannelPromise; - - Optional mKind; - UseMediaStreamTrackPtr mTrack; - - TransportPtr mTransport; // allow lifetime of callback to exist separate from "this" object - std::atomic mTransportState { ISecureTransport::State_Pending }; - - ToneInfoList mPendingTones; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelAudioFactory - #pragma mark - - interaction IRTPSenderChannelAudioFactory - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static IRTPSenderChannelAudioFactory &singleton(); - - virtual RTPSenderChannelAudioPtr create( - RTPSenderChannelPtr sender, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - }; - - class RTPSenderChannelAudioFactory : public IFactory {}; - } -} - -ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPSenderChannelAudioAsyncDelegate) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::ISecureTransport::States, States) -ZS_DECLARE_PROXY_METHOD_1(onSecureTransportState, States) -ZS_DECLARE_PROXY_METHOD_1(onUpdate, ParametersPtr) -ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/ortc_RTPSenderChannelMediaBase.h b/ortc/internal/ortc_RTPSenderChannelMediaBase.h deleted file mode 100644 index 6ea9fc06..00000000 --- a/ortc/internal/ortc_RTPSenderChannelMediaBase.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include -#include - -#include -#include - -//#define ORTC_SETTING_SCTP_TRANSPORT_MAX_MESSAGE_SIZE "ortc/sctp/max-message-size" - -namespace ortc -{ - namespace internal - { - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelMediaBaseForRTPSenderChannel) - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelMediaBaseForMediaStreamTrack) - - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelForRTPSenderChannelMediaBase) - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase) - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelMediaBaseForRTPSenderChannel - #pragma mark - - interaction IRTPSenderChannelMediaBaseForRTPSenderChannel - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForRTPSenderChannel, ForRTPSenderChannel); - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase, UseBaseMediaStreamTrack); - - ZS_DECLARE_TYPEDEF_PTR(IStatsProvider::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - - static ElementPtr toDebug(ForRTPSenderChannelPtr object); - - virtual PUID getID() const = 0; - - virtual void onTrackChanged(UseBaseMediaStreamTrackPtr track) = 0; - - virtual void notifyTransportState(ISecureTransportTypes::States state) = 0; - - virtual void notifyUpdate(ParametersPtr params) = 0; - - virtual bool handlePacket(RTCPPacketPtr packet) = 0; - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) = 0; - - virtual void insertDTMF( - const char *tones, - Milliseconds duration, - Milliseconds interToneGap - ) = 0; - - virtual String toneBuffer() const = 0; - virtual Milliseconds duration() const = 0; - virtual Milliseconds interToneGap() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelMediaBaseForMediaStreamTrack - #pragma mark - - interaction IRTPSenderChannelMediaBaseForMediaStreamTrack - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForMediaStreamTrack, ForMediaStreamTrack) - - static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelMediaBaseForRTPMediaEngine - #pragma mark - - interaction IRTPSenderChannelMediaBaseForRTPMediaEngine - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForRTPMediaEngine, ForRTPMediaEngine) - - static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - virtual PUID getID() const = 0; - }; - } -} diff --git a/ortc/internal/ortc_RTPSenderChannelVideo.h b/ortc/internal/ortc_RTPSenderChannelVideo.h deleted file mode 100644 index b1488482..00000000 --- a/ortc/internal/ortc_RTPSenderChannelVideo.h +++ /dev/null @@ -1,458 +0,0 @@ -/* - - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those - of the authors and should not be interpreted as representing official policies, - either expressed or implied, of the FreeBSD Project. - - */ - -#pragma once - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include - -//#define ORTC_SETTING_SCTP_TRANSPORT_MAX_MESSAGE_SIZE "ortc/sctp/max-message-size" - -namespace ortc -{ - namespace internal - { - ZS_DECLARE_USING_PTR(zsLib, Event); - - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelMediaBaseForRTPSenderChannel); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelVideoForRTPSenderChannel); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelMediaBaseForMediaStreamTrack); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelVideoForMediaStreamTrack); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelVideoForRTPMediaEngine); - - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelForRTPSenderChannelMediaBase); - ZS_DECLARE_INTERACTION_PTR(IRTPSenderChannelForRTPSenderChannelVideo); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForRTPSenderChannelVideo); - - ZS_DECLARE_INTERACTION_PROXY(IRTPSenderChannelVideoAsyncDelegate); - - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelVideoForRTPSenderChannel - #pragma mark - - interaction IRTPSenderChannelVideoForRTPSenderChannel : public IRTPSenderChannelMediaBaseForRTPSenderChannel - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelVideoForRTPSenderChannel, ForRTPSenderChannel) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - static RTPSenderChannelVideoPtr create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - - virtual void sendVideoFrame(VideoFramePtr videoFrame) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelVideoForMediaStreamTrack - #pragma mark - - interaction IRTPSenderChannelVideoForMediaStreamTrack : public IRTPSenderChannelMediaBaseForMediaStreamTrack - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelVideoForMediaStreamTrack, ForMediaStreamTrack) - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelVideoForRTPMediaEngine - #pragma mark - - interaction IRTPSenderChannelVideoForRTPMediaEngine : public IRTPSenderChannelMediaBaseForRTPMediaEngine - { - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelVideoForRTPMediaEngine, ForRTPMediaEngine) - - static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - virtual PUID getID() const = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelVideoAsyncDelegate - #pragma mark - - interaction IRTPSenderChannelVideoAsyncDelegate - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - virtual void onSecureTransportState(ISecureTransport::States state) = 0; - virtual void onUpdate(ParametersPtr params) = 0; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo - #pragma mark - - class RTPSenderChannelVideo : public Noop, - public MessageQueueAssociator, - public SharedRecursiveLock, - public IRTPSenderChannelVideoForRTPSenderChannel, - public IRTPSenderChannelVideoForMediaStreamTrack, - public IRTPSenderChannelVideoForRTPMediaEngine, - public IWakeDelegate, - public zsLib::ITimerDelegate, - public zsLib::IPromiseSettledDelegate, - public IRTPSenderChannelVideoAsyncDelegate - { - protected: - struct make_private {}; - - public: - friend interaction IRTPSenderChannelVideo; - friend interaction IRTPSenderChannelVideoFactory; - friend interaction IRTPSenderChannelMediaBaseForRTPSenderChannel; - friend interaction IRTPSenderChannelVideoForRTPSenderChannel; - friend interaction IRTPSenderChannelMediaBaseForMediaStreamTrack; - friend interaction IRTPSenderChannelVideoForMediaStreamTrack; - friend interaction IRTPSenderChannelVideoForRTPMediaEngine; - - ZS_DECLARE_CLASS_PTR(Transport); - friend class Transport; - - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelForRTPSenderChannelVideo, UseChannel); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase, UseBaseMediaStreamTrack); - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelVideo, UseMediaStreamTrack); - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineForRTPSenderChannelAudio, UseMediaEngine); - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineDeviceResource, UseDeviceResource); - ZS_DECLARE_TYPEDEF_PTR(IRTPMediaEngineVideoSenderChannelResource, UseChannelResource); - - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForRTPSenderChannel, ForRTPSenderChannelFromMediaBase); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderChannelMediaBaseForMediaStreamTrack, ForMediaStreamTrackFromMediaBase); - - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); - typedef std::list RTCPPacketList; - ZS_DECLARE_PTR(RTCPPacketList); - ZS_DECLARE_TYPEDEF_PTR(IStatsProviderTypes::PromiseWithStatsReport, PromiseWithStatsReport); - ZS_DECLARE_TYPEDEF_PTR(IStatsReportTypes::StatsTypeSet, StatsTypeSet) - ZS_DECLARE_TYPEDEF_PTR(webrtc::VideoFrame, VideoFrame); - - enum States - { - State_Pending, - State_Ready, - State_ShuttingDown, - State_Shutdown, - }; - static const char *toString(States state); - - public: - RTPSenderChannelVideo( - const make_private &, - IMessageQueuePtr queue, - UseChannelPtr senderChannel, - UseMediaStreamTrackPtr track, - const Parameters ¶ms - ); - - protected: - RTPSenderChannelVideo(Noop, IMessageQueuePtr queue = IMessageQueuePtr()) : - Noop(true), - MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()) - {} - - void init(); - - public: - virtual ~RTPSenderChannelVideo(); - - static RTPSenderChannelVideoPtr convert(ForRTPSenderChannelFromMediaBasePtr object); - static RTPSenderChannelVideoPtr convert(ForRTPSenderChannelPtr object); - static RTPSenderChannelVideoPtr convert(ForMediaStreamTrackFromMediaBasePtr object); - static RTPSenderChannelVideoPtr convert(ForMediaStreamTrackPtr object); - static RTPSenderChannelVideoPtr convert(ForRTPMediaEnginePtr object); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelMediaBaseForRTPSenderChannel - #pragma mark - - virtual PUID getID() const override {return mID;} - - virtual void onTrackChanged(UseBaseMediaStreamTrackPtr track) override; - - virtual void notifyTransportState(ISecureTransportTypes::States state) override; - - virtual void notifyUpdate(ParametersPtr params) override; - - virtual bool handlePacket(RTCPPacketPtr packet) override; - - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; - - virtual void insertDTMF( - const char *tones, - Milliseconds duration, - Milliseconds interToneGap - ) override {} - - virtual String toneBuffer() const override { return String(); } - virtual Milliseconds duration() const override { return Milliseconds(); } - virtual Milliseconds interToneGap() const override { return Milliseconds(); } - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelVideoForRTPSenderChannel - #pragma mark - - static RTPSenderChannelVideoPtr create( - RTPSenderChannelPtr senderChannel, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - - virtual void sendVideoFrame(VideoFramePtr videoFrame) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelVideoForMediaStreamTrack - #pragma mark - - // (duplicate) static ElementPtr toDebug(ForMediaStreamTrackPtr object); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelMediaBaseForRTPMediaEngine - #pragma mark - - // (duplicate) static ElementPtr toDebug(ForRTPMediaEnginePtr object); - - // (duplicate) virtual PUID getID() const = 0; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IWakeDelegate - #pragma mark - - virtual void onWake() override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => ITimerDelegate - #pragma mark - - virtual void onTimer(ITimerPtr timer) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IPromiseSettledDelegate - #pragma mark - - virtual void onPromiseSettled(PromisePtr promise) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => IRTPSenderChannelVideoAsyncDelegate - #pragma mark - - virtual void onSecureTransportState(ISecureTransport::States state) override; - - virtual void onUpdate(ParametersPtr params) override; - - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => friend Transport - #pragma mark - - virtual bool SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ); - - virtual bool SendRtcp(const uint8_t* packet, size_t length); - - public: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo::Transport - #pragma mark - - class Transport : public webrtc::Transport - { - struct make_private {}; - - protected: - void init(); - - public: - Transport( - const make_private &, - RTPSenderChannelVideoPtr outer - ); - - ~Transport(); - - static TransportPtr create(RTPSenderChannelVideoPtr outer); - - public: - //--------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo::Transport => webrtc::Transport - #pragma mark - - virtual bool SendRtp( - const uint8_t* packet, - size_t length, - const webrtc::PacketOptions& options - ) override; - - virtual bool SendRtcp(const uint8_t* packet, size_t length) override; - - private: - TransportWeakPtr mThisWeak; - RTPSenderChannelVideoWeakPtr mOuter; - }; - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => (internal) - #pragma mark - - Log::Params log(const char *message) const; - Log::Params debug(const char *message) const; - virtual ElementPtr toDebug() const; - - bool isShuttingDown() const; - bool isShutdown() const; - - void step(); - bool stepSetupChannel(); - - void cancel(); - - void setState(States state); - void setError(WORD error, const char *reason = NULL); - - protected: - //----------------------------------------------------------------------- - #pragma mark - #pragma mark RTPSenderChannelVideo => (data) - #pragma mark - - AutoPUID mID; - RTPSenderChannelVideoWeakPtr mThisWeak; - RTPSenderChannelVideoPtr mGracefulShutdownReference; - - States mCurrentState {State_Pending}; - - WORD mLastError {}; - String mLastErrorReason; - - UseChannelWeakPtr mSenderChannel; - - ParametersPtr mParameters; - - PromiseWithRTPMediaEngineChannelResourcePtr mChannelResourceLifetimeHolderPromise; - UseChannelResourcePtr mChannelResource; - - PromisePtr mCloseChannelPromise; - - Optional mKind; - UseMediaStreamTrackPtr mTrack; - - TransportPtr mTransport; // allow lifetime of callback to exist separate from "this" object - std::atomic mTransportState { ISecureTransport::State_Pending }; - }; - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark IRTPSenderChannelVideoFactory - #pragma mark - - interaction IRTPSenderChannelVideoFactory - { - ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters) - - static IRTPSenderChannelVideoFactory &singleton(); - - virtual RTPSenderChannelVideoPtr create( - RTPSenderChannelPtr sender, - MediaStreamTrackPtr track, - const Parameters ¶ms - ); - }; - - class RTPSenderChannelVideoFactory : public IFactory {}; - } -} - -ZS_DECLARE_PROXY_BEGIN(ortc::internal::IRTPSenderChannelVideoAsyncDelegate) -ZS_DECLARE_PROXY_TYPEDEF(ortc::internal::ISecureTransport::States, States) -ZS_DECLARE_PROXY_METHOD_1(onSecureTransportState, States) -ZS_DECLARE_PROXY_METHOD_1(onUpdate, ParametersPtr) -ZS_DECLARE_PROXY_END() diff --git a/ortc/internal/types.h b/ortc/internal/types.h index d962b54f..03453bee 100644 --- a/ortc/internal/types.h +++ b/ortc/internal/types.h @@ -109,9 +109,6 @@ namespace ortc #pragma mark (forwards) #pragma mark - ZS_DECLARE_CLASS_PTR(RTPPacket); - ZS_DECLARE_CLASS_PTR(RTCPPacket); - ZS_DECLARE_INTERACTION_PTR(IDataTransportForSecureTransport); ZS_DECLARE_INTERACTION_PTR(ISecureTransport); ZS_DECLARE_INTERACTION_PTR(ISecureTransportForRTPSender); @@ -119,6 +116,20 @@ namespace ortc ZS_DECLARE_INTERACTION_PTR(ISecureTransportForICETransport); ZS_DECLARE_INTERACTION_PTR(ISecureTransportForRTPListener); ZS_DECLARE_INTERACTION_PTR(ISRTPTransport); + ZS_DECLARE_INTERACTION_PTR(IMediaDevice); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCapture); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCaptureAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceCaptureVideo); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceRender); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceRenderAudio); + ZS_DECLARE_INTERACTION_PTR(IMediaDeviceRenderVideo); + ZS_DECLARE_INTERACTION_PTR(IRTP); + ZS_DECLARE_INTERACTION_PTR(IRTPDecoder); + ZS_DECLARE_INTERACTION_PTR(IRTPDecoderAudio); + ZS_DECLARE_INTERACTION_PTR(IRTPDecoderVideo); + ZS_DECLARE_INTERACTION_PTR(IRTPEncoder); + ZS_DECLARE_INTERACTION_PTR(IRTPEncoderAudio); + ZS_DECLARE_INTERACTION_PTR(IRTPEncoderVideo); ZS_DECLARE_CLASS_PTR(ORTC); ZS_DECLARE_CLASS_PTR(Certificate); @@ -130,8 +141,20 @@ namespace ortc ZS_DECLARE_CLASS_PTR(ICETransport); ZS_DECLARE_CLASS_PTR(ICETransportController); ZS_DECLARE_CLASS_PTR(Identity); + ZS_DECLARE_CLASS_PTR(MediaChannelTraceHelper); + ZS_DECLARE_CLASS_PTR(MediaDeviceCaptureAudio); + ZS_DECLARE_CLASS_PTR(MediaDeviceCaptureVideo); + ZS_DECLARE_CLASS_PTR(MediaDeviceRenderAudio); ZS_DECLARE_CLASS_PTR(MediaDevices); ZS_DECLARE_CLASS_PTR(MediaStreamTrack); + ZS_DECLARE_CLASS_PTR(MediaStreamTrackChannel); + ZS_DECLARE_CLASS_PTR(MediaStreamTrackSubscriberMedia); + ZS_DECLARE_CLASS_PTR(MediaStreamTrackSubscriberRTP); + ZS_DECLARE_CLASS_PTR(MediaEngine); + ZS_DECLARE_CLASS_PTR(RTPDecoderAudio); + ZS_DECLARE_CLASS_PTR(RTPDecoderVideo); + ZS_DECLARE_CLASS_PTR(RTPEncoderAudio); + ZS_DECLARE_CLASS_PTR(RTPEncoderVideo); ZS_DECLARE_CLASS_PTR(RTPListener); ZS_DECLARE_CLASS_PTR(RTPMediaEngine); ZS_DECLARE_CLASS_PTR(RTPReceiver); @@ -149,7 +172,22 @@ namespace ortc ZS_DECLARE_INTERACTION_PROXY(ISecureTransportDelegate); ZS_DECLARE_INTERACTION_PROXY(ISRTPTransportDelegate); + ZS_DECLARE_INTERACTION_PROXY(ISecureTransportDelegate); + + ZS_DECLARE_INTERACTION_PROXY(IMediaDeviceCaptureDelegate); + ZS_DECLARE_INTERACTION_PROXY(IMediaDeviceRenderDelegate); + ZS_DECLARE_INTERACTION_PROXY(IRTPDecoderDelegate); + ZS_DECLARE_INTERACTION_PROXY(IRTPEncoderDelegate); + + ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackFeedbackDelegate); + ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackRTPDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaDeviceCaptureSubscription, IMediaDeviceCaptureDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaDeviceRenderSubscription, IMediaDeviceRenderDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaStreamTrackFeedbackSubscription, IMediaStreamTrackFeedbackDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaStreamTrackRTPSubscription, IMediaStreamTrackRTPDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IRTPDecoderSubscription, IRTPDecoderDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IRTPEncoderSubscription, IRTPEncoderDelegate); ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(ISRTPTransportSubscription, ISRTPTransportDelegate); ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(ISecureTransportSubscription, ISecureTransportDelegate); } diff --git a/ortc/ortc.h b/ortc/ortc.h index ed9363ae..88bc7ad0 100644 --- a/ortc/ortc.h +++ b/ortc/ortc.h @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include diff --git a/ortc/types.h b/ortc/types.h index 505bfb3a..bdf1450e 100644 --- a/ortc/types.h +++ b/ortc/types.h @@ -126,6 +126,9 @@ namespace ortc #pragma mark (forwards) #pragma mark + ZS_DECLARE_CLASS_PTR(RTPPacket); + ZS_DECLARE_CLASS_PTR(RTCPPacket); + interaction IRTPTransport { virtual PUID getID() const = 0; @@ -148,8 +151,9 @@ namespace ortc ZS_DECLARE_INTERACTION_PTR(IICETransport); ZS_DECLARE_INTERACTION_PTR(IICETransportController); ZS_DECLARE_INTERACTION_PTR(IMediaDevices); - ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackRenderCallback); + ZS_DECLARE_INTERACTION_PTR(IMediaElement); ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrack); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackSelector); ZS_DECLARE_INTERACTION_PTR(IRTPListener); ZS_DECLARE_INTERACTION_PTR(IRTPSender); ZS_DECLARE_INTERACTION_PTR(IRTPReceiver); @@ -168,7 +172,11 @@ namespace ortc ZS_DECLARE_INTERACTION_PROXY(IICETransportDelegate); ZS_DECLARE_INTERACTION_PROXY(IRTPListenerDelegate); ZS_DECLARE_INTERACTION_PROXY(IMediaDevicesDelegate); + ZS_DECLARE_INTERACTION_PROXY(IMediaElementDelegate); ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackDelegate); + ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackSyncMediaDelegate); + ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackAsyncMediaDelegate); + ZS_DECLARE_INTERACTION_PROXY(IMediaStreamTrackSelectorDelegate); ZS_DECLARE_INTERACTION_PROXY(IRTPSenderDelegate); ZS_DECLARE_INTERACTION_PROXY(IRTPReceiverDelegate); ZS_DECLARE_INTERACTION_PROXY(ISCTPTransportDelegate); @@ -182,6 +190,10 @@ namespace ortc ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IICETransportSubscription, IICETransportDelegate); ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaDevicesSubscription, IMediaDevicesDelegate); ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaStreamTrackSubscription, IMediaStreamTrackDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaStreamTrackMediaSubscription, IMediaStreamTrackSyncMediaDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaStreamTrackMediaSubscription, IMediaStreamTrackAsyncMediaDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaStreamTrackSelectorSubscription, IMediaStreamTrackSelectorDelegate); + ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IMediaElementSubscription, IMediaElementDelegate); ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IRTPListenerSubscription, IRTPListenerDelegate); ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IRTPSenderSubscription, IRTPSenderDelegate); ZS_DECLARE_INTERACTION_PROXY_SUBSCRIPTION(IRTPReceiverSubscription, IRTPReceiverDelegate); @@ -197,42 +209,4 @@ namespace ortc #pragma mark #pragma mark (mixed case versions of interfaces are available externally) #pragma mark - -#ifndef ORTCLIB_INTERNAL -#if 0 - ZS_DECLARE_TYPEDEF_PTR(IDTLSTransport, IDtlsTransport); - ZS_DECLARE_TYPEDEF_PTR(IDTMFSender, IDtmfSender); - ZS_DECLARE_TYPEDEF_PTR(IORTC, IOrtc); - ZS_DECLARE_TYPEDEF_PTR(IICEGatherer, IIceGatherer); - ZS_DECLARE_TYPEDEF_PTR(IICETransport, IIceTransport); - ZS_DECLARE_TYPEDEF_PTR(IICETransportController, IIceTransportController); - ZS_DECLARE_TYPEDEF_PTR(IRTPListener, IRtpListener); - ZS_DECLARE_TYPEDEF_PTR(IRTPSender, IRtpSender); - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiver, IRtpReceiver); - ZS_DECLARE_TYPEDEF_PTR(IRTPTransport, IRtpTransport); - ZS_DECLARE_TYPEDEF_PTR(IRTCPTransport, IRtcpTransport); - ZS_DECLARE_TYPEDEF_PTR(ISCTPTransport, ISctpTransport); - ZS_DECLARE_TYPEDEF_PTR(ISRTPSDESTransport, ISrtpSdesTransport); - - ZS_DECLARE_TYPEDEF_PTR(IDTLSTransportDelegate, IDtlsTransportDelegate); - ZS_DECLARE_TYPEDEF_PTR(IDTMFSenderDelegate, IDtmfSenderDelegate); - ZS_DECLARE_TYPEDEF_PTR(IICEGathererDelegate, IIceGathererDelegate); - ZS_DECLARE_TYPEDEF_PTR(IICETransportDelegate, IIceTransportDelegate); - ZS_DECLARE_TYPEDEF_PTR(IRTPListenerDelegate, IRtpListenerDelegate); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderDelegate, IRtpSenderDelegate); - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverDelegate, IRtpReceiverDelegate); - ZS_DECLARE_TYPEDEF_PTR(ISCTPTransportDelegate, ISctpTransportDelegate); - ZS_DECLARE_TYPEDEF_PTR(ISRTPSDESTransportDelegate, ISrtpSdesTransportDelegate); - - ZS_DECLARE_TYPEDEF_PTR(IDTLSTransportSubscription, IDtlsTransportSubscription); - ZS_DECLARE_TYPEDEF_PTR(IDTMFSenderSubscription, IDtmfSenderSubscription); - ZS_DECLARE_TYPEDEF_PTR(IICEGathererSubscription, IIceGathererSubscription); - ZS_DECLARE_TYPEDEF_PTR(IICETransportSubscription, IIceTransportSubscription); - ZS_DECLARE_TYPEDEF_PTR(IRTPListenerSubscription, IRtpListenerSubscription); - ZS_DECLARE_TYPEDEF_PTR(IRTPSenderSubscription, IRtpSenderSubscription); - ZS_DECLARE_TYPEDEF_PTR(IRTPReceiverSubscription, IRtpReceiverSubscription); - ZS_DECLARE_TYPEDEF_PTR(ISCTPTransportSubscription, ISctpTransportSubscription); - ZS_DECLARE_TYPEDEF_PTR(ISRTPSDESTransportSubscription, ISrtpSdesTransportSubscription); -#endif //0 -#endif //ORTCLIB_INTERNAL } diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj b/projects/msvs/ortclib.Universal/ortclib.vcxproj index d0929a43..9e35caba 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj @@ -63,7 +63,9 @@ + + @@ -72,8 +74,17 @@ + + + + + + + + + @@ -82,25 +93,29 @@ + + + + + + + + + - + + + + - - - - - - - - @@ -120,6 +135,8 @@ + + @@ -179,23 +196,27 @@ + + + + + + + + + + + - - - - - - - diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters index 7de050a4..568d2c66 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters @@ -156,48 +156,21 @@ ortc\internal - - ortc\internal - ortc\internal - - ortc\internal - - - ortc\internal - ortc\internal ortc\internal - - ortc\internal - - - ortc\internal - - - ortc\internal - ortc\internal ortc\internal - - ortc\internal - - - ortc\internal - - - ortc\internal - ortc\internal @@ -288,6 +261,84 @@ ortc\idl + + ortc\internal + + + ortc + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc + + + ortc + + + ortc + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + + + ortc\internal + @@ -394,9 +445,6 @@ ortc\cpp - - ortc\cpp - ortc\cpp @@ -406,30 +454,12 @@ ortc\cpp - - ortc\cpp - - - ortc\cpp - - - ortc\cpp - ortc\cpp ortc\cpp - - ortc\cpp - - - ortc\cpp - - - ortc\cpp - ortc\cpp @@ -487,6 +517,39 @@ ortc\adapter\cpp + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + + + ortc\cpp + From b5fc112756fb982c6f2f7ceef683d8df81739022 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 15 Aug 2017 14:58:55 -0400 Subject: [PATCH 125/187] - fixed compilation issues when merging to m58 latest --- ortc/cpp/ortc_MediaChannelTraceHelper.cpp | 2 +- ortc/cpp/ortc_MediaDevice.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCapture.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp | 2 +- ortc/cpp/ortc_MediaDeviceRenderAudio.cpp | 2 +- ortc/cpp/ortc_MediaDevices.cpp | 4 +-- ortc/cpp/ortc_MediaEngine.cpp | 2 +- ortc/cpp/ortc_MediaStreamTrack.cpp | 3 +-- ortc/cpp/ortc_SRTPTransport.cpp | 25 ++++++++----------- ortc/internal/ortc_SRTPTransport.h | 5 +--- .../msvs/ortclib.Universal/ortclib.vcxproj | 24 +++++++++--------- 12 files changed, 34 insertions(+), 41 deletions(-) diff --git a/ortc/cpp/ortc_MediaChannelTraceHelper.cpp b/ortc/cpp/ortc_MediaChannelTraceHelper.cpp index 2695ccce..35be1483 100644 --- a/ortc/cpp/ortc_MediaChannelTraceHelper.cpp +++ b/ortc/cpp/ortc_MediaChannelTraceHelper.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ortc/cpp/ortc_MediaDevice.cpp b/ortc/cpp/ortc_MediaDevice.cpp index 6a144fbe..fb94e678 100644 --- a/ortc/cpp/ortc_MediaDevice.cpp +++ b/ortc/cpp/ortc_MediaDevice.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ortc/cpp/ortc_MediaDeviceCapture.cpp b/ortc/cpp/ortc_MediaDeviceCapture.cpp index f60b2bc0..fb3c605f 100644 --- a/ortc/cpp/ortc_MediaDeviceCapture.cpp +++ b/ortc/cpp/ortc_MediaDeviceCapture.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp index a35c5890..51683fc8 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp index 743ee905..fb73409a 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp index fa940a4e..d6e25e4a 100644 --- a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index 253f7192..a5a4c1d9 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -393,7 +393,7 @@ namespace ortc DeviceListPtr value(std::make_shared()); - webrtc::VideoCaptureModule::DeviceInfo* info = webrtc::VideoCaptureFactory::CreateDeviceInfo(0); + webrtc::VideoCaptureModule::DeviceInfo* info = webrtc::VideoCaptureFactory::CreateDeviceInfo(); if (!info) { promise->reject(); return; diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp index 27d10ff6..927812f8 100644 --- a/ortc/cpp/ortc_MediaEngine.cpp +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -1,6 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index f849edf6..fef87140 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -1,7 +1,6 @@ /* - Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. - Copyright (c) 2017, Optical Tone Ltd. + Copyright (c) 2017, Hookflash Inc. / Optical Tone Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ortc/cpp/ortc_SRTPTransport.cpp b/ortc/cpp/ortc_SRTPTransport.cpp index 99a1951d..242234cc 100644 --- a/ortc/cpp/ortc_SRTPTransport.cpp +++ b/ortc/cpp/ortc_SRTPTransport.cpp @@ -60,7 +60,6 @@ #endif //HAVE_TGMATH_H //libSRTP -#include "srtp.h" #include "srtp_priv.h" #ifdef _DEBUG @@ -291,7 +290,7 @@ namespace ortc AutoRecursiveLock lock(mLock); int err = srtp_init(); - mInitialized = (err == err_status_ok); + mInitialized = (err == srtp_err_status_ok); if (!mInitialized) { ZS_LOG_ERROR(Trace, log("Failed to init SRTP") + ZS_PARAM("error", err)) } @@ -499,14 +498,12 @@ namespace ortc memset(&policy, 0, sizeof(policy)); if (CS_AES_CM_128_HMAC_SHA1_80 == mParams[loop].mCryptoSuite) { - crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtp); - crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtcp); - } - else if (CS_AES_CM_128_HMAC_SHA1_32 == mParams[loop].mCryptoSuite) { - crypto_policy_set_aes_cm_128_hmac_sha1_32(&policy.rtp); // rtp is 32, - crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtcp); // rtcp still 80 - } - else { + srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtp); + srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtcp); + } else if (CS_AES_CM_128_HMAC_SHA1_32 == mParams[loop].mCryptoSuite) { + srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(&policy.rtp); // rtp is 32, + srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtcp); // rtcp still 80 + } else { ZS_LOG_WARNING(Detail, log("crypto suite is not understood") + mParams[loop].toDebug()) ORTC_THROW_INVALID_PARAMETERS("Crypto suite is not understood: " + mParams[loop].mCryptoSuite) } @@ -525,7 +522,7 @@ namespace ortc policy.next = NULL; int err = srtp_create(&keyingMaterial->mSRTPSession, &policy); - if (err != err_status_ok) { + if (err != srtp_err_status_ok) { keyingMaterial->mSRTPSession = NULL; ZS_LOG_ERROR(Debug, log("Failed to create SRTP session, err=") + ZS_PARAM("err=", err)) ORTC_THROW_INVALID_PARAMETERS("Failed to create SRTP session") @@ -814,11 +811,11 @@ namespace ortc AutoLock lock(usedKeys[loop]->mSRTPSessionLock); int err = (component == IICETypes::Component_RTP ? srtp_unprotect(usedKeys[loop]->mSRTPSession, decryptedBuffer->BytePtr(), &out_len) : srtp_unprotect_rtcp(usedKeys[loop]->mSRTPSession, decryptedBuffer->BytePtr(), &out_len)); - if (err == err_status_replay_fail) { + if (err == srtp_err_status_replay_fail) { return true; } - if (err != err_status_ok) { + if (err != srtp_err_status_ok) { ZS_LOG_WARNING(Trace, log("cannot use current keying material, trying with next key") + usedKeys[loop]->toDebug()) continue; } @@ -972,7 +969,7 @@ namespace ortc //} } - if (err != err_status_ok) { + if (err != srtp_err_status_ok) { ZS_LOG_WARNING(Debug, log("cannot use current keying material for encryption") + keyingMaterial->toDebug()) return false; } diff --git a/ortc/internal/ortc_SRTPTransport.h b/ortc/internal/ortc_SRTPTransport.h index 0f425510..12984715 100644 --- a/ortc/internal/ortc_SRTPTransport.h +++ b/ortc/internal/ortc_SRTPTransport.h @@ -38,10 +38,7 @@ #include #include -// Forward declaration to avoid pulling in libsrtp headers here -struct srtp_event_data_t; -struct srtp_ctx_t; -struct srtp_policy_t; +#include "srtp.h" //#define ORTC_SETTING_SRTP_TRANSPORT_WARN_OF_KEY_LIFETIME_EXHAUGSTION_WHEN_REACH_PERCENTAGE_USSED "ortc/srtp/warm-key-lifetime-exhaustion-when-reach-percentage-used" diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj b/projects/msvs/ortclib.Universal/ortclib.vcxproj index 9e35caba..eaea5d0d 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj @@ -570,9 +570,9 @@ NotUsing true true - $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) 4068;4290 - USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_UNICODE;UNICODE;%(PreprocessorDefinitions) Console @@ -600,9 +600,9 @@ NotUsing true true - $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) 4068;4290 - USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_UNICODE;UNICODE;%(PreprocessorDefinitions) Console @@ -630,9 +630,9 @@ NotUsing true true - $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) 4068;4290 - USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) Console @@ -660,9 +660,9 @@ NotUsing true true - $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) 4068;4290 - USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) Console @@ -690,9 +690,9 @@ NotUsing true true - $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) 4068;4290 - USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_UNICODE;UNICODE;%(PreprocessorDefinitions) Console @@ -720,9 +720,9 @@ NotUsing true true - $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\srtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\zsLib;$(ProjectDir)..\..\..\..\zsLib-eventing;$(ProjectDir)..\..\..\..\ortclib-services-cpp;$(ProjectDir)..\..\..\..;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\webrtc;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\boringssl\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\usrsctp\usrsctplib;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\crypto\include;$(ProjectDir)..\..\..\..\..\..\webrtc\xplatform\libsrtp\config;%(AdditionalIncludeDirectories) 4068;4290 - USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;USE_ETW;USE_OPENSSL=1;NOMINMAX;WEBRTC_WIN;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;_UNICODE;UNICODE;%(PreprocessorDefinitions) Console From a7f58ef685931246054b0b34bd3878267c80f420 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 23 Aug 2017 10:37:53 -0400 Subject: [PATCH 126/187] - renamed rtp media engine to media engine - added noop media stream track monitor (since it's not used) --- ortc/cpp/ortc.cpp | 4 +- ortc/cpp/ortc.events.json | 8 +- ortc/cpp/ortc_MediaDevices.cpp | 14 +- ortc/cpp/ortc_MediaStreamTrack.cpp | 548 ++++++++---------- ortc/cpp/ortc_MediaStreamTrackMonitor.cpp | 86 +++ ortc/internal/ortc_IMediaStreamTrack.h | 44 ++ ortc/internal/ortc_IMediaStreamTrackMonitor.h | 2 + ortc/internal/ortc_MediaStreamTrack.h | 102 ++-- ortc/internal/ortc_MediaStreamTrackMonitor.h | 52 ++ ortc/internal/types.h | 1 - .../msvs/ortclib.Universal/ortclib.vcxproj | 2 + .../ortclib.Universal/ortclib.vcxproj.filters | 6 + 12 files changed, 529 insertions(+), 340 deletions(-) create mode 100644 ortc/cpp/ortc_MediaStreamTrackMonitor.cpp create mode 100644 ortc/internal/ortc_MediaStreamTrackMonitor.h diff --git a/ortc/cpp/ortc.cpp b/ortc/cpp/ortc.cpp index a0383c17..a88948a6 100644 --- a/ortc/cpp/ortc.cpp +++ b/ortc/cpp/ortc.cpp @@ -42,10 +42,10 @@ namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_icegatherer_router) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_icetransport) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_icetransport_controller) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_mediadevices) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_mediastreamtrack) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtp_rtcp_packet) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtplistener) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtpmediaengine) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtpreceiver) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtpsender) } namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtptypes) } @@ -62,10 +62,10 @@ ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_icegatherer_router, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_icetransport, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_icetransport_controller, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_mediadevices, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_mediaengine, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_mediastreamtrack, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtp_rtcp_packet, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtplistener, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtpmediaengine, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtpreceiver, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtpsender, Debug); ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtptypes, Debug); diff --git a/ortc/cpp/ortc.events.json b/ortc/cpp/ortc.events.json index 90633887..6efff9c9 100644 --- a/ortc/cpp/ortc.events.json +++ b/ortc/cpp/ortc.events.json @@ -77,6 +77,8 @@ "ortc_MediaDeviceCaptureAudio.cpp", "ortc_MediaDeviceCaptureVideo.cpp", "ortc_MediaDeviceRenderAudio.cpp", + "ortc_MediaStreamTrack.cpp", + "ortc_MediaStreamTrackMonitor.cpp", "ortc_RTPEncoderAudio.cpp", "ortc_RTPEncoderVideo.cpp", "ortc_RTPDecoderAudio.cpp", @@ -148,6 +150,9 @@ { "name": "MediaEngine" }, + { + "name": "MediaStreamTrackMonitor" + }, { "name": "RtpPacket" }, @@ -157,9 +162,6 @@ { "name": "RtpListener" }, - { - "name": "RtpMediaEngine" - }, { "name": "RtpReceiver", "opcodes": { diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index a5a4c1d9..c1f4389c 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -482,22 +482,20 @@ namespace ortc if (constraints->mVideo) { - MediaStreamTrackPtr videoTrack = IMediaStreamTrackFactory::singleton().create( + auto videoTrack = IMediaStreamTrackFactory::singleton().createForMediaDevices( IMediaStreamTrackTypes::Kinds::Kind_Video, - false, - constraints->mVideo + *constraints->mVideo ); - value->push_back(videoTrack); + value->push_back(MediaStreamTrack::convert(videoTrack)); } if (constraints->mAudio) { - MediaStreamTrackPtr audioTrack = IMediaStreamTrackFactory::singleton().create( + auto audioTrack = IMediaStreamTrackFactory::singleton().createForMediaDevices( IMediaStreamTrackTypes::Kinds::Kind_Audio, - false, - constraints->mAudio + *constraints->mAudio ); - value->push_back(audioTrack); + value->push_back(MediaStreamTrack::convert(audioTrack)); } promise->resolve(value); diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index fef87140..2c42d882 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -35,8 +35,8 @@ #include #include #include - #include +#include #include @@ -136,9 +136,23 @@ namespace ortc { MediaStreamTrackSettingsDefaults::singleton(); } - -#if 0 - + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrack + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForMediaStreamTrackChannel + #pragma mark + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -148,11 +162,43 @@ namespace ortc #pragma mark //------------------------------------------------------------------------- - MediaStreamTrackPtr IMediaStreamTrackForRTPReceiver::create(Kinds kind) + IMediaStreamTrackForRTPReceiver::ForReceiverPtr IMediaStreamTrackForRTPReceiver::createForReceiver(IMediaStreamTrackTypes::Kinds kind) { - return internal::IMediaStreamTrackFactory::singleton().create(kind); + return IMediaStreamTrackFactory::singleton().createForReceiver(kind); } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForRTPReceiverChannel + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForRTPSender + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForRTPSenderChannel + #pragma mark + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForMediaStream + #pragma mark + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -164,19 +210,21 @@ namespace ortc //------------------------------------------------------------------------- MediaStreamTrack::MediaStreamTrack( const make_private &, - IMessageQueuePtr queue, - Kinds kind, - bool remote, - TrackConstraintsPtr constraints + const MediaStreamTrackArguments &args ) : - MessageQueueAssociator(queue), + MessageQueueAssociator(args.queue_), SharedRecursiveLock(SharedRecursiveLock::create()), - mTrackID(String(IMediaStreamTrackTypes::toString(kind)) + "_label_" + string(zsLib::createUUID())), - mKind(kind), - mRemote(remote), - mConstraints(constraints) + trackId_(String(IMediaStreamTrackTypes::toString(args.kind_)) + "_label_" + string(zsLib::createUUID())), + kind_(args.kind_), + type_(args.type_), + constraints_(args.constraints_) { - ZS_LOG_DETAIL(debug("created")) + ZS_EVENTING_4(x, i, Detail, MediaStreamTrackCreate, ol, MediaEngine, Start, + puid, id, id_, + string, traceId, trackId_, + string, kind, IMediaStreamTrackTypes::toString(kind_), + string, type, MediaStreamTrack::toString(type_) + ); } //------------------------------------------------------------------------- @@ -184,13 +232,12 @@ namespace ortc { AutoRecursiveLock lock(*this); - mStatsTimer = ITimer::create(mThisWeak.lock(), Seconds(1)); - - mCapabilities = make_shared(); - mSettings = make_shared(); + statsTimer_ = ITimer::create(thisWeak_.lock(), Seconds(1)); + capabilities_ = make_shared(); + settings_ = make_shared(); - IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); + IWakeDelegateProxy::create(thisWeak_.lock())->onWake(); } //------------------------------------------------------------------------- @@ -198,108 +245,86 @@ namespace ortc { if (isNoop()) return; - ZS_LOG_DETAIL(log("destroyed")) - mThisWeak.reset(); + ZS_EVENTING_1(x, i, Detail, MediaStreamTrackDestroy, ol, MediaEngine, Stop, puid, id, id_); - cancel(); - } + thisWeak_.reset(); - //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::create( - Kinds kind, - bool remote, - TrackConstraintsPtr constraints - ) - { - MediaStreamTrackPtr pThis(make_shared(make_private{}, IORTCForInternal::queueORTC(), kind, remote, constraints)); - pThis->mThisWeak = pThis; - pThis->init(); - return pThis; + cancel(); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(IMediaStreamTrackPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ortc::IMediaStreamTrackPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } - //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForSenderPtr object) - { - return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); - } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForSenderChannelPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(internal::IMediaStreamTrackPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForSenderChannelMediaBasePtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaStreamPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForSenderChannelAudioPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaStreamTrackChannelPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForSenderChannelVideoPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaStreamTrackSubscriberPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForReceiverPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaStreamTrackSubscriberMediaPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForReceiverChannelPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaStreamTrackSubscriberRTPPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForReceiverChannelMediaBasePtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaDevicesPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForReceiverChannelAudioPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForReceiverPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForReceiverChannelVideoPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForReceiverChannelPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaDevicesPtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForSenderPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaEnginePtr object) + MediaStreamTrackPtr MediaStreamTrack::convert(ForSenderChannelPtr object) { return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); } - //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::convert(ForMediaStreamPtr object) - { - return ZS_DYNAMIC_PTR_CAST(MediaStreamTrack, object); - } //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -319,12 +344,13 @@ namespace ortc if ((isShutdown()) || (isShuttingDown())) { - ZS_LOG_WARNING(Debug, log("can not fetch stats while shutdown / shutting down")); + ZS_EVENTING_2(x, w, Debug, MediaStreamTrackWarning, ol, RtpPacket, Info, puid, id, id_, string, message, "can not fetch stats while shutdown / shutting down"); + return PromiseWithStatsReport::createRejected(IORTCForInternal::queueDelegate()); } PromiseWithStatsReportPtr promise = PromiseWithStatsReport::create(IORTCForInternal::queueDelegate()); - IMediaStreamTrackAsyncDelegateProxy::create(mThisWeak.lock())->onResolveStatsPromise(promise, stats); + IMediaStreamTrackAsyncDelegateProxy::create(thisWeak_.lock())->onResolveStatsPromise(promise, stats); return promise; } @@ -337,26 +363,29 @@ namespace ortc #pragma mark //------------------------------------------------------------------------- - ElementPtr MediaStreamTrack::toDebug(MediaStreamTrackPtr object) + void MediaStreamTrack::trace( + MediaStreamTrackPtr object, + const char *message + ) { - if (!object) return ElementPtr(); - return object->toDebug(); + if (!object) return; + return object->trace(message); } //------------------------------------------------------------------------- IMediaStreamTrackSubscriptionPtr MediaStreamTrack::subscribe(IMediaStreamTrackDelegatePtr originalDelegate) { - ZS_LOG_DETAIL(slog("subscribing to media stream track")) + ZS_EVENTING_1(x, i, Detail, MediaStreamTrackSubscribe, ol, MediaEngine, Info, puid, id, id_); AutoRecursiveLock lock(*this); if (!originalDelegate) return IMediaStreamTrackSubscriptionPtr(); - IMediaStreamTrackSubscriptionPtr subscription = mSubscriptions.subscribe(originalDelegate, IORTCForInternal::queueDelegate()); + IMediaStreamTrackSubscriptionPtr subscription = subscriptions_.subscribe(originalDelegate, IORTCForInternal::queueDelegate()); - IMediaStreamTrackDelegatePtr delegate = mSubscriptions.delegate(subscription, true); + IMediaStreamTrackDelegatePtr delegate = subscriptions_.delegate(subscription, true); if (delegate) { - auto pThis = mThisWeak.lock(); + auto pThis = thisWeak_.lock(); #define TODO_DO_WE_NEED_TO_TELL_ABOUT_ANY_MISSED_EVENTS 1 #define TODO_DO_WE_NEED_TO_TELL_ABOUT_ANY_MISSED_EVENTS 2 @@ -366,7 +395,7 @@ namespace ortc } if (isShutdown()) { - mSubscriptions.clear(); + subscriptions_.clear(); } return subscription; @@ -375,13 +404,13 @@ namespace ortc //------------------------------------------------------------------------- IMediaStreamTrackTypes::Kinds MediaStreamTrack::kind() const { - return mKind; + return kind_; } //------------------------------------------------------------------------- String MediaStreamTrack::id() const { - return mTrackID; + return trackId_; } //------------------------------------------------------------------------- @@ -389,63 +418,59 @@ namespace ortc { AutoRecursiveLock lock(*this); - return mDeviceID; + return deviceId_; } + //------------------------------------------------------------------------- String MediaStreamTrack::label() const { -#define TODO 1 -#define TODO 2 - return String(); + return label_; } //------------------------------------------------------------------------- bool MediaStreamTrack::enabled() const { -#define TODO 1 -#define TODO 2 - return false; + AutoRecursiveLock lock(*this); + return enabled_; } //------------------------------------------------------------------------- void MediaStreamTrack::enabled(bool enabled) { -#define TODO 1 -#define TODO 2 + AutoRecursiveLock lock(*this); + enabled_ = enabled; } //------------------------------------------------------------------------- bool MediaStreamTrack::muted() const { -#define TODO 1 -#define TODO 2 - return false; + AutoRecursiveLock lock(*this); + return muted_; } //------------------------------------------------------------------------- void MediaStreamTrack::muted(bool muted) { -#define TODO 1 -#define TODO 2 + AutoRecursiveLock lock(*this); + muted_ = muted; } //------------------------------------------------------------------------- bool MediaStreamTrack::remote() const { - return mRemote; // no lock needed + return type_ == MediaStreamTrackType_Receiver; } //------------------------------------------------------------------------- IMediaStreamTrackTypes::States MediaStreamTrack::readyState() const { -#define TODO 1 -#define TODO 2 - return State_First; + AutoRecursiveLock lock(*this); + return currentState_; } //------------------------------------------------------------------------- - IMediaStreamTrackPtr MediaStreamTrack::clone() const + ortc::IMediaStreamTrackPtr MediaStreamTrack::clone() const { #define TODO 1 #define TODO 2 @@ -456,26 +481,28 @@ namespace ortc void MediaStreamTrack::stop() { AutoRecursiveLock lock(*this); +#define TODO 1 +#define TODO 2 } //------------------------------------------------------------------------- IMediaStreamTrackTypes::CapabilitiesPtr MediaStreamTrack::getCapabilities() const { - return mCapabilities; + return capabilities_; } //------------------------------------------------------------------------- IMediaStreamTrackTypes::TrackConstraintsPtr MediaStreamTrack::getConstraints() const { AutoRecursiveLock lock(*this); - return mConstraints; + return constraints_; } //------------------------------------------------------------------------- IMediaStreamTrackTypes::SettingsPtr MediaStreamTrack::getSettings() const { AutoRecursiveLock lock(*this); - return mSettings; + return settings_; } //------------------------------------------------------------------------- @@ -485,53 +512,49 @@ namespace ortc auto constraints = TrackConstraints::create(inConstraints); - IMediaStreamTrackAsyncDelegateProxy::create(mThisWeak.lock())->onApplyConstraints(promise, constraints); + IMediaStreamTrackAsyncDelegateProxy::create(thisWeak_.lock())->onApplyConstraints(promise, constraints); return promise; } //------------------------------------------------------------------------- - IMediaStreamTrackMediaSubscriptionPtr MediaStreamTrack::installMediaDelegate(IMediaStreamTrackMediaDelegatePtr delegate) + IMediaStreamTrackMediaSubscriptionPtr MediaStreamTrack::subscribeMedia(IMediaStreamTrackSyncMediaDelegatePtr delegate) { -#define TODO 1 -#define TODO 2 return IMediaStreamTrackMediaSubscriptionPtr(); } + //------------------------------------------------------------------------- + IMediaStreamTrackMediaSubscriptionPtr MediaStreamTrack::subscribeMedia(IMediaStreamTrackAsyncMediaDelegatePtr delegate) + { + return IMediaStreamTrackMediaSubscriptionPtr(); + } + + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSender + #pragma mark MediaStreamTrack => internal::IMediaStreamTrack #pragma mark - //------------------------------------------------------------------------- - void MediaStreamTrack::setSender(IRTPSenderPtr sender) - { - AutoRecursiveLock lock(*this); - - mSender = RTPSender::convert(sender); - } - - //------------------------------------------------------------------------- - void MediaStreamTrack::notifyAttachSenderChannel(RTPSenderChannelPtr channel) - { - IMediaStreamTrackAsyncDelegateProxy::create(mThisWeak.lock())->onAttachSenderChannel(channel); - } //------------------------------------------------------------------------- - void MediaStreamTrack::notifyDetachSenderChannel(RTPSenderChannelPtr channel) + IMediaStreamTrackRTPSubscriptionPtr MediaStreamTrack::subscribeRTP( + const Parameters &rtpEncodingParams, + IMediaStreamTrackRTPDelegatePtr delegate + ) { - IMediaStreamTrackAsyncDelegateProxy::create(mThisWeak.lock())->onDetachSenderChannel(channel); + return IMediaStreamTrackRTPSubscriptionPtr(); } + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannel + #pragma mark MediaStreamTrack => IMediaStreamTrackForSettings #pragma mark //------------------------------------------------------------------------- @@ -539,51 +562,36 @@ namespace ortc //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannelMediaBase + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStream #pragma mark //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannelAudio - #pragma mark + bool MediaStreamTrack::isEnded() const + { + AutoRecursiveLock lock(*this); + return isShutdown(); + } //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannelVideo + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackChannel #pragma mark + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiver + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSubscriber #pragma mark - - //------------------------------------------------------------------------- - MediaStreamTrackPtr MediaStreamTrack::create(Kinds kind) - { - return create(kind, true, TrackConstraintsPtr()); - } - - //------------------------------------------------------------------------- - void MediaStreamTrack::setReceiver(IRTPReceiverPtr receiver) - { - AutoRecursiveLock lock(*this); - - mReceiver = RTPReceiver::convert(receiver); - } - + //------------------------------------------------------------------------- - void MediaStreamTrack::notifyActiveReceiverChannel(RTPReceiverChannelPtr inChannel) + void MediaStreamTrack::notifySubscriberCancelled(UseSubscriberPtr subscriber) { - IMediaStreamTrackAsyncDelegateProxy::create(mThisWeak.lock())->onSetActiveReceiverChannel(inChannel); } //------------------------------------------------------------------------- @@ -591,37 +599,57 @@ namespace ortc //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannel + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSubscriberMedia #pragma mark - + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannelMediaBase + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSubscriberRTP #pragma mark + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannelAudio + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaDevices #pragma mark + + //------------------------------------------------------------------------- + MediaStreamTrack::ForMediaDevicesPtr MediaStreamTrack::createForMediaDevices( + IMediaStreamTrackTypes::Kinds kind, + const TrackConstraints &constraints + ) + { + MediaStreamTrackArguments args; + args.queue_ = IORTCForInternal::queueORTC(); + args.kind_ = kind; + args.type_ = MediaStreamTrackType_Capture; + args.constraints_ = make_shared(constraints); + + MediaStreamTrackPtr pThis(make_shared(make_private{}, args)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; + } + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannelVideo + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSelector #pragma mark //------------------------------------------------------------------------- - void MediaStreamTrack::renderVideoFrame(VideoFramePtr videoFrame) + MediaStreamTrack::ForMediaDevicesPtr MediaStreamTrack::createForMediaStreamTrackSelector(IMediaStreamTrackTypes::Kinds kind) { - AutoRecursiveLock lock(*this); + return ForMediaDevicesPtr(); } //------------------------------------------------------------------------- @@ -629,23 +657,21 @@ namespace ortc //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaEngine + #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiver #pragma mark //------------------------------------------------------------------------- - void MediaStreamTrack::sendCapturedVideoFrame(VideoFramePtr videoFrame) + MediaStreamTrack::ForReceiverPtr MediaStreamTrack::createForReceiver(IMediaStreamTrackTypes::Kinds kind) { - UseSenderChannelPtr channel; - - { - AutoRecursiveLock lock(*this); + MediaStreamTrackArguments args; + args.queue_ = IORTCForInternal::queueORTC(); + args.kind_ = kind; + args.type_ = MediaStreamTrackType_Receiver; - channel = mSenderChannel.lock(); - } - - if (!channel) return; - - channel->sendVideoFrame(videoFrame); + MediaStreamTrackPtr pThis(make_shared(make_private{}, args)); + pThis->thisWeak_ = pThis; + pThis->init(); + return pThis; } //------------------------------------------------------------------------- @@ -653,7 +679,7 @@ namespace ortc //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaEngine + #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiverChannel #pragma mark //------------------------------------------------------------------------- @@ -661,15 +687,16 @@ namespace ortc //------------------------------------------------------------------------- //------------------------------------------------------------------------- #pragma mark - #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStream + #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSender #pragma mark //------------------------------------------------------------------------- - bool MediaStreamTrack::isEnded() const - { - AutoRecursiveLock lock(*this); - return isShutdown(); - } + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPSenderChannel + #pragma mark //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -682,7 +709,7 @@ namespace ortc //------------------------------------------------------------------------- void MediaStreamTrack::onWake() { - ZS_LOG_DEBUG(log("wake")) + ZS_EVENTING_1(x, i, Debug, MediaStreamTrackOnWake, ol, MediaEngine, InternalEvent, puid, id, id_); AutoRecursiveLock lock(*this); step(); @@ -699,11 +726,13 @@ namespace ortc //------------------------------------------------------------------------- void MediaStreamTrack::onTimer(ITimerPtr timer) { - ZS_LOG_TRACE(log("timer") + ZS_PARAM("timer id", timer->getID())) + ZS_EVENTING_2(x, i, Debug, MediaStreamTrackOnTimer, ol, MediaEngine, InternalEvent, + puid, id, id_, + puid, timerId, timer->getID() + ); AutoRecursiveLock lock(*this); - - if (mStatsTimer) { + if (statsTimer_) { } } @@ -718,7 +747,10 @@ namespace ortc //------------------------------------------------------------------------- void MediaStreamTrack::onPromiseSettled(PromisePtr promise) { - ZS_LOG_DEBUG(log("promise settled") + ZS_PARAM("promise", promise->getID())) + ZS_EVENTING_2(x, i, Debug, MediaStreamTrackOnPromiseSettled, ol, MediaEngine, InternalEvent, + puid, id, id_, + puid, promiseId, promise->getID() + ); AutoRecursiveLock lock(*this); step(); @@ -747,52 +779,6 @@ namespace ortc AutoRecursiveLock lock(*this); } - //------------------------------------------------------------------------- - void MediaStreamTrack::onSetActiveReceiverChannel(UseReceiverChannelPtr channel) - { - AutoRecursiveLock lock(*this); - - if (!channel) { - ZS_LOG_DEBUG(log("active receiver channel is being removed")) -#define TODO 1 -#define TODO 2 - return; - } - - ZS_LOG_DEBUG(log("setting to active receiver channel") + ZS_PARAM("channel", channel->getID())) - - mReceiverChannel = channel; - -#define TODO 1 -#define TODO 2 - } - - //------------------------------------------------------------------------- - void MediaStreamTrack::onAttachSenderChannel(UseSenderChannelPtr channel) - { - ZS_LOG_DEBUG(log("attaching sender channel") + ZS_PARAM("channel", channel->getID())) - - AutoRecursiveLock lock(*this); - - mSenderChannel = channel; - -#define TODO 1 -#define TODO 2 - } - - //------------------------------------------------------------------------- - void MediaStreamTrack::onDetachSenderChannel(UseSenderChannelPtr channel) - { - ZS_LOG_DEBUG(log("detaching sender channel") + ZS_PARAM("channel", channel->getID())) - - AutoRecursiveLock lock(*this); - - mSenderChannel.reset(); - -#define TODO 1 -#define TODO 2 - } - //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -802,69 +788,49 @@ namespace ortc #pragma mark //------------------------------------------------------------------------- - Log::Params MediaStreamTrack::log(const char *message) const - { - ElementPtr objectEl = Element::create("ortc::MediaStreamTrack"); - IHelper::debugAppend(objectEl, "id", mID); - return Log::Params(message, objectEl); - } - - //------------------------------------------------------------------------- - Log::Params MediaStreamTrack::slog(const char *message) + void MediaStreamTrack::trace(const char *message) const { - ElementPtr objectEl = Element::create("ortc::MediaStreamTrack"); - return Log::Params(message, objectEl); - } - - //------------------------------------------------------------------------- - Log::Params MediaStreamTrack::debug(const char *message) const - { - return Log::Params(message, toDebug()); - } - - //------------------------------------------------------------------------- - ElementPtr MediaStreamTrack::toDebug() const - { - AutoRecursiveLock lock(*this); - - ElementPtr resultEl = Element::create("ortc::MediaStreamTrack"); - - IHelper::debugAppend(resultEl, "id", mID); - - IHelper::debugAppend(resultEl, "graceful shutdown", (bool)mGracefulShutdownReference); - - IHelper::debugAppend(resultEl, "subscribers", mSubscriptions.size()); - - IHelper::debugAppend(resultEl, "state", toString(mCurrentState)); - - IHelper::debugAppend(resultEl, "error", mLastError); - IHelper::debugAppend(resultEl, "error reason", mLastErrorReason); - - return resultEl; + ZS_EVENTING_15(x, i, Trace, MediaStreamTrackTrace, ol, MediaEngine, Info, + puid, id, id_, + bool, gracefulShutdownReference, (bool)gracefulShutdownReference_, + string, currentState, ortc::IMediaStreamTrackTypes::toString(currentState_), + word, lastError, lastError_, + string, lastErrorReason, lastErrorReason_, + string, trackId, trackId_, + string, label, label_, + string, kind, ortc::IMediaStreamTrackTypes::toString(kind_), + bool, enabled, enabled_, + bool, muted, muted_, + string, type, MediaStreamTrack::toString(type_), + string, deviceId, deviceId_, + size_t, subscribers, subscribers_ ? subscribers_->size() : 0, + size_t, channels, channels_ ? channels_->size() : 0, + puid, statsTimer, statsTimer_ ? statsTimer_->getID() : 0 + ); } //------------------------------------------------------------------------- bool MediaStreamTrack::isShuttingDown() const { - if (mGracefulShutdownReference) return true; - return State_Ended == mCurrentState; + if (gracefulShutdownReference_) return true; + return State_Ended == currentState_; } //------------------------------------------------------------------------- bool MediaStreamTrack::isShutdown() const { - if (mGracefulShutdownReference) return false; - return State_Ended == mCurrentState; + if (gracefulShutdownReference_) return false; + return State_Ended == currentState_; } //------------------------------------------------------------------------- void MediaStreamTrack::step() { - ZS_LOG_DEBUG(debug("step")) + ZS_EVENTING_1(x, i, Debug, MediaStreamTrackStep, ol, MediaEngine, Step, puid, id, id_); if ((isShuttingDown()) || (isShutdown())) { - ZS_LOG_DEBUG(debug("step forwarding to cancel")) + ZS_EVENTING_2(x, i, Debug, MediaStreamTrackStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "step forwarding to cancel"); cancel(); return; } @@ -878,13 +844,13 @@ namespace ortc not_ready: { - ZS_LOG_TRACE(debug("not ready")) + ZS_EVENTING_2(x, i, Debug, MediaStreamTrackStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "not ready"); return; } ready: { - ZS_LOG_TRACE(log("ready")) + ZS_EVENTING_2(x, i, Debug, MediaStreamTrackStepMessage, ol, MediaEngine, Step, puid, id, id_, string, message, "ready"); } } @@ -908,32 +874,36 @@ namespace ortc if (isShutdown()) return; - if (!mGracefulShutdownReference) mGracefulShutdownReference = mThisWeak.lock(); + if (!gracefulShutdownReference_) gracefulShutdownReference_ = thisWeak_.lock(); //....................................................................... // final cleanup setState(State_Ended); - mSubscriptions.clear(); + subscriptions_.clear(); - if (mStatsTimer) { - mStatsTimer->cancel(); - mStatsTimer.reset(); + if (statsTimer_) { + statsTimer_->cancel(); + statsTimer_.reset(); } // make sure to cleanup any final reference to self - mGracefulShutdownReference.reset(); + gracefulShutdownReference_.reset(); } //------------------------------------------------------------------------- void MediaStreamTrack::setState(States state) { - if (state == mCurrentState) return; + if (state == currentState_) return; - ZS_LOG_DETAIL(debug("state changed") + ZS_PARAM("new state", toString(state)) + ZS_PARAM("old state", toString(mCurrentState))) + ZS_EVENTING_3(x, i, Debug, MediaStreamTrackState, ol, MediaEngine, StateEvent, + puid, id, id_, + string, newState, ortc::IMediaStreamTrack::toString(state), + string, oldState, ortc::IMediaStreamTrack::toString(currentState_) + ); - mCurrentState = state; + currentState_ = state; // MediaStreamTrackPtr pThis = mThisWeak.lock(); // if (pThis) { @@ -949,15 +919,23 @@ namespace ortc reason = UseHTTP::toString(UseHTTP::toStatusCode(errorCode)); } - if (0 != mLastError) { - ZS_LOG_WARNING(Detail, debug("error already set thus ignoring new error") + ZS_PARAM("new error", errorCode) + ZS_PARAM("new reason", reason)) + if (0 != lastError_) { + ZS_EVENTING_3(x, w, Debug, MediaStreamTrackErrorAgain, ol, MediaEngine, ErrorEvent, + puid, id, id_, + word, error, errorCode, + string, reason, reason + ); return; } - mLastError = errorCode; - mLastErrorReason = reason; + lastError_ = errorCode; + lastErrorReason_ = reason; - ZS_LOG_WARNING(Detail, debug("error set") + ZS_PARAM("error", mLastError) + ZS_PARAM("reason", mLastErrorReason)) + ZS_EVENTING_3(x, e, Detail, MediaStreamTrackError, ol, MediaEngine, ErrorEvent, + puid, id, id_, + word, error, errorCode, + string, reason, reason + ); } //------------------------------------------------------------------------- @@ -974,26 +952,12 @@ namespace ortc return MediaStreamTrackFactory::singleton(); } - //------------------------------------------------------------------------- - MediaStreamTrackPtr IMediaStreamTrackFactory::create( - IMediaStreamTrackTypes::Kinds kind, - bool remote, - TrackConstraintsPtr constraints - ) + IMediaStreamTrackFactory::ForReceiverPtr IMediaStreamTrackFactory::createForReceiver(IMediaStreamTrackTypes::Kinds kind) { if (this) {} - return internal::MediaStreamTrack::create(kind, remote, constraints); + return internal::MediaStreamTrack::createForReceiver(kind); } - //------------------------------------------------------------------------- - MediaStreamTrackPtr IMediaStreamTrackFactory::create(IMediaStreamTrackTypes::Kinds kind) - { - if (this) {} - return internal::MediaStreamTrack::create(kind); - } - -#endif //0 - } // internal namespace //--------------------------------------------------------------------------- diff --git a/ortc/cpp/ortc_MediaStreamTrackMonitor.cpp b/ortc/cpp/ortc_MediaStreamTrackMonitor.cpp new file mode 100644 index 00000000..b0af7154 --- /dev/null +++ b/ortc/cpp/ortc_MediaStreamTrackMonitor.cpp @@ -0,0 +1,86 @@ +/* + + Copyright (c) 2017, Hookflash Inc. + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#ifdef ORTC_USE_ALTERNATIVE_MEDIASTREAMTRACK_MONITOR +#include +#else // ORTC_USE_ALTERNATIVE_MEDIASTREAMTRACK_MONITOR + +#include +#include + +#include + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaStreamTrackMonitor) } + +namespace ortc +{ + namespace internal + { + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark (helpers) + #pragma mark + + // foreward declaration + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrackMonitorSettingsDefaults + #pragma mark + + //------------------------------------------------------------------------- + void installMediaStreamTrackMonitorSettingsDefaults() + { + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackMonitor + #pragma mark + + IMediaStreamTrackMonitorPtr IMediaStreamTrackMonitor::create(ortc::IMediaStreamTrackPtr track) + { + return IMediaStreamTrackMonitorPtr(); + } + } // internal namespace +} + +#endif // ORTC_USE_ALTERNATIVE_MEDIASTREAMTRACK_MONITOR diff --git a/ortc/internal/ortc_IMediaStreamTrack.h b/ortc/internal/ortc_IMediaStreamTrack.h index 0e7a7c71..5a45cf2b 100644 --- a/ortc/internal/ortc_IMediaStreamTrack.h +++ b/ortc/internal/ortc_IMediaStreamTrack.h @@ -180,6 +180,46 @@ namespace ortc }; + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForMediaDevices + #pragma mark + + interaction IMediaStreamTrackForMediaDevices + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaDevices, ForMediaDevices); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + + static ForMediaDevicesPtr createForMediaDevices( + IMediaStreamTrackTypes::Kinds kind, + const TrackConstraints &constraints + ); + + virtual PUID getID() const = 0; + }; + + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IMediaStreamTrackForMediaStreamTrackSelector + #pragma mark + + interaction IMediaStreamTrackForMediaStreamTrackSelector + { + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackSelector, ForMediaStreamTrackSelector); + + static ForMediaStreamTrackSelectorPtr createForMediaStreamTrackSelector(IMediaStreamTrackTypes::Kinds kind); + + virtual PUID getID() const = 0; + }; + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -192,6 +232,10 @@ namespace ortc { ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiver, ForReceiver); + ZS_DECLARE_TYPEDEF_PTR(IRTPTypes::Parameters, Parameters); + + static ForReceiverPtr createForReceiver(IMediaStreamTrackTypes::Kinds kind); + virtual PUID getID() const = 0; }; diff --git a/ortc/internal/ortc_IMediaStreamTrackMonitor.h b/ortc/internal/ortc_IMediaStreamTrackMonitor.h index 6a5e80d1..1aeccbe8 100644 --- a/ortc/internal/ortc_IMediaStreamTrackMonitor.h +++ b/ortc/internal/ortc_IMediaStreamTrackMonitor.h @@ -50,6 +50,8 @@ namespace ortc ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitorMediaSubscriberMediaDelegate); ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackMonitorMediaSubscriberRTPDelegate); + ZS_DECLARE_INTERACTION_PTR(IMediaStreamTrackForMediaStreamTrackMonitor); + //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- diff --git a/ortc/internal/ortc_MediaStreamTrack.h b/ortc/internal/ortc_MediaStreamTrack.h index bc8348b3..ca5d4ef3 100644 --- a/ortc/internal/ortc_MediaStreamTrack.h +++ b/ortc/internal/ortc_MediaStreamTrack.h @@ -79,7 +79,7 @@ namespace ortc virtual Kinds kind() const = 0; virtual String id() const = 0; - virtual ElementPtr toDebug() const = 0; + virtual void trace(const char *message) const = 0; }; //------------------------------------------------------------------------- @@ -118,6 +118,8 @@ namespace ortc public IMediaStreamTrackForMediaStreamTrackChannel, public IMediaStreamTrackForMediaStreamTrackSubscriberMedia, public IMediaStreamTrackForMediaStreamTrackSubscriberRTP, + public IMediaStreamTrackForMediaDevices, + public IMediaStreamTrackForMediaStreamTrackSelector, public IMediaStreamTrackForRTPReceiver, public IMediaStreamTrackForRTPReceiverChannel, public IMediaStreamTrackForRTPSender, @@ -138,6 +140,8 @@ namespace ortc friend interaction IMediaStreamTrackForMediaStreamTrackChannel; friend interaction IMediaStreamTrackForMediaStreamTrackSubscriberMedia; friend interaction IMediaStreamTrackForMediaStreamTrackSubscriberRTP; + friend interaction IMediaStreamTrackForMediaDevices; + friend interaction IMediaStreamTrackForMediaStreamTrackSelector; friend interaction IMediaStreamTrackForRTPReceiver; friend interaction IMediaStreamTrackForRTPReceiverChannel; friend interaction IMediaStreamTrackForRTPSender; @@ -154,7 +158,7 @@ namespace ortc MediaStreamTrackType_Last = MediaStreamTrackType_Selector, }; - const char *toString(MediaStreamTrackTypes type); + static const char *toString(MediaStreamTrackTypes type); ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaStreamTrack, UseMediaEngine); @@ -182,12 +186,17 @@ namespace ortc ZS_DECLARE_PTR(ChannelMap); public: + struct MediaStreamTrackArguments + { + IMessageQueuePtr queue_; + Kinds kind_; + MediaStreamTrackTypes type_ {MediaStreamTrackType_First}; + TrackConstraintsPtr constraints_; + }; + MediaStreamTrack( const make_private &, - IMessageQueuePtr queue, - Kinds kind, - bool remote, - TrackConstraintsPtr constraints + const MediaStreamTrackArguments &args ); protected: @@ -202,12 +211,6 @@ namespace ortc public: virtual ~MediaStreamTrack(); - static MediaStreamTrackPtr create( - Kinds kind, - MediaStreamTrackTypes type, - TrackConstraintsPtr constraints - ); - static MediaStreamTrackPtr convert(ortc::IMediaStreamTrackPtr object); static MediaStreamTrackPtr convert(internal::IMediaStreamTrackPtr object); static MediaStreamTrackPtr convert(ForMediaStreamPtr object); @@ -215,6 +218,8 @@ namespace ortc static MediaStreamTrackPtr convert(ForMediaStreamTrackSubscriberPtr object); static MediaStreamTrackPtr convert(ForMediaStreamTrackSubscriberMediaPtr object); static MediaStreamTrackPtr convert(ForMediaStreamTrackSubscriberRTPPtr object); + static MediaStreamTrackPtr convert(ForMediaDevicesPtr object); + static MediaStreamTrackPtr convert(ForMediaStreamTrackSelectorPtr object); static MediaStreamTrackPtr convert(ForReceiverPtr object); static MediaStreamTrackPtr convert(ForReceiverChannelPtr object); static MediaStreamTrackPtr convert(ForSenderPtr object); @@ -234,11 +239,11 @@ namespace ortc #pragma mark static void trace( - IMediaStreamTrackPtr object, + MediaStreamTrackPtr object, const char *message = NULL ); - virtual PUID getID() const override {return mID;} + virtual PUID getID() const override {return id_;} virtual IMediaStreamTrackSubscriptionPtr subscribe(IMediaStreamTrackDelegatePtr delegate) override; @@ -267,15 +272,15 @@ namespace ortc virtual IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackAsyncMediaDelegatePtr delegate) override; - virtual IMediaStreamTrackRTPSubscriptionPtr subscribeRTP( - const Parameters &rtpEncodingParams, - IMediaStreamTrackRTPDelegatePtr delegate - ) override; - //----------------------------------------------------------------------- #pragma mark #pragma mark MediaStreamTrack => internal::IMediaStreamTrack #pragma mark + + virtual IMediaStreamTrackRTPSubscriptionPtr subscribeRTP( + const Parameters &rtpEncodingParams, + IMediaStreamTrackRTPDelegatePtr delegate + ) override; //----------------------------------------------------------------------- #pragma mark @@ -314,12 +319,34 @@ namespace ortc #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSubscriberRTP #pragma mark + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaDevices + #pragma mark + + // (duplicate) virtual PUID getID() const = 0; + + static ForMediaDevicesPtr createForMediaDevices( + IMediaStreamTrackTypes::Kinds kind, + const TrackConstraints &constraints + ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSelector + #pragma mark + + // (duplicate) virtual PUID getID() const = 0; + + static ForMediaDevicesPtr createForMediaStreamTrackSelector(IMediaStreamTrackTypes::Kinds kind); //----------------------------------------------------------------------- #pragma mark #pragma mark MediaStreamTrack => IMediaStreamTrackForRTPReceiver #pragma mark + static ForReceiverPtr createForReceiver(IMediaStreamTrackTypes::Kinds kind); + // (duplicate) virtual PUID getID() const = 0; //----------------------------------------------------------------------- @@ -384,6 +411,8 @@ namespace ortc #pragma mark MediaStreamTrack => (internal) #pragma mark + void trace(const char *message) const; + bool isShuttingDown() const; bool isShutdown() const; @@ -402,23 +431,24 @@ namespace ortc #pragma mark MediaStreamTrack => (data) #pragma mark - AutoPUID mID; - MediaStreamTrackWeakPtr mThisWeak; - MediaStreamTrackPtr mGracefulShutdownReference; + AutoPUID id_; + MediaStreamTrackWeakPtr thisWeak_; + MediaStreamTrackPtr gracefulShutdownReference_; - IMediaStreamTrackDelegateSubscriptions mSubscriptions; + IMediaStreamTrackDelegateSubscriptions subscriptions_; - States currentState_ {State_Live}; + States currentState_ {State_First}; WORD lastError_ {}; String lastErrorReason_; - String trackID_; + String trackId_; String label_; Kinds kind_ {Kind_First}; + bool enabled_ {false}; bool muted_ {false}; - MediaStreamTrackTypes type_ {}; - String deviceID_; + MediaStreamTrackTypes type_ {MediaStreamTrackType_First}; + String deviceId_; CapabilitiesPtr capabilities_; TrackConstraintsPtr constraints_; @@ -440,16 +470,20 @@ namespace ortc interaction IMediaStreamTrackFactory { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints) + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::TrackConstraints, TrackConstraints); + + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaDevices, ForMediaDevices); + ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPReceiver, ForReceiver); static IMediaStreamTrackFactory &singleton(); - virtual MediaStreamTrackPtr create( - IMediaStreamTrackTypes::Kinds kind, - bool remote, - TrackConstraintsPtr constraints - ); - virtual MediaStreamTrackPtr create(IMediaStreamTrackTypes::Kinds kind); + virtual ForMediaDevicesPtr createForMediaDevices( + IMediaStreamTrackTypes::Kinds kind, + const TrackConstraints &constraints + ); + + virtual ForReceiverPtr createForReceiver(IMediaStreamTrackTypes::Kinds kind); + }; class MediaStreamTrackFactory : public IFactory {}; diff --git a/ortc/internal/ortc_MediaStreamTrackMonitor.h b/ortc/internal/ortc_MediaStreamTrackMonitor.h new file mode 100644 index 00000000..9239a9e3 --- /dev/null +++ b/ortc/internal/ortc_MediaStreamTrackMonitor.h @@ -0,0 +1,52 @@ +/* + + Copyright (c) 2017, Hookflash Inc. + Copyright (c) 2017, Optical Tone Ltd. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#pragma once + +//#define ORTC_USE_ALTERNATIVE_MEDIASTREAMTRACK_MONITOR + +#ifdef ORTC_USE_ALTERNATIVE_MEDIASTREAMTRACK_MONITOR +#include +#else + +#include + +#include + +namespace ortc +{ + namespace internal + { + } +} + +#endif //ORTC_USE_ALTERNATIVE_MEDIASTREAMTRACK_MONITOR diff --git a/ortc/internal/types.h b/ortc/internal/types.h index 03453bee..47ef1c4b 100644 --- a/ortc/internal/types.h +++ b/ortc/internal/types.h @@ -156,7 +156,6 @@ namespace ortc ZS_DECLARE_CLASS_PTR(RTPEncoderAudio); ZS_DECLARE_CLASS_PTR(RTPEncoderVideo); ZS_DECLARE_CLASS_PTR(RTPListener); - ZS_DECLARE_CLASS_PTR(RTPMediaEngine); ZS_DECLARE_CLASS_PTR(RTPReceiver); ZS_DECLARE_CLASS_PTR(RTPReceiverChannel); ZS_DECLARE_CLASS_PTR(RTPReceiverChannelAudio); diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj b/projects/msvs/ortclib.Universal/ortclib.vcxproj index eaea5d0d..d3212327 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj @@ -104,6 +104,7 @@ + @@ -205,6 +206,7 @@ + diff --git a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters index 568d2c66..c4657202 100644 --- a/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters +++ b/projects/msvs/ortclib.Universal/ortclib.vcxproj.filters @@ -339,6 +339,9 @@ ortc\internal + + ortc\internal + @@ -550,6 +553,9 @@ ortc\cpp + + ortc\cpp + From ff79aeca220e96633a551607921af6c40cc10924 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 23 Aug 2017 15:54:43 -0400 Subject: [PATCH 127/187] - removed unneeded media related items from receiver/sender channel --- ortc/cpp/ortc_RTPReceiverChannel.cpp | 37 +++++------------------ ortc/cpp/ortc_RTPSenderChannel.cpp | 45 +++++----------------------- 2 files changed, 16 insertions(+), 66 deletions(-) diff --git a/ortc/cpp/ortc_RTPReceiverChannel.cpp b/ortc/cpp/ortc_RTPReceiverChannel.cpp index b9c9c694..21185abe 100644 --- a/ortc/cpp/ortc_RTPReceiverChannel.cpp +++ b/ortc/cpp/ortc_RTPReceiverChannel.cpp @@ -61,8 +61,6 @@ #define ASSERT(x) #endif //_DEBUG -#if 0 - namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpreceiver) } namespace ortc @@ -231,15 +229,11 @@ namespace ortc switch (kind.value()) { case IMediaStreamTrackTypes::Kind_Audio: { - mAudio = UseAudio::create(mThisWeak.lock(), MediaStreamTrack::convert(mTrack), *mParameters); - mMediaBase = mAudio; found = true; break; } case IMediaStreamTrackTypes::Kind_Video: { - mVideo = UseVideo::create(mThisWeak.lock(), MediaStreamTrack::convert(mTrack), *mParameters); - mMediaBase = mVideo; found = true; break; } @@ -248,10 +242,9 @@ namespace ortc ORTC_THROW_INVALID_PARAMETERS_IF(!found); - ZS_EVENTING_3( + ZS_EVENTING_2( x, i, Detail, RtpReceiverChannelCreateMediaChannel, ol, RtpReceiverChannel, Info, puid, id, mID, - puid, mediaBaseId, mMediaBase->getID(), string, kind, IMediaStreamTrack::toString(kind.value()) ); @@ -365,36 +358,33 @@ namespace ortc //------------------------------------------------------------------------- bool RTPReceiverChannel::handlePacket(RTPPacketPtr packet) { - ZS_EVENTING_5( + ZS_EVENTING_4( x, i, Trace, RtpReceiverChannelDeliverIncomingPacketToMediaChannel, ol, RtpReceiverChannel, Deliver, puid, id, mID, - puid, mediaBaseId, mMediaBase->getID(), enum, packetType, zsLib::to_underlying(IICETypes::Component_RTP), buffer, packet, packet->buffer()->BytePtr(), size, size, packet->buffer()->SizeInBytes() ); - return mMediaBase->handlePacket(packet); + return false; } //------------------------------------------------------------------------- bool RTPReceiverChannel::handlePacket(RTCPPacketPtr packet) { - ZS_EVENTING_5( + ZS_EVENTING_4( x, i, Trace, RtpReceiverChannelDeliverIncomingPacketToMediaChannel, ol, RtpReceiverChannel, Deliver, puid, id, mID, - puid, mediaBaseId, mMediaBase->getID(), enum, packetType, zsLib::to_underlying(IICETypes::Component_RTCP), buffer, packet, packet->buffer()->BytePtr(), size, size, packet->buffer()->SizeInBytes() ); - return mMediaBase->handlePacket(packet); + return false; } //------------------------------------------------------------------------- void RTPReceiverChannel::requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) { - return mMediaBase->requestStats(promise, stats); } @@ -470,9 +460,7 @@ namespace ortc #define TODO_VERIFY_RETURN_RESULT 1 #define TODO_VERIFY_RETURN_RESULT 2 - if (!mAudio) return 0; - - return mAudio->getAudioSamples(numberOfSamples, numberOfChannels, audioSamples, numberOfSamplesOut); + return 0; } //------------------------------------------------------------------------- @@ -532,8 +520,6 @@ namespace ortc cancel(); } } - - mMediaBase->notifyTransportState(state); } //------------------------------------------------------------------------- @@ -563,13 +549,10 @@ namespace ortc { ZS_LOG_TRACE(log("on update") + params->toDebug()) - UseMediaBasePtr mediaBase; - { AutoRecursiveLock lock(*this); mParameters = params; - mediaBase = mMediaBase; Optional kind = RTPTypesHelper::getCodecsKind(*mParameters); @@ -580,12 +563,12 @@ namespace ortc switch (kind.value()) { case IMediaStreamTrackTypes::Kind_Audio: { - found = (bool)mAudio; + found = true; break; } case IMediaStreamTrackTypes::Kind_Video: { - found = (bool)mVideo; + found = true; break; } } @@ -593,8 +576,6 @@ namespace ortc ORTC_THROW_INVALID_PARAMETERS_IF(!found) } - - mediaBase->notifyUpdate(params); } //------------------------------------------------------------------------- @@ -766,5 +747,3 @@ namespace ortc } // internal namespace } - -#endif //0 diff --git a/ortc/cpp/ortc_RTPSenderChannel.cpp b/ortc/cpp/ortc_RTPSenderChannel.cpp index e66fa717..923caf68 100644 --- a/ortc/cpp/ortc_RTPSenderChannel.cpp +++ b/ortc/cpp/ortc_RTPSenderChannel.cpp @@ -63,8 +63,6 @@ #define ASSERT(x) #endif //_DEBUG -#if 0 - namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) } namespace ortc @@ -237,15 +235,11 @@ namespace ortc switch (kind.value()) { case IMediaStreamTrackTypes::Kind_Audio: { - mAudio = UseAudio::create(mThisWeak.lock(), MediaStreamTrack::convert(mTrack), *mParameters); - mMediaBase = mAudio; found = true; break; } case IMediaStreamTrackTypes::Kind_Video: { - mVideo = UseVideo::create(mThisWeak.lock(), MediaStreamTrack::convert(mTrack), *mParameters); - mMediaBase = mVideo; found = true; break; } @@ -254,10 +248,9 @@ namespace ortc ORTC_THROW_INVALID_PARAMETERS_IF(!found); - ZS_EVENTING_3( + ZS_EVENTING_2( x, i, Detail, RtpSenderChannelCreateMediaChannel, ol, RtpSender, Info, puid, id, mID, - puid, mediaBaseId, mMediaBase->getID(), string, kind, IMediaStreamTrack::toString(kind.value()) ); @@ -339,10 +332,9 @@ namespace ortc void RTPSenderChannel::notifyTrackChanged(MediaStreamTrackPtr inTrack) { UseMediaStreamTrackPtr track = inTrack; - ZS_EVENTING_3( + ZS_EVENTING_2( x, i, Debug, RtpSenderChannelChangeTrack, ol, RtpSenderChannel, InternalEvent, puid, id, mID, - puid, mediaBaseId, mMediaBase->getID(), puid, trackId, ((bool)track) ? track->getID() : 0 ); IRTPSenderChannelAsyncDelegateProxy::create(mThisWeak.lock())->onTrackChanged(track); @@ -382,23 +374,17 @@ namespace ortc { ZS_LOG_TRACE(log("on provide stats") + ZS_PARAM("promise", promise->getID())); - UseMediaBasePtr mediaBase; - { AutoRecursiveLock lock(*this); - mediaBase = mMediaBase; } - - mediaBase->requestStats(promise, stats); } //------------------------------------------------------------------------- bool RTPSenderChannel::handlePacket(RTCPPacketPtr packet) { - ZS_EVENTING_5( + ZS_EVENTING_4( x, i, Trace, RtpSenderChannelDeliverIncomingPacketToMediaChannel, ol, RtpSenderChannel, Deliver, puid, id, mID, - puid, mediaBaseId, mMediaBase->getID(), enum, packetType, zsLib::to_underlying(IICETypes::Component_RTCP), buffer, packet, packet->buffer()->BytePtr(), size, size, packet->buffer()->SizeInBytes() @@ -442,7 +428,7 @@ namespace ortc } } - return mMediaBase->handlePacket(packet); + return false; } //------------------------------------------------------------------------- @@ -452,25 +438,24 @@ namespace ortc Milliseconds interToneGap ) { - mMediaBase->insertDTMF(tones, duration, interToneGap); } //------------------------------------------------------------------------- String RTPSenderChannel::toneBuffer() const { - return mMediaBase->toneBuffer(); + return String(); } //------------------------------------------------------------------------- Milliseconds RTPSenderChannel::duration() const { - return mMediaBase->duration(); + return Milliseconds(); } //------------------------------------------------------------------------- Milliseconds RTPSenderChannel::interToneGap() const { - return mMediaBase->interToneGap(); + return Milliseconds(); } //------------------------------------------------------------------------- @@ -677,14 +662,12 @@ namespace ortc #define TODO_VERIFY_RESULT 1 #define TODO_VERIFY_RESULT 2 if (!mAudio) return 0; - return mAudio->sendAudioSamples(audioSamples, numberOfSamples, numberOfChannels); + return 0; } //------------------------------------------------------------------------- void RTPSenderChannel::sendVideoFrame(VideoFramePtr videoFrame) { - if (!mVideo) return; - mVideo->sendVideoFrame(videoFrame); } //------------------------------------------------------------------------- @@ -733,17 +716,11 @@ namespace ortc //------------------------------------------------------------------------- void RTPSenderChannel::onTrackChanged(UseMediaStreamTrackPtr track) { - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelMediaBase, UseBaseMediaStreamTrack) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelAudio, UseAudioMediaStreamTrack) - ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForRTPSenderChannelVideo, UseVideoMediaStreamTrack) - switch (mKind.value()) { case IMediaStreamTrackTypes::Kind_Audio: { - mMediaBase->onTrackChanged(IMediaStreamTrackForRTPSenderChannelAudioPtr(MediaStreamTrack::convert(track))); break; } case IMediaStreamTrackTypes::Kind_Video: { - mMediaBase->onTrackChanged(IMediaStreamTrackForRTPSenderChannelVideoPtr(MediaStreamTrack::convert(track))); break; } } @@ -764,8 +741,6 @@ namespace ortc cancel(); } } - - mMediaBase->notifyTransportState(state); } //------------------------------------------------------------------------- @@ -820,8 +795,6 @@ namespace ortc setupTagging(); } - - mediaBase->notifyUpdate(params); } //------------------------------------------------------------------------- @@ -1061,5 +1034,3 @@ namespace ortc } // internal namespace } - -#endif //0 From a3d534a17db6dbdb3fde4fab048668063d44a002 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Thu, 14 Sep 2017 15:31:06 +0200 Subject: [PATCH 128/187] Fixed some Webrtc M61 merge issues. Resolved all build issues related to using gn. Added call to IDL compilation macro --- BUILD.gn | 273 ++++++++++++++++++++++++++ ortc/IRTPTypes.h | 4 +- ortc/cpp/ortc_Certificate.cpp | 2 +- ortc/cpp/ortc_DTLSTransport.cpp | 8 +- ortc/cpp/ortc_MediaEngine.cpp | 2 +- ortc/cpp/ortc_MediaStreamTrack.cpp | 2 + ortc/idl/sources.gni | 1 + ortc/internal/ortc_IRTPEncoder.h | 1 - ortc/internal/ortc_MediaEngine.h | 2 +- ortc/internal/ortc_RTPSenderChannel.h | 2 +- ortc/types.h | 4 + 11 files changed, 290 insertions(+), 11 deletions(-) create mode 100644 BUILD.gn create mode 100644 ortc/idl/sources.gni diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 00000000..99b601b1 --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,273 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//ortc/zsLib-eventing/zslib_eventing_tool.gni") +import("//ortc/ortclib/ortc/idl/sources.gni") + +config("ortclib_config") { + if (is_win) { + cflags_cc = [ + "/WX-", + "/wd4068", + "/GR", + ] + } else { + cflags_cc = [ "-g" ] + cflags_cc += [ + "-Wall", + "-std=c++11", + "-stdlib=libc++", + "-lc++", + "-lc++abi", + ] + } + + include_dirs = [ + ".", + "..", + "../zsLib", + "../zsLib/zsLib/extras", + "../zsLib-eventing", + "../ortclib-services", + "../../third_party/boringssl/include", + "../../third_party/usrsctp/usrsctplib", + "../../third_party/libsrtp/srtp/include", + "../../third_party/libsrtp/srtp/crypto/include", + "../../third_party/libsrtp/config", + "../../third_party/usrsctp/usrsctplib/usrsctplib", + "../../third_party/boringssl/include/openssl", + "../../third_party/boringssl/include", + "../../third_party/libsrtp/include", + "../../third_party/libsrtp/crypto/include", + "../../third_party/boringssl/src/include", + "../..", + "../../ortc", + "../ortclib", + "../ortclib/ortc", + "../ortclib/ortc/idl", + "../ortclib/ortc/idl/wrapper", + ] +} + +ortclib_sources = [ + "ortc/ICapabilities.h", + "ortc/ICertificate.h", + "ortc/IConstraints.h", + "ortc/IDataChannel.h", + "ortc/IDataChannelTypes.h", + "ortc/IDataTransport.h", + "ortc/IDTLSTransport.h", + "ortc/IDTMFSender.h", + "ortc/IHelper.h", + "ortc/IICEGatherer.h", + "ortc/IICETransport.h", + "ortc/IICETransportController.h", + "ortc/IICETypes.h", + "ortc/IIdentity.h", + "ortc/IMediaDevices.h", + "ortc/IMediaElement.h", + "ortc/IMediaStreamTrack.h", + "ortc/IMediaStreamTrackSelector.h", + "ortc/IORTC.h", + "ortc/IRTPListener.h", + "ortc/IRTPReceiver.h", + "ortc/IRTPSender.h", + "ortc/IRTPTypes.h", + "ortc/ISCTPTransport.h", + "ortc/ISRTPSDESTransport.h", + "ortc/IStatsProvider.h", + "ortc/IStatsReport.h", + "ortc/ortc.h", + "ortc/RTCPPacket.h", + "ortc/RTPPacket.h", + "ortc/types.h", + "ortc/adapter/adapter.h", + "ortc/adapter/IHelper.h", + "ortc/adapter/IMediaStream.h", + "ortc/adapter/IPeerConnection.h", + "ortc/adapter/ISessionDescription.h", + "ortc/adapter/types.h", + "ortc/adapter/cpp/ortc_adapter_adapter.cpp", + "ortc/adapter/cpp/ortc_adapter_Helper.cpp", + "ortc/adapter/cpp/ortc_adapter_MediaStream.cpp", + "ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp", + "ortc/adapter/cpp/ortc_adapter_SDPParser.cpp", + "ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp", + "ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp", + "ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp", + "ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp", + "ortc/adapter/cpp/ortc_adapter_SessionDescription.cpp", + "ortc/adapter/internal/ortc_adapter_adapter.h", + "ortc/adapter/internal/ortc_adapter_Helper.h", + "ortc/adapter/internal/ortc_adapter_MediaStream.h", + "ortc/adapter/internal/ortc_adapter_PeerConnection.h", + "ortc/adapter/internal/ortc_adapter_SDPParser.h", + "ortc/adapter/internal/ortc_adapter_SessionDescription.h", + "ortc/adapter/internal/types.h", + "ortc/cpp/ifaddrs-android.cc", + "ortc/cpp/ortc.cpp", + "ortc/cpp/ortc_Capabilities.cpp", + "ortc/cpp/ortc_Certificate.cpp", + "ortc/cpp/ortc_Constraints.cpp", + "ortc/cpp/ortc_DataChannel.cpp", + "ortc/cpp/ortc_DTLSTransport.cpp", + "ortc/cpp/ortc_DTMFSender.cpp", + "ortc/cpp/ortc_Helper.cpp", + "ortc/cpp/ortc_ICEGatherer.cpp", + "ortc/cpp/ortc_ICEGathererRouter.cpp", + "ortc/cpp/ortc_ICETransport.cpp", + "ortc/cpp/ortc_ICETransportController.cpp", + "ortc/cpp/ortc_ICETypes.cpp", + "ortc/cpp/ortc_Identity.cpp", + "ortc/cpp/ortc_ISecureTransport.cpp", + "ortc/cpp/ortc_MediaChannelTraceHelper.cpp", + "ortc/cpp/ortc_MediaDevice.cpp", + "ortc/cpp/ortc_MediaDeviceCapture.cpp", + "ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp", + "ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp", + "ortc/cpp/ortc_MediaDeviceRenderAudio.cpp", + "ortc/cpp/ortc_MediaDevices.cpp", + "ortc/cpp/ortc_MediaEngine.cpp", + "ortc/cpp/ortc_MediaStreamTrack.cpp", + "ortc/cpp/ortc_ORTC.cpp", + "ortc/cpp/ortc_RTCPPacket.cpp", + "ortc/cpp/ortc_RTPDecoderAudio.cpp", + "ortc/cpp/ortc_RTPDecoderVideo.cpp", + "ortc/cpp/ortc_RTPEncoderAudio.cpp", + "ortc/cpp/ortc_RTPEncoderVideo.cpp", + "ortc/cpp/ortc_RTPListener.cpp", + "ortc/cpp/ortc_RTPPacket.cpp", + "ortc/cpp/ortc_RTPReceiver.cpp", + "ortc/cpp/ortc_RTPReceiverChannel.cpp", + "ortc/cpp/ortc_RTPSender.cpp", + "ortc/cpp/ortc_RTPSenderChannel.cpp", + "ortc/cpp/ortc_RTPTypes.cpp", + "ortc/cpp/ortc_RTPUtils.cpp", + "ortc/cpp/ortc_SCTPTransport.cpp", + "ortc/cpp/ortc_SCTPTransportListener.cpp", + "ortc/cpp/ortc_SRTPSDESTransport.cpp", + "ortc/cpp/ortc_SRTPTransport.cpp", + "ortc/cpp/ortc_StatsReport.cpp", + "ortc/cpp/ortc_webrtc.cpp", + "ortc/internal/ifaddrs-android.h", + "ortc/internal/ortc.events.h", + "ortc/internal/ortc.events_win.h", + "ortc/internal/ortc.events_win_etw.h", + "ortc/internal/ortc.h", + "ortc/internal/ortc.stats.events.h", + "ortc/internal/ortc.stats.events_win.h", + "ortc/internal/ortc.stats.events_win_etw.h", + "ortc/internal/ortc_Certificate.h", + "ortc/internal/ortc_DataChannel.h", + "ortc/internal/ortc_DTLSTransport.h", + "ortc/internal/ortc_DTMFSender.h", + "ortc/internal/ortc_Helper.h", + "ortc/internal/ortc_ICEGatherer.h", + "ortc/internal/ortc_ICEGathererRouter.h", + "ortc/internal/ortc_ICETransport.h", + "ortc/internal/ortc_ICETransportController.h", + "ortc/internal/ortc_Identity.h", + "ortc/internal/ortc_IMediaDevice.h", + "ortc/internal/ortc_IMediaDeviceCapture.h", + "ortc/internal/ortc_IMediaDeviceRender.h", + "ortc/internal/ortc_IMediaStreamTrack.h", + "ortc/internal/ortc_IMediaStreamTrackChannel.h", + "ortc/internal/ortc_IMediaStreamTrackMonitor.h", + "ortc/internal/ortc_IMediaStreamTrackSubscriber.h", + "ortc/internal/ortc_IRTP.h", + "ortc/internal/ortc_IRTPDecoder.h", + "ortc/internal/ortc_IRTPEncoder.h", + "ortc/internal/ortc_ISecureTransport.h", + "ortc/internal/ortc_ISRTPTransport.h", + "ortc/internal/ortc_MediaChannelTraceHelper.h", + "ortc/internal/ortc_MediaDeviceCaptureAudio.h", + "ortc/internal/ortc_MediaDeviceCaptureVideo.h", + "ortc/internal/ortc_MediaDeviceRenderAudio.h", + "ortc/internal/ortc_MediaDevices.h", + "ortc/internal/ortc_MediaEngine.h", + "ortc/internal/ortc_MediaStreamTrack.h", + "ortc/internal/ortc_MediaStreamTrackChannel.h", + "ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h", + "ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h", + "ortc/internal/ortc_ORTC.h", + "ortc/internal/ortc_RTPDecoderAudio.h", + "ortc/internal/ortc_RTPDecoderVideo.h", + "ortc/internal/ortc_RTPEncoderAudio.h", + "ortc/internal/ortc_RTPEncoderVideo.h", + "ortc/internal/ortc_RTPListener.h", + "ortc/internal/ortc_RTPReceiver.h", + "ortc/internal/ortc_RTPReceiverChannel.h", + "ortc/internal/ortc_RTPSender.h", + "ortc/internal/ortc_RTPSenderChannel.h", + "ortc/internal/ortc_RTPTypes.h", + "ortc/internal/ortc_RTPUtils.h", + "ortc/internal/ortc_SCTPTransport.h", + "ortc/internal/ortc_SCTPTransportListener.h", + "ortc/internal/ortc_SRTPSDESTransport.h", + "ortc/internal/ortc_SRTPTransport.h", + "ortc/internal/ortc_StatsReport.h", + "ortc/internal/ortcEvents.h", + "ortc/internal/platform.h", + "ortc/internal/types.h", +] + +static_library("ortclib") { + + configs += [ ":ortclib_config" ] + + configs -= [ "//build/config/compiler:no_rtti" ] + configs -= [ "//build/config/compiler:chromium_code" ] + + if (!is_win) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + + #To include sources generated from IDL set sources value to ortc_sources + sources = ortclib_sources + + defines = [ + "_LIB", + "USE_ETW", + "USE_OPENSSL=1", + "NOMINMAX", + "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE", + "_CRT_SECURE_NO_WARNINGS", + "_UNICODE", + "UNICODE", + ] + + if (is_linux) { + defines += [ + "WEBRTC_POSIX", + "WEBRTC_BUILD_LIBEVENT", + ] + } + + if (is_win) { + defines += [ "WEBRTC_WIN", ] + } + + deps = [ + ":ortclib_events", + ":ortclib_idl", + ] +} + +compile_event_macro("ortclib_events") { + + sources = [ + "ortc/cpp/ortc.events.json", + "ortc/cpp/ortc.stats.events.json", + ] + +} + +compile_idl_macro("ortclib_idl") { + + sources = [ + "ortc/idl/config.json", + ] + + sourcePathPrefix = "ortc/idl/" +} \ No newline at end of file diff --git a/ortc/IRTPTypes.h b/ortc/IRTPTypes.h index a9dc9f77..75a7be12 100644 --- a/ortc/IRTPTypes.h +++ b/ortc/IRTPTypes.h @@ -154,7 +154,7 @@ namespace ortc #if __APPLE__ CodecCapability &operator=(const CodecCapability &op2) = default; #else - CodecCapability &operator=(const CodecCapability &op2) = delete; + CodecCapability &operator=(const CodecCapability &op2) /*= delete*/; #endif ElementPtr createElement(const char *objectName = "codecCapability") const; @@ -489,7 +489,7 @@ namespace ortc #if __APPLE__ CodecParameters &operator=(const CodecParameters &op2) = default; #else - CodecParameters &operator=(const CodecParameters &op2) = delete; + CodecParameters &operator=(const CodecParameters &op2) /*= delete*/; #endif ElementPtr createElement(const char *objectName) const; diff --git a/ortc/cpp/ortc_Certificate.cpp b/ortc/cpp/ortc_Certificate.cpp index 1d9318c4..ca8c2773 100644 --- a/ortc/cpp/ortc_Certificate.cpp +++ b/ortc/cpp/ortc_Certificate.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include diff --git a/ortc/cpp/ortc_DTLSTransport.cpp b/ortc/cpp/ortc_DTLSTransport.cpp index 04b1369d..8c0fd5dc 100644 --- a/ortc/cpp/ortc_DTLSTransport.cpp +++ b/ortc/cpp/ortc_DTLSTransport.cpp @@ -3000,17 +3000,17 @@ namespace ortc if (ctx == NULL) return NULL; - SSL_CTX_set_min_version(ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_VERSION : TLS1_VERSION); + SSL_CTX_set_min_proto_version(ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_VERSION : TLS1_VERSION); switch (ssl_max_version_) { case SSL_PROTOCOL_TLS_10: - SSL_CTX_set_max_version(ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_VERSION : TLS1_VERSION); + SSL_CTX_set_max_proto_version(ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_VERSION : TLS1_VERSION); break; case SSL_PROTOCOL_TLS_11: - SSL_CTX_set_max_version(ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_VERSION : TLS1_1_VERSION); + SSL_CTX_set_max_proto_version(ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_VERSION : TLS1_1_VERSION); break; case SSL_PROTOCOL_TLS_12: default: - SSL_CTX_set_max_version(ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION); + SSL_CTX_set_max_proto_version(ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION); break; } diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp index 927812f8..145327ac 100644 --- a/ortc/cpp/ortc_MediaEngine.cpp +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -49,7 +49,7 @@ #include -#include +#include #if 0 #include diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index 2c42d882..b354ccfe 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include diff --git a/ortc/idl/sources.gni b/ortc/idl/sources.gni new file mode 100644 index 00000000..8f74a946 --- /dev/null +++ b/ortc/idl/sources.gni @@ -0,0 +1 @@ +ortc_sources = [ ] \ No newline at end of file diff --git a/ortc/internal/ortc_IRTPEncoder.h b/ortc/internal/ortc_IRTPEncoder.h index 73ed0e53..2554924f 100644 --- a/ortc/internal/ortc_IRTPEncoder.h +++ b/ortc/internal/ortc_IRTPEncoder.h @@ -277,7 +277,6 @@ ZS_DECLARE_PROXY_SUBSCRIPTIONS_BEGIN(ortc::internal::IRTPEncoderDelegate, ortc:: ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::RTPPacketPtr, RTPPacketPtr) ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::RTCPPacketPtr, RTCPPacketPtr) ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IRTPEncoderPtr, IRTPEncoderPtr) -ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IRTPEncoderPtr, IRTPEncoderPtr) ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::IMediaStreamTrackTypes::ImmutableMediaChannelTracePtr, ImmutableMediaChannelTracePtr) ZS_DECLARE_PROXY_SUBSCRIPTIONS_TYPEDEF(ortc::internal::IRTP::States, States) ZS_DECLARE_PROXY_SUBSCRIPTIONS_METHOD_SYNC_2(notifyRTPEncoderRTPPacket, ImmutableMediaChannelTracePtr, RTPPacketPtr) diff --git a/ortc/internal/ortc_MediaEngine.h b/ortc/internal/ortc_MediaEngine.h index 929b79f4..8261c496 100644 --- a/ortc/internal/ortc_MediaEngine.h +++ b/ortc/internal/ortc_MediaEngine.h @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include diff --git a/ortc/internal/ortc_RTPSenderChannel.h b/ortc/internal/ortc_RTPSenderChannel.h index 860792a5..15d19bc0 100644 --- a/ortc/internal/ortc_RTPSenderChannel.h +++ b/ortc/internal/ortc_RTPSenderChannel.h @@ -44,7 +44,7 @@ #include #include -#include +#include #define ORTC_SETTING_RTP_SENDER_CHANNEL_RETAG_RTP_PACKETS_AFTER_SSRC_NOT_SENT_IN_SECONDS "ortc/rtp-sender-channel/retag-rtp-packets-after-ssrc-not-sent-in-seconds" #define ORTC_SETTING_RTP_SENDER_CHANNEL_TAG_MID_RID_IN_RTCP_SDES "ortc/rtp-sender-channel/tag-mid-rid-in-rtcp-sdes" diff --git a/ortc/types.h b/ortc/types.h index bdf1450e..a8524753 100644 --- a/ortc/types.h +++ b/ortc/types.h @@ -31,6 +31,10 @@ #pragma once +#ifdef _WIN32 +#pragma warning(disable:4290) +#endif + #include #include From 28f84284c2d2c326801bfd0bb72e6845e78ca36c Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 20 Sep 2017 13:48:43 +0200 Subject: [PATCH 129/187] Updated BUILD.gn to use generated files --- BUILD.gn | 94 ++++- ortc/idl/sources.gni | 793 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 884 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 99b601b1..8b1c0b24 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -212,7 +212,96 @@ ortclib_sources = [ "ortc/internal/types.h", ] -static_library("ortclib") { +shared_library("dummy_lib") { + + sources = ortclib_sources +} + +config("ortclib_config_shared") { + if (is_win) { + cflags_cc = [ + "/WX-", + "/wd4068", + "/GR", + ] + } else { + cflags = [ + "-g", + "-Wall", + "-std=gnu99", + "-stdlib=libc", + ] + } +} + +shared_library("ortclib") { + + configs += [ ":ortclib_config_shared" ] + + configs -= [ "//build/config/compiler:no_rtti" ] + configs -= [ "//build/config/compiler:chromium_code" ] + + if (!is_win) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + + include_dirs = [ + ".", + "..", + "../zsLib", + "../zsLib/zsLib/extras", + "../zsLib-eventing", + "../ortclib-services", + "../../third_party/boringssl/include", + "../../third_party/usrsctp/usrsctplib", + "../../third_party/libsrtp/srtp/include", + "../../third_party/libsrtp/srtp/crypto/include", + "../../third_party/libsrtp/config", + "../../third_party/usrsctp/usrsctplib/usrsctplib", + "../../third_party/boringssl/include/openssl", + "../../third_party/boringssl/include", + "../../third_party/libsrtp/include", + "../../third_party/libsrtp/crypto/include", + "../../third_party/boringssl/src/include", + ] + + sources = ortc_sources + + lib_dirs = [ + "/usr/lib", + "/usr/lib/x86_64-linux-gnu", + ] + libs = [ "uuid" ] + + deps = [ + "//build/config:exe_and_shlib_deps", + ":ortclib_static", + "../zsLib:zslib", + "../cryptopp", + "../udns", + "../idnkit", + ] + + defines = [ + "SHARED", + "USE_ETW", + "USE_OPENSSL=1", + "NOMINMAX", + "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE", + "_CRT_SECURE_NO_WARNINGS", + "_UNICODE", + "UNICODE", + ] + + if (is_linux) { + defines += [ + "WEBRTC_POSIX", + "WEBRTC_BUILD_LIBEVENT", + ] + } +} + +static_library("ortclib_static") { configs += [ ":ortclib_config" ] @@ -224,7 +313,8 @@ static_library("ortclib") { } #To include sources generated from IDL set sources value to ortc_sources - sources = ortclib_sources + sources = ortc_sources_cxx_glue + sources += ortc_sources_cxx_generated defines = [ "_LIB", diff --git a/ortc/idl/sources.gni b/ortc/idl/sources.gni index 8f74a946..c3ef9530 100644 --- a/ortc/idl/sources.gni +++ b/ortc/idl/sources.gni @@ -1 +1,792 @@ -ortc_sources = [ ] \ No newline at end of file +ortc_sources_cxx_glue = [ +"ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h", + "ortc/idl/wrapper/impl_org_ortc_ConstrainLong.h", + "ortc/idl/wrapper/impl_org_ortc_ConstrainString.h", + "ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.h", + "ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.h", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.cpp", + "ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h", + "ortc/idl/wrapper/impl_org_ortc_DoubleRange.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.h", + "ortc/idl/wrapper/impl_org_ortc_MessageQueue.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.h", + "ortc/idl/wrapper/impl_org_ortc_RTCMessageEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_LongRange.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtcpParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameters.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.h", + "ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamStats.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCCodec.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceServer.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.h", + "ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceServer.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaDevices.h", + "ortc/idl/wrapper/impl_org_ortc_LongRange.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.h", + "ortc/idl/wrapper/impl_org_ortc_ErrorEvent.h", + "ortc/idl/wrapper/impl_org_ortc_MessageQueue.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp", + "ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.h", + "ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecParameterSettings.h", + "ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionData.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIdentity.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityOptions.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtensionParameters.h", + "ortc/idl/wrapper/impl_org_ortc_Helper.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpRedCodecParameterSettings.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCStatsProvider.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpUnhandledEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtcpFeedback.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCTrackEvent.h", + "ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpStreamStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_StringOrStringList.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGatherOptions.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCInboundRtpStreamStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_ConstrainString.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtcpTransport.h", + "ortc/idl/wrapper/impl_org_ortc_MediaDevices.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsCertificateBinary.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCCapabilityOptions.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapabilityParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_Settings.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.h", + "ortc/idl/wrapper/impl_org_ortc_Json.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaControl.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGatherInterfacePolicy.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.h", + "ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp", + "ortc/idl/wrapper/impl_org_ortc_Error.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaDeviceInfo.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackSettings.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesCryptoParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStateChangeEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateComplete.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStateChangeEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePairChangeEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaControl.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferAnswerOptions.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpFecParameters.h", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp", + "ortc/idl/wrapper/impl_org_ortc_ConstrainDoubleRange.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStats.h", + "ortc/idl/wrapper/impl_org_ortc_Logger.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaStreamConstraints.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCIceCandidate.h", + "ortc/idl/wrapper/impl_org_ortc_RTCStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCStatsTypeSet.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpCapabilities.cpp", + "ortc/idl/wrapper/impl_org_ortc_Error.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCCertificate.h", + "ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.h", + "ortc/idl/wrapper/impl_org_ortc_ConstrainBooleanParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpContributingSource.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCapabilities.cpp", + "ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_OverconstrainedError.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxParameters.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesKeyParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCAnswerOptions.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidate.cpp", + "ortc/idl/wrapper/impl_org_ortc_Logger.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDataTransport.h", + "ortc/idl/wrapper/impl_org_ortc_RTCCertificateStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecParameterSettings.cpp", + "ortc/idl/wrapper/impl_org_ortc_Json.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCCertificate.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannelParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransportStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannelEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpVp8CodecParameterSettings.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionTransport.h", + "ortc/idl/wrapper/impl_org_ortc_RTCStatsReport.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaSource.h", + "ortc/idl/wrapper/impl_org_ortc_Helper.cpp", + "ortc/idl/wrapper/impl_org_ortc_ConstrainLong.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp", + "ortc/idl/wrapper/impl_org_ortc_ConstrainStringParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIdentityAssertion.h", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraints.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidateAttributes.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidatePair.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.h", + "ortc/idl/wrapper/impl_org_ortc_RTCDtmfToneChangeEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCMediaStreamTrackStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannelStats.h", + "ortc/idl/wrapper/impl_org_ortc_MediaSource.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpHeaderExtension.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStateChangeEvent.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h", + "ortc/idl/wrapper/impl_org_ortc_ConstrainDouble.cpp", + "ortc/idl/wrapper/impl_org_ortc_OrtcLib.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.h", + "ortc/idl/wrapper/impl_org_ortc_StringOrStringList.cpp", + "ortc/idl/wrapper/impl_org_ortc_OrtcLib.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceTransportOptions.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListenerEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecParameterSettings.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSrtpTransportStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp", + "ortc/idl/wrapper/impl_org_ortc_ErrorEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionDescription.h", + "ortc/idl/wrapper/impl_org_ortc_RTCOutboundRtpStreamStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpTransport.h", + "ortc/idl/wrapper/impl_org_ortc_DoubleRange.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.h", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackConstraintSet.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnectionIceEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIdentityError.h", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackCapabilities.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceCandidate.h", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCConfiguration.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecCapability.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCStats.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpCodecParameterSettings.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportStateChangeEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCCodec.h", + "ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_Settings.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpEncodingParameters.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransportStateChangeEvent.cpp", + "ortc/idl/wrapper/impl_org_ortc_MediaTrackSupportedConstraints.cpp", + "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h", + "ortc/idl/wrapper/types.h", + "ortc/idl/wrapper/impl_org_ortc_OverconstrainedErrorEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererIceErrorEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIceGathererStats.h", + "ortc/idl/wrapper/impl_org_ortc_ConstrainLongRange.cpp", + "ortc/idl/wrapper/impl_org_ortc_RTCIdentity.h", + "ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h", + "ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h", + "ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h", +] + +ortc_sources_cxx_generated = [ +"ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpRedCodecParameterSettings.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceTransportStats.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDtmfToneChangeEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapability.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidate.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpEncodingParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceTransport.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceTransportOptions.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererIceErrorEvent.h", + "ortc/idl/wrapper/generated/org_ortc_ConstrainBooleanParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDataChannel.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesCryptoParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpCapabilities.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDtmfSender.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnectionIceEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDtlsFingerprint.h", + "ortc/idl/wrapper/generated/org_ortc_MediaTrackSupportedConstraints.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCCapabilityOptions.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpUnhandledEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpSender.h", + "ortc/idl/wrapper/generated/org_ortc_MediaStreamTrack.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionMediaLine.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceTransportStateChangeEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSctpCapabilities.h", + "ortc/idl/wrapper/generated/org_ortc_MediaStreamConstraints.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesTransport.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpContributingSource.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescription.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIdentityAssertion.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpTransport.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpH264CodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpVp8CodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/org_ortc_Error.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecCapabilityOptions.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_MediaStream.h", + "ortc/idl/wrapper/generated/org_ortc_MessageQueue.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionConnectionData.h", + "ortc/idl/wrapper/generated/org_ortc_MediaSource.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererStats.h", + "ortc/idl/wrapper/generated/org_ortc_ConstrainDoubleRange.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpSender.h", + "ortc/idl/wrapper/generated/org_ortc_OrtcLib.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDataTransport.h", + "ortc/idl/wrapper/generated/org_ortc_RTCStats.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDataChannelEvent.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpH264CodecParameterSettings.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDataChannelStateChangeEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererStateChangeEvent.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCAnswerOptions.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIdentity.h", + "ortc/idl/wrapper/generated/org_ortc_MediaDevices.h", + "ortc/idl/wrapper/generated/org_ortc_RTCCertificate.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceTransportController.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCMediaStreamStats.h", + "ortc/idl/wrapper/generated/org_ortc_OverconstrainedError.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSsrcConflictEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidate.h", + "ortc/idl/wrapper/generated/org_ortc_ConstrainDouble.h", + "ortc/idl/wrapper/generated/org_ortc_RTCStatsProvider.h", + "ortc/idl/wrapper/generated/org_ortc_RTCMessageEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapabilityOptions.h", + "ortc/idl/wrapper/generated/org_ortc_ErrorEvent.h", + "ortc/idl/wrapper/generated/org_ortc_MediaDeviceInfo.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGatherInterfacePolicy.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCTrackEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransport.h", + "ortc/idl/wrapper/generated/org_ortc_MediaTrackConstraintSet.h", + "ortc/idl/wrapper/generated/org_ortc_StringOrStringList.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpFlexFecCodecParameterSettings.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionDescription.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpFecParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDtlsCertificateBinary.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpStreamStats.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxCodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIdentityError.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h", + "ortc/idl/wrapper/generated/org_ortc_RTCOutboundRtpStreamStats.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCConfiguration.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionTransport.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidateAttributes.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceParameters.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpVp8CodecParameterSettings.h", + "ortc/idl/wrapper/generated/org_ortc_Settings.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportStateChangeEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCCodec.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpHeaderExtensionParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCStatsReport.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnection.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxCodecParameterSettings.h", + "ortc/idl/wrapper/generated/org_ortc_MediaTrackCapabilities.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransportStats.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpParameters.h", + "ortc/idl/wrapper/generated/org_ortc_ConstrainBoolean.h", + "ortc/idl/wrapper/generated/org_ortc_LongRange.h", + "ortc/idl/wrapper/generated/org_ortc_ConstrainString.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidateCompleteEvent.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCOfferOptions.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecParameterSettings.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportListenerEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSrtpTransportStats.h", + "ortc/idl/wrapper/generated/org_ortc_OverconstrainedErrorEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCMediaStreamTrackConfiguration.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceServer.h", + "ortc/idl/wrapper/generated/org_ortc_DoubleRange.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidateEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePairStats.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidateComplete.h", + "ortc/idl/wrapper/generated/org_ortc_Json.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesKeyParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpReceiver.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIdentityResult.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportListener.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGatherOptions.h", + "ortc/idl/wrapper/generated/org_ortc_ConstrainLong.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionTransportParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportStats.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCIceCandidate.h", + "ortc/idl/wrapper/generated/org_ortc_RTCCertificateStats.h", + "ortc/idl/wrapper/generated/org_ortc_MediaTrackSettings.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtcpFeedback.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDataChannelParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceGatherer.h", + "ortc/idl/wrapper/generated/org_ortc_RTCInboundRtpStreamStats.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtcpParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpHeaderExtension.h", + "ortc/idl/wrapper/generated/org_ortc_RTCStatsTypeSet.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCOfferAnswerOptions.h", + "ortc/idl/wrapper/generated/org_ortc_ConstrainStringParameters.h", + "ortc/idl/wrapper/generated/org_ortc_ConstrainLongRange.h", + "ortc/idl/wrapper/generated/output.json", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecParameterSettings.h", + "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePair.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDtlsParameters.h", + "ortc/idl/wrapper/generated/org_ortc_MediaControl.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDataChannelStats.h", + "ortc/idl/wrapper/generated/org_ortc_Logger.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtcpTransport.h", + "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxParameters.h", + "ortc/idl/wrapper/generated/org_ortc_MediaTrackConstraints.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransportStateChangeEvent.h", + "ortc/idl/wrapper/generated/types.h", + "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePairChangeEvent.h", + "ortc/idl/wrapper/generated/org_ortc_RTCMediaStreamTrackStats.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpListener.h", + "ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransport.h", +] + +ortc_sources = [ + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityResult.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsReport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpUnhandledEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentity.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSsrcConflictEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateComplete.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ErrorEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesCryptoParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpCapabilities.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpEncodingParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataTransport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDouble.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateAttributes.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_Error.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairChangeEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfToneChangeEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapability.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecParameterSettings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStateChangeEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherOptions.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_Settings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpCapabilities.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnection.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpTransport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameterSettings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaDevices.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePair.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBooleanParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedError.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamTrackStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePair.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecParameterSettings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_Error.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityOptions.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfSender.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannel.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStateChangeEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityAssertion.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsProvider.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDouble.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsProvider.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaControl.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_MediaStream.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSsrcConflictEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidate.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCInboundRtpStreamStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStateChangeEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceServer.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStateChangeEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfToneChangeEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairChangeEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainStringParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_Logger.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherInterfacePolicy.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamConstraints.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_Logger.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCIceCandidate.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCIceCandidate.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpTransport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDoubleRange.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererIceErrorEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpFeedback.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificate.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListenerEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_Settings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainString.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_DoubleRange.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnection.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateComplete.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxParameters.cpp", + "ortc/idl/wrapper/generated/c/c_helpers.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCapabilities.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCOutboundRtpStreamStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackCapabilities.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecParameterSettings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityError.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCCapabilityOptions.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfSender.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsFingerprint.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesCryptoParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainStringParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_OrtcLib.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidate.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSettings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpStreamStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListener.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCInboundRtpStreamStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpReceiver.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererIceErrorEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedErrorEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLongRange.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescription.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSupportedConstraints.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCodec.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBoolean.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStateChangeEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpSender.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferOptions.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpContributingSource.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MessageQueue.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpSender.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLong.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityAssertion.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStateChangeEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_Json.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherer.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidate.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsCertificateBinary.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtensionParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackCapabilities.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ErrorEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceServer.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityOptions.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_OrtcLib.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidate.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateAttributes.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCAnswerOptions.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBooleanParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_DoubleRange.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraints.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaSource.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferOptions.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsFingerprint.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaControl.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListenerEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDoubleRange.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_StringOrStringList.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpContributingSource.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtension.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCConfiguration.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSupportedConstraints.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraints.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_Json.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaDevices.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraintSet.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedErrorEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMessageEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCOutboundRtpStreamStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLongRange.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameterSettings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_LongRange.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpListener.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificateStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsCertificateBinary.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificate.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCConfiguration.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsTypeSet.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtension.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaSource.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportController.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_LongRange.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherOptions.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecParameterSettings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescription.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_MediaStream.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFecParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsReport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStateChangeEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedError.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentity.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportController.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCTrackEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCAnswerOptions.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpTransport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListener.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStateChangeEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamTrack.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_StringOrStringList.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBoolean.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCTrackEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamTrackStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityResult.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapability.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpListener.h", + "ortc/idl/wrapper/generated/c/c_helpers.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMessageEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpReceiver.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpStreamStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescription.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCodec.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpUnhandledEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRedCodecParameterSettings.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherer.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannel.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityError.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferAnswerOptions.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificateStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferAnswerOptions.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpEncodingParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCCapabilityOptions.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamConstraints.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtensionParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpFeedback.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaDeviceInfo.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCapabilities.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesKeyParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpTransport.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherInterfacePolicy.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamTrack.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStats.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateCompleteEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStateChangeEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportOptions.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFecParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraintSet.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRedCodecParameterSettings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesKeyParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainString.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataTransport.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp", + "ortc/idl/wrapper/generated/c/types.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLong.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSettings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateEvent.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_MessageQueue.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsTypeSet.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairStats.h", + "ortc/idl/wrapper/generated/c/c_org_ortc_MediaDeviceInfo.cpp", + "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportOptions.h", +] \ No newline at end of file From 4cf08f5c7496ecb3a9b0210e8192d4fa0d2df1d6 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Thu, 21 Sep 2017 14:20:44 +0200 Subject: [PATCH 130/187] Updated deps for ortclib shared lib --- BUILD.gn | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 8b1c0b24..40192614 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -212,32 +212,15 @@ ortclib_sources = [ "ortc/internal/types.h", ] +#Exists just to keep non generated ortclib code, in case we need it some day shared_library("dummy_lib") { sources = ortclib_sources } -config("ortclib_config_shared") { - if (is_win) { - cflags_cc = [ - "/WX-", - "/wd4068", - "/GR", - ] - } else { - cflags = [ - "-g", - "-Wall", - "-std=gnu99", - "-stdlib=libc", - ] - } -} shared_library("ortclib") { - configs += [ ":ortclib_config_shared" ] - configs -= [ "//build/config/compiler:no_rtti" ] configs -= [ "//build/config/compiler:chromium_code" ] @@ -276,10 +259,12 @@ shared_library("ortclib") { deps = [ "//build/config:exe_and_shlib_deps", ":ortclib_static", - "../zsLib:zslib", - "../cryptopp", - "../udns", - "../idnkit", + "//ortc/ortclib-services", + "//ortc/zsLib:zslib", + "//ortc/zsLib-eventing:zslib-eventing", + "//ortc/cryptopp", + "//ortc/udns", + "//ortc/idnkit", ] defines = [ From c6e1b6bab25576de5dc92c735acf05bd97954094 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Thu, 21 Sep 2017 18:58:47 +0200 Subject: [PATCH 131/187] changed order of include files to fix build issue for x64 platform --- ortc/cpp/ortc_MediaStreamTrack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index b354ccfe..6e270381 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -36,8 +36,8 @@ #include #include #include -#include #include +#include #include #include From 72ba8b98bb8cd488a36f5706a856c8f4bd724955 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Mon, 25 Sep 2017 20:05:16 +0200 Subject: [PATCH 132/187] Resolved issue when projects generation has failed because of missing generated files --- BUILD.gn | 481 +++++++++++++++++++++++++++++++++++++++++++ ortc/idl/sources.gni | 476 ------------------------------------------ 2 files changed, 481 insertions(+), 476 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 40192614..15d0b7cb 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -212,6 +212,482 @@ ortclib_sources = [ "ortc/internal/types.h", ] +ortc_sources_cxx_generated = [ + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpRedCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtmfToneChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapability.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpEncodingParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceTransportOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGathererIceErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ConstrainBooleanParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDataChannel.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesCryptoParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtmfSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnectionIceEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtlsFingerprint.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaTrackSupportedConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpUnhandledEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaStreamTrack.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSctpCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaStreamConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpContributingSource.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescription.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIdentityAssertion.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpH264CodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpVp8CodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_Error.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_MediaStream.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MessageQueue.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionConnectionData.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaSource.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGathererStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ConstrainDoubleRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_OrtcLib.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDataTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDataChannelEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpH264CodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDataChannelStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGathererStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCAnswerOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIdentity.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaDevices.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCCertificate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceTransportController.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCMediaStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_OverconstrainedError.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSsrcConflictEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ConstrainDouble.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCStatsProvider.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCMessageEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaDeviceInfo.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGatherInterfacePolicy.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCTrackEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSctpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaTrackConstraintSet.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_StringOrStringList.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpFlexFecCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionDescription.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpFecParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtlsCertificateBinary.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIdentityError.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCOutboundRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCConfiguration.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceCandidateAttributes.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpVp8CodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_Settings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCCodec.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpHeaderExtensionParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCStatsReport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnection.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaTrackCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ConstrainBoolean.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_LongRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ConstrainString.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidateCompleteEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCOfferOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportListenerEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSrtpTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_OverconstrainedErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCMediaStreamTrackConfiguration.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceServer.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_DoubleRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidateEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePairStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceCandidateComplete.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_Json.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesKeyParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpReceiver.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIdentityResult.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportListener.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGatherOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ConstrainLong.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionTransportParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCIceCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCCertificateStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaTrackSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtcpFeedback.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDataChannelParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceGatherer.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCInboundRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtcpParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpHeaderExtension.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCStatsTypeSet.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCOfferAnswerOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ConstrainStringParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_ConstrainLongRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/output.json", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePair.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtlsParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaControl.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDataChannelStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_Logger.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtcpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_MediaTrackConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/types.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePairChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCMediaStreamTrackStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpListener.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransport.h", +] + +ortc_sources = [ + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityResult.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsReport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpUnhandledEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentity.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSsrcConflictEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateComplete.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ErrorEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesCryptoParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpEncodingParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDouble.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateAttributes.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_Error.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfToneChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapability.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_Settings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpCapabilities.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnection.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaDevices.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePair.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBooleanParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedError.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamTrackStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePair.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_Error.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfSender.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannel.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityAssertion.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsProvider.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDouble.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsProvider.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaControl.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_MediaStream.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSsrcConflictEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCInboundRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceServer.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfToneChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainStringParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_Logger.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherInterfacePolicy.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_Logger.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCIceCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCIceCandidate.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDoubleRange.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererIceErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpFeedback.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificate.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListenerEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_Settings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainString.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_DoubleRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnection.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateComplete.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_helpers.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCapabilities.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCOutboundRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityError.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsFingerprint.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesCryptoParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainStringParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_OrtcLib.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidate.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpStreamStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListener.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCInboundRtpStreamStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpReceiver.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererIceErrorEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedErrorEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLongRange.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescription.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSupportedConstraints.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCCodec.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBoolean.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpSender.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpContributingSource.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MessageQueue.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLong.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityAssertion.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_Json.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherer.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsCertificateBinary.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtensionParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackCapabilities.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceServer.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_OrtcLib.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidate.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateAttributes.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCAnswerOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBooleanParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_DoubleRange.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraints.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaSource.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsFingerprint.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaControl.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListenerEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDoubleRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_StringOrStringList.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpContributingSource.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtension.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCConfiguration.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSupportedConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_Json.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaDevices.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraintSet.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCMessageEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCOutboundRtpStreamStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLongRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_LongRange.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpListener.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificateStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsCertificateBinary.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCConfiguration.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsTypeSet.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtension.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaSource.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportController.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_LongRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescription.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_MediaStream.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFecParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsReport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedError.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentity.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportController.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCTrackEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCAnswerOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListener.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamTrack.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_StringOrStringList.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBoolean.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCTrackEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamTrackStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityResult.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapability.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpListener.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_helpers.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCMessageEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpReceiver.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescription.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCCodec.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpUnhandledEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRedCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherer.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannel.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityError.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferAnswerOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificateStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferAnswerOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpEncodingParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCCapabilityOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamConstraints.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtensionParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpFeedback.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaDeviceInfo.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesKeyParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherInterfacePolicy.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamTrack.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateCompleteEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFecParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraintSet.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRedCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesKeyParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainString.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/types.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLong.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MessageQueue.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsTypeSet.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaDeviceInfo.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportOptions.h", +] + #Exists just to keep non generated ortclib code, in case we need it some day shared_library("dummy_lib") { @@ -248,6 +724,7 @@ shared_library("ortclib") { "../../third_party/boringssl/src/include", ] + #sources = ["$target_gen_dir/../../../../../ortc/ortclib/ortc/idl//moj.cpp"] sources = ortc_sources lib_dirs = [ @@ -265,6 +742,7 @@ shared_library("ortclib") { "//ortc/cryptopp", "//ortc/udns", "//ortc/idnkit", + ":ortclib_idl", ] defines = [ @@ -344,5 +822,8 @@ compile_idl_macro("ortclib_idl") { "ortc/idl/config.json", ] + #outputs = ["$target_gen_dir/ortc/veselko/moj.cpp"] + outputs = ortc_sources + sourcePathPrefix = "ortc/idl/" } \ No newline at end of file diff --git a/ortc/idl/sources.gni b/ortc/idl/sources.gni index c3ef9530..6ae9893f 100644 --- a/ortc/idl/sources.gni +++ b/ortc/idl/sources.gni @@ -313,480 +313,4 @@ ortc_sources_cxx_glue = [ "ortc/idl/wrapper/impl_org_ortc_RTCSsrcConflictEvent.h", "ortc/idl/wrapper/impl_org_ortc_RTCIdentityResult.h", "ortc/idl/wrapper/impl_org_ortc_RTCRtpOpusCodecCapabilityParameters.h", -] - -ortc_sources_cxx_generated = [ -"ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpRedCodecParameterSettings.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceTransportStats.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDtmfToneChangeEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapability.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidate.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpEncodingParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceTransport.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceTransportOptions.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererIceErrorEvent.h", - "ortc/idl/wrapper/generated/org_ortc_ConstrainBooleanParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDataChannel.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesCryptoParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpCapabilities.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDtmfSender.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnectionIceEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDtlsFingerprint.h", - "ortc/idl/wrapper/generated/org_ortc_MediaTrackSupportedConstraints.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCCapabilityOptions.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpUnhandledEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpSender.h", - "ortc/idl/wrapper/generated/org_ortc_MediaStreamTrack.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionMediaLine.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceTransportStateChangeEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSctpCapabilities.h", - "ortc/idl/wrapper/generated/org_ortc_MediaStreamConstraints.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesTransport.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpContributingSource.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescription.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIdentityAssertion.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpTransport.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpH264CodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpVp8CodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/org_ortc_Error.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecCapabilityOptions.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_MediaStream.h", - "ortc/idl/wrapper/generated/org_ortc_MessageQueue.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionConnectionData.h", - "ortc/idl/wrapper/generated/org_ortc_MediaSource.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererStats.h", - "ortc/idl/wrapper/generated/org_ortc_ConstrainDoubleRange.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpSender.h", - "ortc/idl/wrapper/generated/org_ortc_OrtcLib.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDataTransport.h", - "ortc/idl/wrapper/generated/org_ortc_RTCStats.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDataChannelEvent.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpH264CodecParameterSettings.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDataChannelStateChangeEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererStateChangeEvent.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCAnswerOptions.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIdentity.h", - "ortc/idl/wrapper/generated/org_ortc_MediaDevices.h", - "ortc/idl/wrapper/generated/org_ortc_RTCCertificate.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceTransportController.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCMediaStreamStats.h", - "ortc/idl/wrapper/generated/org_ortc_OverconstrainedError.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSsrcConflictEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidate.h", - "ortc/idl/wrapper/generated/org_ortc_ConstrainDouble.h", - "ortc/idl/wrapper/generated/org_ortc_RTCStatsProvider.h", - "ortc/idl/wrapper/generated/org_ortc_RTCMessageEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapabilityOptions.h", - "ortc/idl/wrapper/generated/org_ortc_ErrorEvent.h", - "ortc/idl/wrapper/generated/org_ortc_MediaDeviceInfo.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGatherInterfacePolicy.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCTrackEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransport.h", - "ortc/idl/wrapper/generated/org_ortc_MediaTrackConstraintSet.h", - "ortc/idl/wrapper/generated/org_ortc_StringOrStringList.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpFlexFecCodecParameterSettings.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionDescription.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpFecParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDtlsCertificateBinary.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpStreamStats.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxCodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIdentityError.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h", - "ortc/idl/wrapper/generated/org_ortc_RTCOutboundRtpStreamStats.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCConfiguration.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionTransport.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidateAttributes.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceParameters.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpVp8CodecParameterSettings.h", - "ortc/idl/wrapper/generated/org_ortc_Settings.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportStateChangeEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCCodec.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpHeaderExtensionParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCStatsReport.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnection.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxCodecParameterSettings.h", - "ortc/idl/wrapper/generated/org_ortc_MediaTrackCapabilities.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransportStats.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpParameters.h", - "ortc/idl/wrapper/generated/org_ortc_ConstrainBoolean.h", - "ortc/idl/wrapper/generated/org_ortc_LongRange.h", - "ortc/idl/wrapper/generated/org_ortc_ConstrainString.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidateCompleteEvent.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCOfferOptions.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecParameterSettings.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportListenerEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSrtpTransportStats.h", - "ortc/idl/wrapper/generated/org_ortc_OverconstrainedErrorEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCMediaStreamTrackConfiguration.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceServer.h", - "ortc/idl/wrapper/generated/org_ortc_DoubleRange.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGathererCandidateEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePairStats.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidateComplete.h", - "ortc/idl/wrapper/generated/org_ortc_Json.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesKeyParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpReceiver.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIdentityResult.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportListener.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGatherOptions.h", - "ortc/idl/wrapper/generated/org_ortc_ConstrainLong.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionTransportParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSctpTransportStats.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCIceCandidate.h", - "ortc/idl/wrapper/generated/org_ortc_RTCCertificateStats.h", - "ortc/idl/wrapper/generated/org_ortc_MediaTrackSettings.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtcpFeedback.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDataChannelParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceGatherer.h", - "ortc/idl/wrapper/generated/org_ortc_RTCInboundRtpStreamStats.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtcpParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpHeaderExtension.h", - "ortc/idl/wrapper/generated/org_ortc_RTCStatsTypeSet.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCOfferAnswerOptions.h", - "ortc/idl/wrapper/generated/org_ortc_ConstrainStringParameters.h", - "ortc/idl/wrapper/generated/org_ortc_ConstrainLongRange.h", - "ortc/idl/wrapper/generated/output.json", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpCodecParameterSettings.h", - "ortc/idl/wrapper/generated/org_ortc_RTCSrtpSdesParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePair.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDtlsParameters.h", - "ortc/idl/wrapper/generated/org_ortc_MediaControl.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDataChannelStats.h", - "ortc/idl/wrapper/generated/org_ortc_Logger.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtcpTransport.h", - "ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpRtxParameters.h", - "ortc/idl/wrapper/generated/org_ortc_MediaTrackConstraints.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransportStateChangeEvent.h", - "ortc/idl/wrapper/generated/types.h", - "ortc/idl/wrapper/generated/org_ortc_RTCIceCandidatePairChangeEvent.h", - "ortc/idl/wrapper/generated/org_ortc_RTCMediaStreamTrackStats.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpListener.h", - "ortc/idl/wrapper/generated/org_ortc_RTCRtpOpusCodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransport.h", -] - -ortc_sources = [ - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityResult.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsReport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpUnhandledEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentity.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSsrcConflictEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateComplete.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecParameterSettings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ErrorEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesCryptoParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpCapabilities.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpEncodingParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataTransport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDouble.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateAttributes.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_Error.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairChangeEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfToneChangeEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapability.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecParameterSettings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStateChangeEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherOptions.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSender.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_Settings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpCapabilities.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnection.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpTransport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameterSettings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaDevices.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePair.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSender.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBooleanParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedError.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamTrackStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePair.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecParameterSettings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_Error.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityOptions.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfSender.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannel.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStateChangeEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityAssertion.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsProvider.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDouble.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsProvider.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaControl.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_MediaStream.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSsrcConflictEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidate.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCInboundRtpStreamStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStateChangeEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceServer.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStateChangeEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfToneChangeEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairChangeEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainStringParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_Logger.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherInterfacePolicy.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamConstraints.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_Logger.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecParameterSettings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCIceCandidate.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCIceCandidate.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpTransport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDoubleRange.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererIceErrorEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpFeedback.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStateChangeEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificate.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListenerEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_Settings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainString.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_DoubleRange.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnection.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateComplete.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxParameters.cpp", - "ortc/idl/wrapper/generated/c/c_helpers.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCapabilities.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCOutboundRtpStreamStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackCapabilities.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecParameterSettings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityError.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCCapabilityOptions.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtmfSender.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsFingerprint.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesCryptoParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLine.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainStringParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_OrtcLib.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidate.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSettings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpStreamStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListener.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCInboundRtpStreamStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecCapabilityParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionRtpSenderDetails.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpReceiver.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererIceErrorEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedErrorEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLongRange.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecCapabilityParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescription.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSupportedConstraints.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCodec.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBoolean.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStateChangeEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpSender.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferOptions.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpContributingSource.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MessageQueue.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpSender.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLong.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityAssertion.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStateChangeEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_Json.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherer.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidate.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsCertificateBinary.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtensionParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackCapabilities.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ErrorEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceServer.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityOptions.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_OrtcLib.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidate.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidateAttributes.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCAnswerOptions.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBooleanParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_DoubleRange.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraints.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaSource.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferOptions.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionData.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsFingerprint.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaControl.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListenerEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainDoubleRange.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_StringOrStringList.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpContributingSource.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtension.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCConfiguration.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSupportedConstraints.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraints.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_Json.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaDevices.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraintSet.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedErrorEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMessageEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCOutboundRtpStreamStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLine.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLongRange.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameterSettings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_LongRange.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpListener.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificateStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsCertificateBinary.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificate.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCConfiguration.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsTypeSet.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityOptions.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecParameterSettings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtension.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaSource.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityOptions.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapabilityParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportController.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_LongRange.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherOptions.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDtlsTransportStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpH264CodecParameterSettings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescription.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_MediaStream.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFecParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsReport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStateChangeEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_OverconstrainedError.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentity.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportController.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCTrackEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCAnswerOptions.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpTransport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportListener.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelStateChangeEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamTrack.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_StringOrStringList.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainBoolean.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCTrackEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMediaStreamTrackStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityResult.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCodecCapability.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpListener.h", - "ortc/idl/wrapper/generated/c/c_helpers.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCMessageEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpReceiver.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpStreamStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescription.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCodec.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpUnhandledEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRedCodecParameterSettings.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannelEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherer.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescriptionDetails.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataChannel.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesTransport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIdentityError.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferAnswerOptions.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionDataDetails.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCCertificateStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCOfferAnswerOptions.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpVp8CodecCapabilityParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpEncodingParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCCapabilityOptions.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionSctpMediaLine.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamConstraints.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpHeaderExtensionParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpFeedback.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaDeviceInfo.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpCapabilities.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesKeyParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtcpTransport.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGatherInterfacePolicy.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionConnectionData.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaStreamTrack.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSctpTransportStats.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateCompleteEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportStateChangeEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportOptions.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFecParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackConstraintSet.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRedCodecParameterSettings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCPeerConnectionIceErrorEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpSdesKeyParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpFlexFecCodecCapabilityParameters.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainString.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCDataTransport.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionDescription.cpp", - "ortc/idl/wrapper/generated/c/types.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_ConstrainLong.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaTrackSettings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceGathererCandidateEvent.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCSessionDescriptionTransportParameters.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpOpusCodecParameterSettings.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_MessageQueue.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCStatsTypeSet.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_adapter_RTCMediaStreamTrackConfiguration.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceCandidatePairStats.h", - "ortc/idl/wrapper/generated/c/c_org_ortc_MediaDeviceInfo.cpp", - "ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportOptions.h", ] \ No newline at end of file From d6c20a10a97261b87248c79b54c8235f415f3a2f Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Tue, 26 Sep 2017 14:59:26 +0200 Subject: [PATCH 133/187] Added missing lib --- BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 15d0b7cb..475b62e7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -731,7 +731,7 @@ shared_library("ortclib") { "/usr/lib", "/usr/lib/x86_64-linux-gnu", ] - libs = [ "uuid" ] + libs = [ "uuid", "stdc++" ] deps = [ "//build/config:exe_and_shlib_deps", From a8e50e5f03ebd9709d1a05111eb59cec715b98ac Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 27 Sep 2017 12:59:38 +0200 Subject: [PATCH 134/187] Resolved most of ortclib linking issues for linux --- BUILD.gn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 475b62e7..b6268cc8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -704,6 +704,7 @@ shared_library("ortclib") { configs -= [ "//build/config/gcc:no_exceptions" ] } + include_dirs = [ ".", "..", @@ -731,17 +732,17 @@ shared_library("ortclib") { "/usr/lib", "/usr/lib/x86_64-linux-gnu", ] - libs = [ "uuid", "stdc++" ] + libs = [ "uuid", "stdc++", "curl", ] deps = [ - "//build/config:exe_and_shlib_deps", - ":ortclib_static", - "//ortc/ortclib-services", "//ortc/zsLib:zslib", "//ortc/zsLib-eventing:zslib-eventing", "//ortc/cryptopp", "//ortc/udns", "//ortc/idnkit", + "//build/config:exe_and_shlib_deps", + ":ortclib_static", + "//ortc/ortclib-services", ":ortclib_idl", ] From 9a0e889eeda7c1b59b1c5bfe936a5723fe589ae6 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 27 Sep 2017 16:26:02 +0200 Subject: [PATCH 135/187] Added missing reference to ortclib-cpp files --- BUILD.gn | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index b6268cc8..f7afd51b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -689,9 +689,41 @@ ortc_sources = [ ] #Exists just to keep non generated ortclib code, in case we need it some day -shared_library("dummy_lib") { +static_library("ortclib_static") { +configs += [ ":ortclib_config" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs -= [ "//build/config/compiler:chromium_code" ] + + if (!is_win) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + + #To include sources generated from IDL set sources value to ortc_sources sources = ortclib_sources + + defines = [ + "_LIB", + "USE_ETW", + "USE_OPENSSL=1", + "NOMINMAX", + "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE", + "_CRT_SECURE_NO_WARNINGS", + "_UNICODE", + "UNICODE", + ] + + if (is_linux) { + defines += [ + "WEBRTC_POSIX", + "WEBRTC_BUILD_LIBEVENT", + ] + } + + if (is_win) { + defines += [ "WEBRTC_WIN", ] + } + } @@ -732,7 +764,7 @@ shared_library("ortclib") { "/usr/lib", "/usr/lib/x86_64-linux-gnu", ] - libs = [ "uuid", "stdc++", "curl", ] + libs = [ "uuid", "stdc++", "curl", "ssl", "crypto" ] deps = [ "//ortc/zsLib:zslib", @@ -742,6 +774,7 @@ shared_library("ortclib") { "//ortc/idnkit", "//build/config:exe_and_shlib_deps", ":ortclib_static", + ":ortclib_generated_static", "//ortc/ortclib-services", ":ortclib_idl", ] @@ -765,7 +798,7 @@ shared_library("ortclib") { } } -static_library("ortclib_static") { +static_library("ortclib_generated_static") { configs += [ ":ortclib_config" ] From fc2a3be54fa7d01b46bcebbb165eb41e3eb15be0 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 28 Sep 2017 01:23:43 -0400 Subject: [PATCH 136/187] cleaning up source code with chromium styling --- BUILD.gn | 13 +- ortc/IICETypes.h | 9 +- ortc/IRTPTypes.h | 9 +- ortc/cpp/ortc_ICETypes.cpp | 16 ++ ortc/cpp/ortc_MediaDevice.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCapture.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp | 2 +- ortc/cpp/ortc_MediaDeviceRenderAudio.cpp | 2 +- ortc/cpp/ortc_MediaEngine.cpp | 2 +- ortc/cpp/ortc_MediaStreamTrack.cpp | 34 +++++ ortc/cpp/ortc_RTPTypes.cpp | 135 ++++++++++------- ortc/internal/ortc_Certificate.h | 16 +- ortc/internal/ortc_DTLSTransport.h | 74 ++++----- ortc/internal/ortc_DTMFSender.h | 40 ++--- ortc/internal/ortc_DataChannel.h | 54 +++---- ortc/internal/ortc_ICEGatherer.h | 142 +++++++++--------- ortc/internal/ortc_ICETransport.h | 40 ++--- ortc/internal/ortc_ICETransportController.h | 54 +++---- ortc/internal/ortc_IMediaStreamTrack.h | 6 +- ortc/internal/ortc_Identity.h | 22 +-- ortc/internal/ortc_MediaDeviceCaptureAudio.h | 30 ++-- ortc/internal/ortc_MediaDeviceCaptureVideo.h | 18 +-- ortc/internal/ortc_MediaDeviceRenderAudio.h | 22 +-- ortc/internal/ortc_MediaDevices.h | 18 +-- ortc/internal/ortc_MediaEngine.h | 16 +- ortc/internal/ortc_MediaStreamTrack.h | 65 ++++---- ortc/internal/ortc_MediaStreamTrackChannel.h | 58 +++---- .../ortc_MediaStreamTrackSubscriberMedia.h | 36 ++--- .../ortc_MediaStreamTrackSubscriberRTP.h | 54 +++---- ortc/internal/ortc_RTPDecoderAudio.h | 44 +++--- ortc/internal/ortc_RTPDecoderVideo.h | 44 +++--- ortc/internal/ortc_RTPEncoderAudio.h | 44 +++--- ortc/internal/ortc_RTPEncoderVideo.h | 44 +++--- ortc/internal/ortc_RTPListener.h | 76 +++++----- ortc/internal/ortc_RTPReceiver.h | 58 +++---- ortc/internal/ortc_RTPReceiverChannel.h | 42 +++--- ortc/internal/ortc_RTPSender.h | 58 +++---- ortc/internal/ortc_RTPSenderChannel.h | 50 +++--- ortc/internal/ortc_SCTPTransport.h | 84 +++++------ ortc/internal/ortc_SCTPTransportListener.h | 58 +++---- ortc/internal/ortc_SRTPSDESTransport.h | 120 +++++++-------- ortc/internal/ortc_SRTPTransport.h | 30 ++-- ortc/internal/ortc_StatsReport.h | 8 +- ortc/types.h | 4 +- 45 files changed, 920 insertions(+), 837 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index f7afd51b..e19af3db 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -690,7 +690,7 @@ ortc_sources = [ #Exists just to keep non generated ortclib code, in case we need it some day static_library("ortclib_static") { -configs += [ ":ortclib_config" ] + configs += [ ":ortclib_config" ] configs -= [ "//build/config/compiler:no_rtti" ] configs -= [ "//build/config/compiler:chromium_code" ] @@ -724,6 +724,8 @@ configs += [ ":ortclib_config" ] defines += [ "WEBRTC_WIN", ] } + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + configs -= [ "//build/config/clang:find_bad_constructs" ] } @@ -796,6 +798,10 @@ shared_library("ortclib") { "WEBRTC_BUILD_LIBEVENT", ] } + + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + configs -= [ "//build/config/clang:find_bad_constructs" ] + } static_library("ortclib_generated_static") { @@ -839,6 +845,9 @@ static_library("ortclib_generated_static") { ":ortclib_events", ":ortclib_idl", ] + + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + configs -= [ "//build/config/clang:find_bad_constructs" ] } compile_event_macro("ortclib_events") { @@ -860,4 +869,4 @@ compile_idl_macro("ortclib_idl") { outputs = ortc_sources sourcePathPrefix = "ortc/idl/" -} \ No newline at end of file +} diff --git a/ortc/IICETypes.h b/ortc/IICETypes.h index bcc3c634..5ee6efd8 100644 --- a/ortc/IICETypes.h +++ b/ortc/IICETypes.h @@ -182,11 +182,12 @@ namespace ortc static CandidatePtr convert(GatherCandidatePtr candidate); - Candidate() {} - Candidate(const Candidate &op2) {(*this) = op2;} + Candidate(); + Candidate(const Candidate &op2); Candidate(ElementPtr elem); + ~Candidate(); - virtual ElementPtr createElement(const char *objectName = "candidate") const; + ElementPtr createElement(const char *objectName = "candidate") const override; ElementPtr toDebug() const; String hash(bool includePriorities = true) const; @@ -213,7 +214,7 @@ namespace ortc CandidateComplete(const CandidateComplete &op2) {(*this) = op2;} CandidateComplete(ElementPtr elem); - virtual ElementPtr createElement(const char *objectName = "candidateComplete") const; + ElementPtr createElement(const char *objectName = "candidateComplete") const override; ElementPtr toDebug() const; String hash() const; diff --git a/ortc/IRTPTypes.h b/ortc/IRTPTypes.h index 75a7be12..a9102613 100644 --- a/ortc/IRTPTypes.h +++ b/ortc/IRTPTypes.h @@ -151,16 +151,15 @@ namespace ortc CodecCapability() {}; CodecCapability(const CodecCapability &source); CodecCapability(ElementPtr elem); -#if __APPLE__ - CodecCapability &operator=(const CodecCapability &op2) = default; -#else - CodecCapability &operator=(const CodecCapability &op2) /*= delete*/; -#endif + CodecCapability &operator=(const CodecCapability &op2); ElementPtr createElement(const char *objectName = "codecCapability") const; ElementPtr toDebug() const; String hash() const; + + protected: + void copyAny(const CodecCapability &source); }; //------------------------------------------------------------------------- diff --git a/ortc/cpp/ortc_ICETypes.cpp b/ortc/cpp/ortc_ICETypes.cpp index 5bb1ba5a..918d3139 100644 --- a/ortc/cpp/ortc_ICETypes.cpp +++ b/ortc/cpp/ortc_ICETypes.cpp @@ -246,6 +246,22 @@ namespace ortc #pragma mark IICETypes::Candidate #pragma mark + //--------------------------------------------------------------------------- + IICETypes::Candidate::Candidate() + { + } + + //--------------------------------------------------------------------------- + IICETypes::Candidate::Candidate(const Candidate &op2) + { + (*this) = op2; + } + + //--------------------------------------------------------------------------- + IICETypes::Candidate::~Candidate() + { + } + //--------------------------------------------------------------------------- IICETypes::CandidatePtr IICETypes::Candidate::convert(GatherCandidatePtr candidate) { diff --git a/ortc/cpp/ortc_MediaDevice.cpp b/ortc/cpp/ortc_MediaDevice.cpp index fb94e678..c06d1790 100644 --- a/ortc/cpp/ortc_MediaDevice.cpp +++ b/ortc/cpp/ortc_MediaDevice.cpp @@ -62,7 +62,7 @@ // //#include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDeviceCapture.cpp b/ortc/cpp/ortc_MediaDeviceCapture.cpp index fb3c605f..d8a0cee8 100644 --- a/ortc/cpp/ortc_MediaDeviceCapture.cpp +++ b/ortc/cpp/ortc_MediaDeviceCapture.cpp @@ -62,7 +62,7 @@ // //#include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp index 51683fc8..5f9701a3 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp @@ -87,7 +87,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp index fb73409a..467ed04f 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp @@ -87,7 +87,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp index d6e25e4a..dcc4dd92 100644 --- a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp @@ -48,7 +48,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp index 145327ac..1382a49c 100644 --- a/ortc/cpp/ortc_MediaEngine.cpp +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -77,7 +77,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index 6e270381..7b614d7b 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -209,6 +209,29 @@ namespace ortc #pragma mark MediaStreamTrack #pragma mark + + //------------------------------------------------------------------------- + const char *MediaStreamTrack::toString(MediaStreamTrackTypes type) + { + switch (type) { + case MediaStreamTrackType_Capture: return "capture"; + case MediaStreamTrackType_Receiver: return "receiver"; + case MediaStreamTrackType_Selector: return "selector"; + } + return "UNDEFINED"; + } + + //------------------------------------------------------------------------- + MediaStreamTrack::MediaStreamTrackTypes MediaStreamTrack::toMediaStreamTrackType(const char *inputStr) + { + String str(inputStr); + for (MediaStreamTrack::MediaStreamTrackTypes index = MediaStreamTrack::MediaStreamTrackType_First; index <= MediaStreamTrack::MediaStreamTrackType_Last; index = static_cast(static_cast::type>(index) + 1)) { + if (0 == str.compareNoCase(MediaStreamTrack::toString(index))) return index; + } + ORTC_THROW_INVALID_PARAMETERS("Invalid parameter value: " + str) + return MediaStreamTrack::MediaStreamTrackType_First; + } + //------------------------------------------------------------------------- MediaStreamTrack::MediaStreamTrack( const make_private &, @@ -954,6 +977,17 @@ namespace ortc return MediaStreamTrackFactory::singleton(); } + //------------------------------------------------------------------------- + IMediaStreamTrackFactory::ForMediaDevicesPtr IMediaStreamTrackFactory::createForMediaDevices( + IMediaStreamTrackTypes::Kinds kind, + const TrackConstraints &constraints + ) + { + if (this) {} + return internal::MediaStreamTrack::createForMediaDevices(kind, constraints); + } + + //------------------------------------------------------------------------- IMediaStreamTrackFactory::ForReceiverPtr IMediaStreamTrackFactory::createForReceiver(IMediaStreamTrackTypes::Kinds kind) { if (this) {} diff --git a/ortc/cpp/ortc_RTPTypes.cpp b/ortc/cpp/ortc_RTPTypes.cpp index b403e94e..c16d5a7e 100644 --- a/ortc/cpp/ortc_RTPTypes.cpp +++ b/ortc/cpp/ortc_RTPTypes.cpp @@ -2314,62 +2314,24 @@ namespace ortc mMaxSpatialLayers(source.mMaxSpatialLayers), mSVCMultiStreamSupport(source.mSVCMultiStreamSupport) { - if ((source.mParameters) || - (source.mOptions)) { - SupportedCodecs supported = toSupportedCodec(source.mName); - if (source.mParameters) { - switch (supported) { - case SupportedCodec_Opus: { - auto codec = OpusCodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = OpusCodecCapabilityParameters::create(*codec); - } - break; - } - case SupportedCodec_VP8: { - auto codec = VP8CodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = VP8CodecCapabilityParameters::create(*codec); - } - break; - } - case SupportedCodec_H264: { - auto codec = H264CodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = H264CodecCapabilityParameters::create(*codec); - } - break; - } - case SupportedCodec_RTX: { - auto codec = RTXCodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = RTXCodecCapabilityParameters::create(*codec); - } - break; - } - case SupportedCodec_FlexFEC: { - auto codec = FlexFECCodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = FlexFECCodecCapabilityParameters::create(*codec); - } - break; - } - default: break; - } - } - if (source.mOptions) { - switch (supported) { - case SupportedCodec_Opus: { - auto codec = OpusCodecCapabilityOptions::convert(source.mOptions); - if (codec) { - mOptions = OpusCodecCapabilityOptions::create(*codec); - } - break; - } - default: break; - } - } - } + copyAny(source); + } + + //--------------------------------------------------------------------------- + IRTPTypes::CodecCapability &IRTPTypes::CodecCapability::operator=(const CodecCapability &op2) + { + mName = op2.mName; + mKind = op2.mKind; + mClockRate = op2.mClockRate; + mPreferredPayloadType = op2.mPreferredPayloadType; + mPTime = op2.mPTime; + mMaxPTime = op2.mMaxPTime; + mNumChannels = op2.mNumChannels; + mRTCPFeedback = op2.mRTCPFeedback; + mMaxTemporalLayers = op2.mMaxTemporalLayers; + mMaxSpatialLayers = op2.mMaxSpatialLayers; + mSVCMultiStreamSupport = op2.mSVCMultiStreamSupport; + copyAny(op2); } //--------------------------------------------------------------------------- @@ -2477,6 +2439,67 @@ namespace ortc return hasher->finalizeAsString(); } + //--------------------------------------------------------------------------- + void IRTPTypes::CodecCapability::copyAny(const CodecCapability &source) + { + if ((source.mParameters) || + (source.mOptions)) { + SupportedCodecs supported = toSupportedCodec(source.mName); + if (source.mParameters) { + switch (supported) { + case SupportedCodec_Opus: { + auto codec = OpusCodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = OpusCodecCapabilityParameters::create(*codec); + } + break; + } + case SupportedCodec_VP8: { + auto codec = VP8CodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = VP8CodecCapabilityParameters::create(*codec); + } + break; + } + case SupportedCodec_H264: { + auto codec = H264CodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = H264CodecCapabilityParameters::create(*codec); + } + break; + } + case SupportedCodec_RTX: { + auto codec = RTXCodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = RTXCodecCapabilityParameters::create(*codec); + } + break; + } + case SupportedCodec_FlexFEC: { + auto codec = FlexFECCodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = FlexFECCodecCapabilityParameters::create(*codec); + } + break; + } + default: break; + } + } + if (source.mOptions) { + switch (supported) { + case SupportedCodec_Opus: { + auto codec = OpusCodecCapabilityOptions::convert(source.mOptions); + if (codec) { + mOptions = OpusCodecCapabilityOptions::create(*codec); + } + break; + } + default: break; + } + } + } + } + //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- diff --git a/ortc/internal/ortc_Certificate.h b/ortc/internal/ortc_Certificate.h index a8a44faf..96729873 100644 --- a/ortc/internal/ortc_Certificate.h +++ b/ortc/internal/ortc_Certificate.h @@ -164,11 +164,11 @@ namespace ortc static PromiseWithCertificatePtr generateCertificate(ElementPtr keygenAlgorithm) throw (NotSupportedError); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual Time expires() const override; + Time expires() const override; - virtual FingerprintPtr fingerprint() const override; + FingerprintPtr fingerprint() const override; //----------------------------------------------------------------------- #pragma mark @@ -177,10 +177,10 @@ namespace ortc // (duplicate) virtual PUID getID() const; - virtual KeyPairType getKeyPair() const override; - virtual CertificateObjectType getCertificate() const override; + KeyPairType getKeyPair() const override; + CertificateObjectType getCertificate() const override; - virtual SecureByteBlockPtr getDigest(const String &algorithm) const override; + SecureByteBlockPtr getDigest(const String &algorithm) const override; // (duplicate) virtual FingerprintPtr fingerprint() const override; @@ -194,14 +194,14 @@ namespace ortc #pragma mark Certificate => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark #pragma mark Certificate => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; public: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_DTLSTransport.h b/ortc/internal/ortc_DTLSTransport.h index 6400d25d..fa45390d 100644 --- a/ortc/internal/ortc_DTLSTransport.h +++ b/ortc/internal/ortc_DTLSTransport.h @@ -198,7 +198,7 @@ namespace ortc #pragma mark DTLSTransport => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -216,26 +216,26 @@ namespace ortc static DTLSTransportPtr convert(IRTPTransportPtr rtpTransport); static DTLSTransportPtr convert(IRTCPTransportPtr rtcpTransport); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IDTLSTransportSubscriptionPtr subscribe(IDTLSTransportDelegatePtr delegate) override; + IDTLSTransportSubscriptionPtr subscribe(IDTLSTransportDelegatePtr delegate) override; - virtual CertificateListPtr certificates() const override; - virtual IICETransportPtr transport() const override; + CertificateListPtr certificates() const override; + IICETransportPtr transport() const override; - virtual States state() const override; + States state() const override; - virtual ParametersPtr getLocalParameters() const override; - virtual ParametersPtr getRemoteParameters() const override; + ParametersPtr getLocalParameters() const override; + ParametersPtr getRemoteParameters() const override; - virtual SecureByteBlockListPtr getRemoteCertificates() const override; + SecureByteBlockListPtr getRemoteCertificates() const override; virtual void start(const Parameters &remoteParameters) throw ( InvalidStateError, InvalidParameters ) override; - virtual void stop() override; + void stop() override; //----------------------------------------------------------------------- #pragma mark @@ -262,7 +262,7 @@ namespace ortc size_t bufferLengthInBytes ) override; - virtual IICETransportPtr getICETransport() const override; + IICETransportPtr getICETransport() const override; //----------------------------------------------------------------------- @@ -339,7 +339,7 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual RTPListenerPtr getListener() const override; + RTPListenerPtr getListener() const override; //----------------------------------------------------------------------- #pragma mark @@ -350,13 +350,13 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual ISecureTransportSubscriptionPtr subscribe(ISecureTransportDelegatePtr delegate) override; + ISecureTransportSubscriptionPtr subscribe(ISecureTransportDelegatePtr delegate) override; - virtual ISecureTransportTypes::States state(ISecureTransportTypes::States ignored) const override; + ISecureTransportTypes::States state(ISecureTransportTypes::States ignored) const override; - virtual bool isClientRole() const override; + bool isClientRole() const override; - virtual UseDataTransportPtr getDataTransport() const override; + UseDataTransportPtr getDataTransport() const override; virtual bool sendDataPacket( const BYTE *buffer, @@ -368,45 +368,45 @@ namespace ortc #pragma mark DTLSTransport => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark DTLSTransport => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark DTLSTransport => IDTLSTransportAsyncDelegate #pragma mark - virtual void onAdapterSendPacket() override; - virtual void onDeliverPendingIncomingRTP() override; + void onAdapterSendPacket() override; + void onDeliverPendingIncomingRTP() override; //----------------------------------------------------------------------- #pragma mark #pragma mark DTLSTransport => IICETransportDelegate #pragma mark - virtual void onICETransportStateChange( - IICETransportPtr transport, - IICETransport::States state - ) override; - - virtual void onICETransportCandidatePairAvailable( - IICETransportPtr transport, - CandidatePairPtr candidatePair - ) override; - virtual void onICETransportCandidatePairGone( - IICETransportPtr transport, - CandidatePairPtr candidatePair - ) override; - virtual void onICETransportCandidatePairChanged( - IICETransportPtr transport, - CandidatePairPtr candidatePair - ) override; + void onICETransportStateChange( + IICETransportPtr transport, + IICETransport::States state + ) override; + + void onICETransportCandidatePairAvailable( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; + void onICETransportCandidatePairGone( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; + void onICETransportCandidatePairChanged( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_DTMFSender.h b/ortc/internal/ortc_DTMFSender.h index 21369a53..d6fcda51 100644 --- a/ortc/internal/ortc_DTMFSender.h +++ b/ortc/internal/ortc_DTMFSender.h @@ -128,26 +128,26 @@ namespace ortc IRTPSenderPtr sender ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IDTMFSenderSubscriptionPtr subscribe(IDTMFSenderDelegatePtr delegate) override; + IDTMFSenderSubscriptionPtr subscribe(IDTMFSenderDelegatePtr delegate) override; - virtual bool canInsertDTMF() const override; + bool canInsertDTMF() const override; - virtual void insertDTMF( - const char *tones, - Milliseconds duration = Milliseconds(70), - Milliseconds interToneGap = Milliseconds(70) - ) throw ( - InvalidStateError, - InvalidCharacterError - ) override; + void insertDTMF( + const char *tones, + Milliseconds duration = Milliseconds(70), + Milliseconds interToneGap = Milliseconds(70) + ) throw ( + InvalidStateError, + InvalidCharacterError + ) override; - virtual IRTPSenderPtr sender() const override; + IRTPSenderPtr sender() const override; - virtual String toneBuffer() const override; - virtual Milliseconds duration() const override; - virtual Milliseconds interToneGap() const override; + String toneBuffer() const override; + Milliseconds duration() const override; + Milliseconds interToneGap() const override; //----------------------------------------------------------------------- #pragma mark @@ -163,17 +163,17 @@ namespace ortc #pragma mark DTMFSender => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark DTMFSender => IDTMFSenderDelegate #pragma mark - virtual void onDTMFSenderToneChanged( - IDTMFSenderPtr sender, - String tone - ) override; + void onDTMFSenderToneChanged( + IDTMFSenderPtr sender, + String tone + ) override; //----------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_DataChannel.h b/ortc/internal/ortc_DataChannel.h index f6bba105..0976c77a 100644 --- a/ortc/internal/ortc_DataChannel.h +++ b/ortc/internal/ortc_DataChannel.h @@ -189,38 +189,38 @@ namespace ortc const Parameters ¶ms ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IDataChannelSubscriptionPtr subscribe(IDataChannelDelegatePtr delegate) override; + IDataChannelSubscriptionPtr subscribe(IDataChannelDelegatePtr delegate) override; - virtual IDataTransportPtr transport() const override; + IDataTransportPtr transport() const override; - virtual ParametersPtr parameters() const override; + ParametersPtr parameters() const override; - virtual States readyState() const override; + States readyState() const override; - virtual size_t bufferedAmount() const override; - virtual size_t bufferedAmountLowThreshold() const override; - virtual void bufferedAmountLowThreshold(size_t value) override; + size_t bufferedAmount() const override; + size_t bufferedAmountLowThreshold() const override; + void bufferedAmountLowThreshold(size_t value) override; - virtual String binaryType() const override; - virtual void binaryType(const char *str) override; + String binaryType() const override; + void binaryType(const char *str) override; - virtual void close() override; + void close() override; - virtual void send(const String &data) override; - virtual void send(const SecureByteBlock &data) override; - virtual void send( - const BYTE *buffer, - size_t bufferSizeInBytes - ) override; + void send(const String &data) override; + void send(const SecureByteBlock &data) override; + void send( + const BYTE *buffer, + size_t bufferSizeInBytes + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark DataChannel => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -236,41 +236,41 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual bool isIncoming() const override {return mIncoming;} + bool isIncoming() const override {return mIncoming;} - virtual bool handleSCTPPacket(SCTPPacketIncomingPtr packet) override; + bool handleSCTPPacket(SCTPPacketIncomingPtr packet) override; - virtual void requestShutdown() override; - virtual void notifyClosed() override; + void requestShutdown() override; + void notifyClosed() override; //----------------------------------------------------------------------- #pragma mark #pragma mark DataChannel => ISCTPTransportForDataChannelDelegate #pragma mark - virtual void onSCTPTransportStateChanged() override; + void onSCTPTransportStateChanged() override; //----------------------------------------------------------------------- #pragma mark #pragma mark DataChannel => IDataChannelAsyncDelegate #pragma mark - virtual void onRequestShutdown() override; - virtual void onNotifiedClosed() override; + void onRequestShutdown() override; + void onNotifiedClosed() override; //----------------------------------------------------------------------- #pragma mark #pragma mark DataChannel => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark DataChannel => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; //----------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_ICEGatherer.h b/ortc/internal/ortc_ICEGatherer.h index 0db49e62..222de4e7 100644 --- a/ortc/internal/ortc_ICEGatherer.h +++ b/ortc/internal/ortc_ICEGatherer.h @@ -358,7 +358,7 @@ namespace ortc #pragma mark ICEGatherer => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -372,21 +372,21 @@ namespace ortc const Options &options ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IICEGathererSubscriptionPtr subscribe(IICEGathererDelegatePtr delegate) override; + IICEGathererSubscriptionPtr subscribe(IICEGathererDelegatePtr delegate) override; - virtual Components component() const override; - virtual States state() const override; + Components component() const override; + States state() const override; - virtual ParametersPtr getLocalParameters() const override; - virtual CandidateListPtr getLocalCandidates() const override; + ParametersPtr getLocalParameters() const override; + CandidateListPtr getLocalCandidates() const override; - virtual IICEGathererPtr createAssociatedGatherer(IICEGathererDelegatePtr delegate) throw(InvalidStateError) override; + IICEGathererPtr createAssociatedGatherer(IICEGathererDelegatePtr delegate) throw(InvalidStateError) override; - virtual void gather(const Optional &options = Optional()) override; + void gather(const Optional &options = Optional()) override; - virtual void close() override; + void close() override; //----------------------------------------------------------------------- #pragma mark @@ -398,126 +398,126 @@ namespace ortc // (duplicate) virtual Components component() const = 0; // (duplicate) virtual States state() const = 0; - virtual void installTransport( - ICETransportPtr transport, - const String &remoteUFrag - ) override; - virtual void notifyTransportStateChange(ICETransportPtr transport) override; - virtual void removeTransport(ICETransport &transport) override; + void installTransport( + ICETransportPtr transport, + const String &remoteUFrag + ) override; + void notifyTransportStateChange(ICETransportPtr transport) override; + void removeTransport(ICETransport &transport) override; - virtual ForICETransportPtr getRTCPGatherer() const override; + ForICETransportPtr getRTCPGatherer() const override; // (duplicate) virtual IICEGathererSubscriptionPtr subscribe(IICEGathererDelegatePtr delegate) = 0; // (duplicate) virtual CandidateListPtr getLocalCandidates() const = 0; - virtual bool isContinousGathering() const override; - virtual String getUsernameFrag() const override {return mUsernameFrag;} - virtual String getPassword() const override {return mPassword;} + bool isContinousGathering() const override; + String getUsernameFrag() const override {return mUsernameFrag;} + String getPassword() const override {return mPassword;} - virtual ICEGathererRouterPtr getGathererRouter() const override; + ICEGathererRouterPtr getGathererRouter() const override; - virtual void removeRoute(RouterRoutePtr routerRoute) override; - virtual void remoteAllRelatedRoutes(ICETransport &transport) override; + void removeRoute(RouterRoutePtr routerRoute) override; + void remoteAllRelatedRoutes(ICETransport &transport) override; - virtual bool sendPacket( - UseICETransport &transport, - RouterRoutePtr routerRoute, - const BYTE *buffer, - size_t bufferSizeInBytes - ) override; + bool sendPacket( + UseICETransport &transport, + RouterRoutePtr routerRoute, + const BYTE *buffer, + size_t bufferSizeInBytes + ) override; - virtual void notifyLikelyReflexiveActivity(RouterRoutePtr routerRoute) override; + void notifyLikelyReflexiveActivity(RouterRoutePtr routerRoute) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICEGatherer => IGathererAsyncDelegate #pragma mark - virtual void onNotifyDeliverRouteBufferedPackets( - UseICETransportPtr transport, - PUID routerRouteID - ) override; + void onNotifyDeliverRouteBufferedPackets( + UseICETransportPtr transport, + PUID routerRouteID + ) override; - virtual void onResolveStatsPromise(IStatsProvider::PromiseWithStatsReportPtr promise) override; + void onResolveStatsPromise(IStatsProvider::PromiseWithStatsReportPtr promise) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICEGatherer => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICEGatherer => IDNSDelegate #pragma mark - virtual void onLookupCompleted(IDNSQueryPtr query) override; + void onLookupCompleted(IDNSQueryPtr query) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICEGatherer => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICEGatherer => ISocketDelegate #pragma mark - virtual void onReadReady(SocketPtr socket) override; - virtual void onWriteReady(SocketPtr socket) override; - virtual void onException(SocketPtr socket) override; + void onReadReady(SocketPtr socket) override; + void onWriteReady(SocketPtr socket) override; + void onException(SocketPtr socket) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICEGatherer => IBackOffDelegate #pragma mark - virtual void onBackOffTimerStateChanged( - IBackOffTimerPtr timer, - IBackOffTimer::States state - ) override; + void onBackOffTimerStateChanged( + IBackOffTimerPtr timer, + IBackOffTimer::States state + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICEGatherer => ISTUNDiscoveryDelegate #pragma mark - virtual void onSTUNDiscoverySendPacket( - ISTUNDiscoveryPtr discovery, - IPAddress destination, - SecureByteBlockPtr packet - ) override; + void onSTUNDiscoverySendPacket( + ISTUNDiscoveryPtr discovery, + IPAddress destination, + SecureByteBlockPtr packet + ) override; - virtual void onSTUNDiscoveryCompleted(ISTUNDiscoveryPtr discovery) override; + void onSTUNDiscoveryCompleted(ISTUNDiscoveryPtr discovery) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICEGatherer => ITURNSocketDelegate #pragma mark - virtual void onTURNSocketStateChanged( - ITURNSocketPtr socket, - TURNSocketStates state - ) override; - - virtual void handleTURNSocketReceivedPacket( - ITURNSocketPtr socket, - IPAddress source, - const BYTE *packet, - size_t packetLengthInBytes - ) override; - - virtual bool notifyTURNSocketSendPacket( - ITURNSocketPtr socket, - IPAddress destination, - const BYTE *packet, - size_t packetLengthInBytes - ) override; - - virtual void onTURNSocketWriteReady(ITURNSocketPtr socket) override; + void onTURNSocketStateChanged( + ITURNSocketPtr socket, + TURNSocketStates state + ) override; + + void handleTURNSocketReceivedPacket( + ITURNSocketPtr socket, + IPAddress source, + const BYTE *packet, + size_t packetLengthInBytes + ) override; + + bool notifyTURNSocketSendPacket( + ITURNSocketPtr socket, + IPAddress destination, + const BYTE *packet, + size_t packetLengthInBytes + ) override; + + void onTURNSocketWriteReady(ITURNSocketPtr socket) override; public: diff --git a/ortc/internal/ortc_ICETransport.h b/ortc/internal/ortc_ICETransport.h index f827df0c..af6b43cf 100644 --- a/ortc/internal/ortc_ICETransport.h +++ b/ortc/internal/ortc_ICETransport.h @@ -335,7 +335,7 @@ namespace ortc #pragma mark ICETransport => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -349,35 +349,35 @@ namespace ortc IICEGathererPtr gatherer ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IICETransportSubscriptionPtr subscribe(IICETransportDelegatePtr delegate) override; + IICETransportSubscriptionPtr subscribe(IICETransportDelegatePtr delegate) override; - virtual IICEGathererPtr iceGatherer() const override; + IICEGathererPtr iceGatherer() const override; - virtual Roles role() const override; - virtual Components component() const override; - virtual States state() const override; + Roles role() const override; + Components component() const override; + States state() const override; - virtual CandidateListPtr getRemoteCandidates() const override; + CandidateListPtr getRemoteCandidates() const override; - virtual CandidatePairPtr getSelectedCandidatePair() const override; + CandidatePairPtr getSelectedCandidatePair() const override; - virtual void start( - IICEGathererPtr gatherer, - const Parameters &remoteParameters, - Optional options = Optional() - ) throw (InvalidParameters) override; + void start( + IICEGathererPtr gatherer, + const Parameters &remoteParameters, + Optional options = Optional() + ) throw (InvalidParameters) override; - virtual void stop() override; + void stop() override; - virtual ParametersPtr getRemoteParameters() const override; + ParametersPtr getRemoteParameters() const override; - virtual IICETransportPtr createAssociatedTransport(IICETransportDelegatePtr delegate) throw (InvalidStateError) override; + IICETransportPtr createAssociatedTransport(IICETransportDelegatePtr delegate) throw (InvalidStateError) override; - virtual void addRemoteCandidate(const GatherCandidate &remoteCandidate) throw (InvalidStateError, InvalidParameters) override; - virtual void setRemoteCandidates(const CandidateList &remoteCandidates) throw (InvalidStateError, InvalidParameters) override; - virtual void removeRemoteCandidate(const GatherCandidate &remoteCandidate) throw (InvalidStateError, InvalidParameters) override; + void addRemoteCandidate(const GatherCandidate &remoteCandidate) throw (InvalidStateError, InvalidParameters) override; + void setRemoteCandidates(const CandidateList &remoteCandidates) throw (InvalidStateError, InvalidParameters) override; + void removeRemoteCandidate(const GatherCandidate &remoteCandidate) throw (InvalidStateError, InvalidParameters) override; virtual void keepWarm( const CandidatePair &candidatePair, diff --git a/ortc/internal/ortc_ICETransportController.h b/ortc/internal/ortc_ICETransportController.h index 7ff27af9..dfa31386 100644 --- a/ortc/internal/ortc_ICETransportController.h +++ b/ortc/internal/ortc_ICETransportController.h @@ -161,23 +161,23 @@ namespace ortc static ICETransportControllerPtr create(); - virtual PUID getID() const override; + PUID getID() const override; - virtual ICETransportList getTransports() const override; - virtual void addTransport( - IICETransportPtr transport, - Optional index = Optional() - ) throw( - InvalidParameters, - InvalidStateError - ) override; + ICETransportList getTransports() const override; + void addTransport( + IICETransportPtr transport, + Optional index = Optional() + ) throw( + InvalidParameters, + InvalidStateError + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICETransportController => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -186,37 +186,37 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual PromisePtr notifyWhenUnfrozen( - ICETransportPtr transport, - const String &localFoundation, - const String &remoteFoundation - ) override; + PromisePtr notifyWhenUnfrozen( + ICETransportPtr transport, + const String &localFoundation, + const String &remoteFoundation + ) override; - virtual void notifyDetached(ICETransportPtr transport) override; + void notifyDetached(ICETransportPtr transport) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICETransportController => ITransportControllerAsyncDelegate #pragma mark - virtual void onTransportControllerNotifyWhenUnfrozen( - PromisePtr promise, - UseICETransportPtr transport, - const char *localFoundation, - const char *remoteFoundation - ) override; + void onTransportControllerNotifyWhenUnfrozen( + PromisePtr promise, + UseICETransportPtr transport, + const char *localFoundation, + const char *remoteFoundation + ) override; - virtual void onTransportControllerNotifyDetached( - UseICETransportPtr transport, - AttachedOrderID detachedOrder - ) override; + void onTransportControllerNotifyDetached( + UseICETransportPtr transport, + AttachedOrderID detachedOrder + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark ICETransportController => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_IMediaStreamTrack.h b/ortc/internal/ortc_IMediaStreamTrack.h index 5a45cf2b..6ce714e0 100644 --- a/ortc/internal/ortc_IMediaStreamTrack.h +++ b/ortc/internal/ortc_IMediaStreamTrack.h @@ -127,7 +127,7 @@ namespace ortc { ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackChannel, ForMediaStreamTrackChannel); - virtual ~IMediaStreamTrackForMediaStreamTrackChannel(); + virtual ~IMediaStreamTrackForMediaStreamTrackChannel() {} }; @@ -160,7 +160,7 @@ namespace ortc { ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackSubscriberMedia, ForMediaStreamTrackSubscriberMedia); - virtual ~IMediaStreamTrackForMediaStreamTrackSubscriberMedia(); + virtual ~IMediaStreamTrackForMediaStreamTrackSubscriberMedia() {} }; @@ -176,7 +176,7 @@ namespace ortc { ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackForMediaStreamTrackSubscriberRTP, ForMediaStreamTrackSubscriberRTP); - virtual ~IMediaStreamTrackForMediaStreamTrackSubscriberRTP(); + virtual ~IMediaStreamTrackForMediaStreamTrackSubscriberRTP() {} }; diff --git a/ortc/internal/ortc_Identity.h b/ortc/internal/ortc_Identity.h index 5480409a..f8382ce4 100644 --- a/ortc/internal/ortc_Identity.h +++ b/ortc/internal/ortc_Identity.h @@ -98,33 +98,33 @@ namespace ortc static IdentityPtr create(IDTLSTransportPtr transport); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual AssertionPtr peerIdentity() const override; + AssertionPtr peerIdentity() const override; - virtual IDTLSTransportPtr transport() const override; + IDTLSTransportPtr transport() const override; - virtual PromiseWithResultPtr getIdentityAssertion( - const char *provider, - const char *protoocol = "default", - const char *username = NULL - ) throw (InvalidStateError) override; + PromiseWithResultPtr getIdentityAssertion( + const char *provider, + const char *protoocol = "default", + const char *username = NULL + ) throw (InvalidStateError) override; - virtual PromiseWithAssertionPtr setIdentityAssertion(const String &assertion) override; + PromiseWithAssertionPtr setIdentityAssertion(const String &assertion) override; //----------------------------------------------------------------------- #pragma mark #pragma mark Identity => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark Identity => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_MediaDeviceCaptureAudio.h b/ortc/internal/ortc_MediaDeviceCaptureAudio.h index cc3208e2..53d7f90e 100644 --- a/ortc/internal/ortc_MediaDeviceCaptureAudio.h +++ b/ortc/internal/ortc_MediaDeviceCaptureAudio.h @@ -160,22 +160,22 @@ namespace ortc #pragma mark MediaDeviceCaptureAudio => IMediaDeviceForMediaEngine #pragma mark - virtual bool isDeviceIdle() override; - virtual void shutdown() override; + bool isDeviceIdle() override; + void shutdown() override; - virtual States getState() const override; + States getState() const override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaDeviceCaptureAudio => IMediaDeviceCaptureForMediaEngine #pragma mark - virtual void mediaDeviceCaptureSubscribe( - MediaDeviceCapturePromisePtr promise, - MediaDeviceObjectID repaceExistingDeviceObjectID, - TrackConstraintsPtr constraints, - IMediaDeviceCaptureDelegatePtr delegate - ) override; + void mediaDeviceCaptureSubscribe( + MediaDeviceCapturePromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceCaptureDelegatePtr delegate + ) override; //----------------------------------------------------------------------- #pragma mark @@ -187,14 +187,14 @@ namespace ortc #pragma mark MediaDeviceCaptureAudio => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaDeviceCaptureAudio => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; protected: //----------------------------------------------------------------------- @@ -295,7 +295,7 @@ namespace ortc #pragma mark MediaDeviceCaptureAudio::Media => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; protected: //--------------------------------------------------------------------- @@ -379,7 +379,7 @@ namespace ortc #pragma mark MediaDeviceCaptureAudio::MediaSubscriber => (for MediaDeviceCaptureAudio) #pragma mark - virtual MediaDeviceObjectID getID() const override { return id_; } + MediaDeviceObjectID getID() const override { return id_; } void shutdown(); bool isShutdown() const; void notifyStateChanged(States state); @@ -402,9 +402,9 @@ namespace ortc #pragma mark // (duplicate) virtual MediaDeviceObjectID getID() const override { return id_; } - virtual void cancel() override; + void cancel() override; - virtual States getState() const override; + States getState() const override; //--------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_MediaDeviceCaptureVideo.h b/ortc/internal/ortc_MediaDeviceCaptureVideo.h index 252ddc49..890413c5 100644 --- a/ortc/internal/ortc_MediaDeviceCaptureVideo.h +++ b/ortc/internal/ortc_MediaDeviceCaptureVideo.h @@ -165,10 +165,10 @@ namespace ortc #pragma mark MediaDeviceCaptureVideo => IMediaDeviceForMediaEngine #pragma mark - virtual bool isDeviceIdle() override; - virtual void shutdown() override; + bool isDeviceIdle() override; + void shutdown() override; - virtual States getState() const override; + States getState() const override; //----------------------------------------------------------------------- #pragma mark @@ -192,14 +192,14 @@ namespace ortc #pragma mark MediaDeviceCaptureVideo => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaDeviceCaptureVideo => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; protected: //----------------------------------------------------------------------- @@ -300,7 +300,7 @@ namespace ortc #pragma mark MediaDeviceCaptureVideo::Media => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; protected: //--------------------------------------------------------------------- @@ -384,7 +384,7 @@ namespace ortc #pragma mark MediaDeviceCaptureVideo::MediaSubscriber => (for MediaDeviceCaptureVideo) #pragma mark - virtual MediaDeviceObjectID getID() const override { return id_; } + MediaDeviceObjectID getID() const override { return id_; } void shutdown(); bool isShutdown() const; void notifyStateChanged(States state); @@ -407,9 +407,9 @@ namespace ortc #pragma mark // (duplicate) virtual MediaDeviceObjectID getID() const override { return id_; } - virtual void cancel() override; + void cancel() override; - virtual States getState() const override; + States getState() const override; //--------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_MediaDeviceRenderAudio.h b/ortc/internal/ortc_MediaDeviceRenderAudio.h index 14eaf57e..33d13afa 100644 --- a/ortc/internal/ortc_MediaDeviceRenderAudio.h +++ b/ortc/internal/ortc_MediaDeviceRenderAudio.h @@ -164,22 +164,22 @@ namespace ortc #pragma mark MediaDeviceRenderAudio => IMediaDeviceForMediaEngine #pragma mark - virtual bool isDeviceIdle() override; - virtual void shutdown() override; + bool isDeviceIdle() override; + void shutdown() override; - virtual States getState() const override; + States getState() const override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaDeviceRenderAudio => IMediaDeviceRenderForMediaEngine #pragma mark - virtual void mediaDeviceRenderSubscribe( - MediaDeviceRenderPromisePtr promise, - MediaDeviceObjectID repaceExistingDeviceObjectID, - TrackConstraintsPtr constraints, - IMediaDeviceRenderDelegatePtr delegate - ) override; + void mediaDeviceRenderSubscribe( + MediaDeviceRenderPromisePtr promise, + MediaDeviceObjectID repaceExistingDeviceObjectID, + TrackConstraintsPtr constraints, + IMediaDeviceRenderDelegatePtr delegate + ) override; //----------------------------------------------------------------------- #pragma mark @@ -191,14 +191,14 @@ namespace ortc #pragma mark MediaDeviceRenderAudio => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaDeviceRenderAudio => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_MediaDevices.h b/ortc/internal/ortc_MediaDevices.h index 966dddd8..3805f4ae 100644 --- a/ortc/internal/ortc_MediaDevices.h +++ b/ortc/internal/ortc_MediaDevices.h @@ -152,34 +152,34 @@ namespace ortc #pragma mark MediaDevices => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaDevices => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaDevices => IMediaDevicesAsyncDelegate #pragma mark - virtual void onEnumerateDevices(PromiseWithDeviceListPtr promise) override; - virtual void onEnumerateDefaultModes( - PromiseWithSettingsListPtr promise, - const char *deviceID - ) override; + void onEnumerateDevices(PromiseWithDeviceListPtr promise) override; + void onEnumerateDefaultModes( + PromiseWithSettingsListPtr promise, + const char *deviceID + ) override; - virtual void onGetUserMedia(PromiseWithMediaStreamTrackListPtr promise, ConstraintsPtr constraints) override; + void onGetUserMedia(PromiseWithMediaStreamTrackListPtr promise, ConstraintsPtr constraints) override; //--------------------------------------------------------------------- #pragma mark #pragma mark MessageQueueManager => ISingletonManagerDelegate #pragma mark - virtual void notifySingletonCleanup() override; + void notifySingletonCleanup() override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_MediaEngine.h b/ortc/internal/ortc_MediaEngine.h index 8261c496..b7137ff7 100644 --- a/ortc/internal/ortc_MediaEngine.h +++ b/ortc/internal/ortc_MediaEngine.h @@ -579,7 +579,7 @@ namespace ortc #pragma mark MediaEngine => IMediaEngineForMediaDevice #pragma mark - virtual void notifyDeviceIsIdleOrShutdownStateChanged() override; + void notifyDeviceIsIdleOrShutdownStateChanged() override; //----------------------------------------------------------------------- #pragma mark @@ -639,7 +639,7 @@ namespace ortc #pragma mark MediaEngine => IMediaEngineForRTP #pragma mark - virtual void notifyRTPShutdownStateChanged() override; + void notifyRTPShutdownStateChanged() override; //----------------------------------------------------------------------- #pragma mark @@ -720,28 +720,28 @@ namespace ortc #pragma mark //----------------------------------------------------------------------- - virtual void onMediaDevicesChanged() override; + void onMediaDevicesChanged() override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaEngine => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaEngine => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaEngine => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; protected: //----------------------------------------------------------------------- @@ -755,7 +755,7 @@ namespace ortc class WebRtcTraceCallback : public webrtc::TraceCallback { public: - virtual void Print(webrtc::TraceLevel level, const char* message, int length) override; + void Print(webrtc::TraceLevel level, const char* message, int length) override; }; //----------------------------------------------------------------------- @@ -769,7 +769,7 @@ namespace ortc class WebRtcLogSink : public rtc::LogSink { public: - virtual void OnLogMessage(const std::string& message) override; + void OnLogMessage(const std::string& message) override; }; //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_MediaStreamTrack.h b/ortc/internal/ortc_MediaStreamTrack.h index ca5d4ef3..0dd11d30 100644 --- a/ortc/internal/ortc_MediaStreamTrack.h +++ b/ortc/internal/ortc_MediaStreamTrack.h @@ -159,7 +159,8 @@ namespace ortc }; static const char *toString(MediaStreamTrackTypes type); - + MediaStreamTrackTypes toMediaStreamTrackType(const char *inputStr); + ZS_DECLARE_TYPEDEF_PTR(IMediaEngineForMediaStreamTrack, UseMediaEngine); ZS_DECLARE_TYPEDEF_PTR(IMediaStreamTrackTypes::ImmutableMediaChannelTrace, ImmutableMediaChannelTrace); @@ -231,7 +232,7 @@ namespace ortc #pragma mark MediaStreamTrack => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -243,34 +244,34 @@ namespace ortc const char *message = NULL ); - virtual PUID getID() const override {return id_;} + PUID getID() const override {return id_;} - virtual IMediaStreamTrackSubscriptionPtr subscribe(IMediaStreamTrackDelegatePtr delegate) override; + IMediaStreamTrackSubscriptionPtr subscribe(IMediaStreamTrackDelegatePtr delegate) override; - virtual Kinds kind() const override; - virtual String id() const override; - virtual String deviceID() const override; - virtual String label() const override; - virtual bool enabled() const override; - virtual void enabled(bool enabled) override; - virtual bool muted() const override; - virtual void muted(bool muted) override; - virtual bool remote() const override; - virtual States readyState() const override; + Kinds kind() const override; + String id() const override; + String deviceID() const override; + String label() const override; + bool enabled() const override; + void enabled(bool enabled) override; + bool muted() const override; + void muted(bool muted) override; + bool remote() const override; + States readyState() const override; - virtual ortc::IMediaStreamTrackPtr clone() const override; + ortc::IMediaStreamTrackPtr clone() const override; - virtual void stop() override; + void stop() override; - virtual CapabilitiesPtr getCapabilities() const override; - virtual TrackConstraintsPtr getConstraints() const override; - virtual SettingsPtr getSettings() const override; + CapabilitiesPtr getCapabilities() const override; + TrackConstraintsPtr getConstraints() const override; + SettingsPtr getSettings() const override; - virtual PromisePtr applyConstraints(const TrackConstraints &constraints) override; + PromisePtr applyConstraints(const TrackConstraints &constraints) override; - virtual IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackSyncMediaDelegatePtr delegate) override; + IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackSyncMediaDelegatePtr delegate) override; - virtual IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackAsyncMediaDelegatePtr delegate) override; + IMediaStreamTrackMediaSubscriptionPtr subscribeMedia(IMediaStreamTrackAsyncMediaDelegatePtr delegate) override; //----------------------------------------------------------------------- #pragma mark @@ -292,7 +293,7 @@ namespace ortc #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStream #pragma mark - virtual bool isEnded() const override; + bool isEnded() const override; // (duplicate) virtual Kinds kind() const = 0; // (duplicate) virtual String id() const = 0; // (duplicate) virtual ElementPtr toDebug() const = 0; @@ -307,7 +308,7 @@ namespace ortc #pragma mark MediaStreamTrack => IMediaStreamTrackForMediaStreamTrackSubscriber #pragma mark - virtual void notifySubscriberCancelled(UseSubscriberPtr subscriber) override; + void notifySubscriberCancelled(UseSubscriberPtr subscriber) override; //----------------------------------------------------------------------- #pragma mark @@ -377,33 +378,33 @@ namespace ortc #pragma mark MediaStreamTrack => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaStreamTrack => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaStreamTrack => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; //----------------------------------------------------------------------- #pragma mark #pragma mark MediaStreamTrack => IMediaStreamTrackAsyncDelegate #pragma mark - virtual void onResolveStatsPromise(IStatsProvider::PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) override; + void onResolveStatsPromise(IStatsProvider::PromiseWithStatsReportPtr promise, IStatsReportTypes::StatsTypeSet stats) override; - virtual void onApplyConstraints( - PromisePtr promise, - TrackConstraintsPtr constraints - ) override; + void onApplyConstraints( + PromisePtr promise, + TrackConstraintsPtr constraints + ) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_MediaStreamTrackChannel.h b/ortc/internal/ortc_MediaStreamTrackChannel.h index bc617e80..abc2e4b9 100644 --- a/ortc/internal/ortc_MediaStreamTrackChannel.h +++ b/ortc/internal/ortc_MediaStreamTrackChannel.h @@ -127,35 +127,35 @@ namespace ortc ImmutableMediaChannelTracePtr trace ); - virtual PUID getID() const override { return id_; } - - virtual void shutdown() override; - - virtual void notifyAudioFrame( - size_t timeIndex, - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override; - virtual void notifyVideoFrame( - size_t timeIndex, - ImmutableMediaChannelTracePtr trace, - VideoFramePtr frame - ) override; - - virtual void notifyRTPPacket( - size_t timeIndex, - ImmutableMediaChannelTracePtr trace, - RTPPacketPtr packet - ) override; - virtual void notifyRTCPPacket( - size_t timeIndex, - ImmutableMediaChannelTracePtr trace, - RTPPacketPtr packet - ) override; - - virtual void subscribeComplete() override; - - virtual bool shouldCancel(size_t cleanOlderThanTimeIndex) override; + PUID getID() const override { return id_; } + + void shutdown() override; + + void notifyAudioFrame( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + void notifyVideoFrame( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override; + + void notifyRTPPacket( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + void notifyRTCPPacket( + size_t timeIndex, + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + + void subscribeComplete() override; + + bool shouldCancel(size_t cleanOlderThanTimeIndex) override; //--------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h b/ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h index 16f52a75..24cbfc55 100644 --- a/ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h +++ b/ortc/internal/ortc_MediaStreamTrackSubscriberMedia.h @@ -106,18 +106,18 @@ namespace ortc #pragma mark MediaStreamTrackSubscriberMedia => IMediaStreamTrackSubscriberForMediaStreamTrack #pragma mark - virtual PUID getID() const override { return id_; } + PUID getID() const override { return id_; } - virtual void shutdown() override; + void shutdown() override; - virtual void notifyChannel( - UseMediaChannelBasePtr mediaChannel, - ImmutableMediaChannelTracePtr trace - ) override; + void notifyChannel( + UseMediaChannelBasePtr mediaChannel, + ImmutableMediaChannelTracePtr trace + ) override; - virtual void notifyTrackMute(bool isMuted) override; - virtual void notifyTrackEnded() override; - virtual void notifyOverConstrained(OverconstrainedErrorPtr error) override; + void notifyTrackMute(bool isMuted) override; + void notifyTrackEnded() override; + void notifyOverConstrained(OverconstrainedErrorPtr error) override; //----------------------------------------------------------------------- #pragma mark @@ -145,7 +145,7 @@ namespace ortc #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackChannelDelegate #pragma mark - virtual void notifyMediaChannelCancelled(ImmutableMediaChannelTracePtr trace) override; + void notifyMediaChannelCancelled(ImmutableMediaChannelTracePtr trace) override; //----------------------------------------------------------------------- #pragma mark @@ -153,14 +153,14 @@ namespace ortc #pragma mark - virtual void notifyMediaChannelAudioFrame( - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override; - virtual void notifyMediaChannelVideoFrame( - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override; + void notifyMediaChannelAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + void notifyMediaChannelVideoFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; //----------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h b/ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h index af4d072b..c78c8aea 100644 --- a/ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h +++ b/ortc/internal/ortc_MediaStreamTrackSubscriberRTP.h @@ -106,18 +106,18 @@ namespace ortc #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackSubscriberForMediaStreamTrack #pragma mark - virtual PUID getID() const override { return id_; } + PUID getID() const override { return id_; } - virtual void shutdown() override; + void shutdown() override; - virtual void notifyChannel( - UseMediaChannelBasePtr mediaChannel, - ImmutableMediaChannelTracePtr trace - ) override; + void notifyChannel( + UseMediaChannelBasePtr mediaChannel, + ImmutableMediaChannelTracePtr trace + ) override; - virtual void notifyTrackMute(bool isMuted) override; - virtual void notifyTrackEnded() override; - virtual void notifyOverConstrained(OverconstrainedErrorPtr error) override; + void notifyTrackMute(bool isMuted) override; + void notifyTrackEnded() override; + void notifyOverConstrained(OverconstrainedErrorPtr error) override; //----------------------------------------------------------------------- #pragma mark @@ -144,7 +144,7 @@ namespace ortc #pragma mark MediaStreamTrackSubscriberRTP => IMediaStreamTrackChannelDelegate #pragma mark - virtual void notifyMediaChannelCancelled(ImmutableMediaChannelTracePtr trace) override; + void notifyMediaChannelCancelled(ImmutableMediaChannelTracePtr trace) override; //----------------------------------------------------------------------- #pragma mark @@ -152,15 +152,15 @@ namespace ortc #pragma mark - virtual void notifyMediaChannelAudioFrame( - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override; - virtual void notifyMediaChannelVideoFrame( - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override; - + void notifyMediaChannelAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + void notifyMediaChannelVideoFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + //----------------------------------------------------------------------- #pragma mark @@ -168,14 +168,14 @@ namespace ortc #pragma mark - virtual void notifyMediaChannelRTPPacket( - ImmutableMediaChannelTracePtr trace, - RTPPacketPtr packet - ) override; - virtual void notifyMediaChannelRTCPPacket( - ImmutableMediaChannelTracePtr trace, - RTPPacketPtr packet - ) override; + void notifyMediaChannelRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + void notifyMediaChannelRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_RTPDecoderAudio.h b/ortc/internal/ortc_RTPDecoderAudio.h index c9e5532f..43dd32c7 100644 --- a/ortc/internal/ortc_RTPDecoderAudio.h +++ b/ortc/internal/ortc_RTPDecoderAudio.h @@ -128,24 +128,24 @@ namespace ortc #pragma mark RTPDecoderAudio => IRTP #pragma mark - virtual RTPObjectID getID() const override { return id_; } - virtual void cancel() override; + RTPObjectID getID() const override { return id_; } + void cancel() override; - virtual States getState() const override; + States getState() const override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPDecoderAudio => IRTPDecoder #pragma mark - virtual void notifyRTPPacket( - ImmutableMediaChannelTracePtr trace, - RTPPacketPtr packet - ) override; - virtual void notifyRTCPPacket( - ImmutableMediaChannelTracePtr trace, - RTCPPacketPtr packet - ) override; + void notifyRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + void notifyRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) override; //----------------------------------------------------------------------- #pragma mark @@ -158,7 +158,7 @@ namespace ortc #pragma mark // (duplicate) virtual RTPObjectID getID() const = 0; - virtual void shutdown() override; + void shutdown() override; // (duplciate) virtual States getState() const override; @@ -177,28 +177,28 @@ namespace ortc #pragma mark RTPDecoderAudio => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPDecoderAudio => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPDecoderAudio => IRTPDecoderAysncDelegate #pragma mark - virtual void onRTPDecoderRTPPacket( - ImmutableMediaChannelTracePtr trace, - RTPPacketPtr packet - ) override; - virtual void onRTPDecoderRTCPPacket( - ImmutableMediaChannelTracePtr trace, - RTCPPacketPtr packet - ) override; + void onRTPDecoderRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + void onRTPDecoderRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_RTPDecoderVideo.h b/ortc/internal/ortc_RTPDecoderVideo.h index 2a3a0f01..564eee78 100644 --- a/ortc/internal/ortc_RTPDecoderVideo.h +++ b/ortc/internal/ortc_RTPDecoderVideo.h @@ -128,24 +128,24 @@ namespace ortc #pragma mark RTPDecoderVideo => IRTP #pragma mark - virtual RTPObjectID getID() const override { return id_; } - virtual void cancel() override; + RTPObjectID getID() const override { return id_; } + void cancel() override; - virtual States getState() const override; + States getState() const override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPDecoderVideo => IRTPDecoder #pragma mark - virtual void notifyRTPPacket( - ImmutableMediaChannelTracePtr trace, - RTPPacketPtr packet - ) override; - virtual void notifyRTCPPacket( - ImmutableMediaChannelTracePtr trace, - RTCPPacketPtr packet - ) override; + void notifyRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + void notifyRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) override; //----------------------------------------------------------------------- #pragma mark @@ -158,7 +158,7 @@ namespace ortc #pragma mark // (duplicate) virtual RTPObjectID getID() const = 0; - virtual void shutdown() override; + void shutdown() override; // (duplciate) virtual States getState() const override; @@ -177,28 +177,28 @@ namespace ortc #pragma mark RTPDecoderVideo => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPDecoderVideo => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPDecoderVideo => IRTPDecoderAysncDelegate #pragma mark - virtual void onRTPDecoderRTPPacket( - ImmutableMediaChannelTracePtr trace, - RTPPacketPtr packet - ) override; - virtual void onRTPDecoderRTCPPacket( - ImmutableMediaChannelTracePtr trace, - RTCPPacketPtr packet - ) override; + void onRTPDecoderRTPPacket( + ImmutableMediaChannelTracePtr trace, + RTPPacketPtr packet + ) override; + void onRTPDecoderRTCPPacket( + ImmutableMediaChannelTracePtr trace, + RTCPPacketPtr packet + ) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_RTPEncoderAudio.h b/ortc/internal/ortc_RTPEncoderAudio.h index 98f5624e..8c960677 100644 --- a/ortc/internal/ortc_RTPEncoderAudio.h +++ b/ortc/internal/ortc_RTPEncoderAudio.h @@ -128,24 +128,24 @@ namespace ortc #pragma mark RTPEncoderAudio => IRTP #pragma mark - virtual RTPObjectID getID() const override { return id_; } - virtual void cancel() override; + RTPObjectID getID() const override { return id_; } + void cancel() override; - virtual States getState() const override; + States getState() const override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPEncoderAudio => IRTPEncoder #pragma mark - virtual void notifyAudioFrame( - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override; - virtual void notifyVideoFrame( - ImmutableMediaChannelTracePtr trace, - VideoFramePtr frame - ) override {} + void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + void notifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override {} //----------------------------------------------------------------------- #pragma mark @@ -158,7 +158,7 @@ namespace ortc #pragma mark // (duplicate) virtual RTPObjectID getID() const = 0; - virtual void shutdown() override; + void shutdown() override; // (duplciate) virtual States getState() const override; @@ -177,28 +177,28 @@ namespace ortc #pragma mark RTPEncoderAudio => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPEncoderAudio => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPEncoderAudio => IRTPEncoderAysncDelegate #pragma mark - virtual void onRTPEncoderAudioFrame( - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override; - virtual void onRTPEncoderVideoFrame( - ImmutableMediaChannelTracePtr trace, - VideoFramePtr frame - ) override {} // ignored + void onRTPEncoderAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override; + void onRTPEncoderVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override {} // ignored protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_RTPEncoderVideo.h b/ortc/internal/ortc_RTPEncoderVideo.h index 0bacd478..52a7981c 100644 --- a/ortc/internal/ortc_RTPEncoderVideo.h +++ b/ortc/internal/ortc_RTPEncoderVideo.h @@ -129,24 +129,24 @@ namespace ortc #pragma mark RTPEncoderVideo => IRTP #pragma mark - virtual RTPObjectID getID() const override { return id_; } - virtual void cancel() override; + RTPObjectID getID() const override { return id_; } + void cancel() override; - virtual States getState() const override; + States getState() const override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPEncoderVideo => IRTPEncoder #pragma mark - virtual void notifyAudioFrame( - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override {} - virtual void notifyVideoFrame( - ImmutableMediaChannelTracePtr trace, - VideoFramePtr frame - ) override; + void notifyAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override {} + void notifyVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override; //----------------------------------------------------------------------- #pragma mark @@ -159,7 +159,7 @@ namespace ortc #pragma mark // (duplicate) virtual RTPObjectID getID() const = 0; - virtual void shutdown() override; + void shutdown() override; // (duplciate) virtual States getState() const override; @@ -178,28 +178,28 @@ namespace ortc #pragma mark RTPEncoderVideo => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPEncoderVideo => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPEncoderVideo => IRTPEncoderAysncDelegate #pragma mark - virtual void onRTPEncoderAudioFrame( - ImmutableMediaChannelTracePtr trace, - AudioFramePtr frame - ) override {} // ignored - virtual void onRTPEncoderVideoFrame( - ImmutableMediaChannelTracePtr trace, - VideoFramePtr frame - ) override; + void onRTPEncoderAudioFrame( + ImmutableMediaChannelTracePtr trace, + AudioFramePtr frame + ) override {} // ignored + void onRTPEncoderVideoFrame( + ImmutableMediaChannelTracePtr trace, + VideoFramePtr frame + ) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_RTPListener.h b/ortc/internal/ortc_RTPListener.h index 7cfcfeb6..21cc4c15 100644 --- a/ortc/internal/ortc_RTPListener.h +++ b/ortc/internal/ortc_RTPListener.h @@ -380,20 +380,20 @@ namespace ortc Optional headerExtensions ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IRTPListenerSubscriptionPtr subscribe(IRTPListenerDelegatePtr delegate) override; + IRTPListenerSubscriptionPtr subscribe(IRTPListenerDelegatePtr delegate) override; - virtual IRTPTransportPtr transport() const override; + IRTPTransportPtr transport() const override; - virtual void setHeaderExtensions(const HeaderExtensionParametersList &headerExtensions) override; + void setHeaderExtensions(const HeaderExtensionParametersList &headerExtensions) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPListener => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -406,12 +406,12 @@ namespace ortc static RTPListenerPtr create(IRTPTransportPtr transport); - virtual bool handleRTPPacket( - IICETypes::Components viaComponent, - IICETypes::Components packetType, - const BYTE *buffer, - size_t bufferLengthInBytes - ) override; + bool handleRTPPacket( + IICETypes::Components viaComponent, + IICETypes::Components packetType, + const BYTE *buffer, + size_t bufferLengthInBytes + ) override; //----------------------------------------------------------------------- #pragma mark @@ -422,23 +422,23 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual void registerReceiver( - Optional kind, - UseReceiverPtr inReceiver, - const Parameters &inParams, - RTCPPacketList *outPacketList = NULL - ) override; + void registerReceiver( + Optional kind, + UseReceiverPtr inReceiver, + const Parameters &inParams, + RTCPPacketList *outPacketList = NULL + ) override; - virtual void unregisterReceiver(UseReceiver &inReceiver) override; + void unregisterReceiver(UseReceiver &inReceiver) override; - virtual void getPackets(RTCPPacketList &outPacketList) override; + void getPackets(RTCPPacketList &outPacketList) override; - virtual void notifyUnhandled( - const String &muxID, - const String &rid, - IRTPTypes::SSRCType ssrc, - IRTPTypes::PayloadType payloadType - ) override; + void notifyUnhandled( + const String &muxID, + const String &rid, + IRTPTypes::SSRCType ssrc, + IRTPTypes::PayloadType payloadType + ) override; //----------------------------------------------------------------------- #pragma mark @@ -449,38 +449,38 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual void registerSender( - UseSenderPtr inSender, - const Parameters &inParams, - RTCPPacketList &outPacketList - ) override; + void registerSender( + UseSenderPtr inSender, + const Parameters &inParams, + RTCPPacketList &outPacketList + ) override; - virtual void unregisterSender(UseSender &inReceiver) override; + void unregisterSender(UseSender &inReceiver) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPListener => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPListener => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPListener => IRTPListenerAsyncDelegate #pragma mark - virtual void onDeliverPacket( - IICETypes::Components viaComponent, - UseRTPReceiverPtr receiver, - RTPPacketPtr packet - ) override; + void onDeliverPacket( + IICETypes::Components viaComponent, + UseRTPReceiverPtr receiver, + RTPPacketPtr packet + ) override; public: diff --git a/ortc/internal/ortc_RTPReceiver.h b/ortc/internal/ortc_RTPReceiver.h index f609c640..0cb8b69e 100644 --- a/ortc/internal/ortc_RTPReceiver.h +++ b/ortc/internal/ortc_RTPReceiver.h @@ -410,7 +410,7 @@ namespace ortc #pragma mark RTPReceiver => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -426,27 +426,27 @@ namespace ortc IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IRTPReceiverSubscriptionPtr subscribe(IRTPReceiverDelegatePtr delegate) override; + IRTPReceiverSubscriptionPtr subscribe(IRTPReceiverDelegatePtr delegate) override; - virtual ortc::IMediaStreamTrackPtr track() const override; - virtual IRTPTransportPtr transport() const override; - virtual IRTCPTransportPtr rtcpTransport() const override; + ortc::IMediaStreamTrackPtr track() const override; + IRTPTransportPtr transport() const override; + IRTCPTransportPtr rtcpTransport() const override; - virtual void setTransport( - IRTPTransportPtr transport, - IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() - ) override; + void setTransport( + IRTPTransportPtr transport, + IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() + ) override; static CapabilitiesPtr getCapabilities(Optional kind); - virtual PromisePtr receive(const Parameters ¶meters) override; - virtual void stop() override; + PromisePtr receive(const Parameters ¶meters) override; + void stop() override; - virtual ContributingSourceList getContributingSources() const override; + ContributingSourceList getContributingSources() const override; - virtual void requestSendCSRC(SSRCType csrc) override; + void requestSendCSRC(SSRCType csrc) override; //----------------------------------------------------------------------- #pragma mark @@ -457,15 +457,15 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual bool handlePacket( - IICETypes::Components viaTransport, - RTPPacketPtr packet - ) override; + bool handlePacket( + IICETypes::Components viaTransport, + RTPPacketPtr packet + ) override; - virtual bool handlePacket( - IICETypes::Components viaTransport, - RTCPPacketPtr packet - ) override; + bool handlePacket( + IICETypes::Components viaTransport, + RTCPPacketPtr packet + ) override; //----------------------------------------------------------------------- #pragma mark @@ -476,7 +476,7 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual bool sendPacket(RTCPPacketPtr packet) override; + bool sendPacket(RTCPPacketPtr packet) override; //----------------------------------------------------------------------- #pragma mark @@ -492,24 +492,24 @@ namespace ortc #pragma mark RTPReceiver => ISecureTransportDelegate #pragma mark - virtual void onSecureTransportStateChanged( - ISecureTransportPtr transport, - ISecureTransport::States state - ) override; + void onSecureTransportStateChanged( + ISecureTransportPtr transport, + ISecureTransport::States state + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPReceiver => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPReceiver => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_RTPReceiverChannel.h b/ortc/internal/ortc_RTPReceiverChannel.h index c16fab6c..9bcd08d5 100644 --- a/ortc/internal/ortc_RTPReceiverChannel.h +++ b/ortc/internal/ortc_RTPReceiverChannel.h @@ -285,21 +285,21 @@ namespace ortc const RTCPPacketList &packets ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual void notifyTransportState(ISecureTransportTypes::States state) override; + void notifyTransportState(ISecureTransportTypes::States state) override; - virtual void notifyPacket(RTPPacketPtr packet) override; + void notifyPacket(RTPPacketPtr packet) override; - virtual void notifyPackets(RTCPPacketListPtr packets) override; + void notifyPackets(RTCPPacketListPtr packets) override; - virtual void notifyUpdate(const Parameters ¶ms) override; + void notifyUpdate(const Parameters ¶ms) override; - virtual bool handlePacket(RTPPacketPtr packet) override; + bool handlePacket(RTPPacketPtr packet) override; - virtual bool handlePacket(RTCPPacketPtr packet) override; + bool handlePacket(RTCPPacketPtr packet) override; - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; + void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; //----------------------------------------------------------------------- #pragma mark @@ -310,12 +310,12 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual int32_t getAudioSamples( - const size_t numberOfSamples, - const uint8_t numberOfChannels, - void *audioSamples, - size_t& numberOfSamplesOut - ) override; + int32_t getAudioSamples( + const size_t numberOfSamples, + const uint8_t numberOfChannels, + void *audioSamples, + size_t& numberOfSamplesOut + ) override; //----------------------------------------------------------------------- #pragma mark @@ -324,7 +324,7 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual bool sendPacket(RTCPPacketPtr packet) override; + bool sendPacket(RTCPPacketPtr packet) override; //----------------------------------------------------------------------- #pragma mark @@ -341,27 +341,27 @@ namespace ortc #pragma mark RTPReceiverChannel => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPReceiverChannel => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPReceiverChannel => IRTPReceiverChannelAsyncDelegate #pragma mark - virtual void onSecureTransportState(ISecureTransport::States state) override; + void onSecureTransportState(ISecureTransport::States state) override; - virtual void onNotifyPacket(RTPPacketPtr packet) override; + void onNotifyPacket(RTPPacketPtr packet) override; - virtual void onNotifyPackets(RTCPPacketListPtr packets) override; + void onNotifyPackets(RTCPPacketListPtr packets) override; - virtual void onUpdate(ParametersPtr params) override; + void onUpdate(ParametersPtr params) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_RTPSender.h b/ortc/internal/ortc_RTPSender.h index b6fbfcee..0af38d75 100644 --- a/ortc/internal/ortc_RTPSender.h +++ b/ortc/internal/ortc_RTPSender.h @@ -145,7 +145,7 @@ namespace ortc static ElementPtr toDebug(ForDTMFSenderPtr transport); - virtual IDTMFSenderSubscriptionPtr subscribe(IDTMFSenderDelegatePtr delegate) override { return subscribeDTMF(delegate); } + IDTMFSenderSubscriptionPtr subscribe(IDTMFSenderDelegatePtr delegate) override { return subscribeDTMF(delegate); } virtual IDTMFSenderSubscriptionPtr subscribeDTMF(IDTMFSenderDelegatePtr delegate) = 0; }; @@ -322,7 +322,7 @@ namespace ortc #pragma mark RTPSender => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -338,24 +338,24 @@ namespace ortc IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IRTPSenderSubscriptionPtr subscribe(IRTPSenderDelegatePtr delegate) override; + IRTPSenderSubscriptionPtr subscribe(IRTPSenderDelegatePtr delegate) override; - virtual ortc::IMediaStreamTrackPtr track() const override; - virtual IRTPTransportPtr transport() const override; - virtual IRTCPTransportPtr rtcpTransport() const override; + ortc::IMediaStreamTrackPtr track() const override; + IRTPTransportPtr transport() const override; + IRTCPTransportPtr rtcpTransport() const override; virtual void setTransport( IRTPTransportPtr transport, IRTCPTransportPtr rtcpTransport = IRTCPTransportPtr() ) override; - virtual PromisePtr setTrack(ortc::IMediaStreamTrackPtr track) override; + PromisePtr setTrack(ortc::IMediaStreamTrackPtr track) override; static CapabilitiesPtr getCapabilities(Optional kind); - virtual PromisePtr send(const Parameters ¶meters) override; - virtual void stop() override; + PromisePtr send(const Parameters ¶meters) override; + void stop() override; //----------------------------------------------------------------------- @@ -381,8 +381,8 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual bool sendPacket(RTPPacketPtr packet) override; - virtual bool sendPacket(RTCPPacketPtr packet) override; + bool sendPacket(RTPPacketPtr packet) override; + bool sendPacket(RTCPPacketPtr packet) override; virtual void notifyConflict( UseChannelPtr channel, @@ -390,7 +390,7 @@ namespace ortc bool selfDestruct ) override; - virtual void notifyDTMFSenderToneChanged(const char *tone) override; + void notifyDTMFSenderToneChanged(const char *tone) override; //----------------------------------------------------------------------- #pragma mark @@ -410,9 +410,9 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual IDTMFSenderSubscriptionPtr subscribeDTMF(IDTMFSenderDelegatePtr delegate) override; + IDTMFSenderSubscriptionPtr subscribeDTMF(IDTMFSenderDelegatePtr delegate) override; - virtual bool canInsertDTMF() const override; + bool canInsertDTMF() const override; virtual void insertDTMF( const char *tones, @@ -423,45 +423,45 @@ namespace ortc InvalidCharacterError ) override; - virtual IRTPSenderPtr sender() const override; + IRTPSenderPtr sender() const override; - virtual String toneBuffer() const override; - virtual Milliseconds duration() const override; - virtual Milliseconds interToneGap() const override; + String toneBuffer() const override; + Milliseconds duration() const override; + Milliseconds interToneGap() const override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPReceiver => ISecureTransportDelegate #pragma mark - virtual void onSecureTransportStateChanged( - ISecureTransportPtr transport, - ISecureTransport::States state - ) override; + void onSecureTransportStateChanged( + ISecureTransportPtr transport, + ISecureTransport::States state + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPSender => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPSender => IDTMFSenderDelegate #pragma mark - virtual void onDTMFSenderToneChanged( - IDTMFSenderPtr sender, - String tone - ) override; + void onDTMFSenderToneChanged( + IDTMFSenderPtr sender, + String tone + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPSender => IRTPSenderAsyncDelegate #pragma mark - virtual void onDestroyChannel(UseChannelPtr channel) override; + void onDestroyChannel(UseChannelPtr channel) override; //----------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_RTPSenderChannel.h b/ortc/internal/ortc_RTPSenderChannel.h index 15d19bc0..6cfea5d8 100644 --- a/ortc/internal/ortc_RTPSenderChannel.h +++ b/ortc/internal/ortc_RTPSenderChannel.h @@ -329,19 +329,19 @@ namespace ortc const Parameters ¶ms ); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual void notifyTrackChanged(MediaStreamTrackPtr track) override; + void notifyTrackChanged(MediaStreamTrackPtr track) override; - virtual void notifyTransportState(ISecureTransportTypes::States state) override; + void notifyTransportState(ISecureTransportTypes::States state) override; - virtual void notifyPackets(RTCPPacketListPtr packets) override; + void notifyPackets(RTCPPacketListPtr packets) override; - virtual void notifyUpdate(const Parameters ¶ms) override; + void notifyUpdate(const Parameters ¶ms) override; - virtual bool handlePacket(RTCPPacketPtr packet) override; + bool handlePacket(RTCPPacketPtr packet) override; - virtual void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; + void requestStats(PromiseWithStatsReportPtr promise, const StatsTypeSet &stats) override; virtual void insertDTMF( const char *tones, @@ -349,9 +349,9 @@ namespace ortc Milliseconds interToneGap ) override; - virtual String toneBuffer() const override; - virtual Milliseconds duration() const override; - virtual Milliseconds interToneGap() const override; + String toneBuffer() const override; + Milliseconds duration() const override; + Milliseconds interToneGap() const override; //----------------------------------------------------------------------- #pragma mark @@ -360,16 +360,16 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual bool sendPacket(RTPPacketPtr packet) override; + bool sendPacket(RTPPacketPtr packet) override; - virtual bool sendPacket(RTCPPacketPtr packet) override; + bool sendPacket(RTCPPacketPtr packet) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPSenderChannel => IRTPSenderChannelForRTPSenderChannelAudio #pragma mark - virtual void notifyDTMFSenderToneChanged(const char *tone) override; + void notifyDTMFSenderToneChanged(const char *tone) override; //----------------------------------------------------------------------- #pragma mark @@ -385,40 +385,40 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual int32_t sendAudioSamples( - const void* audioSamples, - const size_t numberOfSamples, - const uint8_t numberOfChannels - ) override; + int32_t sendAudioSamples( + const void* audioSamples, + const size_t numberOfSamples, + const uint8_t numberOfChannels + ) override; - virtual void sendVideoFrame(VideoFramePtr videoFrame) override; + void sendVideoFrame(VideoFramePtr videoFrame) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPSenderChannel => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPSenderChannel => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark RTPSenderChannel => IRTPSenderChannelAsyncDelegate #pragma mark - virtual void onTrackChanged(UseMediaStreamTrackPtr track) override; + void onTrackChanged(UseMediaStreamTrackPtr track) override; - virtual void onSecureTransportState(ISecureTransport::States state) override; + void onSecureTransportState(ISecureTransport::States state) override; - virtual void onNotifyPackets(RTCPPacketListPtr packets) override; + void onNotifyPackets(RTCPPacketListPtr packets) override; - virtual void onUpdate(ParametersPtr params) override; + void onUpdate(ParametersPtr params) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_SCTPTransport.h b/ortc/internal/ortc_SCTPTransport.h index 03a235dc..43be5f34 100644 --- a/ortc/internal/ortc_SCTPTransport.h +++ b/ortc/internal/ortc_SCTPTransport.h @@ -416,7 +416,7 @@ namespace ortc #pragma mark SCTPTransport => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -431,23 +431,23 @@ namespace ortc WORD localPort = 0 ) throw (InvalidParameters, InvalidStateError); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IDTLSTransportPtr transport() const override; - virtual ISCTPTransportTypes::States state() const override; + IDTLSTransportPtr transport() const override; + ISCTPTransportTypes::States state() const override; - virtual WORD port() const override; + WORD port() const override; - virtual WORD localPort() const override; - virtual Optional remotePort() const override; + WORD localPort() const override; + Optional remotePort() const override; virtual void start( const Capabilities &remoteCapabilities, WORD remotePort ) throw (InvalidStateError, InvalidParameters) override; - virtual void stop() override; + void stop() override; - virtual ISCTPTransportSubscriptionPtr subscribe(ISCTPTransportDelegatePtr delegate) override; + ISCTPTransportSubscriptionPtr subscribe(ISCTPTransportDelegatePtr delegate) override; //----------------------------------------------------------------------- @@ -457,29 +457,29 @@ namespace ortc // (duplciate) static ElementPtr toDebug(ForDataChannelPtr transport); - virtual void registerNewDataChannel( - UseDataChannelPtr &ioDataChannel, - WORD &ioSessionID - ) override; + void registerNewDataChannel( + UseDataChannelPtr &ioDataChannel, + WORD &ioSessionID + ) override; // (duplicate) virtual PUID getID() const = 0; - virtual ISCTPTransportForDataChannelSubscriptionPtr subscribe(ISCTPTransportForDataChannelDelegatePtr delegate) override; + ISCTPTransportForDataChannelSubscriptionPtr subscribe(ISCTPTransportForDataChannelDelegatePtr delegate) override; // (duplicate) virtual bool isShuttingDown() const override; // (duplicate) virtual bool isShutdown() const override; - virtual bool isReady() const override; + bool isReady() const override; - virtual void announceIncoming( - UseDataChannelPtr dataChannel, - ParametersPtr params - ) override; + void announceIncoming( + UseDataChannelPtr dataChannel, + ParametersPtr params + ) override; - virtual PromisePtr sendDataNow(SCTPPacketOutgoingPtr packet) override; + PromisePtr sendDataNow(SCTPPacketOutgoingPtr packet) override; - virtual void requestShutdown( - UseDataChannelPtr dataChannel, - WORD sessionID - ) override; + void requestShutdown( + UseDataChannelPtr dataChannel, + WORD sessionID + ) override; //----------------------------------------------------------------------- #pragma mark @@ -499,12 +499,12 @@ namespace ortc // WORD remotePort // ) throw (InvalidStateError, InvalidParameters) = 0; - virtual bool handleDataPacket( - const BYTE *buffer, - size_t bufferLengthInBytes - ) override; + bool handleDataPacket( + const BYTE *buffer, + size_t bufferLengthInBytes + ) override; - virtual void notifyShutdown() override; + void notifyShutdown() override; // (duplicate) virtual bool isShuttingDown() const = 0; // (duplicate) virtual bool isShutdown() const = 0; @@ -514,42 +514,42 @@ namespace ortc #pragma mark SCTPTransport => friend SCTPInit #pragma mark - virtual bool notifySendSCTPPacket( - const BYTE *buffer, - size_t bufferLengthInBytes - ); + bool notifySendSCTPPacket( + const BYTE *buffer, + size_t bufferLengthInBytes + ); //----------------------------------------------------------------------- #pragma mark #pragma mark SCTPTransport => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark SCTPTransport => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark #pragma mark SCTPTransport => ISCTPTransportAsyncDelegate #pragma mark - virtual void onIncomingPacket(SCTPPacketIncomingPtr packet) override; - virtual void onNotifiedToShutdown() override; + void onIncomingPacket(SCTPPacketIncomingPtr packet) override; + void onNotifiedToShutdown() override; //----------------------------------------------------------------------- #pragma mark #pragma mark SCTPTransport => ISecureTransportDelegate #pragma mark - virtual void onSecureTransportStateChanged( - ISecureTransportPtr transport, - ISecureTransportTypes::States state - ) override; + void onSecureTransportStateChanged( + ISecureTransportPtr transport, + ISecureTransportTypes::States state + ) override; //----------------------------------------------------------------------- #pragma mark @@ -720,7 +720,7 @@ ZS_DECLARE_TEAR_AWAY_METHOD_CONST_RETURN_0(state, States) ZS_DECLARE_TEAR_AWAY_METHOD_CONST_RETURN_0(port, WORD) ZS_DECLARE_TEAR_AWAY_METHOD_CONST_RETURN_0(localPort, WORD) ZS_DECLARE_TEAR_AWAY_METHOD_CONST_RETURN_0(remotePort, Optional) - virtual void start(const Capabilities & v1, WORD v2) throw (ortc::InvalidStateError, ortc::InvalidParameters) override { + void start(const Capabilities & v1, WORD v2) throw (ortc::InvalidStateError, ortc::InvalidParameters) override { getDelegate()->start(v1, v2); } ZS_DECLARE_TEAR_AWAY_METHOD_0(stop) diff --git a/ortc/internal/ortc_SCTPTransportListener.h b/ortc/internal/ortc_SCTPTransportListener.h index 3c8ed827..2a8b96a5 100644 --- a/ortc/internal/ortc_SCTPTransportListener.h +++ b/ortc/internal/ortc_SCTPTransportListener.h @@ -234,30 +234,30 @@ namespace ortc #pragma mark SCTPTransport => ISCTPTransportListenerForSCTPTransport #pragma mark - virtual PUID getID() const override {return mID;} - - virtual WORD allocateLocalPort() override; - virtual void deallocateLocalPort(WORD previouslyAllocatedLocalPort) override; - - virtual void registerNewTransport( - IDTLSTransportPtr dtlsTransport, - UseSCTPTransportPtr &ioTransport, - WORD &ioLocalPort, - bool localPortWasPreallocated, - WORD &ioRemotePort - ) override; - - virtual void announceTransport( - UseSCTPTransportPtr transport, - WORD localPort, - WORD remotePort - ) override; - - virtual void notifyShutdown( - UseSCTPTransport &transport, - WORD localPort, - WORD remotePort - ) override; + PUID getID() const override {return mID;} + + WORD allocateLocalPort() override; + void deallocateLocalPort(WORD previouslyAllocatedLocalPort) override; + + void registerNewTransport( + IDTLSTransportPtr dtlsTransport, + UseSCTPTransportPtr &ioTransport, + WORD &ioLocalPort, + bool localPortWasPreallocated, + WORD &ioRemotePort + ) override; + + void announceTransport( + UseSCTPTransportPtr transport, + WORD localPort, + WORD remotePort + ) override; + + void notifyShutdown( + UseSCTPTransport &transport, + WORD localPort, + WORD remotePort + ) override; //----------------------------------------------------------------------- #pragma mark @@ -270,10 +270,10 @@ namespace ortc static ForSecureTransportPtr create(UseSecureTransportPtr transport); - virtual bool handleDataPacket( - const BYTE *buffer, - size_t bufferLengthInBytes - ) override; + bool handleDataPacket( + const BYTE *buffer, + size_t bufferLengthInBytes + ) override; //----------------------------------------------------------------------- #pragma mark @@ -285,7 +285,7 @@ namespace ortc #pragma mark SCTPTransportListener => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_SRTPSDESTransport.h b/ortc/internal/ortc_SRTPSDESTransport.h index 82566aaa..74b6db73 100644 --- a/ortc/internal/ortc_SRTPSDESTransport.h +++ b/ortc/internal/ortc_SRTPSDESTransport.h @@ -141,7 +141,7 @@ namespace ortc #pragma mark SRTPSDESTransport => IStatsProvider #pragma mark - virtual PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; + PromiseWithStatsReportPtr getStats(const StatsTypeSet &stats = StatsTypeSet()) const override; //----------------------------------------------------------------------- #pragma mark @@ -159,16 +159,16 @@ namespace ortc static SRTPSDESTransportPtr convert(IRTPTransportPtr rtpTransport); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual ISRTPSDESTransportSubscriptionPtr subscribe(ISRTPSDESTransportDelegatePtr delegate) override; + ISRTPSDESTransportSubscriptionPtr subscribe(ISRTPSDESTransportDelegatePtr delegate) override; - virtual IICETransportPtr transport() const override; - virtual IICETransportPtr rtcpTransport() const override; + IICETransportPtr transport() const override; + IICETransportPtr rtcpTransport() const override; static ParametersPtr getLocalParameters(); - virtual void stop() override; + void stop() override; //----------------------------------------------------------------------- #pragma mark @@ -186,9 +186,9 @@ namespace ortc // (duplicate) virtual PUID getID() const; - virtual ISecureTransportSubscriptionPtr subscribe(ISecureTransportDelegatePtr delegate) override; + ISecureTransportSubscriptionPtr subscribe(ISecureTransportDelegatePtr delegate) override; - virtual ISecureTransportTypes::States state(ISecureTransportTypes::States ignored) const override; + ISecureTransportTypes::States state(ISecureTransportTypes::States ignored) const override; virtual bool sendPacket( IICETypes::Components sendOverICETransport, @@ -197,7 +197,7 @@ namespace ortc size_t bufferLengthInBytes ) override; - virtual IICETransportPtr getICETransport() const override; + IICETransportPtr getICETransport() const override; //----------------------------------------------------------------------- #pragma mark @@ -229,20 +229,20 @@ namespace ortc // (duplicate) virtual PUID getID() const; - virtual void notifyAssociateTransportCreated( - IICETypes::Components associatedComponent, - ICETransportPtr assoicated - ) override; - - virtual bool handleReceivedPacket( - IICETypes::Components viaTransport, - const BYTE *buffer, - size_t bufferLengthInBytes - ) override; - virtual void handleReceivedSTUNPacket( - IICETypes::Components viaComponent, - STUNPacketPtr packet - ) override; + void notifyAssociateTransportCreated( + IICETypes::Components associatedComponent, + ICETransportPtr assoicated + ) override; + + bool handleReceivedPacket( + IICETypes::Components viaTransport, + const BYTE *buffer, + size_t bufferLengthInBytes + ) override; + void handleReceivedSTUNPacket( + IICETypes::Components viaComponent, + STUNPacketPtr packet + ) override; //----------------------------------------------------------------------- #pragma mark @@ -253,19 +253,19 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual bool sendEncryptedPacket( - IICETypes::Components sendOverICETransport, - IICETypes::Components packetType, - const BYTE *buffer, - size_t bufferLengthInBytes - ) override; + bool sendEncryptedPacket( + IICETypes::Components sendOverICETransport, + IICETypes::Components packetType, + const BYTE *buffer, + size_t bufferLengthInBytes + ) override; - virtual bool handleReceivedDecryptedPacket( - IICETypes::Components viaTransport, - IICETypes::Components packetType, - const BYTE *buffer, - size_t bufferLengthInBytes - ) override; + bool handleReceivedDecryptedPacket( + IICETypes::Components viaTransport, + IICETypes::Components packetType, + const BYTE *buffer, + size_t bufferLengthInBytes + ) override; //----------------------------------------------------------------------- #pragma mark @@ -276,7 +276,7 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - virtual RTPListenerPtr getListener() const override; + RTPListenerPtr getListener() const override; //----------------------------------------------------------------------- #pragma mark @@ -290,42 +290,42 @@ namespace ortc #pragma mark SRTPSDESTransport => ISRTPSDESTransportAsyncDelegate #pragma mark - virtual void onAttachRTCP() override; + void onAttachRTCP() override; //----------------------------------------------------------------------- #pragma mark #pragma mark SRTPSDESTransport => ISRTPTransportDelegate #pragma mark - virtual void onSRTPTransportLifetimeRemaining( - ISRTPTransportPtr transport, - ULONG leastLifetimeRemainingPercentageForAllKeys, - ULONG overallLifetimeRemainingPercentage - ) override; + void onSRTPTransportLifetimeRemaining( + ISRTPTransportPtr transport, + ULONG leastLifetimeRemainingPercentageForAllKeys, + ULONG overallLifetimeRemainingPercentage + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark SRTPSDESTransport => IICETransportDelegate #pragma mark - virtual void onICETransportStateChange( - IICETransportPtr transport, - IICETransport::States state - ) override; - - virtual void onICETransportCandidatePairAvailable( - IICETransportPtr transport, - CandidatePairPtr candidatePair - ) override; - virtual void onICETransportCandidatePairGone( - IICETransportPtr transport, - CandidatePairPtr candidatePair - ) override; - - virtual void onICETransportCandidatePairChanged( - IICETransportPtr transport, - CandidatePairPtr candidatePair - ) override; + void onICETransportStateChange( + IICETransportPtr transport, + IICETransport::States state + ) override; + + void onICETransportCandidatePairAvailable( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; + void onICETransportCandidatePairGone( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; + + void onICETransportCandidatePairChanged( + IICETransportPtr transport, + CandidatePairPtr candidatePair + ) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/internal/ortc_SRTPTransport.h b/ortc/internal/ortc_SRTPTransport.h index 12984715..23612e94 100644 --- a/ortc/internal/ortc_SRTPTransport.h +++ b/ortc/internal/ortc_SRTPTransport.h @@ -217,36 +217,36 @@ namespace ortc const CryptoParameters &decryptParameters ) throw(InvalidParameters); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual ISRTPTransportSubscriptionPtr subscribe(ISRTPTransportDelegatePtr delegate) override; + ISRTPTransportSubscriptionPtr subscribe(ISRTPTransportDelegatePtr delegate) override; - virtual bool handleReceivedPacket( - IICETypes::Components viaTransport, - const BYTE *buffer, - size_t bufferLengthInBytes - ) override; + bool handleReceivedPacket( + IICETypes::Components viaTransport, + const BYTE *buffer, + size_t bufferLengthInBytes + ) override; - virtual bool sendPacket( - IICETypes::Components sendOverICETransport, - IICETypes::Components component, - const BYTE *buffer, - size_t bufferLengthInBytes - ) override; + bool sendPacket( + IICETypes::Components sendOverICETransport, + IICETypes::Components component, + const BYTE *buffer, + size_t bufferLengthInBytes + ) override; //----------------------------------------------------------------------- #pragma mark #pragma mark SRTPTransport => IWakeDelegate #pragma mark - virtual void onWake() override; + void onWake() override; //----------------------------------------------------------------------- #pragma mark #pragma mark SRTPTransport => ITimerDelegate #pragma mark - virtual void onTimer(ITimerPtr timer) override; + void onTimer(ITimerPtr timer) override; //----------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_StatsReport.h b/ortc/internal/ortc_StatsReport.h index 772277c8..a8cf0e07 100644 --- a/ortc/internal/ortc_StatsReport.h +++ b/ortc/internal/ortc_StatsReport.h @@ -143,10 +143,10 @@ namespace ortc static ElementPtr toDebug(StatsReportPtr report); - virtual PUID getID() const override {return mID;} + PUID getID() const override {return mID;} - virtual IDListPtr getStatesIDs() const override; - virtual StatsPtr getStats(const char *id) const override; + IDListPtr getStatesIDs() const override; + StatsPtr getStats(const char *id) const override; //----------------------------------------------------------------------- #pragma mark @@ -165,7 +165,7 @@ namespace ortc #pragma mark StatsReport => IPromiseSettledDelegate #pragma mark - virtual void onPromiseSettled(PromisePtr promise) override; + void onPromiseSettled(PromisePtr promise) override; protected: //----------------------------------------------------------------------- diff --git a/ortc/types.h b/ortc/types.h index a8524753..8f9ce745 100644 --- a/ortc/types.h +++ b/ortc/types.h @@ -92,8 +92,8 @@ namespace ortc ErrorAny(WORD errorCode, const char *reason, const char *name = NULL) : mErrorCode(errorCode), - mReason(reason), - mName(name) {} + mName(name), + mReason(reason) {} static ErrorAnyPtr create(WORD errorCode, const char *reason, const char *name = NULL) { return make_shared(errorCode, reason, name); } }; From 77c33b27ec47cccd7b7617ddea987af9f043a11d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 28 Sep 2017 10:37:57 -0400 Subject: [PATCH 137/187] - fixed linking issues with latest ortc lib code --- BUILD.gn | 1 + ortc/IRTPTypes.h | 11 +- ortc/cpp/ortc_MediaDevice.cpp | 1 + ortc/cpp/ortc_MediaDevices.cpp | 13 ++ ortc/cpp/ortc_ORTC.cpp | 8 - ortc/cpp/ortc_RTP.cpp | 89 +++++++++ ortc/cpp/ortc_RTPDecoderAudio.cpp | 2 +- ortc/cpp/ortc_RTPDecoderVideo.cpp | 2 +- ortc/cpp/ortc_RTPEncoderAudio.cpp | 2 +- ortc/cpp/ortc_RTPEncoderVideo.cpp | 2 +- ortc/cpp/ortc_RTPTypes.cpp | 239 +++++++++++++----------- ortc/internal/ortc_IMediaDeviceRender.h | 2 - ortc/internal/ortc_IRTP.h | 3 +- 13 files changed, 250 insertions(+), 125 deletions(-) create mode 100644 ortc/cpp/ortc_RTP.cpp diff --git a/BUILD.gn b/BUILD.gn index e19af3db..d585a194 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -131,6 +131,7 @@ ortclib_sources = [ "ortc/cpp/ortc_MediaEngine.cpp", "ortc/cpp/ortc_MediaStreamTrack.cpp", "ortc/cpp/ortc_ORTC.cpp", + "ortc/cpp/ortc_RTP.cpp", "ortc/cpp/ortc_RTCPPacket.cpp", "ortc/cpp/ortc_RTPDecoderAudio.cpp", "ortc/cpp/ortc_RTPDecoderVideo.cpp", diff --git a/ortc/IRTPTypes.h b/ortc/IRTPTypes.h index a9102613..63ea1ed6 100644 --- a/ortc/IRTPTypes.h +++ b/ortc/IRTPTypes.h @@ -485,15 +485,16 @@ namespace ortc CodecParameters() {} CodecParameters(const CodecParameters &source); CodecParameters(ElementPtr elem); -#if __APPLE__ - CodecParameters &operator=(const CodecParameters &op2) = default; -#else - CodecParameters &operator=(const CodecParameters &op2) /*= delete*/; -#endif + + CodecParameters &operator=(const CodecParameters &op2); + ElementPtr createElement(const char *objectName) const; ElementPtr toDebug() const; String hash() const; + + protected: + void copyAny(const CodecParameters &op2); }; //------------------------------------------------------------------------- diff --git a/ortc/cpp/ortc_MediaDevice.cpp b/ortc/cpp/ortc_MediaDevice.cpp index c06d1790..11da4fde 100644 --- a/ortc/cpp/ortc_MediaDevice.cpp +++ b/ortc/cpp/ortc_MediaDevice.cpp @@ -361,4 +361,5 @@ namespace ortc } } // internal namespace + } diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index c1f4389c..1db30d1c 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -739,6 +739,13 @@ namespace ortc return internal::MediaDevices::enumerateDevices(); } + //------------------------------------------------------------------------- + IMediaDevicesTypes::PromiseWithSettingsListPtr IMediaDevicesFactory::enumerateDefaultModes(const char *deviceID) + { + if (this) {} + return internal::MediaDevices::enumerateDefaultModes(deviceID); + } + //------------------------------------------------------------------------- IMediaDevicesTypes::PromiseWithMediaStreamTrackListPtr IMediaDevicesFactory::getUserMedia(const Constraints &constraints) { @@ -1178,6 +1185,12 @@ namespace ortc return internal::IMediaDevicesFactory::singleton().enumerateDevices(); } + //--------------------------------------------------------------------------- + IMediaDevices::PromiseWithSettingsListPtr IMediaDevices::enumerateDefaultModes(const char *deviceID) + { + return internal::IMediaDevicesFactory::singleton().enumerateDefaultModes(deviceID); + } + //--------------------------------------------------------------------------- IMediaDevicesTypes::PromiseWithMediaStreamTrackListPtr IMediaDevices::getUserMedia(const Constraints &constraints) { diff --git a/ortc/cpp/ortc_ORTC.cpp b/ortc/cpp/ortc_ORTC.cpp index 20e37708..4b02e8e5 100644 --- a/ortc/cpp/ortc_ORTC.cpp +++ b/ortc/cpp/ortc_ORTC.cpp @@ -76,13 +76,9 @@ namespace ortc void installRTPEncoderVideoSettingsDefaults(); void installMediaEngineSettingsDefaults(); void installRTPReceiverSettingsDefaults(); - void installRTPReceiverChannelAudioSettingsDefaults(); void installRTPReceiverChannelSettingsDefaults(); - void installRTPReceiverChannelVideoSettingsDefaults(); void installRTPSenderSettingsDefaults(); void installRTPSenderChannelSettingsDefaults(); - void installRTPSenderChannelAudioSettingsDefaults(); - void installRTPSenderChannelVideoSettingsDefaults(); void installStatsReportSettingsDefaults(); void installSCTPTransportSettingsDefaults(); void installSCTPTransportListenerSettingsDefaults(); @@ -112,13 +108,9 @@ namespace ortc installRTPEncoderVideoSettingsDefaults(); installMediaEngineSettingsDefaults(); installRTPReceiverSettingsDefaults(); - installRTPReceiverChannelAudioSettingsDefaults(); installRTPReceiverChannelSettingsDefaults(); - installRTPReceiverChannelVideoSettingsDefaults(); installRTPSenderSettingsDefaults(); installRTPSenderChannelSettingsDefaults(); - installRTPSenderChannelAudioSettingsDefaults(); - installRTPSenderChannelVideoSettingsDefaults(); installStatsReportSettingsDefaults(); installSCTPTransportSettingsDefaults(); installSCTPTransportListenerSettingsDefaults(); diff --git a/ortc/cpp/ortc_RTP.cpp b/ortc/cpp/ortc_RTP.cpp new file mode 100644 index 00000000..5d693afe --- /dev/null +++ b/ortc/cpp/ortc_RTP.cpp @@ -0,0 +1,89 @@ +/* + + Copyright (c) 2015, Hookflash Inc. / Hookflash Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. + + */ + +#include +#include +#include + +#ifdef _DEBUG +#define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) +#else +#define ASSERT(x) +#endif //_DEBUG + +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } + +namespace ortc +{ + namespace internal + { + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTP + #pragma mark + + //------------------------------------------------------------------------- + const char *IRTP::toString(States state) + { + switch (state) { + case State_Pending: return "pending"; + case State_Ready: return "ready"; + case State_ShuttingDown: return "shutting down"; + case State_Shutdown: return "shutdown"; + } + return "UNDEFINED"; + } + //------------------------------------------------------------------------- + IRTP::States IRTP::toState(const char *stateStr) throw (InvalidParameters) + { + String str(stateStr); + for (IRTP::States index = IRTP::State_First; index <= IRTP::State_Last; index = static_cast(static_cast::type>(index) + 1)) { + if (0 == str.compareNoCase(IRTP::toString(index))) return index; + } + + ORTC_THROW_INVALID_PARAMETERS("Invalid parameter value: " + str) + return IRTP::State_First; + } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark IRTPForMediaEngine + #pragma mark + + } // namespace internal + +} diff --git a/ortc/cpp/ortc_RTPDecoderAudio.cpp b/ortc/cpp/ortc_RTPDecoderAudio.cpp index c608827f..ac8c97a5 100644 --- a/ortc/cpp/ortc_RTPDecoderAudio.cpp +++ b/ortc/cpp/ortc_RTPDecoderAudio.cpp @@ -48,7 +48,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPDecoderVideo.cpp b/ortc/cpp/ortc_RTPDecoderVideo.cpp index 2f22fcdf..7e0b3ffc 100644 --- a/ortc/cpp/ortc_RTPDecoderVideo.cpp +++ b/ortc/cpp/ortc_RTPDecoderVideo.cpp @@ -48,7 +48,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPEncoderAudio.cpp b/ortc/cpp/ortc_RTPEncoderAudio.cpp index f2ae8fb6..ccd2adac 100644 --- a/ortc/cpp/ortc_RTPEncoderAudio.cpp +++ b/ortc/cpp/ortc_RTPEncoderAudio.cpp @@ -48,7 +48,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPEncoderVideo.cpp b/ortc/cpp/ortc_RTPEncoderVideo.cpp index ceddfe0a..7a4fb844 100644 --- a/ortc/cpp/ortc_RTPEncoderVideo.cpp +++ b/ortc/cpp/ortc_RTPEncoderVideo.cpp @@ -48,7 +48,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaEngine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPTypes.cpp b/ortc/cpp/ortc_RTPTypes.cpp index c16d5a7e..f0249765 100644 --- a/ortc/cpp/ortc_RTPTypes.cpp +++ b/ortc/cpp/ortc_RTPTypes.cpp @@ -2441,61 +2441,66 @@ namespace ortc //--------------------------------------------------------------------------- void IRTPTypes::CodecCapability::copyAny(const CodecCapability &source) - { - if ((source.mParameters) || - (source.mOptions)) { - SupportedCodecs supported = toSupportedCodec(source.mName); - if (source.mParameters) { - switch (supported) { - case SupportedCodec_Opus: { - auto codec = OpusCodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = OpusCodecCapabilityParameters::create(*codec); - } - break; + { + mParameters.reset(); + mOptions.reset(); + + if ((!source.mParameters) && + (!source.mOptions)) { + return; + } + + SupportedCodecs supported = toSupportedCodec(source.mName); + if (source.mParameters) { + switch (supported) { + case SupportedCodec_Opus: { + auto codec = OpusCodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = OpusCodecCapabilityParameters::create(*codec); } - case SupportedCodec_VP8: { - auto codec = VP8CodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = VP8CodecCapabilityParameters::create(*codec); - } - break; + break; + } + case SupportedCodec_VP8: { + auto codec = VP8CodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = VP8CodecCapabilityParameters::create(*codec); } - case SupportedCodec_H264: { - auto codec = H264CodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = H264CodecCapabilityParameters::create(*codec); - } - break; + break; + } + case SupportedCodec_H264: { + auto codec = H264CodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = H264CodecCapabilityParameters::create(*codec); } - case SupportedCodec_RTX: { - auto codec = RTXCodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = RTXCodecCapabilityParameters::create(*codec); - } - break; + break; + } + case SupportedCodec_RTX: { + auto codec = RTXCodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = RTXCodecCapabilityParameters::create(*codec); } - case SupportedCodec_FlexFEC: { - auto codec = FlexFECCodecCapabilityParameters::convert(source.mParameters); - if (codec) { - mParameters = FlexFECCodecCapabilityParameters::create(*codec); - } - break; + break; + } + case SupportedCodec_FlexFEC: { + auto codec = FlexFECCodecCapabilityParameters::convert(source.mParameters); + if (codec) { + mParameters = FlexFECCodecCapabilityParameters::create(*codec); } - default: break; + break; } + default: break; } - if (source.mOptions) { - switch (supported) { - case SupportedCodec_Opus: { - auto codec = OpusCodecCapabilityOptions::convert(source.mOptions); - if (codec) { - mOptions = OpusCodecCapabilityOptions::create(*codec); - } - break; + } + if (source.mOptions) { + switch (supported) { + case SupportedCodec_Opus: { + auto codec = OpusCodecCapabilityOptions::convert(source.mOptions); + if (codec) { + mOptions = OpusCodecCapabilityOptions::create(*codec); } - default: break; + break; } + default: break; } } } @@ -3482,6 +3487,20 @@ namespace ortc #pragma mark IRTPTypes::CodecParameters #pragma mark + + //--------------------------------------------------------------------------- + IRTPTypes::CodecParameters::CodecParameters(const CodecParameters &source) : + mName(source.mName), + mPayloadType(source.mPayloadType), + mClockRate(source.mClockRate), + mPTime(source.mPTime), + mMaxPTime(source.mMaxPTime), + mNumChannels(source.mNumChannels), + mRTCPFeedback(source.mRTCPFeedback) + { + copyAny(source); + } + //--------------------------------------------------------------------------- IRTPTypes::CodecParameters::CodecParameters(ElementPtr elem) { @@ -3541,6 +3560,20 @@ namespace ortc } } + //--------------------------------------------------------------------------- + IRTPTypes::CodecParameters &IRTPTypes::CodecParameters::operator=(const CodecParameters &source) + { + mName = source.mName; + mPayloadType = source.mPayloadType; + mClockRate = source.mClockRate; + mPTime = source.mPTime; + mMaxPTime = source.mMaxPTime; + mNumChannels = source.mNumChannels; + mRTCPFeedback = source.mRTCPFeedback; + copyAny(source); + return *this; + } + //--------------------------------------------------------------------------- ElementPtr IRTPTypes::CodecParameters::createElement(const char *objectName) const { @@ -3620,65 +3653,6 @@ namespace ortc return elem; } - //--------------------------------------------------------------------------- - IRTPTypes::CodecParameters::CodecParameters(const CodecParameters &source) : - mName(source.mName), - mPayloadType(source.mPayloadType), - mClockRate(source.mClockRate), - mPTime(source.mPTime), - mMaxPTime(source.mMaxPTime), - mNumChannels(source.mNumChannels), - mRTCPFeedback(source.mRTCPFeedback) - { - if (source.mParameters) { - SupportedCodecs supported = toSupportedCodec(source.mName); - switch (supported) { - case SupportedCodec_Opus: { - auto codec = OpusCodecParameters::convert(source.mParameters); - if (codec) { - mParameters = OpusCodecParameters::create(*codec); - } - break; - } - case SupportedCodec_VP8: { - auto codec = VP8CodecParameters::convert(source.mParameters); - if (codec) { - mParameters = VP8CodecParameters::create(*codec); - } - break; - } - case SupportedCodec_H264: { - auto codec = H264CodecParameters::convert(source.mParameters); - if (codec) { - mParameters = H264CodecParameters::create(*codec); - } - break; - } - case SupportedCodec_RTX: { - auto codec = RTXCodecParameters::convert(source.mParameters); - if (codec) { - mParameters = RTXCodecParameters::create(*codec); - } - break; - } - case SupportedCodec_RED: { - auto codec = REDCodecParameters::convert(source.mParameters); - if (codec) { - mParameters = REDCodecParameters::create(*codec); - } - break; - } - case SupportedCodec_FlexFEC: { - auto codec = FlexFECCodecParameters::convert(source.mParameters); - if (codec) { - mParameters = FlexFECCodecParameters::create(*codec); - } - break; - } - default: break; - } - } - } //--------------------------------------------------------------------------- ElementPtr IRTPTypes::CodecParameters::toDebug() const @@ -3758,6 +3732,61 @@ namespace ortc return hasher->finalizeAsString(); } + //--------------------------------------------------------------------------- + void IRTPTypes::CodecParameters::copyAny(const CodecParameters &source) + { + mParameters.reset(); + + if (!source.mParameters) return; + + SupportedCodecs supported = toSupportedCodec(source.mName); + switch (supported) { + case SupportedCodec_Opus: { + auto codec = OpusCodecParameters::convert(source.mParameters); + if (codec) { + mParameters = OpusCodecParameters::create(*codec); + } + break; + } + case SupportedCodec_VP8: { + auto codec = VP8CodecParameters::convert(source.mParameters); + if (codec) { + mParameters = VP8CodecParameters::create(*codec); + } + break; + } + case SupportedCodec_H264: { + auto codec = H264CodecParameters::convert(source.mParameters); + if (codec) { + mParameters = H264CodecParameters::create(*codec); + } + break; + } + case SupportedCodec_RTX: { + auto codec = RTXCodecParameters::convert(source.mParameters); + if (codec) { + mParameters = RTXCodecParameters::create(*codec); + } + break; + } + case SupportedCodec_RED: { + auto codec = REDCodecParameters::convert(source.mParameters); + if (codec) { + mParameters = REDCodecParameters::create(*codec); + } + break; + } + case SupportedCodec_FlexFEC: { + auto codec = FlexFECCodecParameters::convert(source.mParameters); + if (codec) { + mParameters = FlexFECCodecParameters::create(*codec); + } + break; + } + default: break; + } + } + //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- diff --git a/ortc/internal/ortc_IMediaDeviceRender.h b/ortc/internal/ortc_IMediaDeviceRender.h index 2aff982e..2015306a 100644 --- a/ortc/internal/ortc_IMediaDeviceRender.h +++ b/ortc/internal/ortc_IMediaDeviceRender.h @@ -105,8 +105,6 @@ namespace ortc ImmutableMediaChannelTracePtr trace, VideoFramePtr frame ) override {} // ignored - - virtual ~IMediaDeviceRenderAudio(); }; //------------------------------------------------------------------------- diff --git a/ortc/internal/ortc_IRTP.h b/ortc/internal/ortc_IRTP.h index ae2aa2b5..88c9911b 100644 --- a/ortc/internal/ortc_IRTP.h +++ b/ortc/internal/ortc_IRTP.h @@ -66,6 +66,7 @@ namespace ortc }; static const char *toString(States state); + static States toState(const char *stateStr) throw (InvalidParameters); virtual RTPObjectID getID() const = 0; virtual void cancel() = 0; @@ -80,7 +81,7 @@ namespace ortc //----------------------------------------------------------------------- //----------------------------------------------------------------------- #pragma mark - #pragma mark IRTPDecoderForMediaEngine + #pragma mark IRTPForMediaEngine #pragma mark interaction IRTPForMediaEngine From 8c9052c0070ae507bc333eae99ee352f9afd1aa4 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 29 Sep 2017 15:15:21 -0400 Subject: [PATCH 138/187] clean-up of chromium styling warnings --- .../cpp/ortc_adapter_PeerConnection.cpp | 4 +- ortc/adapter/cpp/ortc_adapter_SDPParser.cpp | 1 - .../internal/ortc_adapter_PeerConnection.h | 4 +- ortc/cpp/ortc.cpp | 50 +++++++++++++++++++ ortc/cpp/ortc_Certificate.cpp | 2 +- ortc/cpp/ortc_DTLSTransport.cpp | 2 +- ortc/cpp/ortc_DataChannel.cpp | 4 +- ortc/cpp/ortc_ICEGatherer.cpp | 14 +++--- ortc/cpp/ortc_ICETypes.cpp | 4 +- ortc/cpp/ortc_ISecureTransport.cpp | 11 ++++ ortc/cpp/ortc_MediaDevice.cpp | 11 +++- ortc/cpp/ortc_MediaDeviceCapture.cpp | 11 ++++ ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp | 7 +-- ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp | 7 +-- ortc/cpp/ortc_MediaDeviceRenderAudio.cpp | 7 +-- ortc/cpp/ortc_MediaDevices.cpp | 2 - ortc/cpp/ortc_MediaEngine.cpp | 2 - ortc/cpp/ortc_MediaStreamTrack.cpp | 3 +- ortc/cpp/ortc_RTCPPacket.cpp | 22 ++++---- ortc/cpp/ortc_RTPDecoderAudio.cpp | 14 +++++- ortc/cpp/ortc_RTPDecoderVideo.cpp | 14 +++++- ortc/cpp/ortc_RTPEncoderAudio.cpp | 14 +++++- ortc/cpp/ortc_RTPEncoderVideo.cpp | 15 +++++- ortc/cpp/ortc_RTPListener.cpp | 4 +- ortc/cpp/ortc_RTPReceiver.cpp | 10 ++-- ortc/cpp/ortc_RTPReceiverChannel.cpp | 4 +- ortc/cpp/ortc_RTPSender.cpp | 8 ++- ortc/cpp/ortc_RTPSenderChannel.cpp | 4 +- ortc/cpp/ortc_RTPTypes.cpp | 1 + ortc/cpp/ortc_RTPUtils.cpp | 2 +- ortc/cpp/ortc_StatsReport.cpp | 2 +- ortc/internal/ortc.h | 1 + ortc/internal/ortc_MediaStreamTrack.h | 2 +- ortc/internal/ortc_MediaStreamTrackChannel.h | 2 +- ortc/internal/ortc_RTPSender.h | 10 ++-- 35 files changed, 194 insertions(+), 81 deletions(-) diff --git a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp index 33782e2c..a1435267 100644 --- a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp +++ b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp @@ -321,8 +321,8 @@ namespace ortc IPeerConnectionDelegatePtr delegate, const Optional &configuration ) : - SharedRecursiveLock(SharedRecursiveLock::create()), - MessageQueueAssociator(queue) + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) { if (configuration.hasValue()) { mConfiguration = configuration.value(); diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp index 75b2da84..90df6b4a 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp @@ -1607,7 +1607,6 @@ namespace ortc if (mPayloadTypes.size() > 0) { result.append(" "); result.append("pt="); - bool first = true; for (auto iter = mPayloadTypes.begin(); iter != mPayloadTypes.end(); ++iter) { auto &pt = (*iter); if (inserted) result.append(","); diff --git a/ortc/adapter/internal/ortc_adapter_PeerConnection.h b/ortc/adapter/internal/ortc_adapter_PeerConnection.h index 24125876..971aa455 100644 --- a/ortc/adapter/internal/ortc_adapter_PeerConnection.h +++ b/ortc/adapter/internal/ortc_adapter_PeerConnection.h @@ -362,8 +362,8 @@ namespace ortc const Noop &, IMessageQueuePtr queue ) : - SharedRecursiveLock(SharedRecursiveLock::create()), - MessageQueueAssociator(queue) {} + MessageQueueAssociator(queue), + SharedRecursiveLock(SharedRecursiveLock::create()) {} void init(); diff --git a/ortc/cpp/ortc.cpp b/ortc/cpp/ortc.cpp index a88948a6..3dad5a1c 100644 --- a/ortc/cpp/ortc.cpp +++ b/ortc/cpp/ortc.cpp @@ -29,8 +29,13 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include + +#include + #include #include @@ -88,3 +93,48 @@ namespace ortc } } } + +ZS_DECLARE_TEAR_AWAY_IMPLEMENT(ortc::IDataChannel, ortc::internal::DataChannel::TearAwayData) +ZS_DECLARE_TEAR_AWAY_IMPLEMENT(ortc::IRTPListener, ortc::internal::RTPListener::TearAwayData) +ZS_DECLARE_TEAR_AWAY_IMPLEMENT(ortc::ISCTPTransport, ortc::internal::SCTPTransport::TearAwayData) + +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IDataChannelDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IDTLSTransportDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IDTMFSenderDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IICEGathererDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IICETransportDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IMediaDevicesDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IMediaStreamTrackDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IRTPListenerDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IRTPReceiverDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::IRTPSenderDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::ISCTPTransportDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::ISCTPTransportListenerDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::ISRTPSDESTransportDelegate) + +ZS_DECLARE_PROXY_IMPLEMENT(ortc::adapter::IPeerConnectionDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::adapter::IMediaStreamDelegate) + +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IDataChannelAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IDTLSTransportAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IGathererAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IICETransportAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ITransportControllerAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IMediaDeviceCaptureDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IMediaDeviceRenderDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IMediaDevicesAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IMediaStreamTrackAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IRTPDecoderDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IRTPDecoderAysncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IRTPEncoderAysncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IRTPEncoderDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IRTPListenerAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IRTPReceiverChannelAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IRTPSenderAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::IRTPSenderChannelAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISCTPTransportForDataChannelDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISecureTransportDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISRTPSDESTransportAsyncDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISRTPTransportDelegate) + +ZS_DECLARE_PROXY_IMPLEMENT(ortc::adapter::internal::IPeerConnectionAsyncDelegate) diff --git a/ortc/cpp/ortc_Certificate.cpp b/ortc/cpp/ortc_Certificate.cpp index ca8c2773..f5993ea2 100644 --- a/ortc/cpp/ortc_Certificate.cpp +++ b/ortc/cpp/ortc_Certificate.cpp @@ -347,8 +347,8 @@ namespace ortc SharedRecursiveLock(SharedRecursiveLock::create()), mKeygenAlgorithm(keygenAlgorithm ? keygenAlgorithm->clone()->toElement() : ElementPtr()), mName(ISettings::getString(ORTC_SETTING_CERTIFICATE_DEFAULT_KEY_NAME)), - mHash(ISettings::getString(ORTC_SETTING_CERTIFICATE_DEFAULT_HASH)), mNamedCurve(ISettings::getString(ORTC_SETTING_CERTIFICATE_DEFAULT_KEY_NAMED_CURVE)), + mHash(ISettings::getString(ORTC_SETTING_CERTIFICATE_DEFAULT_HASH)), mKeyLength(ISettings::getUInt(ORTC_SETTING_CERTIFICATE_DEFAULT_KEY_LENGTH_IN_BITS)), mRandomBits(ISettings::getUInt(ORTC_SETTING_CERTIFICATE_DEFAULT_SERIAL_RANDOM_BITS)), mPublicExponentLength(ISettings::getString(ORTC_SETTING_CERTIFICATE_DEFAULT_PUBLIC_EXPONENT)), diff --git a/ortc/cpp/ortc_DTLSTransport.cpp b/ortc/cpp/ortc_DTLSTransport.cpp index 8c0fd5dc..fececdf1 100644 --- a/ortc/cpp/ortc_DTLSTransport.cpp +++ b/ortc/cpp/ortc_DTLSTransport.cpp @@ -114,7 +114,7 @@ namespace ortc // Maximum number of pending packets in the queue. Packets are read immediately // after they have been written, so a capacity of "1" is sufficient. - static const size_t kMaxPendingPackets = 1; + //static const size_t kMaxPendingPackets = 1; static bool isDtlsPacket(const BYTE *data, size_t len) { return (len >= kDtlsRecordHeaderLen && (data[0] > 19 && data[0] < 64)); diff --git a/ortc/cpp/ortc_DataChannel.cpp b/ortc/cpp/ortc_DataChannel.cpp index b4681a24..c6c0f262 100644 --- a/ortc/cpp/ortc_DataChannel.cpp +++ b/ortc/cpp/ortc_DataChannel.cpp @@ -276,9 +276,9 @@ namespace ortc MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), mDataTransport(transport), - mParameters(params), mIncoming(ORTC_SCTP_INVALID_DATA_CHANNEL_SESSION_ID != sessionID), - mSessionID(ORTC_SCTP_INVALID_DATA_CHANNEL_SESSION_ID == sessionID ? (params->mID.hasValue() ? params->mID.value() : ORTC_SCTP_INVALID_DATA_CHANNEL_SESSION_ID) : sessionID) + mSessionID(ORTC_SCTP_INVALID_DATA_CHANNEL_SESSION_ID == sessionID ? (params->mID.hasValue() ? params->mID.value() : ORTC_SCTP_INVALID_DATA_CHANNEL_SESSION_ID) : sessionID), + mParameters(params) { ZS_EVENTING_5( x, i, Detail, DataChannelCreate, ol, DataChannel, Start, diff --git a/ortc/cpp/ortc_ICEGatherer.cpp b/ortc/cpp/ortc_ICEGatherer.cpp index 4f731db6..89b15fa6 100644 --- a/ortc/cpp/ortc_ICEGatherer.cpp +++ b/ortc/cpp/ortc_ICEGatherer.cpp @@ -558,22 +558,22 @@ namespace ortc const make_private &, const ConstructorOptions &options ) : - SharedRecursiveLock(SharedRecursiveLock::create()), MessageQueueAssociator(options.mQueue), + SharedRecursiveLock(SharedRecursiveLock::create()), mGathererRouter(ICEGathererRouter::create()), + mComponent(options.mComponent), mUsernameFrag(options.mUsernameFragment.hasData() ? options.mUsernameFragment : IHelper::randomString(ISettings::getUInt(ORTC_SETTING_GATHERER_USERNAME_FRAG_LENGTH))), mPassword(options.mPassword.hasData() ? options.mPassword : IHelper::randomString(ISettings::getUInt(ORTC_SETTING_GATHERER_PASSWORD_LENGTH))), - mCreateTCPCandidates(ISettings::getBool(ORTC_SETTING_GATHERER_CREATE_TCP_CANDIDATES)), - mOptions(options.mOptions), - mComponent(options.mComponent), mRTPGatherer(options.mRTPGatherer), + mOptions(options.mOptions), + mCreateTCPCandidates(ISettings::getBool(ORTC_SETTING_GATHERER_CREATE_TCP_CANDIDATES)), mReflexiveInactivityTime(Seconds(ISettings::getUInt(ORTC_SETTING_GATHERER_REFLEXIVE_INACTIVITY_TIMEOUT_IN_SECONDS))), mRelayInactivityTime(Seconds(ISettings::getUInt(ORTC_SETTING_GATHERER_RELAY_INACTIVITY_TIMEOUT_IN_SECONDS))), - mMaxBufferingTime(Seconds(ISettings::getUInt(ORTC_SETTING_GATHERER_MAX_INCOMING_PACKET_BUFFERING_TIME_IN_SECONDS))), - mMaxTotalBuffers(ISettings::getUInt(ORTC_SETTING_GATHERER_MAX_TOTAL_INCOMING_PACKET_BUFFERING)), + mGatherPassiveTCP(ISettings::getBool(ORTC_SETTING_GATHERER_GATHER_PASSIVE_TCP_CANDIDATES)), mMaxTCPBufferingSizePendingConnection(ISettings::getUInt(ORTC_SETTING_GATHERER_MAX_PENDING_OUTGOING_TCP_SOCKET_BUFFERING_IN_BYTES)), mMaxTCPBufferingSizeConnected(ISettings::getUInt(ORTC_SETTING_GATHERER_MAX_CONNECTED_TCP_SOCKET_BUFFERING_IN_BYTES)), - mGatherPassiveTCP(ISettings::getBool(ORTC_SETTING_GATHERER_GATHER_PASSIVE_TCP_CANDIDATES)) + mMaxBufferingTime(Seconds(ISettings::getUInt(ORTC_SETTING_GATHERER_MAX_INCOMING_PACKET_BUFFERING_TIME_IN_SECONDS))), + mMaxTotalBuffers(ISettings::getUInt(ORTC_SETTING_GATHERER_MAX_TOTAL_INCOMING_PACKET_BUFFERING)) { mSTUNPacketParseOptions = STUNPacket::ParseOptions(STUNPacket::RFC_AllowAll, false, "ortc::ICEGatherer", mID); diff --git a/ortc/cpp/ortc_ICETypes.cpp b/ortc/cpp/ortc_ICETypes.cpp index 918d3139..65cce141 100644 --- a/ortc/cpp/ortc_ICETypes.cpp +++ b/ortc/cpp/ortc_ICETypes.cpp @@ -282,7 +282,7 @@ namespace ortc try { std::underlying_type::type converted = Numeric::type>(str); IICETypes::Components component = static_cast(converted); - if ((component >= IICETypes::Component_First) || + if ((component >= IICETypes::Component_First) && (component <= IICETypes::Component_Last)) { mComponent = component; } else { @@ -486,7 +486,7 @@ namespace ortc try { std::underlying_type::type converted = Numeric::type>(str); IICETypes::Components component = static_cast(converted); - if ((component >= IICETypes::Component_First) || + if ((component >= IICETypes::Component_First) && (component <= IICETypes::Component_Last)) { mComponent = component; } else { diff --git a/ortc/cpp/ortc_ISecureTransport.cpp b/ortc/cpp/ortc_ISecureTransport.cpp index 5c41d1fc..482c70c5 100644 --- a/ortc/cpp/ortc_ISecureTransport.cpp +++ b/ortc/cpp/ortc_ISecureTransport.cpp @@ -46,6 +46,12 @@ // //#include + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#endif //__GNUC__ + namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } namespace ortc @@ -449,3 +455,8 @@ namespace ortc } } + + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif //__GNUC__ diff --git a/ortc/cpp/ortc_MediaDevice.cpp b/ortc/cpp/ortc_MediaDevice.cpp index 11da4fde..eb6a43aa 100644 --- a/ortc/cpp/ortc_MediaDevice.cpp +++ b/ortc/cpp/ortc_MediaDevice.cpp @@ -62,6 +62,11 @@ // //#include +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#endif //__GNUC__ + namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc @@ -315,7 +320,7 @@ namespace ortc for (auto iterAdv = constraints.mAdvanced.begin(); iterAdv != constraints.mAdvanced.end(); ++iterAdv) { auto &advancedConstraints = *(*iter); - if (!mode.checkConstrainSet(constraints)) break; + if (!mode.checkConstrainSet(advancedConstraints)) break; } } } @@ -363,3 +368,7 @@ namespace ortc } // internal namespace } + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ diff --git a/ortc/cpp/ortc_MediaDeviceCapture.cpp b/ortc/cpp/ortc_MediaDeviceCapture.cpp index d8a0cee8..aea61bf7 100644 --- a/ortc/cpp/ortc_MediaDeviceCapture.cpp +++ b/ortc/cpp/ortc_MediaDeviceCapture.cpp @@ -62,6 +62,12 @@ // //#include + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#endif //__GNUC__ + namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } namespace ortc @@ -102,3 +108,8 @@ namespace ortc } // internal namespace } + + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif //__GNUC__ diff --git a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp index 5f9701a3..31cdc41e 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp @@ -975,15 +975,10 @@ namespace ortc return; } - // if (!stepDoSomething()) goto not_ready; + // if (!stepDoSomething()) goto return; goto ready; - not_ready: - { - return; - } - ready: { setState(MediaState_Ready); diff --git a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp index 467ed04f..bda53f96 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp @@ -982,15 +982,10 @@ namespace ortc return; } - // if (!stepDoSomething()) goto not_ready; + // if (!stepDoSomething()) goto return; goto ready; - not_ready: - { - return; - } - ready: { setState(MediaState_Ready); diff --git a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp index dcc4dd92..bd474be8 100644 --- a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp @@ -959,15 +959,10 @@ namespace ortc return; } - // if (!stepDoSomething()) goto not_ready; + // if (!stepDoSomething()) return; goto ready; - not_ready: - { - return; - } - ready: { setState(MediaState_Ready); diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index 1db30d1c..3de62c84 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -311,8 +311,6 @@ namespace ortc auto pThis = singleton(); if (!pThis) { - ZS_DECLARE_STRUCT_PTR(BogusSubscription) - struct BogusSubscription : public IMediaDevicesSubscription { virtual PUID getID() const override {return mID;} virtual void cancel() override {} diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp index 1382a49c..58b55c74 100644 --- a/ortc/cpp/ortc_MediaEngine.cpp +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -1528,8 +1528,6 @@ namespace ortc case IMediaStreamTrackTypes::Kind_Video: if (IMediaDevicesTypes::DeviceKind_VideoInput != device.mKind) continue; } } - if (device.mKind != kind) continue; - if (exactDeviceIDs.size() > 0) { if (!doesListContain(exactDeviceIDs, device.mDeviceID)) continue; if (exactGroupIDs.size() > 0) { diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index 7b614d7b..4a36c68e 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -36,9 +36,8 @@ #include #include #include -#include #include -#include +#include #include diff --git a/ortc/cpp/ortc_RTCPPacket.cpp b/ortc/cpp/ortc_RTCPPacket.cpp index 36411c4e..9ffd4a76 100644 --- a/ortc/cpp/ortc_RTCPPacket.cpp +++ b/ortc/cpp/ortc_RTCPPacket.cpp @@ -352,7 +352,7 @@ namespace ortc //------------------------------------------------------------------------- static size_t getPacketSizeTransportLayerFeedbackMessage(const RTCPPacket::TransportLayerFeedbackMessage *fm) { - typedef RTCPPacket::TransportLayerFeedbackMessage TransportLayerFeedbackMessage; + //typedef RTCPPacket::TransportLayerFeedbackMessage TransportLayerFeedbackMessage; typedef RTCPPacket::TransportLayerFeedbackMessage::GenericNACK GenericNACK; typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBR TMMBR; typedef RTCPPacket::TransportLayerFeedbackMessage::TMMBN TMMBN; @@ -399,7 +399,7 @@ namespace ortc //------------------------------------------------------------------------- static size_t getPacketSizePayloadSpecificFeedbackMessage(const RTCPPacket::PayloadSpecificFeedbackMessage *fm) { - typedef RTCPPacket::PayloadSpecificFeedbackMessage PayloadSpecificFeedbackMessage; + //typedef RTCPPacket::PayloadSpecificFeedbackMessage PayloadSpecificFeedbackMessage; typedef RTCPPacket::PayloadSpecificFeedbackMessage::PLI PLI; typedef RTCPPacket::PayloadSpecificFeedbackMessage::SLI SLI; typedef RTCPPacket::PayloadSpecificFeedbackMessage::RPSI RPSI; @@ -408,7 +408,7 @@ namespace ortc typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTN TSTN; typedef RTCPPacket::PayloadSpecificFeedbackMessage::VBCM VBCM; typedef RTCPPacket::PayloadSpecificFeedbackMessage::AFB AFB; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::REMB REMB; + //typedef RTCPPacket::PayloadSpecificFeedbackMessage::REMB REMB; size_t result = (sizeof(DWORD)*3); @@ -503,7 +503,7 @@ namespace ortc //------------------------------------------------------------------------- static size_t getPacketSizeXR(const RTCPPacket::XR *report) { - typedef RTCPPacket::XR XR; + //typedef RTCPPacket::XR XR; typedef RTCPPacket::XR::ReportBlock ReportBlock; typedef RTCPPacket::XR::LossRLEReportBlock LossRLEReportBlock; typedef RTCPPacket::XR::DuplicateRLEReportBlock DuplicateRLEReportBlock; @@ -512,7 +512,7 @@ namespace ortc typedef RTCPPacket::XR::DLRRReportBlock DLRRReportBlock; typedef RTCPPacket::XR::StatisticsSummaryReportBlock StatisticsSummaryReportBlock; typedef RTCPPacket::XR::VoIPMetricsReportBlock VoIPMetricsReportBlock; - typedef RTCPPacket::XR::UnknownReportBlock UnknownReportBlock; + //typedef RTCPPacket::XR::UnknownReportBlock UnknownReportBlock; size_t result = (sizeof(DWORD)*2); @@ -579,7 +579,7 @@ namespace ortc //------------------------------------------------------------------------- static void writePacketUnknown(const RTCPPacket::UnknownReport *report, BYTE * &pos, size_t &remaining) { - typedef RTCPPacket::UnknownReport UnknownReport; + //typedef RTCPPacket::UnknownReport UnknownReport; pos[1] = report->pt(); advancePos(pos, remaining, sizeof(DWORD)); @@ -625,7 +625,7 @@ namespace ortc //------------------------------------------------------------------------- static void writePacketSenderReceiverCommonReport(const RTCPPacket::SenderReceiverCommonReport *report, BYTE * &pos, size_t &remaining) { - typedef RTCPPacket::SenderReceiverCommonReport SenderReceiverCommonReport; + //typedef RTCPPacket::SenderReceiverCommonReport SenderReceiverCommonReport; typedef RTCPPacket::SenderReceiverCommonReport::ReportBlock ReportBlock; size_t count = 0; @@ -1045,7 +1045,7 @@ namespace ortc typedef RTCPPacket::PayloadSpecificFeedbackMessage::TSTN TSTN; typedef RTCPPacket::PayloadSpecificFeedbackMessage::VBCM VBCM; typedef RTCPPacket::PayloadSpecificFeedbackMessage::AFB AFB; - typedef RTCPPacket::PayloadSpecificFeedbackMessage::REMB REMB; + //typedef RTCPPacket::PayloadSpecificFeedbackMessage::REMB REMB; pos[1] = PayloadSpecificFeedbackMessage::kPayloadType; @@ -5359,7 +5359,7 @@ namespace ortc const BYTE *pos ) { - typedef TransportLayerFeedbackMessage::TMMBRCommon TMMBRCommon; + //typedef TransportLayerFeedbackMessage::TMMBRCommon TMMBRCommon; common->mSSRC = UseRTPUtils::getBE32(&(pos[0])); common->mMxTBRExp = RTCP_GET_BITS(pos[4], 0x3F, 2); @@ -5689,7 +5689,7 @@ namespace ortc //------------------------------------------------------------------------- bool RTCPPacket::parseAFB(PayloadSpecificFeedbackMessage *report) { - typedef PayloadSpecificFeedbackMessage::AFB AFB; + //typedef PayloadSpecificFeedbackMessage::AFB AFB; const BYTE *pos = report->fci(); size_t remaining = report->fciSize(); @@ -5704,7 +5704,7 @@ namespace ortc //------------------------------------------------------------------------- bool RTCPPacket::parseREMB(PayloadSpecificFeedbackMessage *report) { - typedef PayloadSpecificFeedbackMessage::REMB REMB; + //typedef PayloadSpecificFeedbackMessage::REMB REMB; if (!parseAFB(report)) return false; diff --git a/ortc/cpp/ortc_RTPDecoderAudio.cpp b/ortc/cpp/ortc_RTPDecoderAudio.cpp index ac8c97a5..1c6b5e19 100644 --- a/ortc/cpp/ortc_RTPDecoderAudio.cpp +++ b/ortc/cpp/ortc_RTPDecoderAudio.cpp @@ -42,6 +42,13 @@ #include + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#endif //__GNUC__ + + #ifdef _DEBUG #define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) #else @@ -161,8 +168,8 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), - promise_(promise), mediaEngine_(mediaEngine), + promise_(promise), parameters_(parameters), notifyDelegate_(delegate_), delegate_(IRTPDecoderDelegateProxy::createWeak(delegate)), @@ -600,3 +607,8 @@ namespace ortc } // internal namespace } + + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif //__GNUC__ diff --git a/ortc/cpp/ortc_RTPDecoderVideo.cpp b/ortc/cpp/ortc_RTPDecoderVideo.cpp index 7e0b3ffc..bba537d8 100644 --- a/ortc/cpp/ortc_RTPDecoderVideo.cpp +++ b/ortc/cpp/ortc_RTPDecoderVideo.cpp @@ -42,6 +42,13 @@ #include + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#endif //__GNUC__ + + #ifdef _DEBUG #define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) #else @@ -161,8 +168,8 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), - promise_(promise), mediaEngine_(mediaEngine), + promise_(promise), parameters_(parameters), notifyDelegate_(delegate_), delegate_(IRTPDecoderDelegateProxy::createWeak(delegate)), @@ -600,3 +607,8 @@ namespace ortc } // internal namespace } + + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif //__GNUC__ diff --git a/ortc/cpp/ortc_RTPEncoderAudio.cpp b/ortc/cpp/ortc_RTPEncoderAudio.cpp index ccd2adac..9e230840 100644 --- a/ortc/cpp/ortc_RTPEncoderAudio.cpp +++ b/ortc/cpp/ortc_RTPEncoderAudio.cpp @@ -42,6 +42,13 @@ #include + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#endif //__GNUC__ + + #ifdef _DEBUG #define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) #else @@ -161,8 +168,8 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), - promise_(promise), mediaEngine_(mediaEngine), + promise_(promise), parameters_(parameters), notifyDelegate_(delegate_), delegate_(IRTPEncoderDelegateProxy::createWeak(delegate)), @@ -595,3 +602,8 @@ namespace ortc } // internal namespace } + + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif //__GNUC__ diff --git a/ortc/cpp/ortc_RTPEncoderVideo.cpp b/ortc/cpp/ortc_RTPEncoderVideo.cpp index 7a4fb844..83d56e3d 100644 --- a/ortc/cpp/ortc_RTPEncoderVideo.cpp +++ b/ortc/cpp/ortc_RTPEncoderVideo.cpp @@ -42,6 +42,14 @@ #include + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#endif //__GNUC__ + + #ifdef _DEBUG #define ASSERT(x) ZS_THROW_BAD_STATE_IF(!(x)) #else @@ -161,8 +169,8 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), - promise_(promise), mediaEngine_(mediaEngine), + promise_(promise), parameters_(parameters), notifyDelegate_(delegate_), delegate_(IRTPEncoderDelegateProxy::createWeak(delegate)), @@ -595,3 +603,8 @@ namespace ortc } // internal namespace } + + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif //__GNUC__ diff --git a/ortc/cpp/ortc_RTPListener.cpp b/ortc/cpp/ortc_RTPListener.cpp index 765057af..0ddb387e 100644 --- a/ortc/cpp/ortc_RTPListener.cpp +++ b/ortc/cpp/ortc_RTPListener.cpp @@ -436,9 +436,9 @@ namespace ortc mMaxRTCPPacketAge(ISettings::getUInt(ORTC_SETTING_RTP_LISTENER_MAX_AGE_RTCP_PACKETS_IN_SECONDS)), mReceivers(make_shared()), mSenders(make_shared()), - mAmbiguousPayloadMappingMinDifference(ISettings::getUInt(ORTC_SETTING_RTP_LISTENER_ONLY_RESOLVE_AMBIGUOUS_PAYLOAD_MAPPING_IF_ACTIVITY_DIFFERS_IN_MILLISECONDS)), mSSRCTableExpires(ISettings::getUInt(ORTC_SETTING_RTP_LISTENER_SSRC_TIMEOUT_IN_SECONDS)), - mUnhandledEventsExpires(ISettings::getUInt(ORTC_SETTING_RTP_LISTENER_UNHANDLED_EVENTS_TIMEOUT_IN_SECONDS)) + mUnhandledEventsExpires(ISettings::getUInt(ORTC_SETTING_RTP_LISTENER_UNHANDLED_EVENTS_TIMEOUT_IN_SECONDS)), + mAmbiguousPayloadMappingMinDifference(ISettings::getUInt(ORTC_SETTING_RTP_LISTENER_ONLY_RESOLVE_AMBIGUOUS_PAYLOAD_MAPPING_IF_ACTIVITY_DIFFERS_IN_MILLISECONDS)) { ZS_EVENTING_8( x, i, Detail, RtpListenerCreate, ol, RtpListener, Start, diff --git a/ortc/cpp/ortc_RTPReceiver.cpp b/ortc/cpp/ortc_RTPReceiver.cpp index 5061fffd..82bcc800 100644 --- a/ortc/cpp/ortc_RTPReceiver.cpp +++ b/ortc/cpp/ortc_RTPReceiver.cpp @@ -102,6 +102,10 @@ namespace ortc case IRTPTypes::HeaderExtensionURI_RID: return false; case IRTPTypes::HeaderExtensionURI_3gpp_VideoOrientation: return true; case IRTPTypes::HeaderExtensionURI_3gpp_VideoOrientation6: return true; + + case IRTPTypes::HeaderExtensionURI_TransmissionTimeOffsets: return true; + case IRTPTypes::HeaderExtensionURI_AbsoluteSendTime: return true; + case IRTPTypes::HeaderExtensionURI_TransportSequenceNumber: return true; } return true; } @@ -521,12 +525,12 @@ namespace ortc SharedRecursiveLock(SharedRecursiveLock::create()), mKind(kind), mChannels(make_shared()), + mSSRCTableExpires(Seconds(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_SSRC_TIMEOUT_IN_SECONDS))), mMaxBufferedRTPPackets(SafeInt(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_MAX_RTP_PACKETS_IN_BUFFER))), mMaxRTPPacketAge(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_MAX_AGE_RTP_PACKETS_IN_SECONDS)), + mContributingSourcesExpiry(Seconds(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_CSRC_EXPIRY_TIME_IN_SECONDS))), mLockAfterSwitchTime(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_LOCK_TO_RECEIVER_CHANNEL_AFTER_SWITCH_EXCLUSIVELY_FOR_IN_MILLISECONDS)), - mAmbiguousPayloadMappingMinDifference(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_ONLY_RESOLVE_AMBIGUOUS_PAYLOAD_MAPPING_IF_ACTIVITY_DIFFERS_IN_MILLISECONDS)), - mSSRCTableExpires(Seconds(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_SSRC_TIMEOUT_IN_SECONDS))), - mContributingSourcesExpiry(Seconds(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_CSRC_EXPIRY_TIME_IN_SECONDS))) + mAmbiguousPayloadMappingMinDifference(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_ONLY_RESOLVE_AMBIGUOUS_PAYLOAD_MAPPING_IF_ACTIVITY_DIFFERS_IN_MILLISECONDS)) { ZS_LOG_DETAIL(debug("created")) diff --git a/ortc/cpp/ortc_RTPReceiverChannel.cpp b/ortc/cpp/ortc_RTPReceiverChannel.cpp index 21185abe..256df240 100644 --- a/ortc/cpp/ortc_RTPReceiverChannel.cpp +++ b/ortc/cpp/ortc_RTPReceiverChannel.cpp @@ -201,8 +201,8 @@ namespace ortc MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), mReceiver(receiver), - mTrack(track), - mParameters(make_shared(params)) + mParameters(make_shared(params)), + mTrack(track) { ZS_EVENTING_3( x, i, Detail, RtpReceiverChannelCreate, ol, RtpReceiverChannel, Start, diff --git a/ortc/cpp/ortc_RTPSender.cpp b/ortc/cpp/ortc_RTPSender.cpp index b32df6a7..62bb5614 100644 --- a/ortc/cpp/ortc_RTPSender.cpp +++ b/ortc/cpp/ortc_RTPSender.cpp @@ -230,8 +230,6 @@ namespace ortc { notify(ISecureTransport::State_Closed); - ASSERT((bool)mChannel) - auto outer = mHolder.lock(); if (outer) { outer->notifyChannelGone(); @@ -351,8 +349,8 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), - mChannels(make_shared()), - mTrack(MediaStreamTrack::convert(track)) + mTrack(MediaStreamTrack::convert(track)), + mChannels(make_shared()) { ZS_LOG_DETAIL(debug("created")) @@ -1055,7 +1053,7 @@ namespace ortc #pragma mark //------------------------------------------------------------------------- - IDTMFSenderSubscriptionPtr RTPSender::subscribeDTMF(IDTMFSenderDelegatePtr originalDelegate) + IDTMFSenderSubscriptionPtr RTPSender::subscribe(IDTMFSenderDelegatePtr originalDelegate) { ZS_LOG_DETAIL(log("subscribing to dtmf")); diff --git a/ortc/cpp/ortc_RTPSenderChannel.cpp b/ortc/cpp/ortc_RTPSenderChannel.cpp index 923caf68..421d6f58 100644 --- a/ortc/cpp/ortc_RTPSenderChannel.cpp +++ b/ortc/cpp/ortc_RTPSenderChannel.cpp @@ -202,10 +202,10 @@ namespace ortc MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), mSender(sender), - mTrack(track), mParameters(make_shared(params)), mRetagAfterInSeconds(Seconds(ISettings::getUInt(ORTC_SETTING_RTP_SENDER_CHANNEL_RETAG_RTP_PACKETS_AFTER_SSRC_NOT_SENT_IN_SECONDS))), - mTagSDES(ISettings::getBool(ORTC_SETTING_RTP_SENDER_CHANNEL_TAG_MID_RID_IN_RTCP_SDES)) + mTagSDES(ISettings::getBool(ORTC_SETTING_RTP_SENDER_CHANNEL_TAG_MID_RID_IN_RTCP_SDES)), + mTrack(track) { ZS_LOG_DETAIL(debug("created")) diff --git a/ortc/cpp/ortc_RTPTypes.cpp b/ortc/cpp/ortc_RTPTypes.cpp index f0249765..bb95d8f2 100644 --- a/ortc/cpp/ortc_RTPTypes.cpp +++ b/ortc/cpp/ortc_RTPTypes.cpp @@ -2332,6 +2332,7 @@ namespace ortc mMaxSpatialLayers = op2.mMaxSpatialLayers; mSVCMultiStreamSupport = op2.mSVCMultiStreamSupport; copyAny(op2); + return *this; } //--------------------------------------------------------------------------- diff --git a/ortc/cpp/ortc_RTPUtils.cpp b/ortc/cpp/ortc_RTPUtils.cpp index fad19d97..2ae549cd 100644 --- a/ortc/cpp/ortc_RTPUtils.cpp +++ b/ortc/cpp/ortc_RTPUtils.cpp @@ -70,7 +70,7 @@ namespace ortc //------------------------------------------------------------------------- static const size_t kMinRtpPacketLen = 12; - static const size_t kMaxRtpPacketLen = 2048; + //static const size_t kMaxRtpPacketLen = 2048; static const size_t kMinRtcpPacketLen = 4; static const uint8_t kRtpVersion = 2; diff --git a/ortc/cpp/ortc_StatsReport.cpp b/ortc/cpp/ortc_StatsReport.cpp index d80a2598..dd9b902a 100644 --- a/ortc/cpp/ortc_StatsReport.cpp +++ b/ortc/cpp/ortc_StatsReport.cpp @@ -1452,7 +1452,7 @@ namespace ortc internal::reportInt32(mID, timestamp, "tracks", SafeInt(mTrackIDs.size())); unsigned long index = 0; for (auto iter = mTrackIDs.begin(); iter != mTrackIDs.end(); ++iter, ++index) { - auto &trackID = (*iter); + //auto &trackID = (*iter); internal::reportString(mID, timestamp, (String("trackId") + string(index)).c_str(), mStreamID); } } diff --git a/ortc/internal/ortc.h b/ortc/internal/ortc.h index d68dee8d..ad34c417 100644 --- a/ortc/internal/ortc.h +++ b/ortc/internal/ortc.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/ortc/internal/ortc_MediaStreamTrack.h b/ortc/internal/ortc_MediaStreamTrack.h index 0dd11d30..34d80f10 100644 --- a/ortc/internal/ortc_MediaStreamTrack.h +++ b/ortc/internal/ortc_MediaStreamTrack.h @@ -412,7 +412,7 @@ namespace ortc #pragma mark MediaStreamTrack => (internal) #pragma mark - void trace(const char *message) const; + void trace(const char *message) const override; bool isShuttingDown() const; bool isShutdown() const; diff --git a/ortc/internal/ortc_MediaStreamTrackChannel.h b/ortc/internal/ortc_MediaStreamTrackChannel.h index abc2e4b9..df80325c 100644 --- a/ortc/internal/ortc_MediaStreamTrackChannel.h +++ b/ortc/internal/ortc_MediaStreamTrackChannel.h @@ -162,7 +162,7 @@ namespace ortc #pragma mark MediaChannel (ForMediaStreamTrackSubscriber) #pragma mark - virtual void notifyCancelled(SubscriberObjectID subscriberID) = 0; + virtual void notifyCancelled(SubscriberObjectID subscriberID) override; //--------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_RTPSender.h b/ortc/internal/ortc_RTPSender.h index 0af38d75..d1d32338 100644 --- a/ortc/internal/ortc_RTPSender.h +++ b/ortc/internal/ortc_RTPSender.h @@ -144,10 +144,6 @@ namespace ortc ZS_DECLARE_TYPEDEF_PTR(IRTPSenderForDTMFSender, ForDTMFSender) static ElementPtr toDebug(ForDTMFSenderPtr transport); - - IDTMFSenderSubscriptionPtr subscribe(IDTMFSenderDelegatePtr delegate) override { return subscribeDTMF(delegate); } - - virtual IDTMFSenderSubscriptionPtr subscribeDTMF(IDTMFSenderDelegatePtr delegate) = 0; }; //------------------------------------------------------------------------- @@ -410,7 +406,11 @@ namespace ortc // (duplicate) virtual PUID getID() const = 0; - IDTMFSenderSubscriptionPtr subscribeDTMF(IDTMFSenderDelegatePtr delegate) override; + //IDTMFSenderSubscriptionPtr subscribe(IDTMFSenderDelegatePtr delegate) override { return subscribeDTMF(delegate); } + + //virtual IDTMFSenderSubscriptionPtr subscribeDTMF(IDTMFSenderDelegatePtr delegate) = 0; + + IDTMFSenderSubscriptionPtr subscribe(IDTMFSenderDelegatePtr delegate) override; bool canInsertDTMF() const override; From f5af8d4568060ada0bad619f7c4b8ce76a314e38 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Sat, 30 Sep 2017 19:17:07 -0400 Subject: [PATCH 139/187] - missed conflict during merge --- ortc/internal/ortc_ORTC.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ortc/internal/ortc_ORTC.h b/ortc/internal/ortc_ORTC.h index c3d21ff7..4e8bb2e5 100644 --- a/ortc/internal/ortc_ORTC.h +++ b/ortc/internal/ortc_ORTC.h @@ -69,11 +69,7 @@ namespace ortc static void overrideQueueDelegate(IMessageQueuePtr queue); static IMessageQueuePtr queueDelegate(); static IMessageQueuePtr queueORTC(); -<<<<<<< HEAD -======= static IMessageQueuePtr queueORTCPipeline(); - static IMessageQueuePtr queuePacket(); ->>>>>>> origin/releases/m49 static IMessageQueuePtr queueBlockingMediaStartStopThread(); static IMessageQueuePtr queueMediaDevices(); static IMessageQueuePtr queueRTP(); @@ -149,13 +145,9 @@ namespace ortc virtual void overrideQueueDelegate(IMessageQueuePtr queue); virtual IMessageQueuePtr queueDelegate() const; virtual IMessageQueuePtr queueORTC() const; -<<<<<<< HEAD virtual IMessageQueuePtr queueMediaDevices() const; virtual IMessageQueuePtr queueRTP() const; -======= virtual IMessageQueuePtr queueORTCPipeline() const; - virtual IMessageQueuePtr queuePacket() const; ->>>>>>> origin/releases/m49 virtual IMessageQueuePtr queueBlockingMediaStartStopThread() const; virtual IMessageQueuePtr queueCertificateGeneration() const; From f24e55841c9928acb1103eada1492307a4567298 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Mon, 2 Oct 2017 16:43:19 +0200 Subject: [PATCH 140/187] Fixed ortclib dependecy issue --- BUILD.gn | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index d585a194..07ffee98 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -727,6 +727,11 @@ static_library("ortclib_static") { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). configs -= [ "//build/config/clang:find_bad_constructs" ] + + public_deps = [ + ":ortclib_events", + ":ortclib_idl", + ] } @@ -760,8 +765,7 @@ shared_library("ortclib") { "../../third_party/boringssl/src/include", ] - #sources = ["$target_gen_dir/../../../../../ortc/ortclib/ortc/idl//moj.cpp"] - sources = ortc_sources + sources = ortc_sources lib_dirs = [ "/usr/lib", @@ -776,10 +780,8 @@ shared_library("ortclib") { "//ortc/udns", "//ortc/idnkit", "//build/config:exe_and_shlib_deps", - ":ortclib_static", ":ortclib_generated_static", "//ortc/ortclib-services", - ":ortclib_idl", ] defines = [ @@ -842,9 +844,8 @@ static_library("ortclib_generated_static") { defines += [ "WEBRTC_WIN", ] } - deps = [ - ":ortclib_events", - ":ortclib_idl", + public_deps = [ + ":ortclib_static", ] # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). From 9e957fdb3013e7483c4da6fb9318b4d0a9249b9d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 2 Oct 2017 12:57:20 -0400 Subject: [PATCH 141/187] added warning and fix compile issue with missing api --- ortc/cpp/ortc_ORTC.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ortc/cpp/ortc_ORTC.cpp b/ortc/cpp/ortc_ORTC.cpp index 61c9423c..7e32ee67 100644 --- a/ortc/cpp/ortc_ORTC.cpp +++ b/ortc/cpp/ortc_ORTC.cpp @@ -420,7 +420,10 @@ namespace ortc //------------------------------------------------------------------------- bool ORTC::isMRPInstalled() { - return IRTPMediaEngineForORTC::isMRPInstalled(); +#define TODO_NEED_THIS_MRP_INSTALLED_API_IMPLEMENTED 1 +#define TODO_NEED_THIS_MRP_INSTALLED_API_IMPLEMENTED 2 +// return IRTPMediaEngineForORTC::isMRPInstalled(); + return true; } //------------------------------------------------------------------------- From 830eb6923cf260892146d4618278cbcc04ef3169 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 3 Oct 2017 23:14:48 -0400 Subject: [PATCH 142/187] proxy subscriptions now implements template in cpp not header --- ortc/cpp/ortc.cpp | 32 +++++++++++++++++++++++++ ortc/cpp/ortc_DTLSTransport.cpp | 2 ++ ortc/cpp/ortc_DTMFSender.cpp | 1 + ortc/cpp/ortc_DataChannel.cpp | 1 + ortc/cpp/ortc_ICEGatherer.cpp | 1 + ortc/cpp/ortc_ICETransport.cpp | 5 ++-- ortc/cpp/ortc_MediaDevices.cpp | 3 ++- ortc/cpp/ortc_MediaStreamTrack.cpp | 1 + ortc/cpp/ortc_RTPListener.cpp | 1 + ortc/cpp/ortc_RTPReceiver.cpp | 1 + ortc/cpp/ortc_RTPSender.cpp | 2 ++ ortc/cpp/ortc_SCTPTransport.cpp | 2 ++ ortc/cpp/ortc_SCTPTransportListener.cpp | 1 + ortc/cpp/ortc_SRTPSDESTransport.cpp | 2 ++ ortc/cpp/ortc_SRTPTransport.cpp | 1 + ortc/internal/ortc_SCTPTransport.h | 8 +++---- ortc/ortc.h | 1 + 17 files changed, 58 insertions(+), 7 deletions(-) diff --git a/ortc/cpp/ortc.cpp b/ortc/cpp/ortc.cpp index 3dad5a1c..476a9e7a 100644 --- a/ortc/cpp/ortc.cpp +++ b/ortc/cpp/ortc.cpp @@ -136,5 +136,37 @@ ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISCTPTransportForDataChannelDelegate) ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISecureTransportDelegate) ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISRTPSDESTransportAsyncDelegate) ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISRTPTransportDelegate) +ZS_DECLARE_PROXY_IMPLEMENT(ortc::internal::ISCTPTransportAsyncDelegate) ZS_DECLARE_PROXY_IMPLEMENT(ortc::adapter::internal::IPeerConnectionAsyncDelegate) + +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IDTLSTransportDelegate, ortc::IDTLSTransportSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IDTMFSenderDelegate, ortc::IDTMFSenderSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IDataChannelDelegate, ortc::IDataChannelSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IICEGathererDelegate, ortc::IICEGathererSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IICETransportDelegate, ortc::IICETransportSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IMediaDevicesDelegate, ortc::IMediaDevicesSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IMediaStreamTrackDelegate, ortc::IMediaStreamTrackSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IMediaElementDelegate, ortc::IMediaElementSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IMediaStreamTrackAsyncMediaDelegate, ortc::IMediaStreamTrackMediaSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IMediaStreamTrackSyncMediaDelegate, ortc::IMediaStreamTrackMediaSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IMediaStreamTrackSelectorDelegate, ortc::IMediaStreamTrackSelectorSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IRTPListenerDelegate, ortc::IRTPListenerSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IRTPReceiverDelegate, ortc::IRTPReceiverSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::IRTPSenderDelegate, ortc::IRTPSenderSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::ISCTPTransportDelegate, ortc::ISCTPTransportSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::ISCTPTransportListenerDelegate, ortc::ISCTPTransportListenerSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::ISRTPSDESTransportDelegate, ortc::ISRTPSDESTransportSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::adapter::IMediaStreamDelegate, ortc::adapter::IMediaStreamSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::adapter::IPeerConnectionDelegate, ortc::adapter::IPeerConnectionSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::IMediaDeviceCaptureDelegate, ortc::internal::IMediaDeviceCaptureSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::IMediaDeviceRenderDelegate, ortc::internal::IMediaDeviceRenderSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::IMediaStreamTrackRTPDelegate, ortc::internal::IMediaStreamTrackRTPSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::IMediaStreamTrackMonitorDelegate, ortc::internal::IMediaStreamTrackMonitorSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::IRTPDecoderDelegate, ortc::internal::IRTPDecoderSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::IRTPEncoderDelegate, ortc::internal::IRTPEncoderSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::ISRTPTransportDelegate, ortc::internal::ISRTPTransportSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::ISecureTransportDelegate, ortc::internal::ISecureTransportSubscription) +ZS_DECLARE_PROXY_SUBSCRIPTIONS_IMPLEMENT(ortc::internal::ISCTPTransportForDataChannelDelegate, ortc::internal::ISCTPTransportForDataChannelSubscription) + + diff --git a/ortc/cpp/ortc_DTLSTransport.cpp b/ortc/cpp/ortc_DTLSTransport.cpp index 141a5979..9d23ac0a 100644 --- a/ortc/cpp/ortc_DTLSTransport.cpp +++ b/ortc/cpp/ortc_DTLSTransport.cpp @@ -387,7 +387,9 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mICETransport(ICETransport::convert(iceTransport)), + mSecureTransportSubscriptions(decltype(mSecureTransportSubscriptions)::create()), mComponent(mICETransport->component()), mMaxPendingDTLSBuffer(ISettings::getUInt(ORTC_SETTING_DTLS_TRANSPORT_MAX_PENDING_DTLS_BUFFER)), mMaxPendingRTPPackets(ISettings::getUInt(ORTC_SETTING_DTLS_TRANSPORT_MAX_PENDING_RTP_PACKETS)), diff --git a/ortc/cpp/ortc_DTMFSender.cpp b/ortc/cpp/ortc_DTMFSender.cpp index ad2e54a6..3e5a20b0 100644 --- a/ortc/cpp/ortc_DTMFSender.cpp +++ b/ortc/cpp/ortc_DTMFSender.cpp @@ -152,6 +152,7 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mRTPSender(RTPSender::convert(sender)) { ZS_LOG_DETAIL(debug("created")) diff --git a/ortc/cpp/ortc_DataChannel.cpp b/ortc/cpp/ortc_DataChannel.cpp index 7e361bb2..b4b5a317 100644 --- a/ortc/cpp/ortc_DataChannel.cpp +++ b/ortc/cpp/ortc_DataChannel.cpp @@ -275,6 +275,7 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mDataTransport(transport), mIncoming(ORTC_SCTP_INVALID_DATA_CHANNEL_SESSION_ID != sessionID), mSessionID(ORTC_SCTP_INVALID_DATA_CHANNEL_SESSION_ID == sessionID ? (params->mID.hasValue() ? params->mID.value() : ORTC_SCTP_INVALID_DATA_CHANNEL_SESSION_ID) : sessionID), diff --git a/ortc/cpp/ortc_ICEGatherer.cpp b/ortc/cpp/ortc_ICEGatherer.cpp index 6a83f08a..75db53ef 100644 --- a/ortc/cpp/ortc_ICEGatherer.cpp +++ b/ortc/cpp/ortc_ICEGatherer.cpp @@ -583,6 +583,7 @@ namespace ortc ) : MessageQueueAssociator(options.mQueue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mGathererRouter(ICEGathererRouter::create()), mComponent(options.mComponent), mUsernameFrag(options.mUsernameFragment.hasData() ? options.mUsernameFragment : IHelper::randomString(ISettings::getUInt(ORTC_SETTING_GATHERER_USERNAME_FRAG_LENGTH))), diff --git a/ortc/cpp/ortc_ICETransport.cpp b/ortc/cpp/ortc_ICETransport.cpp index 152a4716..8933c144 100644 --- a/ortc/cpp/ortc_ICETransport.cpp +++ b/ortc/cpp/ortc_ICETransport.cpp @@ -221,7 +221,9 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mGatherer(ICEGatherer::convert(gatherer)), + mLegalRoutesComputeQueue(IORTCForInternal::queueORTC()), mRouteStateTracker(make_shared(mID)), mNoPacketsReceivedRecheckTime(ISettings::getUInt(ORTC_SETTING_ICE_TRANSPORT_NO_PACKETS_RECEVIED_RECHECK_CANDIDATES_IN_SECONDS)), mExpireRouteTime(ISettings::getUInt(ORTC_SETTING_ICE_TRANSPORT_EXPIRE_ROUTE_IN_SECONDS)), @@ -229,8 +231,7 @@ namespace ortc mBlacklistConsent(ISettings::getBool(ORTC_SETTING_ICE_TRANSPORT_BLACKLIST_AFTER_CONSENT_REMOVAL)), mKeepWarmTimeBase(ISettings::getUInt(ORTC_SETTING_ICE_TRANSPORT_KEEP_WARM_TIME_BASE_IN_MILLISECONDS)), mKeepWarmTimeRandomizedAddTime(ISettings::getUInt(ORTC_SETTING_ICE_TRANSPORT_KEEP_WARM_TIME_RANDOMIZED_ADD_TIME_IN_MILLISECONDS)), - mMaxBufferedPackets(ISettings::getUInt(ORTC_SETTING_ICE_TRANSPORT_MAX_BUFFERED_FOR_SECURE_TRANSPORT)), - mLegalRoutesComputeQueue(IORTCForInternal::queueORTC()) + mMaxBufferedPackets(ISettings::getUInt(ORTC_SETTING_ICE_TRANSPORT_MAX_BUFFERED_FOR_SECURE_TRANSPORT)) { ZS_LOG_BASIC(debug("created")); diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index 3de62c84..242a6745 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -164,7 +164,8 @@ namespace ortc IMessageQueuePtr queue ) : MessageQueueAssociator(queue), - SharedRecursiveLock(SharedRecursiveLock::create()) + SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()) { ZS_LOG_DETAIL(debug("created")) } diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index 4a36c68e..aa4c87f6 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -238,6 +238,7 @@ namespace ortc ) : MessageQueueAssociator(args.queue_), SharedRecursiveLock(SharedRecursiveLock::create()), + subscriptions_(decltype(subscriptions_)::create()), trackId_(String(IMediaStreamTrackTypes::toString(args.kind_)) + "_label_" + string(zsLib::createUUID())), kind_(args.kind_), type_(args.type_), diff --git a/ortc/cpp/ortc_RTPListener.cpp b/ortc/cpp/ortc_RTPListener.cpp index 0ddb387e..b33c7590 100644 --- a/ortc/cpp/ortc_RTPListener.cpp +++ b/ortc/cpp/ortc_RTPListener.cpp @@ -429,6 +429,7 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mRTPTransport(transport), mMaxBufferedRTPPackets(SafeInt(ISettings::getUInt(ORTC_SETTING_RTP_LISTENER_MAX_RTP_PACKETS_IN_BUFFER))), mMaxRTPPacketAge(ISettings::getUInt(ORTC_SETTING_RTP_LISTENER_MAX_AGE_RTP_PACKETS_IN_SECONDS)), diff --git a/ortc/cpp/ortc_RTPReceiver.cpp b/ortc/cpp/ortc_RTPReceiver.cpp index 82bcc800..7571ab76 100644 --- a/ortc/cpp/ortc_RTPReceiver.cpp +++ b/ortc/cpp/ortc_RTPReceiver.cpp @@ -523,6 +523,7 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mKind(kind), mChannels(make_shared()), mSSRCTableExpires(Seconds(ISettings::getUInt(ORTC_SETTING_RTP_RECEIVER_SSRC_TIMEOUT_IN_SECONDS))), diff --git a/ortc/cpp/ortc_RTPSender.cpp b/ortc/cpp/ortc_RTPSender.cpp index 62bb5614..ac0fcf9c 100644 --- a/ortc/cpp/ortc_RTPSender.cpp +++ b/ortc/cpp/ortc_RTPSender.cpp @@ -349,6 +349,8 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), + mDTMFSubscriptions(decltype(mDTMFSubscriptions)::create()), mTrack(MediaStreamTrack::convert(track)), mChannels(make_shared()) { diff --git a/ortc/cpp/ortc_SCTPTransport.cpp b/ortc/cpp/ortc_SCTPTransport.cpp index 7016b315..9e05b1bf 100644 --- a/ortc/cpp/ortc_SCTPTransport.cpp +++ b/ortc/cpp/ortc_SCTPTransport.cpp @@ -711,6 +711,8 @@ namespace ortc SharedRecursiveLock(SharedRecursiveLock::create()), mSCTPInit(SCTPInit::singleton()), mMaxSessionsPerPort(ISettings::getUInt(ORTC_SETTING_SCTP_TRANSPORT_MAX_SESSIONS_PER_PORT)), + mSubscriptions(decltype(mSubscriptions)::create()), + mDataChannelSubscriptions(decltype(mDataChannelSubscriptions)::create()), mListener(listener), mSecureTransport(secureTransport), mDeliveryQueue(IORTCForInternal::queueORTCPipeline()), diff --git a/ortc/cpp/ortc_SCTPTransportListener.cpp b/ortc/cpp/ortc_SCTPTransportListener.cpp index c893cea9..7d74eb5a 100644 --- a/ortc/cpp/ortc_SCTPTransportListener.cpp +++ b/ortc/cpp/ortc_SCTPTransportListener.cpp @@ -276,6 +276,7 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mSecureTransport(DTLSTransport::convert(secureTransport)), mMaxPorts(SafeInt(ISettings::getUInt(ORTC_SETTING_SCTP_TRANSPORT_LISTENER_MAX_PORTS))), mCurrentAllocationPort(SafeInt(ISettings::getUInt(ORTC_SETTING_SCTP_TRANSPORT_LISTENER_DEFAULT_PORT))), diff --git a/ortc/cpp/ortc_SRTPSDESTransport.cpp b/ortc/cpp/ortc_SRTPSDESTransport.cpp index e48fcca5..a7e759b5 100644 --- a/ortc/cpp/ortc_SRTPSDESTransport.cpp +++ b/ortc/cpp/ortc_SRTPSDESTransport.cpp @@ -153,6 +153,8 @@ namespace ortc ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), + mSecureTransportSubscriptions(decltype(mSecureTransportSubscriptions)::create()), mICETransportRTP(ICETransport::convert(iceTransport)) { ZS_LOG_DETAIL(debug("created")) diff --git a/ortc/cpp/ortc_SRTPTransport.cpp b/ortc/cpp/ortc_SRTPTransport.cpp index 242234cc..409bc01c 100644 --- a/ortc/cpp/ortc_SRTPTransport.cpp +++ b/ortc/cpp/ortc_SRTPTransport.cpp @@ -417,6 +417,7 @@ namespace ortc ) throw(InvalidParameters) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), + mSubscriptions(decltype(mSubscriptions)::create()), mSecureTransport(secureTransport), mSRTPInit(SRTPInit::singleton()) { diff --git a/ortc/internal/ortc_SCTPTransport.h b/ortc/internal/ortc_SCTPTransport.h index 7a85242e..b55391cf 100644 --- a/ortc/internal/ortc_SCTPTransport.h +++ b/ortc/internal/ortc_SCTPTransport.h @@ -445,8 +445,8 @@ namespace ortc WORD localPort() const override; Optional remotePort() const override; - virtual PromiseWithSocketOptionsPtr getOptions(const SocketOptions &inWhichOptions); - virtual PromisePtr setOptions(const SocketOptions &inOptions); + PromiseWithSocketOptionsPtr getOptions(const SocketOptions &inWhichOptions) override; + PromisePtr setOptions(const SocketOptions &inOptions) override; virtual void start( const Capabilities &remoteCapabilities, @@ -742,11 +742,11 @@ ZS_DECLARE_TEAR_AWAY_METHOD_CONST_RETURN_0(state, States) ZS_DECLARE_TEAR_AWAY_METHOD_CONST_RETURN_0(port, WORD) ZS_DECLARE_TEAR_AWAY_METHOD_CONST_RETURN_0(localPort, WORD) ZS_DECLARE_TEAR_AWAY_METHOD_CONST_RETURN_0(remotePort, Optional) - virtual PromiseWithSocketOptionsPtr getOptions(const SocketOptions &inWhichOptions) + PromiseWithSocketOptionsPtr getOptions(const SocketOptions &inWhichOptions) override { return getDelegate()->getOptions(inWhichOptions); } - virtual PromisePtr setOptions(const SocketOptions &inOptions) + PromisePtr setOptions(const SocketOptions &inOptions) override { return getDelegate()->setOptions(inOptions); } diff --git a/ortc/ortc.h b/ortc/ortc.h index 88bc7ad0..721310f4 100644 --- a/ortc/ortc.h +++ b/ortc/ortc.h @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include From 9c9206b02fd0b47cf98381cb6bc88617ae4446b1 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Fri, 6 Oct 2017 17:31:53 +0200 Subject: [PATCH 143/187] added generated cx files to ortc_sources for is_winuwp case, also added is_linux condition for lib_dirs and libs --- BUILD.gn | 338 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 333 insertions(+), 5 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 07ffee98..3af7f55d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -373,6 +373,9 @@ ortc_sources_cxx_generated = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCDtlsTransport.h", ] +ortc_sources = [] + +if(is_win && !is_winuwp){ ortc_sources = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.h", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.h", @@ -688,6 +691,329 @@ ortc_sources = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_MediaDeviceInfo.cpp", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCIceTransportOptions.h", ] +} + +if(is_win && is_winuwp){ + ortc_sources = [ + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/cx_Helpers.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/cx_Helpers.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_MediaStream.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_MediaStream.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCAnswerOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCAnswerOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCCapabilityOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCConfiguration.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCConfiguration.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCIceCandidate.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCIceCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCMediaStreamTrackConfiguration.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCMediaStreamTrackConfiguration.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCOfferAnswerOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCOfferAnswerOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCOfferOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCOfferOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCPeerConnection.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCPeerConnection.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCPeerConnectionIceErrorEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCPeerConnectionIceErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCPeerConnectionIceEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCPeerConnectionIceEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescription.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescription.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionConnectionData.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionConnectionData.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionConnectionDataDetails.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionConnectionDataDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionDescription.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionDescription.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionDescriptionDetails.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionDescriptionDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionMediaLine.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionMediaLineDetails.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionMediaLineDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionRtpMediaLine.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionRtpMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionRtpSender.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionRtpSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionRtpSenderDetails.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionRtpSenderDetails.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionSctpMediaLine.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionSctpMediaLine.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionTransportParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCSessionDescriptionTransportParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCTrackEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Adapter_RTCTrackEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainBoolean.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainBoolean.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainBooleanParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainBooleanParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainDouble.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainDouble.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainDoubleRange.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainDoubleRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainLong.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainLong.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainLongRange.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainLongRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainString.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainString.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainStringParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ConstrainStringParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Dispatcher.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Dispatcher.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_DoubleRange.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_DoubleRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Error.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Error.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ErrorEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_ErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Json.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Json.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Logger.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Logger.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_LongRange.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_LongRange.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaControl.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaControl.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaDeviceInfo.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaDeviceInfo.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaDevices.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaDevices.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaSource.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaSource.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaStreamConstraints.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaStreamConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaStreamTrack.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaStreamTrack.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackCapabilities.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackConstraints.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackConstraintSet.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackConstraintSet.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackSupportedConstraints.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MediaTrackSupportedConstraints.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MessageQueue.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_MessageQueue.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_OrtcLib.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_OrtcLib.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_OrtcLibWithDispatcher.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_OrtcLibWithDispatcher.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_OverconstrainedError.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_OverconstrainedError.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_OverconstrainedErrorEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_OverconstrainedErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCCertificate.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCCertificate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCCertificateStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCCertificateStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCCodec.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCCodec.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannel.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannel.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannelEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannelEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannelParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannelParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannelStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannelStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannelStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataChannelStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDataTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsCertificateBinary.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsCertificateBinary.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsFingerprint.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsFingerprint.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsTransportStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsTransportStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtlsTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtmfSender.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtmfSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtmfToneChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCDtmfToneChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidate.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidateAttributes.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidateAttributes.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidateComplete.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidateComplete.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidatePair.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidatePair.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidatePairChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidatePairChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidatePairStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceCandidatePairStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGatherer.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGatherer.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererCandidate.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererCandidate.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererCandidateCompleteEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererCandidateCompleteEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererCandidateEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererCandidateEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererIceErrorEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererIceErrorEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGathererStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGatherInterfacePolicy.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGatherInterfacePolicy.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGatherOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceGatherOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceServer.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceServer.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransportController.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransportController.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransportOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransportOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransportStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransportStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIceTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIdentity.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIdentity.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIdentityAssertion.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIdentityAssertion.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIdentityError.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIdentityError.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIdentityResult.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCIdentityResult.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCInboundRtpStreamStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCInboundRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCMediaStreamStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCMediaStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCMediaStreamTrackStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCMediaStreamTrackStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCMessageEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCMessageEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCOutboundRtpStreamStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCOutboundRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtcpFeedback.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtcpFeedback.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtcpParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtcpParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtcpTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtcpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCapabilities.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecCapability.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecCapability.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecCapabilityOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpContributingSource.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpContributingSource.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpEncodingParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpEncodingParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpFecParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpFecParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpFlexFecCodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpFlexFecCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpFlexFecCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpFlexFecCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpH264CodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpH264CodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpH264CodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpH264CodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpHeaderExtension.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpHeaderExtension.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpHeaderExtensionParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpHeaderExtensionParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpListener.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpListener.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpOpusCodecCapabilityOptions.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpOpusCodecCapabilityOptions.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpOpusCodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpOpusCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpOpusCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpOpusCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpReceiver.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpReceiver.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpRedCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpRedCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpRtxCodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpRtxCodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpRtxCodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpRtxCodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpRtxParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpRtxParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpSender.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpSender.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpStreamStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpStreamStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpUnhandledEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpUnhandledEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpVp8CodecCapabilityParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpVp8CodecCapabilityParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpVp8CodecParameterSettings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCRtpVp8CodecParameterSettings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpCapabilities.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpCapabilities.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransportListener.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransportListener.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransportListenerEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransportListenerEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransportStateChangeEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransportStateChangeEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransportStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSctpTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesCryptoParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesCryptoParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesKeyParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesKeyParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesParameters.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesParameters.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesTransport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesTransport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpSdesTransportLifetimeRemainingEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpTransportStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSrtpTransportStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSsrcConflictEvent.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCSsrcConflictEvent.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCStats.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCStats.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCStatsProvider.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCStatsProvider.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCStatsReport.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCStatsReport.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCStatsTypeSet.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_RTCStatsTypeSet.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Settings.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_Settings.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_StringOrStringList.cpp", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/Org_Ortc_StringOrStringList.h", + "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/types.h", + ] +} #Exists just to keep non generated ortclib code, in case we need it some day static_library("ortclib_static") { @@ -767,11 +1093,13 @@ shared_library("ortclib") { sources = ortc_sources - lib_dirs = [ - "/usr/lib", - "/usr/lib/x86_64-linux-gnu", - ] - libs = [ "uuid", "stdc++", "curl", "ssl", "crypto" ] + if (is_linux) { + lib_dirs = [ + "/usr/lib", + "/usr/lib/x86_64-linux-gnu", + ] + libs = [ "uuid", "stdc++", "curl", "ssl", "crypto" ] + } deps = [ "//ortc/zsLib:zslib", From 98724778476ddd997af46687750dbf10f9cb7cad Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Fri, 6 Oct 2017 22:40:54 +0200 Subject: [PATCH 144/187] added new paths to include_dirs in shared_library target, and additional small fix --- BUILD.gn | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 3af7f55d..9ce97ced 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -375,7 +375,7 @@ ortc_sources_cxx_generated = [ ortc_sources = [] -if(is_win && !is_winuwp){ +if(!is_winuwp){ ortc_sources = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.h", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.h", @@ -693,7 +693,7 @@ ortc_sources = [ ] } -if(is_win && is_winuwp){ +if(is_winuwp){ ortc_sources = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/cx_Helpers.cpp", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/cx_Helpers.h", @@ -1089,6 +1089,12 @@ shared_library("ortclib") { "../../third_party/libsrtp/include", "../../third_party/libsrtp/crypto/include", "../../third_party/boringssl/src/include", + "../..", + "../../ortc", + "../ortclib", + "../ortclib/ortc", + "../ortclib/ortc/idl", + "../ortclib/ortc/idl/wrapper", ] sources = ortc_sources From 1b140f9564fa2cc9fefee4d47e0701b0bd2b42d7 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Wed, 11 Oct 2017 19:10:48 +0200 Subject: [PATCH 145/187] fix or workaround for find_bad_constructs --- BUILD.gn | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 07ffee98..6bdb0bd1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -726,8 +726,9 @@ static_library("ortclib_static") { } # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] - + if(is_linux) { + configs -= [ "//build/config/clang:find_bad_constructs" ] + } public_deps = [ ":ortclib_events", ":ortclib_idl", @@ -803,8 +804,9 @@ shared_library("ortclib") { } # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] - + if(is_linux) { + configs -= [ "//build/config/clang:find_bad_constructs" ] + } } static_library("ortclib_generated_static") { @@ -849,7 +851,9 @@ static_library("ortclib_generated_static") { ] # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + if(is_linux) { + configs -= [ "//build/config/clang:find_bad_constructs" ] + } } compile_event_macro("ortclib_events") { From 8219e2cefc3da80186e4163e8f41c5fb0c47ff84 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 11 Oct 2017 20:56:00 +0200 Subject: [PATCH 146/187] For Win disabled removing clang:find_bad_constructs from config --- BUILD.gn | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 07ffee98..2ea8e531 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -725,8 +725,10 @@ static_library("ortclib_static") { defines += [ "WEBRTC_WIN", ] } - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + if (is_linux) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + configs -= [ "//build/config/clang:find_bad_constructs" ] + } public_deps = [ ":ortclib_events", @@ -802,8 +804,10 @@ shared_library("ortclib") { ] } - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + if (is_linux) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + configs -= [ "//build/config/clang:find_bad_constructs" ] + } } @@ -848,8 +852,10 @@ static_library("ortclib_generated_static") { ":ortclib_static", ] - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + if (is_linux) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + configs -= [ "//build/config/clang:find_bad_constructs" ] + } } compile_event_macro("ortclib_events") { From bf0656a74bf5e2933be6c7186fc2f6e8571a7920 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Thu, 12 Oct 2017 12:41:16 +0200 Subject: [PATCH 147/187] fix for error C2491: string_t_wrapperCreate_string: definition of dllimport function not allowed --- BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILD.gn b/BUILD.gn index 6bdb0bd1..a158d1f7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -787,6 +787,7 @@ shared_library("ortclib") { defines = [ "SHARED", + "ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION", "USE_ETW", "USE_OPENSSL=1", "NOMINMAX", From 49df8aef178f550fb710d0eaad533556c8768e6a Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Fri, 13 Oct 2017 17:31:07 +0200 Subject: [PATCH 148/187] Commented out all code realted to tracelog --- ortc/cpp/ortc_MediaEngine.cpp | 12 ++++++------ ortc/internal/ortc_MediaEngine.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp index 58b55c74..7d7de90d 100644 --- a/ortc/cpp/ortc_MediaEngine.cpp +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -531,32 +531,32 @@ namespace ortc //------------------------------------------------------------------------- void MediaEngine::internalStartMediaTracing() { - traceLog_.EnableTraceInternalStorage(); - traceLog_.StartTracing(); + //traceLog_.EnableTraceInternalStorage(); + //traceLog_.StartTracing(); } //------------------------------------------------------------------------- void MediaEngine::internalStopMediaTracing() { - traceLog_.StopTracing(); + //traceLog_.StopTracing(); } //------------------------------------------------------------------------- bool MediaEngine::internalIsMediaTracing() { - return traceLog_.IsTracing(); + //return traceLog_.IsTracing(); } //------------------------------------------------------------------------- bool MediaEngine::internalSaveMediaTrace(String filename) { - return traceLog_.Save(filename); + //return traceLog_.Save(filename); } //------------------------------------------------------------------------- bool MediaEngine::internalSaveMediaTrace(String host, int port) { - return traceLog_.Save(host, port); + //return traceLog_.Save(host, port); } diff --git a/ortc/internal/ortc_MediaEngine.h b/ortc/internal/ortc_MediaEngine.h index b7137ff7..870a882b 100644 --- a/ortc/internal/ortc_MediaEngine.h +++ b/ortc/internal/ortc_MediaEngine.h @@ -50,7 +50,7 @@ #include #include -#include +//#include namespace ortc { @@ -870,7 +870,7 @@ namespace ortc std::unique_ptr traceCallback_; std::unique_ptr logSink_; - rtc::TraceLog traceLog_; + //rtc::TraceLog traceLog_; States currentState_ {State_Pending}; WORD lastError_ {}; From 1482b0aa2cb9b800d2493048273de05a79cd0005 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Fri, 13 Oct 2017 19:35:12 +0200 Subject: [PATCH 149/187] added curl lib to link, and dependencies for boringssl, usrsctp, libsrtp, video_capture --- BUILD.gn | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 53291e2e..c521a1d6 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1108,7 +1108,39 @@ shared_library("ortclib") { ] libs = [ "uuid", "stdc++", "curl", "ssl", "crypto" ] } - + + if ((target_os == "winuwp_10") && (target_cpu == "x64") && (is_debug == "true")) { + lib_dirs = [ + "..\..\ortc\curl\x64-debug-dll\lib", + ] + libs = [ "libcurl.lib" ] + } else if ((target_os == "winuwp_10") && (target_cpu == "x64") && (is_debug == "false")) { + lib_dirs = [ + "..\..\ortc\curl\x64-release-dll\lib", + ] + libs = [ "libcurl.lib" ] + } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && (is_debug == "true")) { + lib_dirs = [ + "..\..\ortc\curl\x86-debug-dll\lib", + ] + libs = [ "libcurl.lib" ] + } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && (is_debug == "false")) { + lib_dirs = [ + "..\..\ortc\curl\x86-release-dll\lib", + ] + libs = [ "libcurl.lib" ] + } else if (target_os == "win" && (is_debug == "true")) { + lib_dirs = [ + "..\..\ortc\curl\x86-debug-dll\lib", + ] + libs = [ "libcurl.lib" ] + } else if (target_os == "win" && (is_debug == "false")) { + lib_dirs = [ + "..\..\ortc\curl\x86-release-dll\lib", + ] + libs = [ "libcurl.lib" ] + } + deps = [ "//ortc/zsLib:zslib", "//ortc/zsLib-eventing:zslib-eventing", @@ -1118,6 +1150,10 @@ shared_library("ortclib") { "//build/config:exe_and_shlib_deps", ":ortclib_generated_static", "//ortc/ortclib-services", + "//third_party/boringssl:boringssl", + "//third_party/usrsctp:usrsctp", + "//third_party/libsrtp:libsrtp", + "//webrtc/modules/video_capture", ] defines = [ From 3eca2715cdd8879cbfd0f7d0e50a2deb6408251a Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Mon, 16 Oct 2017 00:11:05 +0200 Subject: [PATCH 150/187] Resolved more ortclib linking issues --- BUILD.gn | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index c521a1d6..d708ad08 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -17,9 +17,6 @@ config("ortclib_config") { cflags_cc += [ "-Wall", "-std=c++11", - "-stdlib=libc++", - "-lc++", - "-lc++abi", ] } @@ -1147,13 +1144,15 @@ shared_library("ortclib") { "//ortc/cryptopp", "//ortc/udns", "//ortc/idnkit", - "//build/config:exe_and_shlib_deps", ":ortclib_generated_static", "//ortc/ortclib-services", "//third_party/boringssl:boringssl", "//third_party/usrsctp:usrsctp", - "//third_party/libsrtp:libsrtp", - "//webrtc/modules/video_capture", + "//third_party/libsrtp:libsrtp", + "//webrtc/modules/audio_device", + "//webrtc/system_wrappers:metrics_default", + "//webrtc/modules/video_capture:video_capture_module", + "//webrtc/modules/video_capture" ] defines = [ From 3adefdddee7d0ec65856f346b5183a5b0e647fe9 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Mon, 16 Oct 2017 12:55:48 +0200 Subject: [PATCH 151/187] fix for curl --- BUILD.gn | 14 +++++++------- ortc/cpp/ortc_MediaEngine.cpp | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index c521a1d6..a72b293a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1109,38 +1109,38 @@ shared_library("ortclib") { libs = [ "uuid", "stdc++", "curl", "ssl", "crypto" ] } - if ((target_os == "winuwp_10") && (target_cpu == "x64") && (is_debug == "true")) { + if ((target_os == "winuwp_10") && (target_cpu == "x64") && is_debug) { lib_dirs = [ "..\..\ortc\curl\x64-debug-dll\lib", ] libs = [ "libcurl.lib" ] - } else if ((target_os == "winuwp_10") && (target_cpu == "x64") && (is_debug == "false")) { + } else if ((target_os == "winuwp_10") && (target_cpu == "x64") && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x64-release-dll\lib", ] libs = [ "libcurl.lib" ] - } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && (is_debug == "true")) { + } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-debug-dll\lib", ] libs = [ "libcurl.lib" ] - } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && (is_debug == "false")) { + } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-release-dll\lib", ] libs = [ "libcurl.lib" ] - } else if (target_os == "win" && (is_debug == "true")) { + } else if (is_win && is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-debug-dll\lib", ] libs = [ "libcurl.lib" ] - } else if (target_os == "win" && (is_debug == "false")) { + } else if (is_win && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-release-dll\lib", ] libs = [ "libcurl.lib" ] } - + deps = [ "//ortc/zsLib:zslib", "//ortc/zsLib-eventing:zslib-eventing", diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp index 7d7de90d..d34ad044 100644 --- a/ortc/cpp/ortc_MediaEngine.cpp +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -545,18 +545,21 @@ namespace ortc bool MediaEngine::internalIsMediaTracing() { //return traceLog_.IsTracing(); + return false; } //------------------------------------------------------------------------- bool MediaEngine::internalSaveMediaTrace(String filename) { //return traceLog_.Save(filename); + return false; } //------------------------------------------------------------------------- bool MediaEngine::internalSaveMediaTrace(String host, int port) { //return traceLog_.Save(host, port); + return false; } From 367b8aa62248857184a5fe84fcac9cbc8187192f Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 16 Oct 2017 11:03:01 -0400 Subject: [PATCH 152/187] fixed linker errors with subscription class --- ortc/adapter/cpp/ortc_adapter_MediaStream.cpp | 2 ++ ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp b/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp index b5e0d3b7..86a6d2ab 100644 --- a/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp +++ b/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include diff --git a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp index 04206145..522f9024 100644 --- a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp +++ b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include From c0036b27fb0b8c2bcc0445e54c98d957656730ad Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Mon, 16 Oct 2017 19:06:10 +0200 Subject: [PATCH 153/187] Resolved ortclib linking issue --- BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 465f6ce0..91388387 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1103,7 +1103,7 @@ shared_library("ortclib") { "/usr/lib", "/usr/lib/x86_64-linux-gnu", ] - libs = [ "uuid", "stdc++", "curl", "ssl", "crypto" ] + libs = [ "uuid", "curl", "ssl", "crypto" ] } if ((target_os == "winuwp_10") && (target_cpu == "x64") && is_debug) { From 1ad994231738911c63b3fd79a8154758d3eed64e Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 18 Oct 2017 18:49:55 +0200 Subject: [PATCH 154/187] Updated header paths --- ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp | 2 +- ortc/cpp/ortc_MediaEngine.cpp | 2 +- ortc/test/TestMediaStreamTrack.cpp | 2 +- ortc/test/TestRTPChannelAudio.cpp | 2 +- ortc/test/TestRTPChannelVideo.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp index 31cdc41e..06d23ed5 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp @@ -66,7 +66,7 @@ #include #include -#include +#include #include #include #include diff --git a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp index bda53f96..e224c3da 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp @@ -66,7 +66,7 @@ #include #include -#include +#include #include #include #include diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp index d34ad044..9b9591ad 100644 --- a/ortc/cpp/ortc_MediaEngine.cpp +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -56,7 +56,7 @@ #include #include -#include +#include #include #include #include diff --git a/ortc/test/TestMediaStreamTrack.cpp b/ortc/test/TestMediaStreamTrack.cpp index a9afbc41..58a8b05e 100644 --- a/ortc/test/TestMediaStreamTrack.cpp +++ b/ortc/test/TestMediaStreamTrack.cpp @@ -42,7 +42,7 @@ #include "config.h" #include "testing.h" -#include +#include #include namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } diff --git a/ortc/test/TestRTPChannelAudio.cpp b/ortc/test/TestRTPChannelAudio.cpp index c16434bd..0a78c106 100644 --- a/ortc/test/TestRTPChannelAudio.cpp +++ b/ortc/test/TestRTPChannelAudio.cpp @@ -43,7 +43,7 @@ #include "config.h" #include "testing.h" -#include +#include #include #include diff --git a/ortc/test/TestRTPChannelVideo.cpp b/ortc/test/TestRTPChannelVideo.cpp index 4e110adc..be68d704 100644 --- a/ortc/test/TestRTPChannelVideo.cpp +++ b/ortc/test/TestRTPChannelVideo.cpp @@ -43,7 +43,7 @@ #include "config.h" #include "testing.h" -#include +#include #include #include From bf5653f50465ea779780f27d75ea0d9384166f81 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Fri, 20 Oct 2017 13:20:57 +0200 Subject: [PATCH 155/187] Updated .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ab2e2394..459ff958 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ ortc/internal/ortc.events_win_etw.man ipch/ *.user ortc/idl/wrapper/generated/ +ortc/idl/wrapper/cx From f7b62c4ac72128569211ec7f53f9e5eed6392def Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Fri, 20 Oct 2017 16:50:37 +0200 Subject: [PATCH 156/187] Disabled pragma warnings --- BUILD.gn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 91388387..73d82b9c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1062,6 +1062,10 @@ static_library("ortclib_static") { shared_library("ortclib") { + cflags_cc = [ + "/WX-", + "/wd4068", + ] configs -= [ "//build/config/compiler:no_rtti" ] configs -= [ "//build/config/compiler:chromium_code" ] From c814462085511e45b247508742ee2f2bf0f20b3c Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Fri, 20 Oct 2017 17:02:27 +0200 Subject: [PATCH 157/187] Disabled pragma warnings only for windows --- BUILD.gn | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 73d82b9c..7c6df60f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1062,16 +1062,18 @@ static_library("ortclib_static") { shared_library("ortclib") { - cflags_cc = [ - "/WX-", - "/wd4068", - ] configs -= [ "//build/config/compiler:no_rtti" ] configs -= [ "//build/config/compiler:chromium_code" ] if (!is_win) { configs -= [ "//build/config/gcc:no_exceptions" ] + } else { + cflags_cc = [ + "/WX-", + "/wd4068", + ] } + include_dirs = [ From c574a514699aa7b82728a43f3714611d5c49b933 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Fri, 20 Oct 2017 19:50:49 +0200 Subject: [PATCH 158/187] added userenv.lib for win32 build --- BUILD.gn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 7c6df60f..05c908a9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1135,13 +1135,15 @@ shared_library("ortclib") { } else if (is_win && is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-debug-dll\lib", + "C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x86", ] - libs = [ "libcurl.lib" ] + libs = [ "libcurl.lib", "userenv.lib" ] } else if (is_win && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-release-dll\lib", + "C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x86", ] - libs = [ "libcurl.lib" ] + libs = [ "libcurl.lib", "userenv.lib" ] } deps = [ From e16adc8e9bf1de43c14ebcede0138abf55c7a939 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Thu, 26 Oct 2017 12:31:04 +0200 Subject: [PATCH 159/187] Updated ortclib project files to support VS2017 --- projects/msvs/ortclib-c/ortclib-c.vcxproj | 12 ++++++------ projects/msvs/ortclib.Win32/ortclib.vcxproj | 12 ++++++------ .../msvs/ortclib.wrapper/ortclib.wrapper.vcxproj | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/projects/msvs/ortclib-c/ortclib-c.vcxproj b/projects/msvs/ortclib-c/ortclib-c.vcxproj index 15a19d07..3001f05b 100644 --- a/projects/msvs/ortclib-c/ortclib-c.vcxproj +++ b/projects/msvs/ortclib-c/ortclib-c.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -22,32 +22,32 @@ {2ACCF81D-4C88-4677-834A-CBE8488A66E7} Win32Proj ortclibc - 8.1 + 10.0.16299.0 DynamicLibrary true - v140 + v141 Unicode DynamicLibrary false - v140 + v141 true Unicode DynamicLibrary true - v140 + v141 Unicode DynamicLibrary false - v140 + v141 true Unicode diff --git a/projects/msvs/ortclib.Win32/ortclib.vcxproj b/projects/msvs/ortclib.Win32/ortclib.vcxproj index f9802e7a..ccbc5b70 100644 --- a/projects/msvs/ortclib.Win32/ortclib.vcxproj +++ b/projects/msvs/ortclib.Win32/ortclib.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -177,32 +177,32 @@ {0CAD64D3-2E39-49AF-961F-F57F6B1AE786} Win32Proj ortclib - 8.1 + 10.0.16299.0 StaticLibrary true - v140 + v141 Unicode StaticLibrary false - v140 + v141 true Unicode StaticLibrary true - v140 + v141 Unicode StaticLibrary false - v140 + v141 true Unicode diff --git a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj index 0aa362da..f1d52835 100644 --- a/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj +++ b/projects/msvs/ortclib.wrapper/ortclib.wrapper.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -22,32 +22,32 @@ {A7614AFA-6E2A-4037-96CA-B9F043333CA9} Win32Proj ortclibwrapper - 10.0.10240.0 + 10.0.16299.0 StaticLibrary true - v140 + v141 Unicode StaticLibrary false - v140 + v141 true Unicode StaticLibrary true - v140 + v141 Unicode StaticLibrary false - v140 + v141 true Unicode From ca9f76415c9a278e31708df71ea8c037f4f1f887 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Thu, 26 Oct 2017 20:59:27 +0200 Subject: [PATCH 160/187] Windows SDK path moved from ortclib-cpp/BUILD.gn to webrtc/build/config/win/BUILD.gn --- BUILD.gn | 2 -- 1 file changed, 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 05c908a9..541b312c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1135,13 +1135,11 @@ shared_library("ortclib") { } else if (is_win && is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-debug-dll\lib", - "C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x86", ] libs = [ "libcurl.lib", "userenv.lib" ] } else if (is_win && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-release-dll\lib", - "C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x86", ] libs = [ "libcurl.lib", "userenv.lib" ] } From 8f68a984b6a2df905f11bd8377bc404da056f76e Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 1 Nov 2017 16:22:26 +0100 Subject: [PATCH 161/187] Updated ortclib BUILD.gn --- BUILD.gn | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 7c6df60f..91fd282a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -45,6 +45,11 @@ config("ortclib_config") { "../ortclib/ortc/idl", "../ortclib/ortc/idl/wrapper", ] + + if (is_winuwp) + { + include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] + } } ortclib_sources = [ @@ -1093,7 +1098,8 @@ shared_library("ortclib") { "../../third_party/boringssl/include", "../../third_party/libsrtp/include", "../../third_party/libsrtp/crypto/include", - "../../third_party/boringssl/src/include", + "../../third_party/boringssl/src/include", + "../../third_party/libyuv/include", "../..", "../../ortc", "../ortclib", @@ -1102,8 +1108,19 @@ shared_library("ortclib") { "../ortclib/ortc/idl/wrapper", ] - sources = ortc_sources + include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] + + sources = ortc_sources + sources += [ + "../ortclib/ortc/idl/wrapper/cx/cx_custom_MediaSourceHelper.cc", + "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_Dispatcher.cpp", + "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_MediaControl.cpp", + "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_MediaSource.cpp", + "../ortclib/ortc/idl/wrapper/cx/cx_custom_RTMediaStreamSource.cc", + "../ortclib/ortc/idl/wrapper/cx/cx_custom_WebRtcMediaSource.cc", + "../ortclib/ortc/idl/wrapper/cx/cx_custom_WebRtcMediaStream.cc", + ] if (is_linux) { lib_dirs = [ "/usr/lib", @@ -1163,7 +1180,6 @@ shared_library("ortclib") { defines = [ "SHARED", - "ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION", "USE_ETW", "USE_OPENSSL=1", "NOMINMAX", @@ -1198,6 +1214,7 @@ static_library("ortclib_generated_static") { configs -= [ "//build/config/gcc:no_exceptions" ] } + #To include sources generated from IDL set sources value to ortc_sources sources = ortc_sources_cxx_glue sources += ortc_sources_cxx_generated From 78a03c256c9cf377e43f49ebd47a80b07768bd9d Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Fri, 3 Nov 2017 15:01:18 +0100 Subject: [PATCH 162/187] Resolved Dispatcher linking issues --- ortc/idl/sources.gni | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ortc/idl/sources.gni b/ortc/idl/sources.gni index 6ae9893f..a910b5fa 100644 --- a/ortc/idl/sources.gni +++ b/ortc/idl/sources.gni @@ -11,6 +11,8 @@ ortc_sources_cxx_glue = [ "ortc/idl/wrapper/impl_org_ortc_ConstrainBoolean.h", "ortc/idl/wrapper/impl_org_ortc_RTCDtlsFingerprint.h", "ortc/idl/wrapper/impl_org_ortc_DoubleRange.h", + "ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp", + "ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp", "ortc/idl/wrapper/impl_org_ortc_RTCRtpParameters.h", "ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescriptionMediaLineDetails.h", "ortc/idl/wrapper/impl_org_ortc_adapter_RTCOfferOptions.cpp", From 1a8cfb2cb005979d1e45ddd9924e66b64b1181a2 Mon Sep 17 00:00:00 2001 From: Vladimir Morosev Date: Fri, 3 Nov 2017 20:18:32 +0100 Subject: [PATCH 163/187] - removed rendering componenets from ortc wrapper --- BUILD.gn | 4 ---- 1 file changed, 4 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 91fd282a..c862c36d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1113,13 +1113,9 @@ shared_library("ortclib") { sources = ortc_sources sources += [ - "../ortclib/ortc/idl/wrapper/cx/cx_custom_MediaSourceHelper.cc", "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_Dispatcher.cpp", "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_MediaControl.cpp", "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_MediaSource.cpp", - "../ortclib/ortc/idl/wrapper/cx/cx_custom_RTMediaStreamSource.cc", - "../ortclib/ortc/idl/wrapper/cx/cx_custom_WebRtcMediaSource.cc", - "../ortclib/ortc/idl/wrapper/cx/cx_custom_WebRtcMediaStream.cc", ] if (is_linux) { lib_dirs = [ From bf4a01da377c6d5255e23b4b58b17e5b2315e28b Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Sat, 4 Nov 2017 23:00:50 +0100 Subject: [PATCH 164/187] BUILD.gn cleanup --- BUILD.gn | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 588551e2..b9c8bf7d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -46,7 +46,7 @@ config("ortclib_config") { "../ortclib/ortc/idl/wrapper", ] - if (is_winuwp) + if (is_winuwp) { include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] } @@ -1107,16 +1107,19 @@ shared_library("ortclib") { "../ortclib/ortc/idl", "../ortclib/ortc/idl/wrapper", ] - - include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] sources = ortc_sources + if (is_winuwp) + { + include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] + sources += [ "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_Dispatcher.cpp", "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_MediaControl.cpp", "../ortclib/ortc/idl/wrapper/cx/cx_custom_Org_Ortc_MediaSource.cpp", ] + } if (is_linux) { lib_dirs = [ "/usr/lib", @@ -1215,6 +1218,14 @@ static_library("ortclib_generated_static") { sources = ortc_sources_cxx_glue sources += ortc_sources_cxx_generated + if (!is_winuwp) + { + sources -= [ + "ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp", + "ortc/idl/wrapper/impl_org_ortc_OrtcLibWithDispatcher.cpp", + ] + } + defines = [ "_LIB", "USE_ETW", From 8abb5062ff3cdc20e17035f4d12a3dadf7cdadc5 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Mon, 6 Nov 2017 17:43:55 +0100 Subject: [PATCH 165/187] Resolved release build linking issues --- ortc/cpp/ortc_DTLSTransport.cpp | 2 ++ ortc/cpp/ortc_DTMFSender.cpp | 2 ++ ortc/cpp/ortc_DataChannel.cpp | 2 ++ ortc/cpp/ortc_ICEGatherer.cpp | 2 ++ ortc/cpp/ortc_ICETransport.cpp | 2 ++ ortc/cpp/ortc_MediaDevices.cpp | 2 ++ ortc/cpp/ortc_MediaStreamTrack.cpp | 2 ++ ortc/cpp/ortc_RTPListener.cpp | 2 ++ ortc/cpp/ortc_RTPReceiver.cpp | 2 ++ ortc/cpp/ortc_RTPSender.cpp | 2 ++ ortc/cpp/ortc_SCTPTransport.cpp | 2 ++ ortc/cpp/ortc_SCTPTransportListener.cpp | 2 ++ ortc/cpp/ortc_SRTPSDESTransport.cpp | 4 +++- ortc/cpp/ortc_SRTPTransport.cpp | 2 ++ 14 files changed, 29 insertions(+), 1 deletion(-) diff --git a/ortc/cpp/ortc_DTLSTransport.cpp b/ortc/cpp/ortc_DTLSTransport.cpp index 9d23ac0a..96acf11e 100644 --- a/ortc/cpp/ortc_DTLSTransport.cpp +++ b/ortc/cpp/ortc_DTLSTransport.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_DTMFSender.cpp b/ortc/cpp/ortc_DTMFSender.cpp index 3e5a20b0..ab9372c1 100644 --- a/ortc/cpp/ortc_DTMFSender.cpp +++ b/ortc/cpp/ortc_DTMFSender.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_DataChannel.cpp b/ortc/cpp/ortc_DataChannel.cpp index b4b5a317..803ed04a 100644 --- a/ortc/cpp/ortc_DataChannel.cpp +++ b/ortc/cpp/ortc_DataChannel.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_ICEGatherer.cpp b/ortc/cpp/ortc_ICEGatherer.cpp index 75db53ef..01eafe5c 100644 --- a/ortc/cpp/ortc_ICEGatherer.cpp +++ b/ortc/cpp/ortc_ICEGatherer.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_ICETransport.cpp b/ortc/cpp/ortc_ICETransport.cpp index 8933c144..322c2d1a 100644 --- a/ortc/cpp/ortc_ICETransport.cpp +++ b/ortc/cpp/ortc_ICETransport.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index 242a6745..4616e97c 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index aa4c87f6..9e6193a9 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_RTPListener.cpp b/ortc/cpp/ortc_RTPListener.cpp index b33c7590..70e272da 100644 --- a/ortc/cpp/ortc_RTPListener.cpp +++ b/ortc/cpp/ortc_RTPListener.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_RTPReceiver.cpp b/ortc/cpp/ortc_RTPReceiver.cpp index 7571ab76..31746fd2 100644 --- a/ortc/cpp/ortc_RTPReceiver.cpp +++ b/ortc/cpp/ortc_RTPReceiver.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_RTPSender.cpp b/ortc/cpp/ortc_RTPSender.cpp index ac0fcf9c..ad65f195 100644 --- a/ortc/cpp/ortc_RTPSender.cpp +++ b/ortc/cpp/ortc_RTPSender.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_SCTPTransport.cpp b/ortc/cpp/ortc_SCTPTransport.cpp index 9e05b1bf..4ecacf65 100644 --- a/ortc/cpp/ortc_SCTPTransport.cpp +++ b/ortc/cpp/ortc_SCTPTransport.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_SCTPTransportListener.cpp b/ortc/cpp/ortc_SCTPTransportListener.cpp index 7d74eb5a..ad070942 100644 --- a/ortc/cpp/ortc_SCTPTransportListener.cpp +++ b/ortc/cpp/ortc_SCTPTransportListener.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_SRTPSDESTransport.cpp b/ortc/cpp/ortc_SRTPSDESTransport.cpp index a7e759b5..93d74473 100644 --- a/ortc/cpp/ortc_SRTPSDESTransport.cpp +++ b/ortc/cpp/ortc_SRTPSDESTransport.cpp @@ -1,4 +1,4 @@ -/* + /* Copyright (c) 2014, Hookflash Inc. / Hookflash Inc. All rights reserved. @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include diff --git a/ortc/cpp/ortc_SRTPTransport.cpp b/ortc/cpp/ortc_SRTPTransport.cpp index 409bc01c..3f4d9b1b 100644 --- a/ortc/cpp/ortc_SRTPTransport.cpp +++ b/ortc/cpp/ortc_SRTPTransport.cpp @@ -29,6 +29,8 @@ */ +#define ZS_DECLARE_TEMPLATE_GENERATE_IMPLEMENTATION + #include #include #include From 02169d15be2397f846db826ea8164114e9279500 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Tue, 7 Nov 2017 14:07:50 +0100 Subject: [PATCH 166/187] Fixed curl library paths --- BUILD.gn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index b9c8bf7d..df77b6ac 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1130,32 +1130,32 @@ shared_library("ortclib") { if ((target_os == "winuwp_10") && (target_cpu == "x64") && is_debug) { lib_dirs = [ - "..\..\ortc\curl\x64-debug-dll\lib", + "..\..\ortc\curl\x64-debug-static\lib", ] libs = [ "libcurl.lib" ] } else if ((target_os == "winuwp_10") && (target_cpu == "x64") && !is_debug) { lib_dirs = [ - "..\..\ortc\curl\x64-release-dll\lib", + "..\..\ortc\curl\x64-release-static\lib", ] libs = [ "libcurl.lib" ] } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && is_debug) { lib_dirs = [ - "..\..\ortc\curl\x86-debug-dll\lib", + "..\..\ortc\curl\x86-debug-static\lib", ] libs = [ "libcurl.lib" ] } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && !is_debug) { lib_dirs = [ - "..\..\ortc\curl\x86-release-dll\lib", + "..\..\ortc\curl\x86-release-static\lib", ] libs = [ "libcurl.lib" ] } else if (is_win && is_debug) { lib_dirs = [ - "..\..\ortc\curl\x86-debug-dll\lib", + "..\..\ortc\curl\x86-debug-static\lib", ] libs = [ "libcurl.lib", "userenv.lib" ] } else if (is_win && !is_debug) { lib_dirs = [ - "..\..\ortc\curl\x86-release-dll\lib", + "..\..\ortc\curl\x86-release-static\lib", ] libs = [ "libcurl.lib", "userenv.lib" ] } From 0667903f67ae7d429eae58c36e0aa35e3e3001a2 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 8 Nov 2017 15:56:33 -0500 Subject: [PATCH 167/187] added jman file includes for eventing --- ortc/cpp/ortc_ORTC.cpp | 2 ++ ortc/internal/platform.h | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ortc/cpp/ortc_ORTC.cpp b/ortc/cpp/ortc_ORTC.cpp index 7e32ee67..fcf05847 100644 --- a/ortc/cpp/ortc_ORTC.cpp +++ b/ortc/cpp/ortc_ORTC.cpp @@ -32,7 +32,9 @@ #include #include +#include #include +#include #include #include diff --git a/ortc/internal/platform.h b/ortc/internal/platform.h index f12bac30..70475e7e 100644 --- a/ortc/internal/platform.h +++ b/ortc/internal/platform.h @@ -108,13 +108,13 @@ #endif //__APPPLE__ -#ifdef _LINUX +#ifdef __linux__ // Linux has these options #define HAVE_SYS_TYPES_H 1 #define HAVE_IFADDRS_H 1 #define HAVE_NET_IF_H 1 -#define HAVE_NETINIT6_IN6_VAR_H 1 +//#define HAVE_NETINIT6_IN6_VAR_H 1 #define HAVE_GETIFADDRS 1 #ifdef _ANDROID @@ -125,4 +125,4 @@ #undef HAVE_IFADDRS_H #endif //_ANDROID -#endif //_LINUX +#endif //__linux__ From f0d09046953678e4b8f2bdbb8a59dea263166749 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Thu, 9 Nov 2017 15:26:59 +0100 Subject: [PATCH 168/187] fix for error C2491: string_t_wrapperCreate_string: definition of dllimport function not allowed --- BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILD.gn b/BUILD.gn index df77b6ac..791da7e0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1179,6 +1179,7 @@ shared_library("ortclib") { defines = [ "SHARED", + "ORTC_WRAPPER_C_GENERATED_IMPLEMENTATION", "USE_ETW", "USE_OPENSSL=1", "NOMINMAX", From 2afae62899db2e962949e489b5f5fb26cffe4115 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 14 Nov 2017 22:19:25 -0500 Subject: [PATCH 169/187] - added git ignore for jman.h --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 459ff958..f8326c12 100644 --- a/.gitignore +++ b/.gitignore @@ -8,12 +8,14 @@ ortc/internal/ortc.stats.events_win_etw.h ortc/internal/ortc.stats.events_win.h ortc/internal/ortc.stats.events.h ortc/internal/ortc.stats.events.jman +ortc/internal/ortc.stats.events.jman.h ortc/internal/ortc.stats.events_win_etw.wprp ortc/internal/ortc.stats.events_win_etw.man ortc/internal/ortc.events_win_etw.h ortc/internal/ortc.events_win.h ortc/internal/ortc.events.h ortc/internal/ortc.events.jman +ortc/internal/ortc.events.jman.h ortc/internal/ortc.events_win_etw.wprp ortc/internal/ortc.events_win_etw.man *.db From 66a99b412ffce6d63d1137cfa5109de407ada484 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Thu, 16 Nov 2017 23:50:19 +0100 Subject: [PATCH 170/187] Updated BUILD.gn to enable iOs building. --- BUILD.gn | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 791da7e0..000da61f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1049,6 +1049,12 @@ static_library("ortclib_static") { ] } + if (is_ios || is_mac) { + defines += [ + "WEBRTC_POSIX", + ] + } + if (is_win) { defines += [ "WEBRTC_WIN", ] } @@ -1071,7 +1077,17 @@ shared_library("ortclib") { configs -= [ "//build/config/compiler:chromium_code" ] if (!is_win) { - configs -= [ "//build/config/gcc:no_exceptions" ] + configs -= [ "//build/config/gcc:no_exceptions", ] + if (is_ios || is_mac) { + cflags_cc = [ + "-Wall", + "-std=c++11", + "-g", + ] + ldflags = [ + "-ObjC", + ] + } } else { cflags_cc = [ "/WX-", @@ -1158,7 +1174,12 @@ shared_library("ortclib") { "..\..\ortc\curl\x86-release-static\lib", ] libs = [ "libcurl.lib", "userenv.lib" ] - } + } else { + lib_dirs = [ + "..\..\ortc\curl\curl\ios-appstore\lib", + ] + libs = [ "libcurl.a" ] + } deps = [ "//ortc/zsLib:zslib", @@ -1189,6 +1210,12 @@ shared_library("ortclib") { "UNICODE", ] + if (is_ios || is_mac) { + defines += [ + "WEBRTC_POSIX", + ] + } + if (is_linux) { defines += [ "WEBRTC_POSIX", From 654d215f60cfbb42e9804afeac1dc76c236f9507 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Fri, 17 Nov 2017 21:29:39 +0100 Subject: [PATCH 171/187] Resolved Ortc build issue for linux --- BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 000da61f..9c0fc74b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1174,8 +1174,8 @@ shared_library("ortclib") { "..\..\ortc\curl\x86-release-static\lib", ] libs = [ "libcurl.lib", "userenv.lib" ] - } else { - lib_dirs = [ + } else if (is_mac || is_ios){ + lib_dirs += [ "..\..\ortc\curl\curl\ios-appstore\lib", ] libs = [ "libcurl.a" ] From 0ae3c79698299680f84b934440422d67673afcfc Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Tue, 21 Nov 2017 14:46:34 +0100 Subject: [PATCH 172/187] Resolved Ortc linking issues for iOS --- BUILD.gn | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 9c0fc74b..de5bfef4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1085,7 +1085,8 @@ shared_library("ortclib") { "-g", ] ldflags = [ - "-ObjC", + "-lz", + "-lresolv", ] } } else { @@ -1175,10 +1176,7 @@ shared_library("ortclib") { ] libs = [ "libcurl.lib", "userenv.lib" ] } else if (is_mac || is_ios){ - lib_dirs += [ - "..\..\ortc\curl\curl\ios-appstore\lib", - ] - libs = [ "libcurl.a" ] + libs = [ "../../ortc/curl/curl/ios-appstore/lib/libcurl.a" ] } deps = [ From 9ad01b2731cf4f84a038cd5f88e030dd44748511 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Wed, 6 Dec 2017 18:30:51 +0100 Subject: [PATCH 173/187] fix for unresolved references (IdnToAscii, IdnToUnicode) --- BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index de5bfef4..285f17f3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1169,12 +1169,12 @@ shared_library("ortclib") { lib_dirs = [ "..\..\ortc\curl\x86-debug-static\lib", ] - libs = [ "libcurl.lib", "userenv.lib" ] + libs = [ "libcurl.lib", "userenv.lib", "normaliz.lib" ] } else if (is_win && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-release-static\lib", ] - libs = [ "libcurl.lib", "userenv.lib" ] + libs = [ "libcurl.lib", "userenv.lib", "normaliz.lib" ] } else if (is_mac || is_ios){ libs = [ "../../ortc/curl/curl/ios-appstore/lib/libcurl.a" ] } From 9d7cc79511c0913688e9615b79d0dbba88edb8db Mon Sep 17 00:00:00 2001 From: ivanab Date: Wed, 27 Dec 2017 17:39:48 +0100 Subject: [PATCH 174/187] updated linker fleg for ortclib shared library --- BUILD.gn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 285f17f3..df9c37e3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1095,6 +1095,9 @@ shared_library("ortclib") { "/wd4068", ] } + ldflags = [ + "/FIXED:NO", + ] From bd3ecb1a18c17e138cbc4b2d6358366f530b85d0 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Thu, 28 Dec 2017 19:22:44 +0100 Subject: [PATCH 175/187] Renamed shared target from ortclib to libOrtc. Updated linking flags for win32 libOrtc build --- BUILD.gn | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index df9c37e3..b93aad00 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1071,7 +1071,7 @@ static_library("ortclib_static") { } -shared_library("ortclib") { +shared_library("libOrtc") { configs -= [ "//build/config/compiler:no_rtti" ] configs -= [ "//build/config/compiler:chromium_code" ] @@ -1094,13 +1094,12 @@ shared_library("ortclib") { "/WX-", "/wd4068", ] - } - ldflags = [ + if (!is_winuwp) { + ldflags = [ "/FIXED:NO", ] - - - + } + } include_dirs = [ ".", "..", From e0c655decd77f2e4899ec9b410524a9df87c921e Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Sat, 20 Jan 2018 00:44:40 +0100 Subject: [PATCH 176/187] Moving cryptopp, udns, idnkit to third_party --- BUILD.gn | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 285f17f3..ddacdb90 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -27,6 +27,7 @@ config("ortclib_config") { "../zsLib/zsLib/extras", "../zsLib-eventing", "../ortclib-services", + "../../third_party", "../../third_party/boringssl/include", "../../third_party/usrsctp/usrsctplib", "../../third_party/libsrtp/srtp/include", @@ -1105,6 +1106,7 @@ shared_library("ortclib") { "../zsLib/zsLib/extras", "../zsLib-eventing", "../ortclib-services", + "../../third_party", "../../third_party/boringssl/include", "../../third_party/usrsctp/usrsctplib", "../../third_party/libsrtp/srtp/include", @@ -1182,14 +1184,14 @@ shared_library("ortclib") { deps = [ "//ortc/zsLib:zslib", "//ortc/zsLib-eventing:zslib-eventing", - "//ortc/cryptopp", - "//ortc/udns", - "//ortc/idnkit", + "//third_party/cryptopp:cryptopp", + "//third_party/idnkit:idnkit", + "//third_party/udns:udns", ":ortclib_generated_static", "//ortc/ortclib-services", "//third_party/boringssl:boringssl", - "//third_party/usrsctp:usrsctp", - "//third_party/libsrtp:libsrtp", + "//third_party/usrsctp:usrsctp", + "//third_party/libsrtp:libsrtp", "//webrtc/modules/audio_device", "//webrtc/system_wrappers:metrics_default", "//webrtc/modules/video_capture:video_capture_module", From 5f792736f17dc6e1d1290ec2fe1b311c0b7244c0 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Mon, 22 Jan 2018 13:27:34 +0100 Subject: [PATCH 177/187] Added /EHsc compiler option for Windows win32 builds. --- BUILD.gn | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index b93aad00..6096ab00 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -7,11 +7,16 @@ import("//ortc/ortclib/ortc/idl/sources.gni") config("ortclib_config") { if (is_win) { - cflags_cc = [ - "/WX-", - "/wd4068", - "/GR", - ] + cflags_cc = [ + "/WX-", + "/wd4068", + "/GR", + ] + + if (!is_winuwp) + { + cflags_cc += ["/EHsc"] + } } else { cflags_cc = [ "-g" ] cflags_cc += [ @@ -1098,6 +1103,7 @@ shared_library("libOrtc") { ldflags = [ "/FIXED:NO", ] + cflags_cc += ["/EHsc"] } } include_dirs = [ From 029cc1d2e62d5dfa585d1a3994693a551b1f4c68 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 26 Jan 2018 09:29:24 -0500 Subject: [PATCH 178/187] bug: fixed processing of candidate complete in wrapper bug: remapping of newly created SCTP transport to incoming remote SCTP channel to fix race condition upgrade:cleaned up namespaces of all the subsystems / logging componenets upgrade: eventing tracing of sub objects not formalized to be more consistent and output at the event level of the caller not callee upgrade: removal of dead weight commented eventing code --- ortc/IMediaStreamTrack.h | 10 +- ortc/RTCPPacket.h | 5 +- ortc/RTPPacket.h | 45 +- ortc/adapter/cpp/ortc_adapter_Helper.cpp | 2 +- ortc/adapter/cpp/ortc_adapter_MediaStream.cpp | 5 +- .../cpp/ortc_adapter_PeerConnection.cpp | 2 +- ortc/adapter/cpp/ortc_adapter_SDPParser.cpp | 2 +- ...rtc_adapter_SDPParser_DescriptionToSDP.cpp | 2 +- .../ortc_adapter_SDPParser_GenerateSDP.cpp | 2 +- .../cpp/ortc_adapter_SDPParser_ParseSDP.cpp | 2 +- ...rtc_adapter_SDPParser_SDPToDescription.cpp | 2 +- .../cpp/ortc_adapter_SessionDescription.cpp | 2 +- ortc/adapter/cpp/ortc_adapter_adapter.cpp | 2 +- ortc/cpp/ortc.cpp | 74 +-- ortc/cpp/ortc.events.json | 6 + ortc/cpp/ortc_Capabilities.cpp | 2 +- ortc/cpp/ortc_Certificate.cpp | 2 +- ortc/cpp/ortc_Constraints.cpp | 2 +- ortc/cpp/ortc_DTLSTransport.cpp | 5 +- ortc/cpp/ortc_DTMFSender.cpp | 2 +- ortc/cpp/ortc_DataChannel.cpp | 32 +- ortc/cpp/ortc_Helper.cpp | 2 +- ortc/cpp/ortc_ICEGatherer.cpp | 27 +- ortc/cpp/ortc_ICEGathererRouter.cpp | 54 +- ortc/cpp/ortc_ICETransport.cpp | 117 ++-- ortc/cpp/ortc_ICETransportController.cpp | 2 +- ortc/cpp/ortc_ICETypes.cpp | 2 +- ortc/cpp/ortc_ISecureTransport.cpp | 2 +- ortc/cpp/ortc_Identity.cpp | 2 +- ortc/cpp/ortc_MediaChannelTraceHelper.cpp | 2 +- ortc/cpp/ortc_MediaDevice.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCapture.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp | 2 +- ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp | 2 +- ortc/cpp/ortc_MediaDeviceRenderAudio.cpp | 2 +- ortc/cpp/ortc_MediaDevices.cpp | 5 +- ortc/cpp/ortc_MediaEngine.cpp | 2 +- ortc/cpp/ortc_MediaStreamTrack.cpp | 58 +- ortc/cpp/ortc_MediaStreamTrackMonitor.cpp | 2 +- ortc/cpp/ortc_ORTC.cpp | 2 +- ortc/cpp/ortc_RTCPPacket.cpp | 114 ++-- ortc/cpp/ortc_RTP.cpp | 2 +- ortc/cpp/ortc_RTPDecoderAudio.cpp | 2 +- ortc/cpp/ortc_RTPDecoderVideo.cpp | 2 +- ortc/cpp/ortc_RTPEncoderAudio.cpp | 2 +- ortc/cpp/ortc_RTPEncoderVideo.cpp | 2 +- ortc/cpp/ortc_RTPListener.cpp | 2 +- ortc/cpp/ortc_RTPPacket.cpp | 137 +++-- ortc/cpp/ortc_RTPReceiver.cpp | 6 +- ortc/cpp/ortc_RTPReceiverChannel.cpp | 2 +- ortc/cpp/ortc_RTPSender.cpp | 4 +- ortc/cpp/ortc_RTPSenderChannel.cpp | 2 +- ortc/cpp/ortc_RTPTypes.cpp | 2 +- ortc/cpp/ortc_RTPUtils.cpp | 2 +- ortc/cpp/ortc_SCTPTransport.cpp | 501 ++++++++++++++---- ortc/cpp/ortc_SCTPTransportListener.cpp | 38 +- ortc/cpp/ortc_SRTPSDESTransport.cpp | 2 +- ortc/cpp/ortc_SRTPTransport.cpp | 2 +- ortc/cpp/ortc_StatsReport.cpp | 2 +- ortc/cpp/ortc_webrtc.cpp | 2 +- ortc/idl/Logger.idl | 85 +-- ortc/idl/wrapper/impl_org_ortc.cpp | 4 +- ortc/idl/wrapper/impl_org_ortc_Helper.cpp | 61 ++- ortc/idl/wrapper/impl_org_ortc_Helper.h | 1 - ortc/idl/wrapper/impl_org_ortc_Json.cpp | 1 - ortc/idl/wrapper/impl_org_ortc_Json.h | 1 - ortc/idl/wrapper/impl_org_ortc_Logger.cpp | 24 +- .../impl_org_ortc_MediaStreamTrack.cpp | 2 +- .../wrapper/impl_org_ortc_RTCDataChannel.cpp | 2 +- .../impl_org_ortc_RTCDtlsTransport.cpp | 2 +- .../wrapper/impl_org_ortc_RTCDtmfSender.cpp | 2 +- .../wrapper/impl_org_ortc_RTCIceGatherer.cpp | 2 +- ...c_RTCIceGathererCandidateCompleteEvent.cpp | 3 +- .../wrapper/impl_org_ortc_RTCIceTransport.cpp | 2 +- ...mpl_org_ortc_RTCIceTransportController.cpp | 2 +- .../wrapper/impl_org_ortc_RTCRtpListener.cpp | 2 +- .../wrapper/impl_org_ortc_RTCRtpReceiver.cpp | 2 +- .../wrapper/impl_org_ortc_RTCRtpSender.cpp | 2 +- .../impl_org_ortc_RTCSctpTransport.cpp | 2 +- ...impl_org_ortc_RTCSctpTransportListener.cpp | 2 +- .../impl_org_ortc_RTCSrtpSdesTransport.cpp | 2 +- .../impl_org_ortc_adapter_MediaStream.cpp | 2 +- ...mpl_org_ortc_adapter_RTCPeerConnection.cpp | 2 +- ...org_ortc_adapter_RTCSessionDescription.cpp | 2 +- ortc/internal/ortc_DataChannel.h | 7 + ortc/internal/ortc_ICEGatherer.h | 5 +- ortc/internal/ortc_ICEGathererRouter.h | 5 +- ortc/internal/ortc_ICETransport.h | 5 +- ortc/internal/ortc_MediaStreamTrack.h | 17 +- ortc/internal/ortc_SCTPTransport.h | 56 +- ortc/test/TestDTLS.cpp | 2 +- ortc/test/TestICEGatherer.cpp | 2 +- ortc/test/TestICETransport.cpp | 2 +- ortc/test/TestMediaStreamTrack.cpp | 2 +- ortc/test/TestRTCPPacket.cpp | 2 +- ortc/test/TestRTPChannel.cpp | 2 +- ortc/test/TestRTPChannelAudio.cpp | 2 +- ortc/test/TestRTPChannelVideo.cpp | 2 +- ortc/test/TestRTPListener.cpp | 2 +- ortc/test/TestRTPPacket.cpp | 2 +- ortc/test/TestRTPReceiver.cpp | 2 +- ortc/test/TestRTPSender.cpp | 2 +- ortc/test/TestSCTP.cpp | 2 +- ortc/test/TestSRTP.cpp | 2 +- ortc/test/TestSetup.cpp | 2 +- ortc/test/testing.cpp | 2 +- 106 files changed, 1044 insertions(+), 620 deletions(-) diff --git a/ortc/IMediaStreamTrack.h b/ortc/IMediaStreamTrack.h index 1c399163..027064e2 100644 --- a/ortc/IMediaStreamTrack.h +++ b/ortc/IMediaStreamTrack.h @@ -408,15 +408,15 @@ namespace ortc public IMediaStreamTrackTypes, public IStatsProvider { - static void trace( - IMediaStreamTrackPtr object, - const char *message = NULL - ); - static IMediaStreamTrackPtr convert(AnyPtr any); virtual MediaChannelID getID() const = 0; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const = 0; + virtual IMediaStreamTrackSubscriptionPtr subscribe(IMediaStreamTrackDelegatePtr delegate) = 0; virtual Kinds kind() const = 0; diff --git a/ortc/RTCPPacket.h b/ortc/RTCPPacket.h index 58b2efd3..f9d2d476 100644 --- a/ortc/RTCPPacket.h +++ b/ortc/RTCPPacket.h @@ -1472,7 +1472,10 @@ namespace ortc XR *xrAtIndex(size_t index) const; UnknownReport *unknownAtIndex(size_t index) const; - void trace(const char *message = NULL) const; + void trace( + const char *func = NULL, + const char *message = NULL + ) const; protected: //----------------------------------------------------------------------- diff --git a/ortc/RTPPacket.h b/ortc/RTPPacket.h index 15fee285..49dbbec9 100644 --- a/ortc/RTPPacket.h +++ b/ortc/RTPPacket.h @@ -104,7 +104,10 @@ namespace ortc HeaderExtension *mNext {}; - virtual void trace(const char *message) const; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const; }; //----------------------------------------------------------------------- @@ -126,7 +129,10 @@ namespace ortc bool voiceActivity() const; BYTE level() const; - virtual void trace(const char *message) const override; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const override; public: BYTE mLevelBuffer {}; @@ -155,7 +161,10 @@ namespace ortc BYTE unusedBit(size_t index) const; BYTE level(size_t index) const; - virtual void trace(const char *message) const override; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const override; public: BYTE mLevelBuffer[kMaxLevelCount] {}; @@ -178,7 +187,10 @@ namespace ortc const char *str() const; - virtual void trace(const char *message) const override; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const override; public: BYTE mStringBuffer[kMaxStringLength+sizeof(char)] {}; @@ -209,7 +221,10 @@ namespace ortc String str() const; - virtual void trace(const char *message) const override; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const override; public: BYTE mNumberBuffer[kMaxNumberByteLength] {}; @@ -234,7 +249,10 @@ namespace ortc const char *mid() const {return str();} - virtual void trace(const char *message) const override; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const override; public: }; @@ -258,7 +276,10 @@ namespace ortc const char *rid() const {return str();} - virtual void trace(const char *message) const override; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const override; public: }; @@ -294,7 +315,10 @@ namespace ortc virtual UINT degreesClockwise() const; virtual UINT degreesCounterClockwise() const; - virtual void trace(const char *message) const override; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const override; public: BYTE mEncoded[1] {}; @@ -392,7 +416,10 @@ namespace ortc void changeHeaderExtensions(HeaderExtension *firstExtension); - void trace(const char *message = NULL) const; + void trace( + const char *func = NULL, + const char *message = NULL + ) const; protected: //----------------------------------------------------------------------- diff --git a/ortc/adapter/cpp/ortc_adapter_Helper.cpp b/ortc/adapter/cpp/ortc_adapter_Helper.cpp index ce0edcc2..200720bf 100644 --- a/ortc/adapter/cpp/ortc_adapter_Helper.cpp +++ b/ortc/adapter/cpp/ortc_adapter_Helper.cpp @@ -45,7 +45,7 @@ //#define USE_TEMPORAL_LAYERS //#define USE_SPATIAL_LAYERS -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter) } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter) } } namespace ortc { diff --git a/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp b/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp index 86a6d2ab..611da14f 100644 --- a/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp +++ b/ortc/adapter/cpp/ortc_adapter_MediaStream.cpp @@ -40,10 +40,11 @@ #include +#include #include #include -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter); } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter); } } namespace ortc { @@ -327,7 +328,7 @@ namespace ortc AutoRecursiveLock lock(*this); auto result = getTrackByID(track->id()); if (nullptr != result) { - IMediaStreamTrack::trace(track, "already added track (not added again)"); + ZS_EVENTING_TRACE_OBJECT_PTR(Detail, track, "already added track (not added again)"); ZS_LOG_WARNING(Debug, log("already added track (not added again)")); return; } diff --git a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp index 522f9024..4c123ece 100644 --- a/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp +++ b/ortc/adapter/cpp/ortc_adapter_PeerConnection.cpp @@ -55,7 +55,7 @@ #pragma warning(3 : 4062) #endif //_MSC_VER -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter) } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter) } } namespace ortc { diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp index 90df6b4a..a3ed1a3c 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser.cpp @@ -50,7 +50,7 @@ #pragma warning(3 : 4062) #endif //_MSC_VER -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter) } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter) } } namespace ortc { diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp index 6bd47535..1326b91d 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_DescriptionToSDP.cpp @@ -50,7 +50,7 @@ #pragma warning(3 : 4062) #endif //_MSC_VER -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter) } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter) } } namespace ortc { diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp index b6adefcd..03e8c127 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_GenerateSDP.cpp @@ -50,7 +50,7 @@ #pragma warning(3 : 4062) #endif //_MSC_VER -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter) } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter) } } namespace ortc { diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp index 24c7d979..842dd85c 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_ParseSDP.cpp @@ -48,7 +48,7 @@ #pragma warning(3 : 4062) #endif //_MSC_VER -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter) } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter) } } namespace ortc { diff --git a/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp b/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp index c4de2861..a5854cfc 100644 --- a/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SDPParser_SDPToDescription.cpp @@ -50,7 +50,7 @@ #pragma warning(3 : 4062) #endif //_MSC_VER -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter) } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter) } } namespace ortc { diff --git a/ortc/adapter/cpp/ortc_adapter_SessionDescription.cpp b/ortc/adapter/cpp/ortc_adapter_SessionDescription.cpp index 9d98bfd0..839002f1 100644 --- a/ortc/adapter/cpp/ortc_adapter_SessionDescription.cpp +++ b/ortc/adapter/cpp/ortc_adapter_SessionDescription.cpp @@ -48,7 +48,7 @@ #pragma warning(3 : 4062) #endif //_MSC_VER -namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortclib_adapter) } } +namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_adapter) } } namespace ortc { diff --git a/ortc/adapter/cpp/ortc_adapter_adapter.cpp b/ortc/adapter/cpp/ortc_adapter_adapter.cpp index f6acc9b5..3d533d81 100644 --- a/ortc/adapter/cpp/ortc_adapter_adapter.cpp +++ b/ortc/adapter/cpp/ortc_adapter_adapter.cpp @@ -41,7 +41,7 @@ //#include -namespace ortc { namespace adapter { ZS_IMPLEMENT_SUBSYSTEM(ortclib_adapter); } } +namespace ortc { namespace adapter { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_adapter); } } namespace ortc { diff --git a/ortc/cpp/ortc.cpp b/ortc/cpp/ortc.cpp index 476a9e7a..07d39dfb 100644 --- a/ortc/cpp/ortc.cpp +++ b/ortc/cpp/ortc.cpp @@ -39,43 +39,43 @@ #include #include -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_webrtc) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_dtlstransport) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_icegatherer) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_icegatherer_router) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_icetransport) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_icetransport_controller) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_mediadevices) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_mediaengine) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_mediastreamtrack) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtp_rtcp_packet) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtplistener) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtpreceiver) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtpsender) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_rtptypes) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_sctp_datachannel) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_srtp) } -namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortclib_stats) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_webrtc) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_dtls_transport) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_ice_gatherer) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_ice_gatherer_router) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_ice_transport) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_ice_transport_controller) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_media_devices) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_media_engine) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_media_stream_track) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_rtp_rtcp_packet) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_rtp_listener) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_rtp_receiver) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_rtp_sender) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_rtp_types) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_sctp_data_channel) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_srtp) } +namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_stats) } ZS_EVENTING_EXCLUSIVE(OrtcLib); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_webrtc, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_dtlstransport, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_icegatherer, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_icegatherer_router, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_icetransport, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_icetransport_controller, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_mediadevices, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_mediaengine, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_mediastreamtrack, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtp_rtcp_packet, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtplistener, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtpreceiver, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtpsender, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_rtptypes, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_sctp_datachannel, Debug); -ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(ortclib_srtp, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_webrtc, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_dtlstransport, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_ice_gatherer, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_ice_gatherer_router, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_ice_transport, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_ice_transport_controller, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_media_devices, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_media_engine, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_media_stream_track, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_rtp_rtcp_packet, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_rtp_listener, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_rtp_receiver, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_rtp_sender, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_rtp_types, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_sctp_data_channel, Debug); +ZS_EVENTING_SUBSYSTEM_DEFAULT_LEVEL(org_ortc_srtp, Debug); ZS_EVENTING_EXCLUSIVE(x); ZS_EVENTING_EXCLUSIVE(OrtcLibStatsReport); @@ -88,8 +88,8 @@ namespace ortc { void initSubsystems() { - ZS_GET_SUBSYSTEM_LOG_LEVEL(ZS_GET_OTHER_SUBSYSTEM(ortc, ortclib)); - ZS_GET_SUBSYSTEM_LOG_LEVEL(ZS_GET_OTHER_SUBSYSTEM(ortc, ortclib_webrtc)); + ZS_GET_SUBSYSTEM_LOG_LEVEL(ZS_GET_OTHER_SUBSYSTEM(ortc, org_ortc)); + ZS_GET_SUBSYSTEM_LOG_LEVEL(ZS_GET_OTHER_SUBSYSTEM(ortc, org_ortc_webrtc)); } } } diff --git a/ortc/cpp/ortc.events.json b/ortc/cpp/ortc.events.json index 6efff9c9..7277e26b 100644 --- a/ortc/cpp/ortc.events.json +++ b/ortc/cpp/ortc.events.json @@ -231,6 +231,12 @@ { "name": "Parse" }, + { + "name": "Install" + }, + { + "name": "Remove" + }, { "name": "Event" }, diff --git a/ortc/cpp/ortc_Capabilities.cpp b/ortc/cpp/ortc_Capabilities.cpp index b1d5a83f..bc808764 100644 --- a/ortc/cpp/ortc_Capabilities.cpp +++ b/ortc/cpp/ortc_Capabilities.cpp @@ -46,7 +46,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_Certificate.cpp b/ortc/cpp/ortc_Certificate.cpp index f5993ea2..ae60a595 100644 --- a/ortc/cpp/ortc_Certificate.cpp +++ b/ortc/cpp/ortc_Certificate.cpp @@ -57,7 +57,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_Constraints.cpp b/ortc/cpp/ortc_Constraints.cpp index 25736bcc..c3203af2 100644 --- a/ortc/cpp/ortc_Constraints.cpp +++ b/ortc/cpp/ortc_Constraints.cpp @@ -48,7 +48,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_DTLSTransport.cpp b/ortc/cpp/ortc_DTLSTransport.cpp index 96acf11e..c1fff9eb 100644 --- a/ortc/cpp/ortc_DTLSTransport.cpp +++ b/ortc/cpp/ortc_DTLSTransport.cpp @@ -74,7 +74,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_dtlstransport) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_dtls_transport) } namespace ortc { @@ -1035,7 +1035,8 @@ namespace ortc puid, id, mID, enum, viaComponent, zsLib::to_underlying(viaComponent) ); - packet->trace(__func__); + + ZS_EVENTING_TRACE_OBJECT(Trace, *packet, "dtls received stun packet"); ZS_LOG_TRACE(log("handle receive STUN packet") + packet->toDebug()) diff --git a/ortc/cpp/ortc_DTMFSender.cpp b/ortc/cpp/ortc_DTMFSender.cpp index ab9372c1..53bfce38 100644 --- a/ortc/cpp/ortc_DTMFSender.cpp +++ b/ortc/cpp/ortc_DTMFSender.cpp @@ -57,7 +57,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_sender) } namespace ortc { diff --git a/ortc/cpp/ortc_DataChannel.cpp b/ortc/cpp/ortc_DataChannel.cpp index 803ed04a..287a3557 100644 --- a/ortc/cpp/ortc_DataChannel.cpp +++ b/ortc/cpp/ortc_DataChannel.cpp @@ -61,7 +61,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_sctp_datachannel) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_sctp_data_channel) } namespace ortc { @@ -286,7 +286,7 @@ namespace ortc ZS_EVENTING_5( x, i, Detail, DataChannelCreate, ol, DataChannel, Start, puid, id, mID, - puid, dataTransportId, ((bool)transport) ? transport->getID() : 0, + puid, dataTransportId, ((bool)transport) ? transport->getRealID() : 0, string, parameters, ((bool)mParameters) ? IHelper::toString(mParameters->createElement("params")) : String(), bool, incoming, mIncoming, word, sessionId, mSessionID @@ -693,12 +693,20 @@ namespace ortc //------------------------------------------------------------------------- void DataChannel::notifyClosed() { - ZS_EVENTING_1(x, i, Trace, DataChannelSCTPTransportRequestNotifyClosed, ol, DataChannel, InternalEvent, puid, id, mID); + ZS_EVENTING_1(x, i, Trace, DataChannelSCTPTransportInternalNotifyClosed, ol, DataChannel, InternalEvent, puid, id, mID); ZS_LOG_TRACE(log("notify closed")); IDataChannelAsyncDelegateProxy::create(mThisWeak.lock())->onNotifiedClosed(); } + void DataChannel::notifyRemapFailure() + { + ZS_EVENTING_1(x, i, Trace, DataChannelSCTPTransportInternalNotifyRemapFailure, ol, DataChannel, InternalEvent, puid, id, mID); + + ZS_LOG_TRACE(log("notify remap failure")); + IDataChannelAsyncDelegateProxy::create(mThisWeak.lock())->onNotifiedRemapFailure(); + } + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -737,13 +745,27 @@ namespace ortc //------------------------------------------------------------------------- void DataChannel::onNotifiedClosed() { - ZS_LOG_TRACE(log("on notified closed")) + ZS_LOG_TRACE(log("on notified closed")); AutoRecursiveLock lock(*this); mNotifiedClosed = true; cancel(); } + //------------------------------------------------------------------------- + void DataChannel::onNotifiedRemapFailure() + { + ZS_LOG_TRACE(log("on notified remap failure")); + + AutoRecursiveLock lock(*this); + + setError(UseHTTP::HTTPStatusCode_Conflict, "Data channel moved from locally created SCTP transport to remote incoming SCTP transport except incoming transport already has a data channel with the same ID mapped."); + + mNotifiedClosed = true; + cancel(); + } + + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -849,7 +871,7 @@ namespace ortc IHelper::debugAppend(resultEl, "default subscription", (bool)mDefaultSubscription); auto dataTransport = mDataTransport.lock(); - IHelper::debugAppend(resultEl, "data transport", dataTransport ? dataTransport->getID() : 0); + IHelper::debugAppend(resultEl, "data transport", dataTransport ? dataTransport->getRealID() : 0); IHelper::debugAppend(resultEl, "data transport subscription", (bool)mDataTransportSubscription); IHelper::debugAppend(resultEl, "state", toString(mCurrentState)); diff --git a/ortc/cpp/ortc_Helper.cpp b/ortc/cpp/ortc_Helper.cpp index 981ac64f..77cbfbcc 100644 --- a/ortc/cpp/ortc_Helper.cpp +++ b/ortc/cpp/ortc_Helper.cpp @@ -46,7 +46,7 @@ namespace std { } #endif //_WIN32 -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_ICEGatherer.cpp b/ortc/cpp/ortc_ICEGatherer.cpp index 01eafe5c..858c1dcc 100644 --- a/ortc/cpp/ortc_ICEGatherer.cpp +++ b/ortc/cpp/ortc_ICEGatherer.cpp @@ -96,7 +96,7 @@ using namespace Windows::Networking::Connectivity; #define ORTC_ICEGATHERER_TO_ORDER(xInterfaceType, xOrder) ((((ULONG)xInterfaceType)*100)+xOrder) -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_icegatherer) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_ice_gatherer) } namespace ortc { @@ -1156,7 +1156,7 @@ namespace ortc auto route = (*found).second; - route->trace(__func__, "remove"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "remove route"); ZS_LOG_DEBUG(log("removing route") + route->toDebug()) @@ -1630,7 +1630,7 @@ namespace ortc puid, id, mID, puid, routerRouteId, buffer->mRouterRoute->mID ); - buffer->mSTUNPacket->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Debug, *(buffer->mSTUNPacket), "buffer clean-up"); } ZS_LOG_TRACE(log("buffering for too long (or too many buffered packets)") + ZS_PARAM("buffer time", (now - buffer->mTimestamp)) + buffer->toDebug()) @@ -5976,7 +5976,7 @@ namespace ortc puid, routerRouteId, routerRoute->mID, bool, wasBuffered, false ); - stunPacket->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Trace, *stunPacket, "forwarding packet to transport"); transport->notifyPacket(routerRoute, stunPacket); return SecureByteBlockPtr(); } @@ -5999,7 +5999,7 @@ namespace ortc ); ZS_LOG_ERROR(Debug, log("candidate password integrity failed") + ZS_PARAM("request", stunPacket->toDebug()) + ZS_PARAM("reply", response->toDebug())) - response->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Debug, *response, "candidate password integrity check failed"); return response->packetize(STUNPacket::RFC_5245_ICE); } @@ -6026,7 +6026,7 @@ namespace ortc puid, id, mID, puid, routerRouteId, routerRoute->mID ); - stunPacket->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Trace, *stunPacket, "buffering packet where no transport is installed"); ZS_LOG_TRACE(log("buffering stun packet until ice transport installed to handle packet") + packet->toDebug()) mBufferedPackets.push_back(packet); @@ -6453,12 +6453,12 @@ namespace ortc goto failed_resolve_local_candidate; } - route->trace(__func__, "install route"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "install route"); ZS_LOG_TRACE(log("installing route") + route->toDebug()); ZS_EVENTING_4( - x, i, Debug, IceGathererInstallQuickRoute, ol, IceGatherer, Receive, + x, i, Debug, IceGathererInstallQuickRoute, ol, IceGatherer, Install, puid, id, mID, pointer, candidate, search.first.get(), string, ip, search.second.string(), @@ -6524,7 +6524,7 @@ namespace ortc auto route = (*current).second; if (route->mTransportID != transportID) continue; - route->trace(__func__, "remove all related"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "need to remove route because of unbinding previous transport"); ZS_LOG_WARNING(Detail, log("need to remove route because of unbinding previous transport") + route->toDebug()) @@ -7102,11 +7102,14 @@ namespace ortc #pragma mark //------------------------------------------------------------------------- - void ICEGatherer::Route::trace(const char *function, const char *message) const + void ICEGatherer::Route::trace( + const char *function, + const char *message + ) const { if (mLocalCandidate) { ZS_EVENTING_20( - x, i, Trace, IceGathererRouteTrace, ol, IceGatherer, Info, + x, i, Basic, IceGathererRouteTrace, ol, IceGatherer, Info, puid, routeId, mID, string, callingMethod, function, string, message, message, @@ -7131,7 +7134,7 @@ namespace ortc } else { ZS_EVENTING_20( - x, i, Trace, IceGathererRouteTrace, ol, IceGatherer, Info, + x, i, Basic, IceGathererRouteTrace, ol, IceGatherer, Info, puid, routeId, mID, string, callingMethod, function, string, message, message, diff --git a/ortc/cpp/ortc_ICEGathererRouter.cpp b/ortc/cpp/ortc_ICEGathererRouter.cpp index 2df3212e..e096c7a9 100644 --- a/ortc/cpp/ortc_ICEGathererRouter.cpp +++ b/ortc/cpp/ortc_ICEGathererRouter.cpp @@ -40,7 +40,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_icegatherer_router) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_ice_gatherer_router) } namespace ortc { @@ -139,7 +139,7 @@ namespace ortc string, remoteIp, remoteIP.string() ); - route->trace(__func__, "found"); + ZS_EVENTING_TRACE_OBJECT(Insane, *route, "found route"); ZS_LOG_TRACE(log("route found") + route->toDebug() + ZS_PARAM("create route", createRouteIfNeeded)) return route; } @@ -189,7 +189,7 @@ namespace ortc word, localCandidatePort, ((bool)localCandidate) ? localCandidate->mPort : static_cast(0), string, remoteIp, remoteIP.string() ); - route->trace(__func__, "created"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "route created"); mRoutes[search] = route; @@ -224,7 +224,6 @@ namespace ortc auto remoteIP = ((*current).first).second; if (route) { - //IceGathererRouterInternalEvent(__func__, mID, "keep", candidateHash, NULL, 0, remoteIP.string()); ZS_EVENTING_6( x, i, Trace, IceGathererRouterInternalEvent, ol, IceGathererRouter, InternalEvent, puid, id, mID, @@ -234,12 +233,11 @@ namespace ortc word, localCandidatePort, 0, string, remoteIp, remoteIP.string() ); - route->trace(__func__, "keep"); + ZS_EVENTING_TRACE_OBJECT(Insane, *route, "route still in use (not pruning)"); ZS_LOG_TRACE(log("route still in use") + ZS_PARAM("candidate hash", candidateHash) + ZS_PARAM("remote ip", remoteIP.string())) continue; } - //IceGathererRouterInternalEvent(__func__, mID, "prune", candidateHash, NULL, 0, remoteIP.string()); ZS_EVENTING_6( x, i, Trace, IceGathererRouterInternalEvent, ol, IceGathererRouter, InternalEvent, puid, id, mID, @@ -329,28 +327,8 @@ namespace ortc ) const { if (mLocalCandidate) { - /* - IceGathererRouterRouteTrace( - __func__, - function, - message, - mID, - mLocalCandidate->mInterfaceType, - mLocalCandidate->mFoundation, - mLocalCandidate->mPriority, - mLocalCandidate->mUnfreezePriority, - IICETypes::toString(mLocalCandidate->mProtocol), - mLocalCandidate->mIP, - mLocalCandidate->mPort, - IICETypes::toString(mLocalCandidate->mCandidateType), - IICETypes::toString(mLocalCandidate->mTCPType), - mLocalCandidate->mRelatedAddress, - mLocalCandidate->mRelatedPort, - mRemoteIP.string() - ); - */ ZS_EVENTING_15( - x, i, Trace, IceGathererRouterRouteTrace, ol, IceGathererRouter, Info, + x, i, Basic, IceGathererRouterRouteTrace, ol, IceGathererRouter, Info, puid, routeId, mID, string, callingMethod, function, string, message, message, @@ -368,28 +346,8 @@ namespace ortc string, remoteIp, mRemoteIP.string() ); } else { - /* - EventWriteOrtcIceGathererRouterRouteTrace( - __func__, - function, - message, - mID, - NULL, - NULL, - 0, - 0, - NULL, - NULL, - 0, - NULL, - NULL, - NULL, - 0, - mRemoteIP.string() - ); - */ ZS_EVENTING_15( - x, i, Trace, IceGathererRouterRouteTrace, ol, IceGathererRouter, Info, + x, i, Basic, IceGathererRouterRouteTrace, ol, IceGathererRouter, Info, puid, routeId, mID, string, callingMethod, function, string, message, message, diff --git a/ortc/cpp/ortc_ICETransport.cpp b/ortc/cpp/ortc_ICETransport.cpp index 322c2d1a..b05443c1 100644 --- a/ortc/cpp/ortc_ICETransport.cpp +++ b/ortc/cpp/ortc_ICETransport.cpp @@ -56,7 +56,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_icetransport) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_ice_transport) } namespace ortc { @@ -966,7 +966,7 @@ namespace ortc bool, keepWarm, keepWarm ); - route->trace(__func__, "keepp warm blacklisted"); + ZS_EVENTING_TRACE_OBJECT(Detail, *route, "keep warm blacklisted"); ZS_LOG_WARNING(Detail, log("cannot keep warm as route is blacklisted") + route->toDebug()) return; } @@ -979,8 +979,7 @@ namespace ortc bool, keepWarm, keepWarm ); - route->trace(__func__, "keep warm"); - + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "route found for keep warm"); ZS_LOG_DETAIL(log("route found for keep warm") + route->toDebug() + ZS_PARAMIZE(keepWarm) + ZS_PARAMIZE(hash)) route->mKeepWarm = keepWarm; @@ -1013,8 +1012,8 @@ namespace ortc puid, id, mID, puid, routerRouteId, routerRoute->mID ); - routerRoute->trace(__func__, "received stun packet"); - packet->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Trace, *routerRoute, "received stun packet") + ZS_EVENTING_TRACE_OBJECT(Trace, *packet, "received stun packet"); { AutoRecursiveLock lock(*this); @@ -1063,8 +1062,8 @@ namespace ortc sendPacket(routerRoute, response); setBlacklisted(route); - route->trace(__func__, "blacklist response to stun binding request"); - response->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "blacklist response to stun binding request"); + ZS_EVENTING_TRACE_OBJECT(Debug, *response, "blacklist response to stun binding request"); return; } } @@ -1077,8 +1076,8 @@ namespace ortc ZS_LOG_WARNING(Debug, log("returning conflict error to remote party") + routerRoute->toDebug() + response->toDebug()) sendPacket(routerRoute, response); - route->trace(__func__, "blacklist response to stun binding request"); - response->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "returning conflict error to remote party"); + ZS_EVENTING_TRACE_OBJECT(Debug, *response, "returning conflict error to remote party"); return; } @@ -1086,7 +1085,7 @@ namespace ortc if (Time() == route->mLastReceivedResponse) { if (route->mOutgoingCheck) { ZS_LOG_DEBUG(log("forcing a trigger check response immediately") + route->toDebug()) - route->trace(__func__, "activate trigger check"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "activate trigger check"); route->mOutgoingCheck->retryRequestNow(); } } @@ -1098,7 +1097,7 @@ namespace ortc (route->isIgnored())) { if (mRemoteParameters.mUsernameFragment.hasData()) { ZS_LOG_DETAIL(log("going to activate candidate pair because of incoming request") + route->toDebug()) - route->trace(__func__, "activate route (due to incoming request)"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "activate route (due to incoming request)"); setInProgress(route); } else { mNextActivationCausesAllRoutesThatReceivedChecksToActivate = true; @@ -1107,8 +1106,8 @@ namespace ortc auto response = createBindResponse(packet, route); - route->trace(__func__, "create response to stun binding request"); - response->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "create response to stun binding request"); + ZS_EVENTING_TRACE_OBJECT(Trace, *response, "create response to stun binding request"); ZS_LOG_TRACE(log("sending binding response to remote party") + route->toDebug() + response->toDebug()) sendPacket(routerRoute, response); @@ -1146,7 +1145,7 @@ namespace ortc mLastReceivedUseCandidate = mLastReceivedPacket; if (previousRoute != mActiveRoute) { - mActiveRoute->trace(__func__, reason); + ZS_EVENTING_TRACE_OBJECT(Trace, *mActiveRoute, reason); ZS_LOG_DEBUG(log("controlling side indicates to use this route") + mActiveRoute->toDebug()) wakeUp(); } @@ -1186,14 +1185,15 @@ namespace ortc auto found = mGathererRoutes.find(routerRoute->mID); if (found == mGathererRoutes.end()) { ZS_LOG_WARNING(Detail, log("route was not found") + routerRoute->toDebug() + ZS_PARAMIZE(bufferSizeInBytes)) + ZS_EVENTING_TRACE_OBJECT(Debug, *routerRoute, "route was not found"); return; } auto route = (*found).second; if (route->isBlacklisted()) { - ZS_LOG_WARNING(Debug, log("no consent given on this route") + route->toDebug() + ZS_PARAMIZE(bufferSizeInBytes)) - route->trace(__func__, "ignoring incoming packet (route was blacklisted)"); + ZS_LOG_WARNING(Debug, log("no consent given on this route") + route->toDebug() + ZS_PARAMIZE(bufferSizeInBytes)); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "ignoring incoming packet (route was blacklisted)"); return; } @@ -1202,8 +1202,8 @@ namespace ortc updateAfterPacket(route); if (!mActiveRoute) { - ZS_LOG_WARNING(Debug, log("no active route chosen (thus must ignore packet)") + route->toDebug() + ZS_PARAMIZE(bufferSizeInBytes)) - route->trace(__func__, "ignoring incoming packet (no route was chosen)"); + ZS_LOG_WARNING(Debug, log("no active route chosen (thus must ignore packet)") + route->toDebug() + ZS_PARAMIZE(bufferSizeInBytes)); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "ignoring incoming packet (no route was chosen)"); return; } @@ -1553,7 +1553,7 @@ namespace ortc size, size, bufferSizeInBytes ); - routerRoute->trace(__func__, "gatherer to use this route to send secure packet"); + ZS_EVENTING_TRACE_OBJECT(Insane, *routerRoute, "gatherer to use this route to send secure packet"); return gatherer->sendPacket(*this, routerRoute, buffer, bufferSizeInBytes); } @@ -1602,8 +1602,8 @@ namespace ortc puid, id, mID, puid, routerRouteId, routerRoute->mID ); - routerRoute->trace(__func__, "retry received stun packet"); - stunPacket->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Insane, *routerRoute, "retry received stun packet"); + ZS_EVENTING_TRACE_OBJECT(Trace, *stunPacket, "retry received stun packet"); ZS_LOG_TRACE(log("retrying to handle packet again") + routerRoute->toDebug() + stunPacket->toDebug()) @@ -1880,7 +1880,7 @@ namespace ortc puid, routeId, route->mID ); - route->trace(__func__, "unfrozen promise settled"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "unfrozen promise settled"); mFrozen.erase(found); route->mFrozenPromise.reset(); @@ -2195,7 +2195,7 @@ namespace ortc puid, stunReuqesterId, requester->getID(), string, fromIpAddress, fromIPAddress.string() ); - response->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Trace, *response, "ice transport response received"); AutoRecursiveLock lock(*this); @@ -2722,7 +2722,7 @@ namespace ortc route->mCandidatePair = candidatePair; route->mCandidatePairHash = hash; - route->trace(__func__, "new legal route"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "new legal route"); ZS_LOG_DEBUG(log("found new legal route") + route->toDebug()); mLegalRoutes[hash] = route; @@ -2923,7 +2923,7 @@ namespace ortc puid, activeRouteId, mActiveRoute->mID ); - mActiveRoute->trace(__func__, reason); + ZS_EVENTING_TRACE_OBJECT(Debug, *mActiveRoute, reason); ZS_LOG_DETAIL(log("new route chosen") + mActiveRoute->toDebug()) mSubscriptions.delegate()->onICETransportCandidatePairChanged(mThisWeak.lock(), cloneCandidatePair(mActiveRoute)); } else { @@ -2982,7 +2982,7 @@ namespace ortc ZS_LOG_DEBUG(log("nominating candidate") + mActiveRoute->toDebug()) mUseCandidateRoute = mActiveRoute; - mUseCandidateRoute->trace(__func__, "nominate candidate"); + ZS_EVENTING_TRACE_OBJECT(Debug, *mUseCandidateRoute, "nominate candidate"); mUseCandidateRequest = createBindRequest(mUseCandidateRoute, true); @@ -3025,7 +3025,7 @@ namespace ortc continue; } - route->trace(__func__, "dewarm"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "route cannot be kept warm any longer (expired)"); ZS_LOG_DEBUG(log("route cannot be kept warm any longer (expired)") + ZS_PARAM("difference", (now - route->mLastReceivedResponse)) + route->toDebug() + ZS_PARAM("expires (s)", mExpireRouteTime)) @@ -3081,7 +3081,7 @@ namespace ortc continue; } - route->trace(__func__, "keep warm"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "installing keep warm timer"); ZS_LOG_DEBUG(log("installing keep warm timer") + route->toDebug()) @@ -3492,7 +3492,7 @@ namespace ortc auto latest = getLastRemoteActivity(mActiveRoute); if (Time() != latest) { if (latest + mExpireRouteTime < now) { - mActiveRoute->trace(__func__, "expire route"); + ZS_EVENTING_TRACE_OBJECT(Debug, *mActiveRoute, "expire route"); if (mBlacklistConsent) { ZS_LOG_WARNING(Detail, log("blacklisting consent on active route") + ZS_PARAM("difference", (now - latest)) + mActiveRoute->toDebug()) setBlacklisted(mActiveRoute); @@ -3524,7 +3524,7 @@ namespace ortc continue; } - route->trace(__func__, "warm route expired"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "warm route expired"); expired = true; mWarmRoutes.erase(current); @@ -3772,7 +3772,7 @@ namespace ortc activate_previous_route: { ZS_LOG_DEBUG(log("activating route due to possible failure situation about to happen") + route->toDebug()) - route->trace(__func__, "activate route (due to potential failure condition as no remote activity detected)"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "activate route (due to potential failure condition as no remote activity detected)"); setInProgress(route); goto check_activation_timer; } @@ -3834,7 +3834,7 @@ namespace ortc auto pThis = mThisWeak.lock(); if (!pThis) return; - route->trace(__func__, "forced active"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "forcing route to generate activity"); // install a temporary keep warm timer (to force route activate sooner) route->mNextKeepWarm = ITimer::create(mThisWeak.lock(), zsLib::now() + Milliseconds(IHelper::random(0, static_cast(mKeepWarmTimeRandomizedAddTime.count())))); @@ -3848,7 +3848,7 @@ namespace ortc { if (!route) return; - route->trace(__func__, "shutdown"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "ice transport shutting down route"); ZS_LOG_TRACE(log("shutting down route") + route->toDebug()) @@ -3973,7 +3973,7 @@ namespace ortc insert_pending: { - route->trace(__func__, "pending"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "route is now being set to the pending state"); ZS_LOG_DEBUG(log("route is now being set to the pending state") + route->toDebug()) @@ -4044,7 +4044,7 @@ namespace ortc freeze: { - route->trace(__func__, "frozen"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "route is now being frozen"); ZS_LOG_DEBUG(log("route is now being frozen") + route->toDebug()) @@ -4090,7 +4090,7 @@ namespace ortc in_progress: { - route->trace(__func__, "in progress"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "route is now being set in progress"); ZS_LOG_DEBUG(log("route is now being set in progress") + route->toDebug()) @@ -4132,7 +4132,7 @@ namespace ortc succeeded: { - route->trace(__func__, "succeeded"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "route is now successful"); ZS_LOG_DEBUG(log("route is now successful") + route->toDebug()) @@ -4178,7 +4178,7 @@ namespace ortc failed: { - route->trace(__func__, "failed"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "route is now a failure"); ZS_LOG_DEBUG(log("route is now a failure") + route->toDebug()) @@ -4214,7 +4214,7 @@ namespace ortc ignored: { - route->trace(__func__, "ignored"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "route is now being ignored"); ZS_LOG_DEBUG(log("route is now being ignored") + route->toDebug()) @@ -4250,7 +4250,7 @@ namespace ortc blacklist: { - route->trace(__func__, "blacklisted"); + ZS_EVENTING_TRACE_OBJECT(Detail, *route, "route is now blacklisted"); ZS_LOG_DEBUG(log("route is now blacklisted") + route->toDebug()) @@ -4316,11 +4316,11 @@ namespace ortc if (Time() != route->mLastReceivedResponse) { ZS_LOG_DEBUG(log("setting route to active since received a response and no other route is available") + route->toDebug()) mActiveRoute = route; - mActiveRoute->trace(__func__, "choosing as active route (as response was received and no other route is available)"); + ZS_EVENTING_TRACE_OBJECT(Debug, *mActiveRoute, "choosing as active route (as response was received and no other route is available)"); } else if (Time() != route->mLastReceivedCheck) { ZS_LOG_DEBUG(log("setting route to active since received a validated incoming request") + route->toDebug()) mActiveRoute = route; - mActiveRoute->trace(__func__, "choosing as active route (as incoming check was received on this route)"); + ZS_EVENTING_TRACE_OBJECT(Debug, *mActiveRoute, "choosing as active route (as incoming check was received on this route)"); } } @@ -4402,7 +4402,7 @@ namespace ortc return false; } - route->trace(__func__, "gatherer route installed"); + ZS_EVENTING_TRACE_OBJECT(Insane, *route, "gatherer route installed"); mGathererRoutes[route->mGathererRoute->mID] = route; return true; @@ -4426,7 +4426,7 @@ namespace ortc size_t, totalRoutes, routes.size() ); - route->trace(__func__, "installed foundation"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "installed foundation"); mFoundationRoutes[foundation] = routes; return; @@ -4448,7 +4448,7 @@ namespace ortc size_t, totalRoutes, routes.size() ); - route->trace(__func__, "installed foundation"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "installed foundation"); } } @@ -4582,7 +4582,7 @@ namespace ortc mGatherer->removeRoute(route->mGathererRoute); } - route->trace(__func__, "removing fatherer route"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "removing gatherer route"); route->mGathererRoute.reset(); } @@ -4730,7 +4730,8 @@ namespace ortc puid, id, mID, puid, stunRequesterId, ((bool)result) ? result->getID() : 0 ); - route->trace(__func__, "create binding request"); + ZS_EVENTING_TRACE_OBJECT(Debug, *stunPacket, "create binding request"); + ZS_EVENTING_TRACE_OBJECT(Debug, *route, "create binding request"); } return result; @@ -4755,8 +4756,8 @@ namespace ortc fix(stunPacket); - route->trace(__func__, "create binding response"); - stunPacket->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "create binding response"); + ZS_EVENTING_TRACE_OBJECT(Trace, *stunPacket, "create binding response"); return stunPacket; } @@ -4814,7 +4815,7 @@ namespace ortc buffer, packet, packetized->BytePtr(), size, size, packetized->SizeInBytes() ); - packet->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Insane, *packet, "ice transport send packet"); mGatherer->sendPacket(*this, routerRoute, packetized->BytePtr(), packetized->SizeInBytes()); } @@ -4850,8 +4851,8 @@ namespace ortc response->mMappedAddress = routerRoute->mRemoteIP; setRole(response); - routerRoute->trace(__func__, "role conflict detected"); - response->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Debug, *routerRoute, "ice transport role conflict detected"); + ZS_EVENTING_TRACE_OBJECT(Debug, *response, "ice transport role conflict detected"); ZS_LOG_WARNING(Detail, log("returning conflict error to remote party") + routerRoute->toDebug() + response->toDebug()) sendPacket(routerRoute, response); @@ -4915,7 +4916,7 @@ namespace ortc // add to gathering routes route->mGathererRoute = routerRoute; - route->trace(__func__, "added gatherer route"); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "added gatherer route"); mGathererRoutes[route->mGathererRoute->mID] = route; return route; @@ -4956,8 +4957,8 @@ namespace ortc route->mCandidatePair->mRemote = remoteCandidate; route->mCandidatePairHash = route->mCandidatePair->hash(); - route->trace("added missing route (because of incoming stun packet)"); - packet->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Trace, *route, "ice transport added missing route (because of incoming stun packet)"); + ZS_EVENTING_TRACE_OBJECT(Trace, *packet, "ice transport added missing route (because of incoming stun packet)"); // add as legal routes mLegalRoutes[route->mCandidatePairHash] = route; @@ -5021,7 +5022,7 @@ namespace ortc puid, secureTransportId, transport->getID() ); - packet->trace(__func__); + ZS_EVENTING_TRACE_OBJECT(Insane, *packet, "ice transport delivering packet"); transport->handleReceivedSTUNPacket(mComponent, packet); } } @@ -5172,7 +5173,7 @@ namespace ortc void ICETransport::Route::trace(const char *function, const char *message) const { ZS_EVENTING_COMPACT_41( - x, i, Trace, IceTransportRouteTrace, ol, IceTransport, Info, + x, i, Basic, IceTransportRouteTrace, ol, IceTransport, Info, puid/routeId, mID, string/callingMethod, function, string/message, message, diff --git a/ortc/cpp/ortc_ICETransportController.cpp b/ortc/cpp/ortc_ICETransportController.cpp index 5463925d..fc5fdbba 100644 --- a/ortc/cpp/ortc_ICETransportController.cpp +++ b/ortc/cpp/ortc_ICETransportController.cpp @@ -46,7 +46,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_icetransport_controller) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_ice_transport_controller) } namespace ortc { diff --git a/ortc/cpp/ortc_ICETypes.cpp b/ortc/cpp/ortc_ICETypes.cpp index 65cce141..a9f1fef9 100644 --- a/ortc/cpp/ortc_ICETypes.cpp +++ b/ortc/cpp/ortc_ICETypes.cpp @@ -44,7 +44,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_ISecureTransport.cpp b/ortc/cpp/ortc_ISecureTransport.cpp index 482c70c5..457cf3ed 100644 --- a/ortc/cpp/ortc_ISecureTransport.cpp +++ b/ortc/cpp/ortc_ISecureTransport.cpp @@ -52,7 +52,7 @@ #pragma GCC diagnostic ignored "-Wunused-local-typedef" #endif //__GNUC__ -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_Identity.cpp b/ortc/cpp/ortc_Identity.cpp index 670b8bef..1962a3a4 100644 --- a/ortc/cpp/ortc_Identity.cpp +++ b/ortc/cpp/ortc_Identity.cpp @@ -54,7 +54,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaChannelTraceHelper.cpp b/ortc/cpp/ortc_MediaChannelTraceHelper.cpp index 35be1483..d9dc8664 100644 --- a/ortc/cpp/ortc_MediaChannelTraceHelper.cpp +++ b/ortc/cpp/ortc_MediaChannelTraceHelper.cpp @@ -45,7 +45,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediastreamtrack) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_stream_track) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDevice.cpp b/ortc/cpp/ortc_MediaDevice.cpp index eb6a43aa..eeb04f2e 100644 --- a/ortc/cpp/ortc_MediaDevice.cpp +++ b/ortc/cpp/ortc_MediaDevice.cpp @@ -67,7 +67,7 @@ #pragma GCC diagnostic ignored "-Wunused-local-typedef" #endif //__GNUC__ -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDeviceCapture.cpp b/ortc/cpp/ortc_MediaDeviceCapture.cpp index aea61bf7..b50b50fc 100644 --- a/ortc/cpp/ortc_MediaDeviceCapture.cpp +++ b/ortc/cpp/ortc_MediaDeviceCapture.cpp @@ -68,7 +68,7 @@ #pragma GCC diagnostic ignored "-Wunused-local-typedef" #endif //__GNUC__ -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp index 06d23ed5..ef448a1d 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureAudio.cpp @@ -87,7 +87,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp index e224c3da..b62f6572 100644 --- a/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp +++ b/ortc/cpp/ortc_MediaDeviceCaptureVideo.cpp @@ -87,7 +87,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp index bd474be8..ad549d98 100644 --- a/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp +++ b/ortc/cpp/ortc_MediaDeviceRenderAudio.cpp @@ -48,7 +48,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaDevices.cpp b/ortc/cpp/ortc_MediaDevices.cpp index 4616e97c..187ca8f0 100644 --- a/ortc/cpp/ortc_MediaDevices.cpp +++ b/ortc/cpp/ortc_MediaDevices.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -60,7 +61,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediadevices) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_devices) } namespace ortc { @@ -1061,7 +1062,7 @@ namespace ortc for (auto iter = begin(); iter != end(); ++iter) { auto &track = (*iter); - IMediaStreamTrack::trace(track); + ZS_EVENTING_TRACE_OBJECT_PTR(Trace, track, "media stream track list debug"); } return resultEl; diff --git a/ortc/cpp/ortc_MediaEngine.cpp b/ortc/cpp/ortc_MediaEngine.cpp index 9b9591ad..f93e35d5 100644 --- a/ortc/cpp/ortc_MediaEngine.cpp +++ b/ortc/cpp/ortc_MediaEngine.cpp @@ -77,7 +77,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_MediaStreamTrack.cpp b/ortc/cpp/ortc_MediaStreamTrack.cpp index 9e6193a9..d5708cf3 100644 --- a/ortc/cpp/ortc_MediaStreamTrack.cpp +++ b/ortc/cpp/ortc_MediaStreamTrack.cpp @@ -66,7 +66,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediastreamtrack) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_stream_track) } namespace ortc { @@ -391,12 +391,29 @@ namespace ortc //------------------------------------------------------------------------- void MediaStreamTrack::trace( - MediaStreamTrackPtr object, + const char *func, const char *message - ) + ) const { - if (!object) return; - return object->trace(message); + ZS_EVENTING_17(x, i, Basic, MediaStreamTrackTrace, ol, MediaEngine, Info, + puid, id, id_, + string, func, func, + string, message, message, + bool, gracefulShutdownReference, (bool)gracefulShutdownReference_, + string, currentState, ortc::IMediaStreamTrackTypes::toString(currentState_), + word, lastError, lastError_, + string, lastErrorReason, lastErrorReason_, + string, trackId, trackId_, + string, label, label_, + string, kind, ortc::IMediaStreamTrackTypes::toString(kind_), + bool, enabled, enabled_, + bool, muted, muted_, + string, type, MediaStreamTrack::toString(type_), + string, deviceId, deviceId_, + size_t, subscribers, subscribers_ ? subscribers_->size() : 0, + size_t, channels, channels_ ? channels_->size() : 0, + puid, statsTimer, statsTimer_ ? statsTimer_->getID() : 0 + ); } //------------------------------------------------------------------------- @@ -814,28 +831,6 @@ namespace ortc #pragma mark MediaStreamTrack => (internal) #pragma mark - //------------------------------------------------------------------------- - void MediaStreamTrack::trace(const char *message) const - { - ZS_EVENTING_15(x, i, Trace, MediaStreamTrackTrace, ol, MediaEngine, Info, - puid, id, id_, - bool, gracefulShutdownReference, (bool)gracefulShutdownReference_, - string, currentState, ortc::IMediaStreamTrackTypes::toString(currentState_), - word, lastError, lastError_, - string, lastErrorReason, lastErrorReason_, - string, trackId, trackId_, - string, label, label_, - string, kind, ortc::IMediaStreamTrackTypes::toString(kind_), - bool, enabled, enabled_, - bool, muted, muted_, - string, type, MediaStreamTrack::toString(type_), - string, deviceId, deviceId_, - size_t, subscribers, subscribers_ ? subscribers_->size() : 0, - size_t, channels, channels_ ? channels_->size() : 0, - puid, statsTimer, statsTimer_ ? statsTimer_->getID() : 0 - ); - } - //------------------------------------------------------------------------- bool MediaStreamTrack::isShuttingDown() const { @@ -1847,15 +1842,6 @@ namespace ortc #pragma mark IMediaStreamTrack #pragma mark - //--------------------------------------------------------------------------- - void IMediaStreamTrack::trace( - IMediaStreamTrackPtr object, - const char *message - ) - { - internal::MediaStreamTrack::trace(internal::MediaStreamTrack::convert(object), message); - } - //--------------------------------------------------------------------------- IMediaStreamTrackPtr IMediaStreamTrack::convert(AnyPtr any) { diff --git a/ortc/cpp/ortc_MediaStreamTrackMonitor.cpp b/ortc/cpp/ortc_MediaStreamTrackMonitor.cpp index b0af7154..5f87052a 100644 --- a/ortc/cpp/ortc_MediaStreamTrackMonitor.cpp +++ b/ortc/cpp/ortc_MediaStreamTrackMonitor.cpp @@ -39,7 +39,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_MediaStreamTrackMonitor) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_stream_track_monitor) } namespace ortc { diff --git a/ortc/cpp/ortc_ORTC.cpp b/ortc/cpp/ortc_ORTC.cpp index fcf05847..a4c2b6b6 100644 --- a/ortc/cpp/ortc_ORTC.cpp +++ b/ortc/cpp/ortc_ORTC.cpp @@ -46,7 +46,7 @@ #include #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_RTCPPacket.cpp b/ortc/cpp/ortc_RTCPPacket.cpp index 9ffd4a76..fcbfc8a6 100644 --- a/ortc/cpp/ortc_RTCPPacket.cpp +++ b/ortc/cpp/ortc_RTCPPacket.cpp @@ -54,7 +54,7 @@ #define RTCP_GET_BITS(xByte, xBitPattern, xLowestBit) (((xByte) >> (xLowestBit)) & (xBitPattern)) #define RTCP_PACK_BITS(xByte, xBitPattern, xLowestBit) (((xByte) & (xBitPattern)) << (xLowestBit)) -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtp_rtcp_packet) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_rtcp_packet) } namespace ortc { @@ -1418,7 +1418,7 @@ namespace ortc RTCPPacket::Report *common ) { - ZS_EVENTING_8(x, i, Insane, RTCPPacketTraceReport, ol, RtcpPacket, Info, + ZS_EVENTING_8(x, i, Basic, RTCPPacketTraceReport, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, bool, next, NULL != common->next(), buffer, buffer, common->ptr(), @@ -1440,7 +1440,7 @@ namespace ortc if (NULL == block) return; for (; NULL != block; block = block->next()) { - ZS_EVENTING_8(x, i, Insane, RTCPPacketTraceSenderReceiverCommonReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_8(x, i, Basic, RTCPPacketTraceSenderReceiverCommonReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, dword, ssrc, block->ssrc(), byte, fractionLost, block->fractionLost(), @@ -1460,7 +1460,7 @@ namespace ortc ) { traceReport(mediaChannelID, common); - ZS_EVENTING_5(x, i, Insane, RTCPPacketTraceSenderReceiverCommonReport, ol, RtcpPacket, Info, + ZS_EVENTING_5(x, i, Basic, RTCPPacketTraceSenderReceiverCommonReport, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, ssrcType, (RTCPPacket::ReceiverReport::kPayloadType != common->pt() ? "ssrc of sender" : "ssrc of packet sender"), dword, ssrc, common->ssrcOfSender(), @@ -1480,7 +1480,7 @@ namespace ortc if (RTCPPacket::SDES::Chunk::Priv::kItemType == type) { RTCPPacket::SDES::Chunk::Priv *priv = reinterpret_cast(common); - ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceChunkStringItemPriv, ol, RtcpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTCPPacketTraceChunkStringItemPriv, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, type, common->type(), size_t, prefixLength, priv->prefixLength(), @@ -1489,7 +1489,7 @@ namespace ortc string, value, common->value() ); } else { - ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceChunkStringItem, ol, RtcpPacket, Parse, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTraceChunkStringItem, ol, RtcpPacket, Parse, puid, mediaChannelID, mediaChannelID, byte, type, common->type(), size_t, length, common->length(), @@ -1523,7 +1523,7 @@ namespace ortc if (NULL == values) return; for (size_t index = 0; index < count; ++index) { - ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceDWORDs, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTraceDWORDs, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, type, type, size_t, index, index, @@ -1539,7 +1539,7 @@ namespace ortc ) { traceReport(mediaChannelID, common); - ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceFeedbackMessage, ol, RtcpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTCPPacketTraceFeedbackMessage, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, fmt, common->fmt(), dword, ssrcOfPacketSender, common->ssrcOfPacketSender(), @@ -1556,7 +1556,7 @@ namespace ortc RTCPPacket::TransportLayerFeedbackMessage::TMMBRCommon *common ) { - ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceFeedbackMessageTMMBRCommon, ol, RtcpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTCPPacketTraceFeedbackMessageTMMBRCommon, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, fmt, fmt, dword, ssrc, common->ssrc(), @@ -1573,7 +1573,7 @@ namespace ortc RTCPPacket::PayloadSpecificFeedbackMessage::CodecControlCommon *common ) { - ZS_EVENTING_5(x, i, Insane, RTCPPacketTraceFeedbackMessageCodecControlCommon, ol, RtcpPacket, Info, + ZS_EVENTING_5(x, i, Basic, RTCPPacketTraceFeedbackMessageCodecControlCommon, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, fmt, fmt, dword, ssrc, common->ssrc(), @@ -1588,7 +1588,7 @@ namespace ortc RTCPPacket::XR::ReportBlock *common ) { - ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceXRReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTCPPacketTraceXRReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, bool, next, (NULL != common->next()), byte, blockType, common->blockType(), @@ -1605,7 +1605,7 @@ namespace ortc ) { traceXRReportBlock(mediaChannelID, common); - ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceXRReportBlockRange, ol, RtcpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTCPPacketTraceXRReportBlockRange, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, reserved, common->reserved(), byte, thinning, common->thinning(), @@ -1635,19 +1635,19 @@ namespace ortc if (RTCPPacket::XR::isRunLengthChunk(chunk)) { RTCPPacket::XR::RunLength rl(chunk); - ZS_EVENTING_3(x, i, Insane, RTCPPacketTraceXRRLEReportBlockChunkRunLength, ol, RtcpPacket, Info, + ZS_EVENTING_3(x, i, Basic, RTCPPacketTraceXRRLEReportBlockChunkRunLength, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, runType, rl.runType(), size_t, runLength, rl.runLength() ); } else if (RTCPPacket::XR::isBitVectorChunk(chunk)) { RTCPPacket::XR::BitVector bv(chunk); - ZS_EVENTING_2(x, i, Insane, RTCPPacketTraceXRRLEReportBlockChunkBitVector, ol, RtcpPacket, Info, + ZS_EVENTING_2(x, i, Basic, RTCPPacketTraceXRRLEReportBlockChunkBitVector, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, word, bitVector, bv.bitVector() ); } else { - ZS_EVENTING_2(x, i, Insane, RTCPPacketTraceXRRLEReportBlockChunkUnknown, ol, RtcpPacket, Info, + ZS_EVENTING_2(x, i, Basic, RTCPPacketTraceXRRLEReportBlockChunkUnknown, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, word, chunk, chunk ); @@ -1662,7 +1662,7 @@ namespace ortc ) { traceSenderReceiverCommonReport(mediaChannelID, sr); - ZS_EVENTING_7(x, i, Insane, RTCPPacketTraceSenderReport, ol, RtcpPacket, Info, + ZS_EVENTING_7(x, i, Basic, RTCPPacketTraceSenderReport, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, dword, ntpTimestampMS, sr->ntpTimestampMS(), dword, ntpTimestampLS, sr->ntpTimestampLS(), @@ -1681,7 +1681,7 @@ namespace ortc { ElementPtr subEl = Element::create("ReceiverReport"); traceSenderReceiverCommonReport(mediaChannelID, rr); - ZS_EVENTING_2(x, i, Insane, RTCPPacketTraceReceiverReport, ol, RtcpPacket, Info, + ZS_EVENTING_2(x, i, Basic, RTCPPacketTraceReceiverReport, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, bool, nextReceiverReport, (NULL != rr->nextReceiverReport()) ); @@ -1695,7 +1695,7 @@ namespace ortc { traceReport(mediaChannelID, sdes); - ZS_EVENTING_3(x, i, Insane, RTCPPacketTraceSDES, ol, RtcpPacket, Info, + ZS_EVENTING_3(x, i, Basic, RTCPPacketTraceSDES, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, sc, sdes->sc(), bool, nextSDES, (NULL != sdes->nextSDES()) @@ -1704,7 +1704,7 @@ namespace ortc RTCPPacket::SDES::Chunk *chunk = sdes->firstChunk(); if (NULL != chunk) { for (; NULL != chunk; chunk = chunk->next()) { - ZS_EVENTING_14(x, i, Insane, RTCPPacketTraceSDESChunk, ol, RtcpPacket, Info, + ZS_EVENTING_14(x, i, Basic, RTCPPacketTraceSDESChunk, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, dword, ssrc, chunk->ssrc(), size_t, count, chunk->count(), @@ -1743,7 +1743,7 @@ namespace ortc ) { traceReport(mediaChannelID, bye); - ZS_EVENTING_3(x, i, Insane, RTCPPacketTraceBye, ol, RtcpPacket, Info, + ZS_EVENTING_3(x, i, Basic, RTCPPacketTraceBye, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, reasonForLeaving, bye->reasonForLeaving(), bool, nextBye, (NULL != bye->nextBye()) @@ -1758,7 +1758,7 @@ namespace ortc ) { traceReport(mediaChannelID, app); - ZS_EVENTING_7(x, i, Insane, RTCPPacketTraceApp, ol, RtcpPacket, Info, + ZS_EVENTING_7(x, i, Basic, RTCPPacketTraceApp, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, subtype, app->subtype(), dword, ssrc, app->ssrc(), @@ -1777,7 +1777,7 @@ namespace ortc { traceFeedbackMessage(mediaChannelID, fm); - ZS_EVENTING_3(x, i, Insane, RTCPPacketTraceTransportLayerFeedbackMessage, ol, RtcpPacket, Info, + ZS_EVENTING_3(x, i, Basic, RTCPPacketTraceTransportLayerFeedbackMessage, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, bool, unknown, (NULL != fm->unknown()), bool, nextTransportLayerFeedbackMessage, (NULL != fm->nextTransportLayerFeedbackMessage()) @@ -1789,7 +1789,7 @@ namespace ortc for (size_t index = 0; index < count; ++index) { auto format = fm->genericNACKAtIndex(index); - ZS_EVENTING_3(x, i, Insane, RTCPPacketTransportLayerFeedbackMessageGenericNACK, ol, RtcpPacket, Info, + ZS_EVENTING_3(x, i, Basic, RTCPPacketTransportLayerFeedbackMessageGenericNACK, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, word, pid, format->pid(), word, blp, format->blp() @@ -1834,7 +1834,7 @@ namespace ortc { auto format = fm->pli(); if (NULL != format) { - ZS_EVENTING_1(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessagePLI, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID); + ZS_EVENTING_1(x, i, Basic, RTCPPacketTracePayloadSpecificFeedbackMessagePLI, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID); } } @@ -1844,7 +1844,7 @@ namespace ortc for (size_t index = 0; index < count; ++index) { auto format = fm->sliAtIndex(index); - ZS_EVENTING_5(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageSLI, ol, RtcpPacket, Info, + ZS_EVENTING_5(x, i, Basic, RTCPPacketTracePayloadSpecificFeedbackMessageSLI, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, index, index, word, first, format->first(), @@ -1858,7 +1858,7 @@ namespace ortc { auto format = fm->rpsi(); if (NULL != format) { - ZS_EVENTING_5(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageRPSI, ol, RtcpPacket, Info, + ZS_EVENTING_5(x, i, Basic, RTCPPacketTracePayloadSpecificFeedbackMessageRPSI, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, zeroBit, format->zeroBit(), byte, payloadType, format->payloadType(), @@ -1885,7 +1885,7 @@ namespace ortc auto format = fm->tstrAtIndex(index); traceCodecControlCommon(mediaChannelID, RTCPPacket::PayloadSpecificFeedbackMessage::TSTR::kFmt, format); - ZS_EVENTING_4(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageTSTx, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTracePayloadSpecificFeedbackMessageTSTx, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, type, "TSTR", size_t, index, index, @@ -1902,7 +1902,7 @@ namespace ortc auto format = fm->tstnAtIndex(index); traceCodecControlCommon(mediaChannelID, RTCPPacket::PayloadSpecificFeedbackMessage::TSTN::kFmt, format); - ZS_EVENTING_4(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageTSTx, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTracePayloadSpecificFeedbackMessageTSTx, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, type, "TSTN", size_t, index, index, @@ -1919,7 +1919,7 @@ namespace ortc auto format = fm->vbcmAtIndex(index); traceCodecControlCommon(mediaChannelID, RTCPPacket::PayloadSpecificFeedbackMessage::TSTN::kFmt, format); - ZS_EVENTING_6(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageVBCM, ol, RtcpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTCPPacketTracePayloadSpecificFeedbackMessageVBCM, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, index, index, byte, zeroBit, format->zeroBit(), @@ -1937,7 +1937,7 @@ namespace ortc if ((NULL != format) && (NULL == remb)) { - ZS_EVENTING_3(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageAFB, ol, RtcpPacket, Info, + ZS_EVENTING_3(x, i, Basic, RTCPPacketTracePayloadSpecificFeedbackMessageAFB, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, buffer, data, format->data(), size, dataSize, format->dataSize() @@ -1948,7 +1948,7 @@ namespace ortc { auto format = fm->remb(); if (NULL != format) { - ZS_EVENTING_4(x, i, Insane, RTCPPacketTracePayloadSpecificFeedbackMessageREMB, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTracePayloadSpecificFeedbackMessageREMB, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, numSSRC, format->numSSRC(), byte, brExp, format->brExp(), @@ -1967,7 +1967,7 @@ namespace ortc { traceReport(mediaChannelID, xr); - ZS_EVENTING_5(x, i, Insane, RTCPPacketTraceXR, ol, RtcpPacket, Info, + ZS_EVENTING_5(x, i, Basic, RTCPPacketTraceXR, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, byte, numSSRC, xr->reserved(), dword, ssrc, xr->ssrc(), @@ -1980,7 +1980,7 @@ namespace ortc if (count > 0) { for (size_t index = 0; index < count; ++index) { auto format = xr->lossRLEReportBlockAtIndex(index); - ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, type, "LossRLE", size_t, index, index, @@ -1996,7 +1996,7 @@ namespace ortc if (count > 0) { for (size_t index = 0; index < count; ++index) { auto format = xr->duplicateRLEReportBlockAtIndex(index); - ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, type, "DuplicateRLE", size_t, index, index, @@ -2012,7 +2012,7 @@ namespace ortc if (count > 0) { for (size_t index = 0; index < count; ++index) { auto format = xr->packetReceiptTimesReportBlockAtIndex(index); - ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, type, "PacketReceiptTimes", size_t, index, index, @@ -2029,7 +2029,7 @@ namespace ortc if (count > 0) { for (size_t index = 0; index < count; ++index) { auto format = xr->receiverReferenceTimeReportBlockAtIndex(index); - ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceXRReceiverReferenceTimeReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTCPPacketTraceXRReceiverReferenceTimeReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, index, index, dword, ntpTimestampMS, format->ntpTimestampMS(), @@ -2049,7 +2049,7 @@ namespace ortc auto format = xr->dlrrReportBlockAtIndex(index); size_t subBlockCount = format->subBlockCount(); - ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRDLRRReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTraceXRDLRRReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, index, index, size_t, subBlockCount, subBlockCount, @@ -2060,7 +2060,7 @@ namespace ortc for (size_t indexSubBlock = 0; indexSubBlock < subBlockCount; ++indexSubBlock) { auto subBlock = format->subBlockAtIndex(indexSubBlock); - ZS_EVENTING_6(x, i, Insane, RTCPPacketTraceXRDLRRReportBlockSubBlock, ol, RtcpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTCPPacketTraceXRDLRRReportBlockSubBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, index, indexSubBlock, size_t, subBlockCount, subBlockCount, @@ -2080,7 +2080,7 @@ namespace ortc if (count > 0) { for (size_t index = 0; index < count; ++index) { auto format = xr->statisticsSummaryReportBlockAtIndex(index); - ZS_EVENTING_22(x, i, Insane, RTCPPacketTraceXRStatisticsSummary, ol, RtcpPacket, Info, + ZS_EVENTING_22(x, i, Basic, RTCPPacketTraceXRStatisticsSummary, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, index, index, bool, lossReportFlag, format->lossReportFlag(), @@ -2114,7 +2114,7 @@ namespace ortc if (count > 0) { for (size_t index = 0; index < count; ++index) { auto format = xr->voIPMetricsReportBlockAtIndex(index); - ZS_EVENTING_27(x, i, Insane, RTCPPacketTraceXRVoIPMetricsReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_27(x, i, Basic, RTCPPacketTraceXRVoIPMetricsReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, size_t, index, index, dword, ssrcOfSource, format->ssrcOfSource(), @@ -2154,7 +2154,7 @@ namespace ortc if (count > 0) { for (size_t index = 0; index < count; ++index) { auto format = xr->unknownReportBlockAtIndex(index); - ZS_EVENTING_4(x, i, Insane, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, + ZS_EVENTING_4(x, i, Basic, RTCPPacketTraceXRTypeRLEReportBlock, ol, RtcpPacket, Info, puid, mediaChannelID, mediaChannelID, string, type, "UnknownReportBlock", size_t, index, index, @@ -2999,12 +2999,14 @@ namespace ortc } //------------------------------------------------------------------------- - void RTCPPacket::trace(const char *message) const + void RTCPPacket::trace( + const char *func, + const char *message + ) const { - if (!ZS_EVENTING_IS_LOGGING(Insane)) return; - - ZS_EVENTING_7(x, i, Insane, RTCPPacketTrace, ol, RtcpPacket, Info, + ZS_EVENTING_8(x, i, Basic, RTCPPacketTrace, ol, RtcpPacket, Info, puid, mediaChannelID, mMediaChannelID, + string, func, func, string, message, message, buffer, buffer, ((bool)mBuffer) ? mBuffer->BytePtr() : NULL, size, size, ((bool)mBuffer) ? mBuffer->SizeInBytes() : 0, @@ -3067,7 +3069,7 @@ namespace ortc default: { UnknownReport *unknown = static_cast(report); - ZS_EVENTING_2(x, i, Insane, RTCPPacketTraceUnknownReport, ol, RtcpPacket, Info, + ZS_EVENTING_2(x, i, Basic, RTCPPacketTraceUnknownReport, ol, RtcpPacket, Info, puid, mediaChannelID, mMediaChannelID, bool, next, (NULL != unknown->nextUnknown()) ); @@ -3099,7 +3101,7 @@ namespace ortc size_t, remaining, 0, size_t, length, size ); - trace("packet length is too short"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "packet length is too short"); return false; } @@ -3118,7 +3120,7 @@ namespace ortc puid, mediaChannelID, mMediaChannelID, byte, version, version ); - trace("illegal version found"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "illegal version found"); return false; } @@ -3134,7 +3136,7 @@ namespace ortc size_t, remaining, remaining, size_t, length, length ); - trace("found illegal second padding bit set in compound RTCP block"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "found illegal second padding bit set in compound RTCP block"); return false; } @@ -3148,7 +3150,7 @@ namespace ortc size_t, remaining, remaining, size_t, length, length ); - trace("malformed padding size in RTCP packet"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "malformed padding size in RTCP packet"); return false; } @@ -3161,7 +3163,7 @@ namespace ortc size_t, remaining, remaining, size_t, length, length ); - trace("insufficient length remaining for RTCP block"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "insufficient length remaining for RTCP block"); return false; } @@ -3195,7 +3197,7 @@ namespace ortc } if (0 == mAllocationSize) { - trace("no RTCP packets were processed"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "no RTCP packets were processed"); return true; } @@ -3295,7 +3297,7 @@ namespace ortc } } - trace("parsed"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "parsed"); return true; } @@ -3486,7 +3488,7 @@ namespace ortc size_t, remaining, remaining, size_t, length, length ); - trace("malformed SDES Priv prefix found"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "malformed SDES Priv prefix found"); return false; } break; @@ -3501,7 +3503,7 @@ namespace ortc puid, mediaChannelID, mMediaChannelID, byte, type, type ); - trace("SDES item type is not understood"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "SDES item type is not understood"); break; } } @@ -4823,7 +4825,7 @@ namespace ortc puid, mediaChannelID, mMediaChannelID, size_t, sc, report->sc() ); - trace("BYE report count > 0 but does not contain SSRCs"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "BYE report count > 0 but does not contain SSRCs"); return false; } diff --git a/ortc/cpp/ortc_RTP.cpp b/ortc/cpp/ortc_RTP.cpp index 5d693afe..2e14676b 100644 --- a/ortc/cpp/ortc_RTP.cpp +++ b/ortc/cpp/ortc_RTP.cpp @@ -39,7 +39,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPDecoderAudio.cpp b/ortc/cpp/ortc_RTPDecoderAudio.cpp index 1c6b5e19..cb4bc436 100644 --- a/ortc/cpp/ortc_RTPDecoderAudio.cpp +++ b/ortc/cpp/ortc_RTPDecoderAudio.cpp @@ -55,7 +55,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPDecoderVideo.cpp b/ortc/cpp/ortc_RTPDecoderVideo.cpp index bba537d8..81a1a285 100644 --- a/ortc/cpp/ortc_RTPDecoderVideo.cpp +++ b/ortc/cpp/ortc_RTPDecoderVideo.cpp @@ -55,7 +55,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPEncoderAudio.cpp b/ortc/cpp/ortc_RTPEncoderAudio.cpp index 9e230840..4d3bce49 100644 --- a/ortc/cpp/ortc_RTPEncoderAudio.cpp +++ b/ortc/cpp/ortc_RTPEncoderAudio.cpp @@ -55,7 +55,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPEncoderVideo.cpp b/ortc/cpp/ortc_RTPEncoderVideo.cpp index 83d56e3d..67a9dd8e 100644 --- a/ortc/cpp/ortc_RTPEncoderVideo.cpp +++ b/ortc/cpp/ortc_RTPEncoderVideo.cpp @@ -56,7 +56,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_mediaengine) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_media_engine) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPListener.cpp b/ortc/cpp/ortc_RTPListener.cpp index 70e272da..c57eb450 100644 --- a/ortc/cpp/ortc_RTPListener.cpp +++ b/ortc/cpp/ortc_RTPListener.cpp @@ -63,7 +63,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtplistener) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_listener) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPPacket.cpp b/ortc/cpp/ortc_RTPPacket.cpp index ec1e12ac..fe6c2433 100644 --- a/ortc/cpp/ortc_RTPPacket.cpp +++ b/ortc/cpp/ortc_RTPPacket.cpp @@ -68,7 +68,7 @@ #define RTP_GET_BITS(xByte, xBitPattern, xLowestBit) (((xByte) >> (xLowestBit)) & (xBitPattern)) #define RTP_PACK_BITS(xByte, xBitPattern, xLowestBit) (((xByte) & (xBitPattern)) << (xLowestBit)) -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtp_rtcp_packet) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_rtcp_packet) } namespace ortc { @@ -147,9 +147,13 @@ namespace ortc #pragma mark //--------------------------------------------------------------------------- - void RTPPacket::HeaderExtension::trace(const char *message) const + void RTPPacket::HeaderExtension::trace( + const char *func, + const char *message + ) const { - ZS_EVENTING_5(x, i, Insane, RTPPacketHeaderExtension, ol, RtpPacket, Info, + ZS_EVENTING_6(x, i, Basic, RTPPacketHeaderExtension, ol, RtpPacket, Info, + string, func, func, string, message, message, byte, id, mID, binary, data, mData, @@ -208,9 +212,13 @@ namespace ortc } //--------------------------------------------------------------------------- - void RTPPacket::ClientToMixerExtension::trace(const char *message) const + void RTPPacket::ClientToMixerExtension::trace( + const char *func, + const char *message + ) const { - ZS_EVENTING_7(x, i, Insane, RTPPacketClientToMixerExtension, ol, RtpPacket, Info, + ZS_EVENTING_8(x, i, Basic, RTPPacketClientToMixerExtension, ol, RtpPacket, Info, + string, func, func, string, message, message, byte, id, mID, binary, data, mData, @@ -289,9 +297,13 @@ namespace ortc } //--------------------------------------------------------------------------- - void RTPPacket::MixerToClientExtension::trace(const char *message) const + void RTPPacket::MixerToClientExtension::trace( + const char *func, + const char *message + ) const { - ZS_EVENTING_6(x, i, Insane, RTPPacketMixerToClientExtension, ol, RtpPacket, Info, + ZS_EVENTING_7(x, i, Basic, RTPPacketMixerToClientExtension, ol, RtpPacket, Info, + string, func, func, string, message, message, byte, id, mID, binary, data, mData, @@ -354,9 +366,13 @@ namespace ortc } //--------------------------------------------------------------------------- - void RTPPacket::StringHeaderExtension::trace(const char *message) const + void RTPPacket::StringHeaderExtension::trace( + const char *func, + const char *message + ) const { - ZS_EVENTING_6(x, i, Insane, RTPPacketStringHeaderExtension, ol, RtpPacket, Info, + ZS_EVENTING_7(x, i, Basic, RTPPacketStringHeaderExtension, ol, RtpPacket, Info, + string, func, func, string, message, message, byte, id, mID, binary, data, mData, @@ -469,9 +485,13 @@ namespace ortc } //--------------------------------------------------------------------------- - void RTPPacket::NumberHeaderExtension::trace(const char *message) const + void RTPPacket::NumberHeaderExtension::trace( + const char *func, + const char *message + ) const { - ZS_EVENTING_6(x, i, Insane, RTPPacketNumberHeaderExtension, ol, RtpPacket, Info, + ZS_EVENTING_7(x, i, Basic, RTPPacketNumberHeaderExtension, ol, RtpPacket, Info, + string, func, func, string, message, message, byte, id, mID, binary, data, mData, @@ -490,9 +510,13 @@ namespace ortc #pragma mark //--------------------------------------------------------------------------- - void RTPPacket::MidHeaderExtension::trace(const char *message) const + void RTPPacket::MidHeaderExtension::trace( + const char *func, + const char *message + ) const { - ZS_EVENTING_6(x, i, Insane, RTPPacketMidHeaderExtension, ol, RtpPacket, Info, + ZS_EVENTING_7(x, i, Basic, RTPPacketMidHeaderExtension, ol, RtpPacket, Info, + string, func, func, string, message, message, byte, id, mID, bool, data, mData ? true : false, @@ -511,9 +535,13 @@ namespace ortc #pragma mark //--------------------------------------------------------------------------- - void RTPPacket::RidHeaderExtension::trace(const char *message) const + void RTPPacket::RidHeaderExtension::trace( + const char *func, + const char *message + ) const { - ZS_EVENTING_6(x, i, Insane, RTPPacketRidHeaderExtension, ol, RtpPacket, Info, + ZS_EVENTING_7(x, i, Insane, RTPPacketRidHeaderExtension, ol, RtpPacket, Info, + string, func, func, string, message, message, byte, id, mID, binary, data, mData, @@ -625,9 +653,13 @@ namespace ortc } //--------------------------------------------------------------------------- - void RTPPacket::VideoOrientationHeaderExtension::trace(const char *message) const + void RTPPacket::VideoOrientationHeaderExtension::trace( + const char *func, + const char *message + ) const { - ZS_EVENTING_8(x, i, Insane, RTPPacketVideoOrientationHeaderExtension, ol, RtpPacket, Info, + ZS_EVENTING_9(x, i, Basic, RTPPacketVideoOrientationHeaderExtension, ol, RtpPacket, Info, + string, func, func, string, message, message, byte, id, mID, binary, data, mData, @@ -846,35 +878,37 @@ namespace ortc } //--------------------------------------------------------------------------- - void RTPPacket::trace(const char *message) const + void RTPPacket::trace( + const char *func, + const char *message + ) const { - if (ZS_EVENTING_IS_LOGGING(Insane)) { - ZS_EVENTING_20(x, i, Insane, RTPPacketTrace, ol, RtpPacket, Info, - string, message, message, - puid, mediaChannelID, mMediaChannelID, - binary, buffer, mBuffer ? mBuffer->BytePtr() : NULL, - size, size, mBuffer ? mBuffer->SizeInBytes() : 0, - byte, version, mVersion, - size_t, padding, mPadding, - byte, cc, mCC, - bool, m, mM, - byte, pt, mPT, - word, sequenceNumber, mSequenceNumber, - dword, timestamp, mTimestamp, - dword, ssrc, mSSRC, - size_t, headerSize, mHeaderSize, - size_t, headerExtensionSize, mHeaderExtensionSize, - size_t, payloadSize, mPayloadSize, - size_t, totalHeaderExtensions, mTotalHeaderExtensions, - byte, headerExtensionAppBits, mHeaderExtensionAppBits, - size_t, headerExtensionPrepaddedSize, mHeaderExtensionPrepaddedSize, - binary, headerExtensionParseStoppedPos, mHeaderExtensionParseStoppedPos, - size, headerExtensionParseStoppedSize, mHeaderExtensionParseStoppedSize - ); + ZS_EVENTING_21(x, i, Basic, RTPPacketTrace, ol, RtpPacket, Info, + string, func, func, + string, message, message, + puid, mediaChannelID, mMediaChannelID, + binary, buffer, mBuffer ? mBuffer->BytePtr() : NULL, + size, size, mBuffer ? mBuffer->SizeInBytes() : 0, + byte, version, mVersion, + size_t, padding, mPadding, + byte, cc, mCC, + bool, m, mM, + byte, pt, mPT, + word, sequenceNumber, mSequenceNumber, + dword, timestamp, mTimestamp, + dword, ssrc, mSSRC, + size_t, headerSize, mHeaderSize, + size_t, headerExtensionSize, mHeaderExtensionSize, + size_t, payloadSize, mPayloadSize, + size_t, totalHeaderExtensions, mTotalHeaderExtensions, + byte, headerExtensionAppBits, mHeaderExtensionAppBits, + size_t, headerExtensionPrepaddedSize, mHeaderExtensionPrepaddedSize, + binary, headerExtensionParseStoppedPos, mHeaderExtensionParseStoppedPos, + size, headerExtensionParseStoppedSize, mHeaderExtensionParseStoppedSize + ); - for (auto current = mHeaderExtensions; NULL != current; current = current->mNext) { - current->trace(message); - } + for (auto current = mHeaderExtensions; NULL != current; current = current->mNext) { + current->trace(func, message); } } @@ -933,7 +967,7 @@ namespace ortc // going to strip the extension header out entirely if (!RTP_HEADER_EXTENSION(buffer)) { - trace("no extension present (thus no need to strip extension from RTP packet)"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "no extension present (thus no need to strip extension from RTP packet)"); return; } @@ -968,7 +1002,7 @@ namespace ortc mHeaderExtensionParseStoppedPos = NULL; mHeaderExtensionParseStoppedSize = 0; - trace("stripped existing extension header"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "stripped existing extension header"); return; } @@ -992,7 +1026,7 @@ namespace ortc writeHeaderExtensions(firstExtension, twoByteHeader); - trace("header extension changed"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "header extension changed"); } //--------------------------------------------------------------------------- @@ -1096,7 +1130,7 @@ namespace ortc if (0 == mHeaderExtensionSize) { // no extensions present - trace("parsed"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "parsed"); return true; } @@ -1123,7 +1157,7 @@ namespace ortc size_t remaining = mHeaderExtensionSize - sizeof(DWORD); if (0 == remaining) { - trace("parsed"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "parsed"); return true; } @@ -1262,7 +1296,7 @@ namespace ortc mTotalHeaderExtensions = totalFound; - trace("parsed"); + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "parsed"); return true; } @@ -1478,7 +1512,8 @@ namespace ortc if (0 != mPadding) { newBuffer[newSize-1] = static_cast(mPadding); } - trace("generated"); + + ZS_EVENTING_TRACE_OBJECT(Insane, *this, "generated"); } } // namespace ortc diff --git a/ortc/cpp/ortc_RTPReceiver.cpp b/ortc/cpp/ortc_RTPReceiver.cpp index 31746fd2..aa099ab4 100644 --- a/ortc/cpp/ortc_RTPReceiver.cpp +++ b/ortc/cpp/ortc_RTPReceiver.cpp @@ -68,7 +68,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpreceiver) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_receiver) } namespace ortc { @@ -1631,7 +1631,7 @@ namespace ortc ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport))); - packet->trace("received packet"); + ZS_EVENTING_TRACE_OBJECT(Insane, *packet, "rtp receiver received packet"); ChannelHolderPtr channelHolder; @@ -1702,7 +1702,7 @@ namespace ortc ); ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport))); - packet->trace("received packet"); + ZS_EVENTING_TRACE_OBJECT(Insane, *packet, "rtp receiver received packet"); ChannelWeakMapPtr channels; diff --git a/ortc/cpp/ortc_RTPReceiverChannel.cpp b/ortc/cpp/ortc_RTPReceiverChannel.cpp index 256df240..5125be53 100644 --- a/ortc/cpp/ortc_RTPReceiverChannel.cpp +++ b/ortc/cpp/ortc_RTPReceiverChannel.cpp @@ -61,7 +61,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpreceiver) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_receiver) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPSender.cpp b/ortc/cpp/ortc_RTPSender.cpp index ad65f195..196021c3 100644 --- a/ortc/cpp/ortc_RTPSender.cpp +++ b/ortc/cpp/ortc_RTPSender.cpp @@ -72,7 +72,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_sender) } namespace ortc { @@ -883,7 +883,7 @@ namespace ortc ); ZS_LOG_TRACE(log("received packet") + ZS_PARAM("via", IICETypes::toString(viaTransport))) - packet->trace("received packet"); + ZS_EVENTING_TRACE_OBJECT(Insane, *packet, "rtp sender received packet"); ParametersToChannelHolderMapPtr channels; diff --git a/ortc/cpp/ortc_RTPSenderChannel.cpp b/ortc/cpp/ortc_RTPSenderChannel.cpp index 421d6f58..d8bc1f6c 100644 --- a/ortc/cpp/ortc_RTPSenderChannel.cpp +++ b/ortc/cpp/ortc_RTPSenderChannel.cpp @@ -63,7 +63,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtpsender) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_sender) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPTypes.cpp b/ortc/cpp/ortc_RTPTypes.cpp index bb95d8f2..994771a0 100644 --- a/ortc/cpp/ortc_RTPTypes.cpp +++ b/ortc/cpp/ortc_RTPTypes.cpp @@ -57,7 +57,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc) } namespace ortc { diff --git a/ortc/cpp/ortc_RTPUtils.cpp b/ortc/cpp/ortc_RTPUtils.cpp index 2ae549cd..30e93d0f 100644 --- a/ortc/cpp/ortc_RTPUtils.cpp +++ b/ortc/cpp/ortc_RTPUtils.cpp @@ -48,7 +48,7 @@ namespace std { } #endif //_WIN32 -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_rtptypes) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_rtp_types) } namespace ortc { diff --git a/ortc/cpp/ortc_SCTPTransport.cpp b/ortc/cpp/ortc_SCTPTransport.cpp index 4ecacf65..e39d2db5 100644 --- a/ortc/cpp/ortc_SCTPTransport.cpp +++ b/ortc/cpp/ortc_SCTPTransport.cpp @@ -88,7 +88,7 @@ enum WindowsErrorCompatibility { ((sizeof(a) / sizeof(*(a))) / \ static_cast(!(sizeof(a) % sizeof(*(a))))) -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_sctp_datachannel) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_sctp_data_channel) } namespace ortc { @@ -276,9 +276,9 @@ namespace ortc //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- -#pragma mark -#pragma mark SCTPTransportSettingsDefaults -#pragma mark + #pragma mark + #pragma mark SCTPTransportSettingsDefaults + #pragma mark class SCTPTransportSettingsDefaults : public ISettingsApplyDefaultsDelegate { @@ -323,21 +323,21 @@ namespace ortc //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- -#pragma mark -#pragma mark SCTPInit -#pragma mark + #pragma mark + #pragma mark SCTPInit + #pragma mark -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- -#pragma mark -#pragma mark SCTPInit -#pragma mark + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark SCTPInit + #pragma mark -// code borrowed from: -// https://chromium.googlesource.com/external/webrtc/+/master/talk/media/sctp/sctpdataengine.cc -// https://chromium.googlesource.com/external/webrtc/+/master/talk/media/sctp/sctpdataengine.h + // code borrowed from: + // https://chromium.googlesource.com/external/webrtc/+/master/talk/media/sctp/sctpdataengine.cc + // https://chromium.googlesource.com/external/webrtc/+/master/talk/media/sctp/sctpdataengine.h class SCTPInit : public ISingletonManagerDelegate { @@ -522,7 +522,6 @@ namespace ortc const SCTPPayloadProtocolIdentifier ppid = static_cast(ntohl(rcv.rcv_ppid)); - if (0 == (flags & MSG_NOTIFICATION)) { switch (ppid) { case SCTP_PPID_CONTROL: @@ -568,11 +567,11 @@ namespace ortc protected: //----------------------------------------------------------------------- -#pragma mark -#pragma mark SCTPInit => (internal) -#pragma mark + #pragma mark + #pragma mark SCTPInit => (internal) + #pragma mark -//----------------------------------------------------------------------- + //----------------------------------------------------------------------- Log::Params log(const char *message) const { ElementPtr objectEl = Element::create("ortc::SCTPInit"); @@ -673,13 +672,13 @@ namespace ortc const char *SCTPTransport::toString(InternalStates state) { switch (state) { - case InternalState_New: return "new"; - case InternalState_Connecting: return "connecting"; - case InternalState_ConnectingDisrupted: return "connecting disrupted"; - case InternalState_Ready: return "ready"; - case InternalState_Disconnected: return "disconnected"; - case InternalState_ShuttingDown: return "shutting down"; - case InternalState_Shutdown: return "shutdown"; + case InternalState_New: return "new"; + case InternalState_Connecting: return "connecting"; + case InternalState_ConnectingDisrupted: return "connecting disrupted"; + case InternalState_Ready: return "ready"; + case InternalState_Disconnected: return "disconnected"; + case InternalState_ShuttingDown: return "shutting down"; + case InternalState_Shutdown: return "shutdown"; } return "UNDEFINED"; } @@ -688,27 +687,28 @@ namespace ortc ISCTPTransportTypes::States SCTPTransport::toState(InternalStates state) { switch (state) { - case InternalState_New: return ISCTPTransportTypes::State_New; - case InternalState_Connecting: return ISCTPTransportTypes::State_Connecting; - case InternalState_ConnectingDisrupted: return ISCTPTransportTypes::State_Connecting; - case InternalState_Ready: return ISCTPTransportTypes::State_Connected; - case InternalState_Disconnected: return ISCTPTransportTypes::State_Connected; - case InternalState_ShuttingDown: return ISCTPTransportTypes::State_Closed; - case InternalState_Shutdown: return ISCTPTransportTypes::State_Closed; + case InternalState_New: return ISCTPTransportTypes::State_New; + case InternalState_Connecting: return ISCTPTransportTypes::State_Connecting; + case InternalState_ConnectingDisrupted: return ISCTPTransportTypes::State_Connecting; + case InternalState_Ready: return ISCTPTransportTypes::State_Connected; + case InternalState_Disconnected: return ISCTPTransportTypes::State_Connected; + case InternalState_ShuttingDown: return ISCTPTransportTypes::State_Closed; + case InternalState_Shutdown: return ISCTPTransportTypes::State_Closed; } - ZS_THROW_NOT_IMPLEMENTED(String("state is not implemented:") + toString(state)) - return ISCTPTransportTypes::State_Closed; + ZS_THROW_NOT_IMPLEMENTED(String("state is not implemented:") + toString(state)); + return ISCTPTransportTypes::State_Closed; } //------------------------------------------------------------------------- SCTPTransport::SCTPTransport( - const make_private &, - IMessageQueuePtr queue, - UseListenerPtr listener, - UseSecureTransportPtr secureTransport, - WORD localPort, - WORD remotePort - ) : + const make_private &, + IMessageQueuePtr queue, + ISCTPTransportDelegatePtr originalDelegate, + UseListenerPtr listener, + UseSecureTransportPtr secureTransport, + WORD localPort, + WORD remotePort + ) : MessageQueueAssociator(queue), SharedRecursiveLock(SharedRecursiveLock::create()), mSCTPInit(SCTPInit::singleton()), @@ -736,18 +736,21 @@ namespace ortc ZS_LOG_DETAIL(debug("created")); - ORTC_THROW_INVALID_STATE_IF(!mSCTPInit) + ORTC_THROW_INVALID_STATE_IF(!mSCTPInit); + + if (originalDelegate) { + mDefaultSubscription = mSubscriptions.subscribe(originalDelegate, IORTCForInternal::queueDelegate()); + } } //------------------------------------------------------------------------- void SCTPTransport::init() { AutoRecursiveLock lock(*this); - //IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); - ZS_LOG_DETAIL(debug("SCTP init")) + ZS_LOG_DETAIL(debug("SCTP init")); - auto secureTransport = mSecureTransport.lock(); + auto secureTransport = mSecureTransport.lock(); if (secureTransport) { mSecureTransportSubscription = secureTransport->subscribe(mThisWeak.lock()); } @@ -760,8 +763,8 @@ namespace ortc { if (isNoop()) return; - ZS_LOG_DETAIL(log("destroyed")) - mThisWeak.reset(); + ZS_LOG_DETAIL(log("destroyed")); + mThisWeak.reset(); mThisSocket->reset(); cancel(); @@ -819,7 +822,6 @@ namespace ortc return PromiseWithStatsReport::createRejected(IORTCForInternal::queueDelegate()); } - //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -835,6 +837,29 @@ namespace ortc return transport->toDebug(); } + //------------------------------------------------------------------------- + PUID SCTPTransport::getID() const + { + AutoRecursiveLock lock(*this); + + // Caller has seen the real ID thus do not hide the real ID. + if (mObtainedID) return mID; + + // Ideally the redirect transport and this transport woud have the same + // ID but that's not possible. To the external world hide the ID of + // this transport's real ID if the redirect transport is in place. But + // do not hide the ID if the real ID has been revealed before the + // redirect was put into place. + if (mRedirectToExistingTransport) { + // Once a redirect is in place the redirect linkage cannot be broken. + return mRedirectToExistingTransport->getID(); + } + + // Caller has obtained real ID so this ID cannot change for this object. + mObtainedID = true; // mutuable + return mID; + } + //------------------------------------------------------------------------- ISCTPTransportPtr SCTPTransport::create( ISCTPTransportDelegatePtr delegate, @@ -860,12 +885,19 @@ namespace ortc inLocalPort = allocatedLocalPort.value(); } - SCTPTransportPtr pThis(make_shared(make_private{}, IORTCForInternal::queueORTC(), listener, useSecureTransport)); + SCTPTransportPtr pThis(make_shared(make_private{}, IORTCForInternal::queueORTC(), delegate, listener, useSecureTransport)); pThis->mThisWeak = pThis; pThis->mThisSocket = new SCTPTransportWeakPtr(pThis); ISCTPTransportPtr registeredTransport = pThis; + // A tear away is created to allow caller to hold an instance of the tear + // away as a means to ensure an instance of the listener is held as + // well as this object since both objects are needed. This object cannot + // hold an instance directly to the listener as the listener holds + // instances to every SCTP transport as that would cause a circular + // reference. Thus by using a tear away to hold the references to this + // object and the listener prevents the circular reference. auto tearAway = ISCTPTransportTearAway::create(registeredTransport, make_shared()); ORTC_THROW_INVALID_STATE_IF(!tearAway); @@ -873,7 +905,6 @@ namespace ortc ORTC_THROW_INVALID_STATE_IF(!tearAwayData); tearAwayData->mListener = listener; - tearAwayData->mDelegate = delegate; AutoRecursiveLock lock(*pThis); pThis->mTearAway = tearAway; @@ -887,39 +918,47 @@ namespace ortc ISCTPTransportTypes::States SCTPTransport::state() const { AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) return mRedirectToExistingTransport->state(); return mLastReportedState; } //------------------------------------------------------------------------- IDTLSTransportPtr SCTPTransport::transport() const { + // NOTE: Redirect and this object must share same secure transport. return DTLSTransport::convert(mSecureTransport.lock()); } //------------------------------------------------------------------------- WORD SCTPTransport::port() const { + // NOTE: Redirect and this object must share same secure port. return mLocalPort; } //------------------------------------------------------------------------- WORD SCTPTransport::localPort() const { + // NOTE: Redirect and this object must share same secure port. return mLocalPort; } //------------------------------------------------------------------------- Optional SCTPTransport::remotePort() const { + // NOTE: Redirect and this object must share same secure port. return mRemotePort; } //------------------------------------------------------------------------- ISCTPTransportTypes::PromiseWithSocketOptionsPtr SCTPTransport::getOptions(const SocketOptions &inWhichOptions) { + AutoRecursiveLock lock(*this); + + if (mRedirectToExistingTransport) return mRedirectToExistingTransport->getOptions(inWhichOptions); + auto promise = PromiseWithSocketOptions::create(IORTCForInternal::queueDelegate()); - AutoRecursiveLock lock(*this); if ((isShuttingDown()) || (isShutdown())) { promise->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "transport is closing or closed")); @@ -945,10 +984,12 @@ namespace ortc //------------------------------------------------------------------------- PromisePtr SCTPTransport::setOptions(const SocketOptions &inOptions) { - auto promise = Promise::create(IORTCForInternal::queueDelegate()); - AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) return mRedirectToExistingTransport->setOptions(inOptions); + + auto promise = Promise::create(IORTCForInternal::queueDelegate()); + if ((isShuttingDown()) || (isShutdown())) { promise->reject(ErrorAny::create(UseHTTP::HTTPStatusCode_Gone, "transport is closing or closed")); @@ -991,15 +1032,35 @@ namespace ortc ZS_LOG_DEBUG(log("start called") + remoteCapabilities.toDebug()); AutoRecursiveLock lock(*this); + + if (mRedirectToExistingTransport) { + mRedirectToExistingTransport->start(remoteCapabilities, inRemotePort); + return; + } + if ((isShuttingDown()) || (isShutdown())) { ORTC_THROW_INVALID_STATE("already shutting down"); } if (mCapabilities) { - ORTC_THROW_INVALID_STATE("already started"); + ORTC_THROW_INVALID_STATE_IF(!mStartedFromListener); + if (mStartedFromListener) { + // Not allowed to change capabilities after declaring the + // capabilities to the sctp transport listener. + ORTC_THROW_INVALID_STATE_IF(mCapabilities->mMaxMessageSize != remoteCapabilities.mMaxMessageSize); + ORTC_THROW_INVALID_STATE_IF(mCapabilities->mMaxSessionsPerPort != remoteCapabilities.mMaxSessionsPerPort); + } + ZS_LOG_DEBUG(log("already started")); + mStartedFromListener = false; + + // Needed to ensure any moved requests from a redirection get handled. + IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); + return; } + mStartedFromListener = false; + if (0 != inRemotePort) { mRemotePort = inRemotePort; } @@ -1023,33 +1084,134 @@ namespace ortc ORTC_THROW_INVALID_PARAMETERS("unable to allocate port, local port=" + string(mLocalPort) + ", remote port=" + string(remotePort)); } - auto usePThis = SCTPTransport::convert(forListener); - mLocalPort = localPort; mRemotePort = remotePort; + mCapabilities = make_shared(remoteCapabilities); + + // The SCTP transport used in the mapping of local:remote may already + // exist if the remote party initialized an SCTP transport before the + // local side has a chance to start its SCTP transport. This ensures + // this object remaps all requrests to an existing SCTP transport rather + // than creating a duplicate transport. + if (forListener != originalForListener) { + mRedirectToExistingTransport = SCTPTransport::convert(forListener); - auto originalTearAwayInterface = mTearAway.lock(); - auto tearAway = ISCTPTransportTearAway::tearAway(originalTearAwayInterface); - if (tearAway) { - tearAway->setDelegate(usePThis); - - auto tearAwayData = ISCTPTransportTearAway::data(originalTearAwayInterface); - if (tearAwayData) { - auto delegate = tearAwayData->mDelegate.lock(); - if ((!tearAwayData->mDefaultSubscription) && - (delegate)) { - tearAwayData->mDefaultSubscription = usePThis->subscribe(delegate); - tearAwayData->mDelegate.reset(); + if (mRedirectToExistingTransport) { + AutoRecursiveLock lock(*mRedirectToExistingTransport); + + if ((mRedirectToExistingTransport->isShuttingDown()) || + (mRedirectToExistingTransport->isShutdown())) { + ORTC_THROW_INVALID_STATE("already shutting down"); } - } - } - if (forListener != originalForListener) { - cancel(); + // Need to move get/set options to new transport + { + for (auto iter = mGetSocketOptions.begin(); iter != mGetSocketOptions.end(); ++iter) { + auto &value = (*iter); + mRedirectToExistingTransport->mGetSocketOptions.push_back(value); + } + for (auto iter = mSetSocketOptions.begin(); iter != mSetSocketOptions.end(); ++iter) { + auto &value = (*iter); + mRedirectToExistingTransport->mSetSocketOptions.push_back(value); + } + + mGetSocketOptions.clear(); + mSetSocketOptions.clear(); + } + + // Need to move the existing data channels to the redirected transport. + { + for (auto iter = mSessions.begin(); iter != mSessions.end(); ++iter) { + auto &sessionID = (*iter).first; + auto &dataChannel = (*iter).second; + if (!dataChannel) continue; + + bool remapped = false; + + try { + SessionID tempID = sessionID; + UseDataChannelPtr channel = dataChannel; + + if (!mRedirectToExistingTransport->isSessionAvailable(sessionID)) goto skip_register; + mRedirectToExistingTransport->registerNewDataChannel(channel, tempID); + remapped = true; + } catch(const InvalidParameters &e) { + goto skip_register; + } catch(const InvalidStateError &e) { + goto skip_register; + } + + skip_register: + { + if (!remapped) { + mFilterSessionRequests.insert(sessionID); + dataChannel->notifyRemapFailure(); + continue; + } + + auto found = mAnnouncedIncomingDataChannels.find(dataChannel->getID()); + if (found != mAnnouncedIncomingDataChannels.end()) { + mRedirectToExistingTransport->mAnnouncedIncomingDataChannels[dataChannel->getID()] = dataChannel; + } + } + } + + // sessions being reset should also be moved to a new transport + for (auto iter = mPendingResetSessions.begin(); iter != mPendingResetSessions.end(); ++iter) { + auto &sessionID = (*iter).first; + auto &dataChannel = (*iter).second; + if (!dataChannel) continue; + + if (!mRedirectToExistingTransport->isSessionAvailable(sessionID)) { + mFilterSessionRequests.insert(sessionID); + dataChannel->notifyClosed(); + continue; + } + auto found = mAnnouncedIncomingDataChannels.find(dataChannel->getID()); + if (found != mAnnouncedIncomingDataChannels.end()) { + mRedirectToExistingTransport->mAnnouncedIncomingDataChannels[dataChannel->getID()] = dataChannel; + } + mRedirectToExistingTransport->mPendingResetSessions[sessionID] = dataChannel; + } + + // sessions queued to reset should also be moved to a new transport + for (auto iter = mQueuedResetSessions.begin(); iter != mQueuedResetSessions.end(); ++iter) { + auto &sessionID = (*iter).first; + auto &dataChannel = (*iter).second; + if (!dataChannel) continue; + + if (!mRedirectToExistingTransport->isSessionAvailable(sessionID)) { + mFilterSessionRequests.insert(sessionID); + dataChannel->notifyClosed(); + continue; + } + auto found = mAnnouncedIncomingDataChannels.find(dataChannel->getID()); + if (found != mAnnouncedIncomingDataChannels.end()) { + mRedirectToExistingTransport->mAnnouncedIncomingDataChannels[dataChannel->getID()] = dataChannel; + } + mRedirectToExistingTransport->mQueuedResetSessions[sessionID] = dataChannel; + } + + // everything is now moved + mSessions.clear(); + mPendingResetSessions.clear(); + mQueuedResetSessions.clear(); + mAnnouncedIncomingDataChannels.clear(); + + // finally is socket is setup then kill the socket + if (mSocket) { + usrsctp_close(mSocket); + mSocket = NULL; + usrsctp_deregister_address(mThisSocket); + } + } + + mRedirectToExistingTransportSubscription = mRedirectToExistingTransport->subscribe(mThisWeak.lock()); + mRedirectToExistingTransport->start(remoteCapabilities, inRemotePort); + } return; } - mCapabilities = make_shared(remoteCapabilities); IWakeDelegateProxy::create(mThisWeak.lock())->onWake(); } @@ -1060,13 +1222,14 @@ namespace ortc ZS_LOG_DEBUG(log("stop called")) AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) return mRedirectToExistingTransport->stop(); cancel(); } //------------------------------------------------------------------------- ISCTPTransportSubscriptionPtr SCTPTransport::subscribe(ISCTPTransportDelegatePtr originalDelegate) { - ZS_LOG_DETAIL(log("subscribing to transport state")) + ZS_LOG_DETAIL(log("subscribing to transport state")); AutoRecursiveLock lock(*this); @@ -1077,15 +1240,29 @@ namespace ortc if (delegate) { SCTPTransportPtr pThis = mThisWeak.lock(); - for (auto iter = mAnnouncedIncomingDataChannels.begin(); iter != mAnnouncedIncomingDataChannels.end(); ++iter) { - // NOTE: ID of data channels are always greater than last so order - // should be guarenteed. - auto dataChannel = (*iter).second; - delegate->onSCTPTransportDataChannel(mThisWeak.lock(), DataChannel::convert(dataChannel)); - } + if (mRedirectToExistingTransport) { + AutoRecursiveLock lock(*mRedirectToExistingTransport); + + for (auto iter = mRedirectToExistingTransport->mAnnouncedIncomingDataChannels.begin(); iter != mRedirectToExistingTransport->mAnnouncedIncomingDataChannels.end(); ++iter) { + // NOTE: ID of data channels are always greater than last so order should be guarenteed. + auto dataChannel = (*iter).second; + delegate->onSCTPTransportDataChannel(pThis, DataChannel::convert(dataChannel)); + } - if (State_New != mLastReportedState) { - delegate->onSCTPTransportStateChange(pThis, mLastReportedState); + if (State_New != mRedirectToExistingTransport->mLastReportedState) { + delegate->onSCTPTransportStateChange(pThis, mRedirectToExistingTransport->mLastReportedState); + } + } else { + for (auto iter = mAnnouncedIncomingDataChannels.begin(); iter != mAnnouncedIncomingDataChannels.end(); ++iter) { + // NOTE: ID of data channels are always greater than last so order + // should be guarenteed. + auto dataChannel = (*iter).second; + delegate->onSCTPTransportDataChannel(pThis, DataChannel::convert(dataChannel)); + } + + if (State_New != mLastReportedState) { + delegate->onSCTPTransportStateChange(pThis, mLastReportedState); + } } } @@ -1112,6 +1289,11 @@ namespace ortc { AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) { + mRedirectToExistingTransport->registerNewDataChannel(ioDataChannel, ioSessionID); + return; + } + UseDataChannelPtr dataChannel = ioDataChannel; WORD sessionID = ioSessionID; @@ -1219,7 +1401,9 @@ namespace ortc ZS_LOG_DETAIL(log("datachannel subscribing to SCTP Transport")) AutoRecursiveLock lock(*this); - + + if (mRedirectToExistingTransport) return mRedirectToExistingTransport->subscribe(originalDelegate); + ISCTPTransportForDataChannelSubscriptionPtr subscription = mDataChannelSubscriptions.subscribe(originalDelegate, IORTCForInternal::queueORTC()); ISCTPTransportForDataChannelDelegatePtr delegate = mDataChannelSubscriptions.delegate(subscription, true); @@ -1242,6 +1426,8 @@ namespace ortc //------------------------------------------------------------------------- bool SCTPTransport::isReady() const { + AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) return mRedirectToExistingTransport->isReady(); return InternalState_Ready == mCurrentState; } @@ -1256,6 +1442,12 @@ namespace ortc AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) { + if (mFilterSessionRequests.end() != mFilterSessionRequests.find(params->mID.value())) return; + mRedirectToExistingTransport->announceIncoming(dataChannel, params); + return; + } + auto found = mSessions.find(params->mID.value()); if (found == mSessions.end()) { ZS_LOG_WARNING(Debug, log("cannot announce incoming session as it is not active") + params->toDebug()) @@ -1296,10 +1488,16 @@ namespace ortc size, size, ((bool)packet->mBuffer) ? size_t((SafeInt(packet->mBuffer->SizeInBytes()))) : 0 ); - ZS_DECLARE_TYPEDEF_PTR(ISCTPTransportForDataChannel::RejectReason, RejectReason) + ZS_DECLARE_TYPEDEF_PTR(ISCTPTransportForDataChannel::RejectReason, RejectReason); + { AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) { + if (mFilterSessionRequests.end() != mFilterSessionRequests.find(packet->mSessionID)) return Promise::createRejected(RejectReason::create(UseHTTP::HTTPStatusCode_Conflict, "cannot send because of a remap conflict"), IORTCForInternal::queueORTC());; + return mRedirectToExistingTransport->sendDataNow(packet); + } + if ((isShuttingDown()) || (isShutdown())) { ZS_LOG_WARNING(Debug, log("cannot send data while shutting down / shutdown")) @@ -1355,6 +1553,12 @@ namespace ortc AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) { + if (mFilterSessionRequests.end() != mFilterSessionRequests.find(sessionID)) return; + mRedirectToExistingTransport->requestShutdown(dataChannel, sessionID); + return; + } + if (isShutdown()) { ZS_LOG_WARNING(Trace, log("already shutdown transport")) dataChannel->notifyClosed(); @@ -1437,13 +1641,34 @@ namespace ortc WORD localPort ) { - SCTPTransportPtr pThis(make_shared(make_private {}, IORTCForInternal::queueORTC(), listener, secureTransport, localPort)); + SCTPTransportPtr pThis(make_shared(make_private {}, IORTCForInternal::queueORTC(), ISCTPTransportDelegatePtr(), listener, secureTransport, localPort)); pThis->mThisWeak = pThis; pThis->mThisSocket = new SCTPTransportWeakPtr(pThis); pThis->init(); return pThis; } + //------------------------------------------------------------------------- + void SCTPTransport::startFromListener( + const Capabilities &remoteCapabilities, + WORD remotePort + ) throw (InvalidStateError, InvalidParameters) + { + AutoRecursiveLock lock(*this); + + if (mRedirectToExistingTransport) { + mRedirectToExistingTransport->startFromListener(remoteCapabilities, remotePort); + return; + } + + if (mCapabilities) { + ZS_LOG_DEBUG(log("already started from remote")); + return; + } + start(remoteCapabilities, remotePort); + mStartedFromListener = true; + } + //------------------------------------------------------------------------- bool SCTPTransport::handleDataPacket( const BYTE *buffer, @@ -1465,6 +1690,8 @@ namespace ortc { AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) return mRedirectToExistingTransport->handleDataPacket(buffer, bufferLengthInBytes); + { if (isShutdown()) { ZS_LOG_WARNING(Debug, log("packet arrived after shutdown")) @@ -1539,10 +1766,53 @@ namespace ortc size, size, bufferLengthInBytes ); + // NOTE: No need to redirect to existing transport as same secure + // secure transport is used. return transport->sendDataPacket(buffer, bufferLengthInBytes); } + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + #pragma mark + #pragma mark SCTPTransport => ISCTPTransportDelegate + #pragma mark + + //------------------------------------------------------------------------- + void SCTPTransport::onSCTPTransportStateChange( + ISCTPTransportPtr transport, + ISCTPTransportTypes::States state + ) + { + auto pThis = mThisWeak.lock(); + + ZS_EVENTING_1(x, i, Detail, SctpTransportInternalSCTPTransportStateChange, ol, SctpTransport, InternalEvent, puid, id, mID); + + AutoRecursiveLock lock(*this); + + // simulate redirect transport event as if it came from this transport + mSubscriptions.delegate()->onSCTPTransportStateChange(pThis, state); + } + + //------------------------------------------------------------------------- + void SCTPTransport::onSCTPTransportDataChannel( + ISCTPTransportPtr transport, + IDataChannelPtr channel + ) + { + auto pThis = mThisWeak.lock(); + + ZS_EVENTING_1(x, i, Detail, SctpTransportInternalSCTPTransportDataChannel, ol, SctpTransport, InternalEvent, puid, id, mID); + + AutoRecursiveLock lock(*this); + + // simulate redirect transport event as if it came from this transport + mSubscriptions.delegate()->onSCTPTransportDataChannel(pThis, channel); + } + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -1613,6 +1883,10 @@ namespace ortc ZS_THROW_INVALID_ASSUMPTION_IF(notification.sn_header.sn_length != packet->mBuffer->SizeInBytes()) AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) { + mRedirectToExistingTransport->handleNotificationPacket(notification); + return; + } handleNotificationPacket(notification); return; } @@ -1622,6 +1896,12 @@ namespace ortc { AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) { + if (mFilterSessionRequests.end() != mFilterSessionRequests.find(packet->mSessionID)) return; + mRedirectToExistingTransport->onIncomingPacket(packet); + return; + } + // scope: check active sessions { auto found = mSessions.find(packet->mSessionID); @@ -1693,6 +1973,10 @@ namespace ortc ZS_LOG_TRACE(log("on notified to shutdown")) AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) { + mRedirectToExistingTransport->onNotifiedToShutdown(); + return; + } cancel(); } @@ -1757,6 +2041,8 @@ namespace ortc { AutoRecursiveLock lock(*this); + if (mRedirectToExistingTransport) return mRedirectToExistingTransport->toDebug(); + ElementPtr resultEl = Element::create("ortc::SCTPTransport"); IHelper::debugAppend(resultEl, "id", mID); @@ -1831,7 +2117,12 @@ namespace ortc //------------------------------------------------------------------------- void SCTPTransport::step() { - ZS_LOG_DEBUG(debug("step")) + ZS_LOG_DEBUG(debug("step")); + + if (mRedirectToExistingTransport) { + mRedirectToExistingTransport->step(); + return; + } if ((isShuttingDown()) || (isShutdown())) { @@ -1903,7 +2194,31 @@ namespace ortc } case ISecureTransportTypes::State_Connected: { - ZS_LOG_TRACE(log("secure transport already notified ready")) + ZS_LOG_TRACE(log("secure transport already notified ready")); + InternalStates currentState = mCurrentState; + switch (currentState) + { + case InternalState_New: + case InternalState_Connecting: + case InternalState_ConnectingDisrupted: + { + setState(InternalState_Connecting); + break; + } + case InternalState_Ready: + case InternalState_Disconnected: + { + setState(InternalState_Ready); + break; + } + case InternalState_ShuttingDown: + case InternalState_Shutdown: + { + ZS_LOG_WARNING(Trace, log("already shutting down")) + cancel(); + return false; + } + } break; } case ISecureTransportTypes::State_Disconnected: @@ -1942,13 +2257,11 @@ namespace ortc } } - - if (!mSettledRole) { + if (mSettledRole) { ZS_LOG_TRACE(log("role of secure transport already settled")) return true; } - ZS_LOG_DEBUG(log("secure transport notified ready")) mSettledRole = true; diff --git a/ortc/cpp/ortc_SCTPTransportListener.cpp b/ortc/cpp/ortc_SCTPTransportListener.cpp index ad070942..70799290 100644 --- a/ortc/cpp/ortc_SCTPTransportListener.cpp +++ b/ortc/cpp/ortc_SCTPTransportListener.cpp @@ -57,7 +57,7 @@ #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_sctp_datachannel) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_sctp_data_channel) } namespace ortc { @@ -466,7 +466,7 @@ namespace ortc if (found != mTransports.end()) { ioTransport = (*found).second; - ZS_LOG_TRACE(log("found existing transport") + ZS_PARAM("transport", ioTransport->getID()) + ZS_PARAM("local port", localPort) + ZS_PARAM("remote port", remotePort) + ZS_PARAM("tuple id", tupleID)); + ZS_LOG_TRACE(log("found existing transport") + ZS_PARAM("transport", ioTransport->getRealID()) + ZS_PARAM("local port", localPort) + ZS_PARAM("remote port", remotePort) + ZS_PARAM("tuple id", tupleID)); if ((ioTransport->isShuttingDown()) || (ioTransport->isShutdown())) { @@ -486,7 +486,7 @@ namespace ortc word, remotePort, ioRemotePort ); - ZS_LOG_DEBUG(log("found existing transport") + ZS_PARAM("transport", ioTransport->getID()) + ZS_PARAM("local port", localPort) + ZS_PARAM("remote port", remotePort) + ZS_PARAM("tuple id", tupleID)); + ZS_LOG_DEBUG(log("found existing transport") + ZS_PARAM("transport", ioTransport->getRealID()) + ZS_PARAM("local port", localPort) + ZS_PARAM("remote port", remotePort) + ZS_PARAM("tuple id", tupleID)); return; } @@ -541,7 +541,7 @@ namespace ortc word, localPort, ioLocalPort, word, remotePort, ioRemotePort ); - ZS_LOG_DEBUG(log("registered local/remote port pairing") + ZS_PARAM("transport", ioTransport->getID()) + ZS_PARAM("local port", localPort) + ZS_PARAM("remote port", remotePort) + ZS_PARAM("tuple id", tupleID)); + ZS_LOG_DEBUG(log("registered local/remote port pairing") + ZS_PARAM("transport", ioTransport->getRealID()) + ZS_PARAM("local port", localPort) + ZS_PARAM("remote port", remotePort) + ZS_PARAM("tuple id", tupleID)); mTransports[tupleID] = ioTransport; } @@ -571,16 +571,16 @@ namespace ortc ZS_EVENTING_4( x, i, Detail, SctpTransportListenerSctpTransportEvent, ol, SctpTransportListener, InternalEvent, puid, id, mID, - puid, secureTransportId, transport->getID(), + puid, secureTransportId, transport->getRealID(), word, localPort, localPort, word, remotePort, remotePort ); - ZS_LOG_DEBUG(log("announcing incoming transport") + ZS_PARAM("transport", transport->getID())) + ZS_LOG_DEBUG(log("announcing incoming transport") + ZS_PARAM("transport", transport->getRealID())) mSubscriptions.delegate()->onSCTPTransport(SCTPTransport::convert(transport)); - mAnnouncedTransports[transport->getID()] = transport; + mAnnouncedTransports[transport->getRealID()] = transport; } //------------------------------------------------------------------------- @@ -593,7 +593,7 @@ namespace ortc ZS_EVENTING_4( x, i, Detail, SctpTransportListenerSctpTransportShutdownEvent, ol, SctpTransportListener, InternalEvent, puid, id, mID, - puid, sctpTransportId, transport.getID(), + puid, sctpTransportId, transport.getRealID(), word, localPort, localPort, word, remotePort, remotePort ); @@ -607,13 +607,13 @@ namespace ortc auto tuple = UseListenerHelper::createTuple(localPort, remotePort); - ZS_LOG_DETAIL(log("notified shutdown of SCTP transport") + ZS_PARAM("tuple", tuple) + ZS_PARAM("local port", localPort) + ZS_PARAM("remote port", remotePort) + ZS_PARAM("transport id", transport.getID())) + ZS_LOG_DETAIL(log("notified shutdown of SCTP transport") + ZS_PARAM("tuple", tuple) + ZS_PARAM("local port", localPort) + ZS_PARAM("remote port", remotePort) + ZS_PARAM("transport id", transport.getRealID())) { auto found = mTransports.find(tuple); if (found != mTransports.end()) { auto registeredTransport = (*found).second; - if (registeredTransport->getID() == transport.getID()) { + if (registeredTransport->getRealID() == transport.getRealID()) { deallocatePort(mAllocatedLocalPorts, localPort); deallocatePort(mAllocatedRemotePorts, remotePort); mTransports.erase(found); @@ -622,12 +622,12 @@ namespace ortc } { - auto found = mAnnouncedTransports.find(transport.getID()); + auto found = mAnnouncedTransports.find(transport.getRealID()); if (found != mAnnouncedTransports.end()) mAnnouncedTransports.erase(found); } { - auto found = mPendingTransports.find(transport.getID()); + auto found = mPendingTransports.find(transport.getRealID()); if (found != mPendingTransports.end()) mPendingTransports.erase(found); } @@ -692,15 +692,15 @@ namespace ortc ZS_EVENTING_4( x, i, Detail, SctpTransportListenerSctpTransportCreatedEvent, ol, SctpTransportListener, Receive, puid, id, mID, - puid, sctpTransportId, transport->getID(), + puid, sctpTransportId, transport->getRealID(), word, localPort, localPort, word, remotePort, remotePort ); if (mRemoteCapabilities) { - transport->start(*mRemoteCapabilities, remotePort); + transport->startFromListener(*mRemoteCapabilities, remotePort); } else { - mPendingTransports[transport->getID()] = TransportPortPair(transport, remotePort); + mPendingTransports[transport->getRealID()] = TransportPortPair(transport, remotePort); } allocatePort(mAllocatedLocalPorts, localPort); allocatePort(mAllocatedRemotePorts, remotePort); @@ -713,7 +713,7 @@ namespace ortc ZS_EVENTING_4( x, i, Trace, SctpTransportListenerDeliverIncomingDataPacket, ol, SctpTransportListener, Receive, puid, id, mID, - puid, sctpTransportId, transport->getID(), + puid, sctpTransportId, transport->getRealID(), buffer, dataPacket, buffer, size,size, bufferLengthInBytes ); @@ -891,11 +891,11 @@ namespace ortc mTransports.erase(current); { - auto found = mPendingTransports.find(transport->getID()); + auto found = mPendingTransports.find(transport->getRealID()); if (found != mPendingTransports.end()) mPendingTransports.erase(found); } { - auto found = mAnnouncedTransports.find(transport->getID()); + auto found = mAnnouncedTransports.find(transport->getRealID()); if (found != mAnnouncedTransports.end()) mAnnouncedTransports.erase(found); } continue; @@ -958,7 +958,7 @@ namespace ortc { auto port = (*iter).second.second; UseSCTPTransportPtr transport = (*iter).second.first; - transport->start(*mRemoteCapabilities, port); + transport->startFromListener(*mRemoteCapabilities, port); } mPendingTransports.clear(); diff --git a/ortc/cpp/ortc_SRTPSDESTransport.cpp b/ortc/cpp/ortc_SRTPSDESTransport.cpp index 93d74473..027662b1 100644 --- a/ortc/cpp/ortc_SRTPSDESTransport.cpp +++ b/ortc/cpp/ortc_SRTPSDESTransport.cpp @@ -53,7 +53,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_srtp) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_srtp) } namespace ortc { diff --git a/ortc/cpp/ortc_SRTPTransport.cpp b/ortc/cpp/ortc_SRTPTransport.cpp index 3f4d9b1b..2ed79061 100644 --- a/ortc/cpp/ortc_SRTPTransport.cpp +++ b/ortc/cpp/ortc_SRTPTransport.cpp @@ -70,7 +70,7 @@ #define ASSERT(x) #endif //_DEBUG -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_srtp) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_srtp) } #define ORTC_SRTPTRANSPORT_ILLEGAL_MKI_LEGNTH (0xFFFF) diff --git a/ortc/cpp/ortc_StatsReport.cpp b/ortc/cpp/ortc_StatsReport.cpp index dd9b902a..68cf3f5d 100644 --- a/ortc/cpp/ortc_StatsReport.cpp +++ b/ortc/cpp/ortc_StatsReport.cpp @@ -60,7 +60,7 @@ using namespace date; -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_stats) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_stats) } namespace ortc { diff --git a/ortc/cpp/ortc_webrtc.cpp b/ortc/cpp/ortc_webrtc.cpp index 5ee4b29d..6faab993 100644 --- a/ortc/cpp/ortc_webrtc.cpp +++ b/ortc/cpp/ortc_webrtc.cpp @@ -33,7 +33,7 @@ #include -namespace ortc { ZS_DECLARE_SUBSYSTEM(ortclib_webrtc) } +namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_webrtc) } namespace ortc { diff --git a/ortc/idl/Logger.idl b/ortc/idl/Logger.idl index c97f2cb0..1203956c 100644 --- a/ortc/idl/Logger.idl +++ b/ortc/idl/Logger.idl @@ -74,16 +74,23 @@ namespace org /// enum Component { + /// + /// All components. + /// + all, /// /// The low level socket, aynchronous eventing, and OS abstraction /// library. /// - zsLib, + zslib, /// - /// The socket monitor within the low level socket abstraction - /// library. + /// The socket abstraction library. + /// + socket, + /// + /// The eventing services library (ETW). /// - zsLibSocket, + eventing, /// /// The servers support library for the ORTC library. /// @@ -91,102 +98,106 @@ namespace org /// /// The DNS services support library for the ORTC library. /// - servicesDns, + dns, /// /// The TURN services support library for the ORTC library. /// - servicesTurn, + turn, /// /// The HTTP services support library for the ORTC library. /// - servicesHttp, + http, + /// + /// The logger tracer at the services layer. + /// + logger, /// /// The wire level tracing of services support for the ORTC library. /// This component also includes the details of the STUN packet(s). /// - servicesWire, + wire, /// /// All STUN related request processing (minus the STUN on the wire). /// - servicesStun, + stun, /// /// The C++ ORTC library (for all objects who don't have their own /// trace level). /// - ortcLib, + ortc, /// /// The C++ ORTC media area. /// - ortcLibWebrtc, + webrtc, /// /// The C++ ORTC DTLS transport object. /// - ortcLibDtlsTransport, + dtlsTransport, /// /// The C++ ORTC ICE gatherer object. /// - ortcLibIceGatherer, + iceGatherer, /// /// The C++ ORTC ICE gatherer router object. /// - ortcLibIceGathererRouter, + iceGathererRouter, /// /// The C++ ORTC ICE transport object. /// - ortcLibIceTransport, + iceTransport, /// /// The C++ ORTC ICE transport controller object. /// - ortcLibIceTransportController, + iceTransportController, /// /// The C++ ORTC media devices object. /// - ortcLibMediaDevices, + mediaDevices, /// /// The C++ ORTC media stream track object. /// - ortcLibMediaStreamTrack, + mediaStreamTrack, /// /// The C++ ORTC rtp / rtcp packet related traces. /// - ortcLibRtpRtcpPacket, + rtpRtcpPacket, /// /// The C++ ORTC rtp listener object. /// - ortcLibRtpListener, + rtpListener, /// /// The C++ ORTC rtp listener object. /// - ortcLibRtpMediaEngine, + rtpMediaEngine, /// /// The C++ ORTC rtp receiver object. /// - ortcLibRtpReceiver, + rtpReceiver, /// /// The C++ ORTC rtp sender object. /// - ortcLibRtpSender, + rtpSender, /// /// The C++ ORTC rtp type structure tracing (parsers, helpers and /// other). /// - ortcLibRtpTypes, + rtpTypes, /// /// The C++ SCTP and data channel related objects. /// - ortcLibSctpDataChannel, + sctpDataChannel, /// /// The C++ SRTP related objects. /// - ortcLibSrtp, + srtp, /// /// The C++ SRTP related objects. /// - ortcLibStats, + stats, /// /// The C++ ORTC Adapter library. /// - ortcLibAdapter, + adapter, }; } @@ -196,16 +207,12 @@ namespace org [static] interface Logger { - /// - /// Set the default log level for all componenets. - /// - [static] - void setDefaultLogLevel(log::Level level); /// /// Set the log level for a specific component. /// [static, default] void setLogLevel(log::Component component, log::Level level); + /// /// Sets the log level for a component by its component string name. /// @@ -297,13 +304,21 @@ namespace org /// /// Set the default eventing level for all componenets. /// - [static] - void setDefaultEventingLevel(log::Level level); + [static, default] + void setDefaultEventingLevel(log::Component component, log::Level level); + + /// + /// Sets the log eventing for a component by its component string name. + /// + [static, altname(setDefaultEventingLevelByName)] + void setDefaultEventingLevel(string component, log::Level level); + /// /// Set the eventing level for a specific component. /// [static, default] void setEventingLevel(log::Component component, log::Level level); + /// /// Sets the log eventing for a component by its component string name. /// diff --git a/ortc/idl/wrapper/impl_org_ortc.cpp b/ortc/idl/wrapper/impl_org_ortc.cpp index 65fb9e41..251b0176 100644 --- a/ortc/idl/wrapper/impl_org_ortc.cpp +++ b/ortc/idl/wrapper/impl_org_ortc.cpp @@ -1,5 +1,5 @@ #include -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(ortc_wrapper); } } } } -namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_IMPLEMENT_SUBSYSTEM(ortc_adapter_wrapper); } } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_wrapper_adapter); } } } } } diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp index fa5f7684..1aee1caa 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.cpp @@ -11,8 +11,8 @@ #include #include -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } -namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper_adapter); } } } } } namespace wrapper { namespace impl { @@ -64,33 +64,36 @@ namespace wrapper { { const char *componentStr{}; switch (component) { - case wrapper::org::ortc::log::Component_zsLib: componentStr = "zsLib"; break; - case wrapper::org::ortc::log::Component_zsLibSocket: componentStr = "zsLib_socket"; break; - case wrapper::org::ortc::log::Component_services: componentStr = "ortc_services"; break; - case wrapper::org::ortc::log::Component_servicesDns: componentStr = "ortc_services_dns"; break; - case wrapper::org::ortc::log::Component_servicesTurn: componentStr = "ortc_services_turn"; break; - case wrapper::org::ortc::log::Component_servicesHttp: componentStr = "ortc_services_http"; break; - case wrapper::org::ortc::log::Component_servicesWire: componentStr = "ortc_services_wire"; break; - case wrapper::org::ortc::log::Component_servicesStun: componentStr = "ortc_services_stun"; break; - case wrapper::org::ortc::log::Component_ortcLib: componentStr = "ortclib"; break; - case wrapper::org::ortc::log::Component_ortcLibWebrtc: componentStr = "ortclib_webrtc"; break; - case wrapper::org::ortc::log::Component_ortcLibDtlsTransport: componentStr = "ortclib_dtlstransport"; break; - case wrapper::org::ortc::log::Component_ortcLibIceGatherer: componentStr = "ortclib_icegatherer"; break; - case wrapper::org::ortc::log::Component_ortcLibIceGathererRouter: componentStr = "ortclib_icegatherer_router"; break; - case wrapper::org::ortc::log::Component_ortcLibIceTransport: componentStr = "ortclib_icetransport"; break; - case wrapper::org::ortc::log::Component_ortcLibIceTransportController: componentStr = "ortclib_icetransport_controller"; break; - case wrapper::org::ortc::log::Component_ortcLibMediaDevices: componentStr = "ortclib_mediadevices"; break; - case wrapper::org::ortc::log::Component_ortcLibMediaStreamTrack: componentStr = "ortclib_mediastreamtrack"; break; - case wrapper::org::ortc::log::Component_ortcLibRtpRtcpPacket: componentStr = "ortclib_rtp_rtcp_packet"; break; - case wrapper::org::ortc::log::Component_ortcLibRtpListener: componentStr = "ortclib_rtplistener"; break; - case wrapper::org::ortc::log::Component_ortcLibRtpMediaEngine: componentStr = "ortclib_rtpmediaengine"; break; - case wrapper::org::ortc::log::Component_ortcLibRtpReceiver: componentStr = "ortclib_rtpreceiver"; break; - case wrapper::org::ortc::log::Component_ortcLibRtpSender: componentStr = "ortclib_rtpsender"; break; - case wrapper::org::ortc::log::Component_ortcLibRtpTypes: componentStr = "ortclib_rtptypes"; break; - case wrapper::org::ortc::log::Component_ortcLibSctpDataChannel: componentStr = "ortclib_sctp_datachannel"; break; - case wrapper::org::ortc::log::Component_ortcLibSrtp: componentStr = "ortclib_srtp"; break; - case wrapper::org::ortc::log::Component_ortcLibStats: componentStr = "ortclib_stats"; break; - case wrapper::org::ortc::log::Component_ortcLibAdapter: componentStr = "ortclib_adapter"; break; + case wrapper::org::ortc::log::Component_all: return NULL; + case wrapper::org::ortc::log::Component_zslib: componentStr = "zslib"; break; + case wrapper::org::ortc::log::Component_socket: componentStr = "zslib_socket"; break; + case wrapper::org::ortc::log::Component_eventing: componentStr = "zslib_eventing"; break; + case wrapper::org::ortc::log::Component_services: componentStr = "org_ortc_services"; break; + case wrapper::org::ortc::log::Component_dns: componentStr = "org_ortc_services_dns"; break; + case wrapper::org::ortc::log::Component_turn: componentStr = "org_ortc_services_turn"; break; + case wrapper::org::ortc::log::Component_http: componentStr = "org_ortc_services_http"; break; + case wrapper::org::ortc::log::Component_logger: componentStr = "org_ortc_services_logger"; break; + case wrapper::org::ortc::log::Component_wire: componentStr = "org_ortc_services_wire"; break; + case wrapper::org::ortc::log::Component_stun: componentStr = "org_ortc_services_stun"; break; + case wrapper::org::ortc::log::Component_ortc: componentStr = "org_ortc"; break; + case wrapper::org::ortc::log::Component_webrtc: componentStr = "org_ortc_webrtc"; break; + case wrapper::org::ortc::log::Component_dtlsTransport: componentStr = "org_ortc_dtls_transport"; break; + case wrapper::org::ortc::log::Component_iceGatherer: componentStr = "org_ortc_ice_gatherer"; break; + case wrapper::org::ortc::log::Component_iceGathererRouter: componentStr = "org_ortc_ice_gatherer_router"; break; + case wrapper::org::ortc::log::Component_iceTransport: componentStr = "org_ortc_ice_transport"; break; + case wrapper::org::ortc::log::Component_iceTransportController: componentStr = "org_ortc_ice_transport_controller"; break; + case wrapper::org::ortc::log::Component_mediaDevices: componentStr = "org_ortc_media_devices"; break; + case wrapper::org::ortc::log::Component_mediaStreamTrack: componentStr = "org_ortc_media_stream_track"; break; + case wrapper::org::ortc::log::Component_rtpRtcpPacket: componentStr = "org_ortc_rtp_rtcp_packet"; break; + case wrapper::org::ortc::log::Component_rtpListener: componentStr = "org_ortc_rtp_listener"; break; + case wrapper::org::ortc::log::Component_rtpMediaEngine: componentStr = "org_ortc_rtp_media_engine"; break; + case wrapper::org::ortc::log::Component_rtpReceiver: componentStr = "org_ortc_rtp_receiver"; break; + case wrapper::org::ortc::log::Component_rtpSender: componentStr = "org_ortc_rtp_sender"; break; + case wrapper::org::ortc::log::Component_rtpTypes: componentStr = "org_ortc_rtp_types"; break; + case wrapper::org::ortc::log::Component_sctpDataChannel: componentStr = "org_ortc_sctp_data_channel"; break; + case wrapper::org::ortc::log::Component_srtp: componentStr = "org_ortc_srtp"; break; + case wrapper::org::ortc::log::Component_stats: componentStr = "org_ortc_stats"; break; + case wrapper::org::ortc::log::Component_adapter: componentStr = "org_ortc_adapter"; break; }; ZS_THROW_INVALID_ARGUMENT_IF(!componentStr); return componentStr; diff --git a/ortc/idl/wrapper/impl_org_ortc_Helper.h b/ortc/idl/wrapper/impl_org_ortc_Helper.h index 7db22f23..b01983c9 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Helper.h +++ b/ortc/idl/wrapper/impl_org_ortc_Helper.h @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #pragma once diff --git a/ortc/idl/wrapper/impl_org_ortc_Json.cpp b/ortc/idl/wrapper/impl_org_ortc_Json.cpp index b713d563..c7093f4d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Json.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Json.cpp @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #include "impl_org_ortc_Json.h" diff --git a/ortc/idl/wrapper/impl_org_ortc_Json.h b/ortc/idl/wrapper/impl_org_ortc_Json.h index 3293eb17..4f9ad826 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Json.h +++ b/ortc/idl/wrapper/impl_org_ortc_Json.h @@ -1,4 +1,3 @@ -// Generated by zsLibEventingTool #pragma once diff --git a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp index 28d18643..0b6d85c3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_Logger.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_Logger.cpp @@ -22,7 +22,7 @@ using ::std::map; #include -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } using namespace wrapper::impl::org::ortc; @@ -33,12 +33,6 @@ wrapper::impl::org::ortc::Logger::~Logger() { } -//------------------------------------------------------------------------------ -void wrapper::org::ortc::Logger::setDefaultLogLevel(wrapper::org::ortc::log::Level level) -{ - UseLogger::setLogLevel(Helper::toNative(level)); -} - //------------------------------------------------------------------------------ void wrapper::org::ortc::Logger::setLogLevel( wrapper::org::ortc::log::Component component, @@ -147,9 +141,21 @@ void wrapper::org::ortc::Logger::uninstallDebuggerLogger() } //------------------------------------------------------------------------------ -void wrapper::org::ortc::Logger::setDefaultEventingLevel(wrapper::org::ortc::log::Level level) +void wrapper::org::ortc::Logger::setDefaultEventingLevel( + wrapper::org::ortc::log::Component component, + wrapper::org::ortc::log::Level level + ) +{ + UseLogger::setDefaultEventingLevel(Helper::toNative(component), Helper::toNative(level)); +} + +//------------------------------------------------------------------------------ +void wrapper::org::ortc::Logger::setDefaultEventingLevel( + String component, + wrapper::org::ortc::log::Level level + ) { - UseLogger::setEventingLevel(Helper::toNative(level)); + UseLogger::setDefaultEventingLevel(component, Helper::toNative(level)); } //------------------------------------------------------------------------------ diff --git a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp index 8a905bf6..e47fc02c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_MediaStreamTrack.cpp @@ -26,7 +26,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamTrack::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::MediaStreamTrack::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp index 42fd9fd8..6dced5ac 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp @@ -25,7 +25,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannel::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDataChannel::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp index 73858248..ca04a996 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtlsTransport.cpp @@ -26,7 +26,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsTransport::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtlsTransport::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp index 06251fe7..d3b9db41 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDtmfSender.cpp @@ -21,7 +21,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfSender::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCDtmfSender::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp index d3b92301..4bc62d7c 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGatherer.cpp @@ -27,7 +27,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGatherer::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceGatherer::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp index dfa4e8d5..d44c9ea3 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceGathererCandidateCompleteEvent.cpp @@ -44,8 +44,7 @@ wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::~RTCIceGathererC //------------------------------------------------------------------------------ wrapper::org::ortc::RTCIceCandidateCompletePtr wrapper::impl::org::ortc::RTCIceGathererCandidateCompleteEvent::get_candidate() { - wrapper::org::ortc::RTCIceCandidateCompletePtr result {}; - return result; + return candidate_; } //------------------------------------------------------------------------------ diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp index 67f27260..6a6517bd 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransport.cpp @@ -30,7 +30,7 @@ using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransport::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransport::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp index 27d5640c..1f03280f 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCIceTransportController.cpp @@ -21,7 +21,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportController::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCIceTransportController::WrapperImplType, WrapperImplType); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp index b2294893..e250c7bc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpListener.cpp @@ -23,7 +23,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpListener::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpListener::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp index 8aab1d91..1d2816f4 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpReceiver.cpp @@ -27,7 +27,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpReceiver::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpReceiver::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp index 317fe0fa..0c0b5690 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCRtpSender.cpp @@ -26,7 +26,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpSender::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCRtpSender::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp index 8cc3adb7..675c62c1 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransport.cpp @@ -25,7 +25,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } using namespace wrapper::impl::org::ortc; diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp index 47203474..d2f34b70 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSctpTransportListener.cpp @@ -22,7 +22,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListener::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSctpTransportListener::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp index 1b4cb859..a5b9aee2 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCSrtpSdesTransport.cpp @@ -26,7 +26,7 @@ using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(ortc_wrapper); } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper); } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesTransport::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::RTCSrtpSdesTransport::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp index 6f7c8a5f..61dfc6da 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_MediaStream.cpp @@ -26,7 +26,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper_adapter); } } } } } //------------------------------------------------------------------------------ wrapper::impl::org::ortc::adapter::MediaStream::MediaStream() diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp index 02d5a733..fcdabc6d 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCPeerConnection.cpp @@ -38,7 +38,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper_adapter); } } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnection::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCPeerConnection::NativeTypeSubscription, NativeTypeSubscription); diff --git a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp index 7bf3cd98..314cc6bc 100644 --- a/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_adapter_RTCSessionDescription.cpp @@ -26,7 +26,7 @@ using ::std::list; using ::std::set; using ::std::map; -namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(ortc_adapter_wrapper); } } } } } +namespace wrapper { namespace impl { namespace org { namespace ortc { namespace adapter { ZS_DECLARE_SUBSYSTEM(org_ortc_wrapper_adapter); } } } } } ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescription::NativeType, NativeType); ZS_DECLARE_TYPEDEF_PTR(wrapper::impl::org::ortc::adapter::RTCSessionDescription::WrapperImplType, WrapperImplType); diff --git a/ortc/internal/ortc_DataChannel.h b/ortc/internal/ortc_DataChannel.h index 0976c77a..1e16cde0 100644 --- a/ortc/internal/ortc_DataChannel.h +++ b/ortc/internal/ortc_DataChannel.h @@ -86,6 +86,8 @@ namespace ortc virtual void requestShutdown() = 0; virtual void notifyClosed() = 0; + + virtual void notifyRemapFailure() = 0; }; //------------------------------------------------------------------------- @@ -100,6 +102,7 @@ namespace ortc { virtual void onRequestShutdown() = 0; virtual void onNotifiedClosed() = 0; + virtual void onNotifiedRemapFailure() = 0; }; } } @@ -107,6 +110,7 @@ namespace ortc ZS_DECLARE_PROXY_BEGIN(ortc::internal::IDataChannelAsyncDelegate) ZS_DECLARE_PROXY_METHOD_0(onRequestShutdown) ZS_DECLARE_PROXY_METHOD_0(onNotifiedClosed) +ZS_DECLARE_PROXY_METHOD_0(onNotifiedRemapFailure) ZS_DECLARE_PROXY_END() namespace ortc @@ -243,6 +247,8 @@ namespace ortc void requestShutdown() override; void notifyClosed() override; + void notifyRemapFailure() override; + //----------------------------------------------------------------------- #pragma mark #pragma mark DataChannel => ISCTPTransportForDataChannelDelegate @@ -257,6 +263,7 @@ namespace ortc void onRequestShutdown() override; void onNotifiedClosed() override; + void onNotifiedRemapFailure() override; //----------------------------------------------------------------------- #pragma mark diff --git a/ortc/internal/ortc_ICEGatherer.h b/ortc/internal/ortc_ICEGatherer.h index 25c66e39..718421cb 100644 --- a/ortc/internal/ortc_ICEGatherer.h +++ b/ortc/internal/ortc_ICEGatherer.h @@ -868,7 +868,10 @@ namespace ortc RelayPortPtr mRelayPort; // send via relay port TCPPortPtr mTCPPort; // send via TCP socket - void trace(const char *function, const char *message = NULL) const; + void trace( + const char *function = NULL, + const char *message = NULL + ) const; ElementPtr toDebug() const; }; diff --git a/ortc/internal/ortc_ICEGathererRouter.h b/ortc/internal/ortc_ICEGathererRouter.h index e84d5d63..e1e2e716 100644 --- a/ortc/internal/ortc_ICEGathererRouter.h +++ b/ortc/internal/ortc_ICEGathererRouter.h @@ -130,7 +130,10 @@ namespace ortc CandidatePtr mLocalCandidate; IPAddress mRemoteIP; - void trace(const char *function, const char *message = NULL) const; + void trace( + const char *function = NULL, + const char *message = NULL + ) const; ElementPtr toDebug() const; }; diff --git a/ortc/internal/ortc_ICETransport.h b/ortc/internal/ortc_ICETransport.h index a47dd6ae..a112cb8f 100644 --- a/ortc/internal/ortc_ICETransport.h +++ b/ortc/internal/ortc_ICETransport.h @@ -628,7 +628,10 @@ namespace ortc bool isFailed() const {return State_Failed == mState;} bool isBlacklisted() const {return State_Blacklisted == mState;} - void trace(const char *function, const char *message = NULL) const; + void trace( + const char *function = NULL, + const char *message = NULL + ) const; protected: Log::Params log(const char *message) const; diff --git a/ortc/internal/ortc_MediaStreamTrack.h b/ortc/internal/ortc_MediaStreamTrack.h index 34d80f10..7327f08c 100644 --- a/ortc/internal/ortc_MediaStreamTrack.h +++ b/ortc/internal/ortc_MediaStreamTrack.h @@ -79,7 +79,10 @@ namespace ortc virtual Kinds kind() const = 0; virtual String id() const = 0; - virtual void trace(const char *message) const = 0; + virtual void trace( + const char *func = NULL, + const char *message = NULL + ) const = 0; }; //------------------------------------------------------------------------- @@ -239,13 +242,13 @@ namespace ortc #pragma mark MediaStreamTrack => ortc::IMediaStreamTrack #pragma mark - static void trace( - MediaStreamTrackPtr object, - const char *message = NULL - ); - PUID getID() const override {return id_;} + void trace( + const char *func = NULL, + const char *message = NULL + ) const override; + IMediaStreamTrackSubscriptionPtr subscribe(IMediaStreamTrackDelegatePtr delegate) override; Kinds kind() const override; @@ -412,8 +415,6 @@ namespace ortc #pragma mark MediaStreamTrack => (internal) #pragma mark - void trace(const char *message) const override; - bool isShuttingDown() const; bool isShutdown() const; diff --git a/ortc/internal/ortc_SCTPTransport.h b/ortc/internal/ortc_SCTPTransport.h index b55391cf..8ddf86a1 100644 --- a/ortc/internal/ortc_SCTPTransport.h +++ b/ortc/internal/ortc_SCTPTransport.h @@ -46,6 +46,7 @@ #include #include +#include #define ORTC_SETTING_SCTP_TRANSPORT_MAX_SESSIONS_PER_PORT "ortc/sctp/max-sessions-per-port" @@ -184,7 +185,7 @@ namespace ortc String mErrorReason; }; - virtual PUID getID() const = 0; + virtual PUID getRealID() const = 0; virtual void registerNewDataChannel( UseDataChannelPtr &ioDataChannel, @@ -233,12 +234,12 @@ namespace ortc WORD localPort ); - virtual PUID getID() const = 0; + virtual PUID getRealID() const = 0; - virtual void start( - const Capabilities &remoteCapabilities, - WORD remotePort - ) throw (InvalidStateError, InvalidParameters) = 0; + virtual void startFromListener( + const Capabilities &remoteCapabilities, + WORD remotePort + ) throw (InvalidStateError, InvalidParameters) = 0; virtual bool handleDataPacket( const BYTE *buffer, @@ -330,6 +331,7 @@ namespace ortc public ISCTPTransportForSettings, public ISCTPTransportForDataChannel, public ISCTPTransportForSCTPTransportListener, + public ISCTPTransportDelegate, public IWakeDelegate, public zsLib::ITimerDelegate, public ISCTPTransportAsyncDelegate, @@ -357,6 +359,7 @@ namespace ortc typedef PUID DataChannelID; typedef std::map DataChannelMap; + typedef std::set DataChannelIDSet; typedef WORD SessionID; typedef std::map DataChannelSessionMap; @@ -390,6 +393,7 @@ namespace ortc SCTPTransport( const make_private &, IMessageQueuePtr queue, + ISCTPTransportDelegatePtr originalDelegate, UseListenerPtr listener, UseSecureTransportPtr secureTransport, WORD localPort = 0, @@ -435,7 +439,7 @@ namespace ortc WORD localPort = 0 ) throw (InvalidParameters, InvalidStateError); - PUID getID() const override {return mID;} + PUID getID() const override; IDTLSTransportPtr transport() const override; ISCTPTransportTypes::States state() const override; @@ -469,7 +473,7 @@ namespace ortc WORD &ioSessionID ) override; - // (duplicate) virtual PUID getID() const = 0; + PUID getRealID() const override { return mID; } ISCTPTransportForDataChannelSubscriptionPtr subscribe(ISCTPTransportForDataChannelDelegatePtr delegate) override; // (duplicate) virtual bool isShuttingDown() const override; @@ -501,10 +505,10 @@ namespace ortc WORD localPort ); - // (duplicate) virtual void start( - // const Capabilities &remoteCapabilities, - // WORD remotePort - // ) throw (InvalidStateError, InvalidParameters) = 0; + void startFromListener( + const Capabilities &remoteCapabilities, + WORD remotePort + ) throw (InvalidStateError, InvalidParameters) override; bool handleDataPacket( const BYTE *buffer, @@ -525,6 +529,20 @@ namespace ortc const BYTE *buffer, size_t bufferLengthInBytes ); + + //----------------------------------------------------------------------- + #pragma mark + #pragma mark SCTPTransport => ISCTPTransportDelegate + #pragma mark + + virtual void onSCTPTransportStateChange( + ISCTPTransportPtr transport, + ISCTPTransportTypes::States state + ) override; + virtual void onSCTPTransportDataChannel( + ISCTPTransportPtr transport, + IDataChannelPtr channel + ) override; //----------------------------------------------------------------------- #pragma mark @@ -620,8 +638,6 @@ namespace ortc struct TearAwayData { UseListenerPtr mListener; - ISCTPTransportDelegateWeakPtr mDelegate; - ISCTPTransportSubscriptionPtr mDefaultSubscription; }; protected: @@ -631,6 +647,7 @@ namespace ortc #pragma mark AutoPUID mID; + mutable std::atomic mObtainedID {}; SCTPTransportWeakPtr mThisWeak; SCTPTransportPtr mGracefulShutdownReference; @@ -638,6 +655,7 @@ namespace ortc size_t mMaxSessionsPerPort {}; ISCTPTransportDelegateSubscriptions mSubscriptions; + ISCTPTransportSubscriptionPtr mDefaultSubscription; ISCTPTransportForDataChannelDelegateSubscriptions mDataChannelSubscriptions; @@ -649,10 +667,18 @@ namespace ortc UseListenerWeakPtr mListener; + // If the transport is started after an existing transport was created + // by the remote party then two SCTP transports will exist pointing + // to the same local:remote mapping. This redirection forwards all + // requests to the existing object to prevent mapping confusion. + SCTPTransportPtr mRedirectToExistingTransport; + ISCTPTransportSubscriptionPtr mRedirectToExistingTransportSubscription; + UseSecureTransportWeakPtr mSecureTransport; // no lock needed ISecureTransportSubscriptionPtr mSecureTransportSubscription; CapabilitiesPtr mCapabilities; + bool mStartedFromListener {}; SCTPTransportWeakPtr *mThisSocket {}; ISCTPTransportWeakPtr mTearAway; @@ -674,6 +700,8 @@ namespace ortc DataChannelSessionMap mPendingResetSessions; DataChannelSessionMap mQueuedResetSessions; + DataChannelIDSet mFilterSessionRequests; + bool mSettledRole {false}; WORD mCurrentAllocationSessionID {}; WORD mMinAllocationSessionID {0}; diff --git a/ortc/test/TestDTLS.cpp b/ortc/test/TestDTLS.cpp index 7edb2164..8b1d25f2 100644 --- a/ortc/test/TestDTLS.cpp +++ b/ortc/test/TestDTLS.cpp @@ -44,7 +44,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestICEGatherer.cpp b/ortc/test/TestICEGatherer.cpp index 6ce88c57..72ed569a 100644 --- a/ortc/test/TestICEGatherer.cpp +++ b/ortc/test/TestICEGatherer.cpp @@ -41,7 +41,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestICETransport.cpp b/ortc/test/TestICETransport.cpp index 5d1d3747..743a73fa 100644 --- a/ortc/test/TestICETransport.cpp +++ b/ortc/test/TestICETransport.cpp @@ -42,7 +42,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestMediaStreamTrack.cpp b/ortc/test/TestMediaStreamTrack.cpp index 58a8b05e..bac79494 100644 --- a/ortc/test/TestMediaStreamTrack.cpp +++ b/ortc/test/TestMediaStreamTrack.cpp @@ -45,7 +45,7 @@ #include #include -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestRTCPPacket.cpp b/ortc/test/TestRTCPPacket.cpp index 6ff29b0f..bd8752bd 100644 --- a/ortc/test/TestRTCPPacket.cpp +++ b/ortc/test/TestRTCPPacket.cpp @@ -42,7 +42,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using std::make_shared; diff --git a/ortc/test/TestRTPChannel.cpp b/ortc/test/TestRTPChannel.cpp index 28f48e45..fc26c037 100644 --- a/ortc/test/TestRTPChannel.cpp +++ b/ortc/test/TestRTPChannel.cpp @@ -43,7 +43,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestRTPChannelAudio.cpp b/ortc/test/TestRTPChannelAudio.cpp index 0a78c106..de6e8f6a 100644 --- a/ortc/test/TestRTPChannelAudio.cpp +++ b/ortc/test/TestRTPChannelAudio.cpp @@ -47,7 +47,7 @@ #include #include -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestRTPChannelVideo.cpp b/ortc/test/TestRTPChannelVideo.cpp index be68d704..7ecafa20 100644 --- a/ortc/test/TestRTPChannelVideo.cpp +++ b/ortc/test/TestRTPChannelVideo.cpp @@ -47,7 +47,7 @@ #include #include -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestRTPListener.cpp b/ortc/test/TestRTPListener.cpp index ab74df49..38fd19a1 100644 --- a/ortc/test/TestRTPListener.cpp +++ b/ortc/test/TestRTPListener.cpp @@ -43,7 +43,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestRTPPacket.cpp b/ortc/test/TestRTPPacket.cpp index 3f0ee14e..299fc0a6 100644 --- a/ortc/test/TestRTPPacket.cpp +++ b/ortc/test/TestRTPPacket.cpp @@ -45,7 +45,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using std::make_shared; diff --git a/ortc/test/TestRTPReceiver.cpp b/ortc/test/TestRTPReceiver.cpp index 41cb29aa..4a92c9ed 100644 --- a/ortc/test/TestRTPReceiver.cpp +++ b/ortc/test/TestRTPReceiver.cpp @@ -43,7 +43,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestRTPSender.cpp b/ortc/test/TestRTPSender.cpp index 30ea5328..3f4d1d3b 100644 --- a/ortc/test/TestRTPSender.cpp +++ b/ortc/test/TestRTPSender.cpp @@ -43,7 +43,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestSCTP.cpp b/ortc/test/TestSCTP.cpp index b6d5a72a..0c49c86c 100644 --- a/ortc/test/TestSCTP.cpp +++ b/ortc/test/TestSCTP.cpp @@ -42,7 +42,7 @@ #include "testing.h" #include -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::String; using zsLib::ULONG; diff --git a/ortc/test/TestSRTP.cpp b/ortc/test/TestSRTP.cpp index 0c25094c..93642010 100644 --- a/ortc/test/TestSRTP.cpp +++ b/ortc/test/TestSRTP.cpp @@ -48,7 +48,7 @@ #include "config.h" #include "testing.h" -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } using zsLib::BYTE; using zsLib::String; diff --git a/ortc/test/TestSetup.cpp b/ortc/test/TestSetup.cpp index 99ab500d..cf5522a7 100644 --- a/ortc/test/TestSetup.cpp +++ b/ortc/test/TestSetup.cpp @@ -74,7 +74,7 @@ using namespace Windows::UI::Core; #endif //defined(WINUWP) && !defined(HAVE_GETADAPTERADDRESSES) -namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_DECLARE_SUBSYSTEM(org_ortc_test) } } //using zsLib::String; //using zsLib::ULONG; diff --git a/ortc/test/testing.cpp b/ortc/test/testing.cpp index c448fd8f..74887ece 100644 --- a/ortc/test/testing.cpp +++ b/ortc/test/testing.cpp @@ -39,7 +39,7 @@ #include -namespace ortc { namespace test { ZS_IMPLEMENT_SUBSYSTEM(ortc_test) } } +namespace ortc { namespace test { ZS_IMPLEMENT_SUBSYSTEM(org_ortc_test) } } #ifdef _WIN32 From 07875f0a392a848bf1a2a39c5dda1d293dccfc3f Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 2 Feb 2018 19:14:00 -0500 Subject: [PATCH 179/187] Fix: OnOpen / OnClose events were not fired for wrapper / idl --- ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp index 6dced5ac..bc13746a 100644 --- a/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp +++ b/ortc/idl/wrapper/impl_org_ortc_RTCDataChannel.cpp @@ -154,6 +154,12 @@ void WrapperImplType::onDataChannelStateChange( ) { onStateChange(RTCDataChannelStateChangeEvent::toWrapper(state)); + + switch (state) { + case ::ortc::IDataChannelTypes::State_Open: onOpen(); break; + case ::ortc::IDataChannelTypes::State_Closed: onClose(); break; + default: break; + } } //------------------------------------------------------------------------------ From bc61984bcbfd041e6addbf426724198ec67eee5e Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Tue, 13 Feb 2018 16:27:45 -0500 Subject: [PATCH 180/187] Sync chromium/build with changes to be upstreamed to google --- BUILD.gn | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 21113554..25608ce8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,7 +13,7 @@ config("ortclib_config") { "/GR", ] - if (!is_winuwp) + if (!is_target_winuwp) { cflags_cc += ["/EHsc"] } @@ -52,7 +52,7 @@ config("ortclib_config") { "../ortclib/ortc/idl/wrapper", ] - if (is_winuwp) + if (is_target_winuwp) { include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] } @@ -383,7 +383,7 @@ ortc_sources_cxx_generated = [ ortc_sources = [] -if(!is_winuwp){ +if(!is_target_winuwp){ ortc_sources = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.h", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.h", @@ -701,7 +701,7 @@ ortc_sources = [ ] } -if(is_winuwp){ +if(is_target_winuwp){ ortc_sources = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/cx_Helpers.cpp", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/cx_Helpers.h", @@ -1100,7 +1100,7 @@ shared_library("libOrtc") { "/WX-", "/wd4068", ] - if (!is_winuwp) { + if (!is_target_winuwp) { ldflags = [ "/FIXED:NO", ] @@ -1137,7 +1137,7 @@ shared_library("libOrtc") { sources = ortc_sources - if (is_winuwp) + if (is_target_winuwp) { include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] @@ -1155,22 +1155,22 @@ shared_library("libOrtc") { libs = [ "uuid", "curl", "ssl", "crypto" ] } - if ((target_os == "winuwp_10") && (target_cpu == "x64") && is_debug) { + if (is_target_winuwp && (target_cpu == "x64") && is_debug) { lib_dirs = [ "..\..\ortc\curl\x64-debug-static\lib", ] libs = [ "libcurl.lib" ] - } else if ((target_os == "winuwp_10") && (target_cpu == "x64") && !is_debug) { + } else if (is_target_winuwp && (target_cpu == "x64") && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x64-release-static\lib", ] libs = [ "libcurl.lib" ] - } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && is_debug) { + } else if (is_target_winuwp && (target_cpu == "x86") && is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-debug-static\lib", ] libs = [ "libcurl.lib" ] - } else if ((target_os == "winuwp_10") && (target_cpu == "x86") && !is_debug) { + } else if (is_target_winuwp && (target_cpu == "x86") && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-release-static\lib", ] @@ -1254,7 +1254,7 @@ static_library("ortclib_generated_static") { sources = ortc_sources_cxx_glue sources += ortc_sources_cxx_generated - if (!is_winuwp) + if (!is_target_winuwp) { sources -= [ "ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp", From 87c2bedb8e13fc071cbe15926495e1633352af81 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Fri, 2 Mar 2018 22:09:23 +0100 Subject: [PATCH 181/187] Undefined HAVE_GETIFADDRS for Android --- ortc/internal/platform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ortc/internal/platform.h b/ortc/internal/platform.h index 70475e7e..0509d792 100644 --- a/ortc/internal/platform.h +++ b/ortc/internal/platform.h @@ -117,12 +117,13 @@ //#define HAVE_NETINIT6_IN6_VAR_H 1 #define HAVE_GETIFADDRS 1 -#ifdef _ANDROID +#ifdef ANDROID // Android supports these additional features // Android does not support these features #undef HAVE_IFADDRS_H +#undef HAVE_GETIFADDRS #endif //_ANDROID #endif //__linux__ From f0732d74eaaee28edad03c86ab1b5f72c7c80f38 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Mon, 5 Mar 2018 18:01:14 +0100 Subject: [PATCH 182/187] fix for link error for linux x86 --- BUILD.gn | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 21113554..0b7d7261 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1148,10 +1148,20 @@ shared_library("libOrtc") { ] } if (is_linux) { - lib_dirs = [ - "/usr/lib", - "/usr/lib/x86_64-linux-gnu", - ] + + if (target_cpu == "x64") { + lib_dirs = [ + "/usr/lib", + "/usr/lib/x86_64-linux-gnu", + ] + } else if (target_cpu == "x86") { + lib_dirs = [ + "/usr/lib", + "/usr/lib/i386-linux-gnu", + "/lib/i386-linux-gnu", + ] + } + libs = [ "uuid", "curl", "ssl", "crypto" ] } From cff116157412d4d8bfc135022515bb4502e54c7c Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Wed, 7 Mar 2018 19:53:11 +0100 Subject: [PATCH 183/187] Resolved Android build issues. --- BUILD.gn | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 21113554..59cb8903 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -113,7 +113,6 @@ ortclib_sources = [ "ortc/adapter/internal/ortc_adapter_SDPParser.h", "ortc/adapter/internal/ortc_adapter_SessionDescription.h", "ortc/adapter/internal/types.h", - "ortc/cpp/ifaddrs-android.cc", "ortc/cpp/ortc.cpp", "ortc/cpp/ortc_Capabilities.cpp", "ortc/cpp/ortc_Certificate.cpp", @@ -1048,7 +1047,7 @@ static_library("ortclib_static") { "UNICODE", ] - if (is_linux) { + if (is_linux || is_android) { defines += [ "WEBRTC_POSIX", "WEBRTC_BUILD_LIBEVENT", @@ -1224,7 +1223,7 @@ shared_library("libOrtc") { ] } - if (is_linux) { + if (is_linux || is_android) { defines += [ "WEBRTC_POSIX", "WEBRTC_BUILD_LIBEVENT", @@ -1309,8 +1308,7 @@ compile_idl_macro("ortclib_idl") { "ortc/idl/config.json", ] - #outputs = ["$target_gen_dir/ortc/veselko/moj.cpp"] - outputs = ortc_sources + outputs = ortc_sources sourcePathPrefix = "ortc/idl/" } From 301903ee9f58a0f2014e707a8d7b7b8228b5ce62 Mon Sep 17 00:00:00 2001 From: Sergej Jovanovic Date: Fri, 9 Mar 2018 18:03:21 +0100 Subject: [PATCH 184/187] _ANDROID flag replaced with ANDROID --- ortc/cpp/ortc_ICEGatherer.cpp | 2 +- ortc/internal/platform.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ortc/cpp/ortc_ICEGatherer.cpp b/ortc/cpp/ortc_ICEGatherer.cpp index 858c1dcc..2be15c7d 100644 --- a/ortc/cpp/ortc_ICEGatherer.cpp +++ b/ortc/cpp/ortc_ICEGatherer.cpp @@ -76,7 +76,7 @@ #include #endif //HAVE_NETINIT6_IN6_VAR_H -#ifdef _ANDROID +#ifdef ANDROID #include #else #endif diff --git a/ortc/internal/platform.h b/ortc/internal/platform.h index 0509d792..dbc35ec2 100644 --- a/ortc/internal/platform.h +++ b/ortc/internal/platform.h @@ -125,5 +125,5 @@ #undef HAVE_IFADDRS_H #undef HAVE_GETIFADDRS -#endif //_ANDROID +#endif //ANDROID #endif //__linux__ From f1741d4940b06d7b1c177b96317a7cc29a1e69ce Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Wed, 28 Mar 2018 14:24:51 -0400 Subject: [PATCH 185/187] replaced is_target_winuwp with current_os check against "winuwp" --- BUILD.gn | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index ea5aceef..b1561a3d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,7 +13,7 @@ config("ortclib_config") { "/GR", ] - if (!is_target_winuwp) + if (current_os != "winuwp") { cflags_cc += ["/EHsc"] } @@ -52,7 +52,7 @@ config("ortclib_config") { "../ortclib/ortc/idl/wrapper", ] - if (is_target_winuwp) + if (current_os == "winuwp") { include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] } @@ -382,7 +382,7 @@ ortc_sources_cxx_generated = [ ortc_sources = [] -if(!is_target_winuwp){ +if(current_os != "winuwp"){ ortc_sources = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCSrtpTransportStats.h", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/c/c_org_ortc_RTCRtpRtxCodecParameterSettings.h", @@ -700,7 +700,7 @@ ortc_sources = [ ] } -if(is_target_winuwp){ +if(current_os == "winuwp"){ ortc_sources = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/cx_Helpers.cpp", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/cx/cx_Helpers.h", @@ -1099,7 +1099,7 @@ shared_library("libOrtc") { "/WX-", "/wd4068", ] - if (!is_target_winuwp) { + if (current_os != "winuwp") { ldflags = [ "/FIXED:NO", ] @@ -1136,7 +1136,7 @@ shared_library("libOrtc") { sources = ortc_sources - if (is_target_winuwp) + if (current_os == "winuwp") { include_dirs += [ "../ortclib/ortc/idl/wrapper/cx", ] @@ -1164,22 +1164,22 @@ shared_library("libOrtc") { libs = [ "uuid", "curl", "ssl", "crypto" ] } - if (is_target_winuwp && (target_cpu == "x64") && is_debug) { + if ((current_os == "winuwp") && (target_cpu == "x64") && is_debug) { lib_dirs = [ "..\..\ortc\curl\x64-debug-static\lib", ] libs = [ "libcurl.lib" ] - } else if (is_target_winuwp && (target_cpu == "x64") && !is_debug) { + } else if ((current_os == "winuwp") && (target_cpu == "x64") && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x64-release-static\lib", ] libs = [ "libcurl.lib" ] - } else if (is_target_winuwp && (target_cpu == "x86") && is_debug) { + } else if ((current_os == "winuwp") && (target_cpu == "x86") && is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-debug-static\lib", ] libs = [ "libcurl.lib" ] - } else if (is_target_winuwp && (target_cpu == "x86") && !is_debug) { + } else if ((current_os == "winuwp") && (target_cpu == "x86") && !is_debug) { lib_dirs = [ "..\..\ortc\curl\x86-release-static\lib", ] @@ -1263,7 +1263,7 @@ static_library("ortclib_generated_static") { sources = ortc_sources_cxx_glue sources += ortc_sources_cxx_generated - if (!is_target_winuwp) + if (current_os != "winuwp") { sources -= [ "ortc/idl/wrapper/impl_org_ortc_Dispatcher.cpp", From 3d7711dd42d9d7763ea65d0b4e4d283edc9d1091 Mon Sep 17 00:00:00 2001 From: Vladimir Mancic Date: Wed, 18 Apr 2018 22:53:57 +0200 Subject: [PATCH 186/187] Fix for error LNK1104: cannot open file... ifaddrs-android.obj --- BUILD.gn | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index ea5aceef..32d37e0c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -113,6 +113,7 @@ ortclib_sources = [ "ortc/adapter/internal/ortc_adapter_SDPParser.h", "ortc/adapter/internal/ortc_adapter_SessionDescription.h", "ortc/adapter/internal/types.h", + "ortc/cpp/ifaddrs-android.cc", "ortc/cpp/ortc.cpp", "ortc/cpp/ortc_Capabilities.cpp", "ortc/cpp/ortc_Certificate.cpp", @@ -220,6 +221,12 @@ ortclib_sources = [ "ortc/internal/types.h", ] +if (is_android) { + ortclib_sources -= [ + "ortc/cpp/ifaddrs-android.cc", + ] +} + ortc_sources_cxx_generated = [ "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_adapter_RTCSessionDescriptionRtpMediaLine.h", "$target_gen_dir/../../../../../ortc/ortclib/ortc/idl/wrapper/generated/org_ortc_RTCRtpRedCodecParameterSettings.h", From 9ca6aacadee74b8a28c05ada29e058562cd62776 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 17 Sep 2018 17:46:26 -0400 Subject: [PATCH 187/187] RelayOnly value on filter policy of gatherer is set wrongly --- ortc/IICEGatherer.h | 2 +- ortc/idl/enums.idl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ortc/IICEGatherer.h b/ortc/IICEGatherer.h index a9d3b24e..6bce161d 100644 --- a/ortc/IICEGatherer.h +++ b/ortc/IICEGatherer.h @@ -101,7 +101,7 @@ namespace ortc FilterPolicy_NoPrflx = (FilterPolicy_NoIPv4Prflx | FilterPolicy_NoIPv6Prflx), FilterPolicy_NoRelay = (FilterPolicy_NoIPv4Relay | FilterPolicy_NoIPv6Relay), FilterPolicy_NoPrivate = (FilterPolicy_NoIPv4Private | FilterPolicy_NoIPv6Private), - FilterPolicy_RelayOnly = (FilterPolicy_NoHost | FilterPolicy_NoSrflx | FilterPolicy_NoPrflx), + FilterPolicy_RelayOnly = (FilterPolicy_NoHost | FilterPolicy_NoPrivate | FilterPolicy_NoSrflx | FilterPolicy_NoPrflx), FilterPolicy_NoCandidates = (0x7FFFFFFF) }; diff --git a/ortc/idl/enums.idl b/ortc/idl/enums.idl index c15fa222..8c19740b 100644 --- a/ortc/idl/enums.idl +++ b/ortc/idl/enums.idl @@ -297,11 +297,11 @@ namespace org /// Filter all private candidates. /// See: https://en.wikipedia.org/wiki/Private_network /// - noPrivate = 0x00001010, + noPrivate = 0x00001000, /// /// Filter all but relay candidates. /// - relayOnly = 0x00000707, + relayOnly = 0x00001707, /// /// Filter all candidates. ///