Giter VIP home page Giter VIP logo

mediasoup-client-swift's People

Contributors

fedulvtubudul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mediasoup-client-swift's Issues

Crash when setting codec in createProducer

Hello,
I'm trying to set the video codec when creating the producer by passing a json in the codec parameter but it crashes systematically. It works perfectly well when the parameter is nil.

Any idea ? I try to understand the crash and it looks like some memory corruption that leads to a crash later in the matchCodecs method. Maybe something to do with concurrency ?

For info, this is the kind of json I'm using : "{
"kind" : "video",
"rtcpFeedback" : [
{
"type" : "nack",
"parameter" : ""
},
{
"type" : "nack",
"parameter" : "pli"
},
{
"type" : "ccm",
"parameter" : "fir"
},
{
"type" : "goog-remb",
"parameter" : ""
},
{
"type" : "transport-cc",
"parameter" : ""
}
],
"parameters" : {
"packetization-mode" : 1,
"level-asymmetry-allowed" : 1,
"profile-level-id" : "42e01f"
},
"clockRate" : 90000,
"preferredPayloadType" : 103,
"mimeType" : "video/H264"
}"

No SPM Support

Please could this be updated so we can install with SPM.

Cannot compile m112

I'm getting errors while trying to build the project. Looks like cmake tries to build libmediasoupclient using C++14 instead of C++17. Any idea what could be wrong? Thanks.

-- Build files have been written to: /User/myuser/mediasoup-client-swift/build/libmediasoupclient/device/arm64
[  4%] Building CXX object libmediasoupclient/libsdptransform/CMakeFiles/sdptransform.dir/src/grammar.cpp.o
[  8%] Building CXX object libmediasoupclient/libsdptransform/CMakeFiles/sdptransform.dir/src/parser.cpp.o
[ 12%] Building CXX object libmediasoupclient/libsdptransform/CMakeFiles/sdptransform.dir/src/writer.cpp.o
[ 16%] Linking CXX static library libsdptransform.a
[ 16%] Built target sdptransform
[ 20%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Consumer.cpp.o
In file included from /User/myuser/mediasoup-client-swift/Mediasoup/dependencies/libmediasoupclient/src/Consumer.cpp:3:
In file included from /User/myuser/mediasoup-client-swift/Mediasoup/dependencies/libmediasoupclient/include/Consumer.hpp:5:
In file included from /User/myuser/mediasoup-client-swift/Mediasoup/dependencies/webrtc/src/api/media_stream_interface.h:27:
In file included from /User/myuser/mediasoup-client-swift/Mediasoup/dependencies/webrtc/src/api/video/recordable_encoded_frame.h:16:
In file included from /User/myuser/mediasoup-client-swift/Mediasoup/dependencies/webrtc/src/api/units/timestamp.h:21:
In file included from /User/myuser/mediasoup-client-swift/Mediasoup/dependencies/webrtc/src/api/units/time_delta.h:22:
/User/myuser/mediasoup-client-swift/Mediasoup/dependencies/webrtc/src/rtc_base/units/unit_base.h:256:44: error: no template named 'is_floating_point_v' in namespace 'std'; did you mean 'is_floating_point'?
            typename std::enable_if_t<std::is_floating_point_v<T>>* = nullptr>
                                      ~~~~~^~~~~~~~~~~~~~~~~~~
                                           is_floating_point

No H264 decoding with 0.4.3

Hello,

I tried to upgrade from 0.4.2 to 0.4.3 but I'm not able to consume an H264 stream with 0.4.3 in the same setups that works perfectly with 0.4.2

When I look at the device.rtpCapabilities() there is no H264 codec.

Any idea ?

getting compilation error while executing build.sh directly

I cloned the project and executed build.sh without any modifications. Then, I got this error:

FAILED: obj/sdk/arm64/WebRTC obj/sdk/arm64/WebRTC.TOC
if [ ! -e "obj/sdk/arm64/WebRTC" -o ! -e "obj/sdk/arm64/WebRTC.TOC" ] || ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l "obj/sdk/arm64/WebRTC" | grep -q LC_REEXPORT_DYLIB ; then TOOL_VERSION=1675933541 ../../../../Mediasoup/dependencies/webrtc/src/build/toolchain/apple/linker_driver.py -Wcrl,strippath,../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --deterministic ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -B ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ -shared -all_load -install_name @rpath/WebRTC.framework/WebRTC -Wl,-install_name,@rpath/WebRTC.framework/WebRTC -Wl,-fatal_warnings -target arm64-apple-ios13.0 -Wl,-dead_strip -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -Wl,-ObjC -Wl,-objc_abi_version,2 -Wl,-rpath,@executable_path/Frameworks -Wl,-rpath,@loader_path/Frameworks -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/lib/swift -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -o "obj/sdk/arm64/WebRTC" -Wl,-filelist,"obj/sdk/arm64/WebRTC.rsp" -framework AVFoundation -framework CoreGraphics -framework CoreMedia -framework CoreFoundation -framework CoreText -framework Foundation -framework CFNetwork -framework Security -framework SystemConfiguration -framework UIKit -framework AudioToolbox -framework VideoToolbox -framework CoreVideo -framework Network -framework QuartzCore -framework Metal -framework MetalKit -framework GLKit -framework OpenGLES && { ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l "obj/sdk/arm64/WebRTC" | grep LC_ID_DYLIB -A 5; ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm -gPp "obj/sdk/arm64/WebRTC" | cut -f1-2 -d' ' | grep -v U$$; true; } > "obj/sdk/arm64/WebRTC.TOC"; else TOOL_VERSION=1675933541 ../../../../Mediasoup/dependencies/webrtc/src/build/toolchain/apple/linker_driver.py -Wcrl,strippath,../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --deterministic ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -B ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ -shared -all_load -install_name @rpath/WebRTC.framework/WebRTC -Wl,-install_name,@rpath/WebRTC.framework/WebRTC -Wl,-fatal_warnings -target arm64-apple-ios13.0 -Wl,-dead_strip -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -Wl,-ObjC -Wl,-objc_abi_version,2 -Wl,-rpath,@executable_path/Frameworks -Wl,-rpath,@loader_path/Frameworks -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/lib/swift -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -o "obj/sdk/arm64/WebRTC" -Wl,-filelist,"obj/sdk/arm64/WebRTC.rsp" -framework AVFoundation -framework CoreGraphics -framework CoreMedia -framework CoreFoundation -framework CoreText -framework Foundation -framework CFNetwork -framework Security -framework SystemConfiguration -framework UIKit -framework AudioToolbox -framework VideoToolbox -framework CoreVideo -framework Network -framework QuartzCore -framework Metal -framework MetalKit -framework GLKit -framework OpenGLES && { ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l "obj/sdk/arm64/WebRTC" | grep LC_ID_DYLIB -A 5; ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm -gPp "obj/sdk/arm64/WebRTC" | cut -f1-2 -d' ' | grep -v U$$; true; } > "obj/sdk/arm64/WebRTC.tmp" && if ! cmp -s "obj/sdk/arm64/WebRTC.tmp" "obj/sdk/arm64/WebRTC.TOC"; then mv "obj/sdk/arm64/WebRTC.tmp" "obj/sdk/arm64/WebRTC.TOC" ; fi; fi

It seems to be casuse by Xcode 14.
How can I fix it ?

Mobile Network Streaming Issue

This observation has been present since day 1 of integrating the library, but our focus was primarily on the integration itself, and therefore, we used Wi-Fi to ensure functionality. However, now that we have our product ready, we need to ensure mobile network support as well.

I find it intriguing that everything works smoothly on Wi-Fi, including streaming capabilities. On mobile, I can successfully join and retrieve user information via the socket, but I encounter issues when attempting to stream or receive the feed.

The 'Transport onConnectionState' consistently returns a failed status, and even the socket struggles to reconnect.

According to the Mediasoup forum, it's suggested that using a TURN server might resolve this. It's worth mentioning that we do have a TURN server in place, and it's effectively working for Android and web platforms.

Here are the relevant forum threads for reference:

iOS iPhone can't connect under 4g/5g network
Mediasoup not working on mobile data or hotspot and not connecting to the client, especially on IPv6 address, connecting to another peer at IPv4

Do you have any insights or suggestions regarding this matter? Your input would be greatly appreciated.

try to run sh build.sh giving error

warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_118BlockProcessorImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN6webrtc12_GLOBAL__N_118BlockProcessorImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_118BlockProcessorImpl15instance_count_E' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_19kSqrt2SinE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_115EchoRemoverImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_115EchoRemoverImpl15instance_count_E' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_17kMaxErlE' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc14FilterAnalyzer17PreProcessFiltersEN3rtc9ArrayViewIKNSt3__16vectorIfNS3_9allocatorIfEEEELln4711EEEE1h' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_131kPreEchoHistogramDataNotUpdatedE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_114kHErrorInitialE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_121RenderDelayBufferImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN6webrtc12_GLOBAL__N_121RenderDelayBufferImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_121RenderDelayBufferImpl15instance_count_E' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_125RenderDelayControllerImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN6webrtc12_GLOBAL__N_125RenderDelayControllerImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_125RenderDelayControllerImpl15instance_count_E' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_115kBandBoundariesE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_114kMinNoisePowerE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_112kSqrtHanningE' in the debug map.
warning: (arm64) failed to insert symbol '__ZZNK6webrtc8OouraFft10bitrv2_128EPfE2ip' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtcL9rdft_wk1rE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_123WebRtcAecm_kSqrtHanningE' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc12_GLOBAL__N_118LogClippingMetricsEiE24atomic_histogram_pointer' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtcL15kHistBinCentersE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtcL16kNoiseGmmWeightsE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtcL15kCoeffNumeratorE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_115kLowProbabilityE' in the debug map.
warning: (arm64) failed to insert symbol '_kWeight' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_116kGainTableAnalogE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_113kGenFuncTableE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_19log_tableE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_123kBlocks160w256FirstHalfE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtcL14kLtrFeatureThrE' in the debug map.
warning: (arm64) failed to insert symbol '__ZNSt3__1L19piecewise_constructE' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN7cricket19FilterRtpExtensionsERKNSt3__16vectorIN6webrtc12RtpExtensionENS0_9allocatorIS3_EEEEPFbN4absl11string_viewEEbRKNS2_15FieldTrialsViewEE23kBweExtensionPriorities' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN7cricket23WebRtcVoiceMediaChannel31MaybeCreateDefaultReceiveStreamERKN6webrtc17RtpPacketReceivedEE24atomic_histogram_pointer' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_135VideoDecoderSoftwareFallbackWrapperE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_135VideoEncoderSoftwareFallbackWrapperE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN6webrtc12_GLOBAL__N_135VideoEncoderSoftwareFallbackWrapperE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_127kBaseHeavy3TlRateAllocationE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_123kRtcpAnyExtendedReportsE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_126kIncludeCaptureClockOffsetE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc14UlpfecReceiverD1EvE24atomic_histogram_pointer' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_127kBweBackOffFactorExperimentE' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc20PacketArrivalTimeMap14SetNotReceivedExxE5value' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_114kTimestampToMsE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_115kFieldTrialNameE' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc16BitrateAllocatorD1EvE24atomic_histogram_pointer' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_126kBweThroughputWindowConfigE' in the debug map.
warning: (arm64) failed to insert symbol '__ZNSt3__1L19piecewise_constructE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc15ProbeController12RequestProbeENS_9TimestampEE24atomic_histogram_pointer' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_117kUmaRampupMetricsE' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc27SendSideBandwidthEstimation9UpdateRttENS_9TimeDeltaENS_9TimestampEE24atomic_histogram_pointer' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_120kBweLossBasedControlE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_121AudioCodingModuleImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN6webrtc12_GLOBAL__N_121AudioCodingModuleImplE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_128kNackTrackerConfigFieldTrialE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc20StatisticsCalculator14EndExpandEventEiE24atomic_histogram_pointer' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_115WebRtcCng_kDbovE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_115AudioEncoderCngE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN6webrtc12_GLOBAL__N_115AudioEncoderCngE' in the debug map.
warning: (arm64) failed to insert symbol '__ZNSt3__1L19piecewise_constructE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12video_coding12_GLOBAL__N_115start_code_h264E' in the debug map.
warning: (arm64) failed to insert symbol '__ZNSt3__1L19piecewise_constructE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_114kMaxVideoDelayE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_134kMaxScreenSharingLayerFramerateFpsE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_135BuiltinVideoBitrateAllocatorFactoryE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN6webrtc12_GLOBAL__N_135BuiltinVideoBitrateAllocatorFactoryE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_112kAccMaxErrorE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_123FrameCadenceAdapterImplE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_119FrameDumpingDecoderE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN6webrtc12_GLOBAL__N_119FrameDumpingDecoderE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_118kMaxFramesBufferedE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN3rtc16RefCountedObjectIN6webrtc12_GLOBAL__N_125EncodedImageBufferWrapperEEE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZN7cricket12_GLOBAL__N_139kUseLegacySimulcastLayerLimitFieldTrialE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_111kFieldTrialE' in the debug map.
warning: (arm64) failed to insert symbol '__ZNSt3__1L19piecewise_constructE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_115kFieldTrialNameE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc17VideoRenderFramesD1EvE24atomic_histogram_pointer' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc27DefaultOutputRateCalculator28CalculateOutputRateFromRangeEN3rtc9ArrayViewIKiLln4711EEEE12native_rates' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc15DcSctpTransportC1EPN3rtc6ThreadEPNS1_23PacketTransportInternalEPNS_5ClockENSt3__110unique_ptrIN6dcsctp19DcSctpSocketFactoryENS8_14default_deleteISB_EEEEE14instance_count' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVNSt3__110__function6__funcIZN6dcsctp12TimerManager11CreateTimerEN4absl11string_viewENS_8functionIFNS4_8optionalINS2_10DurationMsEEEvEEERKNS2_12TimerOptionsEE3$_0NS_9allocatorISF_EEFvvEEE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVNSt3__110__function6__funcIZN6dcsctp15ReassemblyQueueC1EN4absl11string_viewEN6webrtc11StrongAliasINS2_6TSNTagEjEEmbE3$_0NS_9allocatorISA_EEFvN3rtc9ArrayViewIKNS2_23UnwrappedSequenceNumberIS9_EELln4711EEENS2_13DcSctpMessageEEEE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSNSt3__110__function6__funcIZN6dcsctp15ReassemblyQueueC1EN4absl11string_viewEN6webrtc11StrongAliasINS2_6TSNTagEjEEmbE3$_0NS_9allocatorISA_EEFvN3rtc9ArrayViewIKNS2_23UnwrappedSequenceNumberIS9_EELln4711EEENS2_13DcSctpMessageEEEE' in the debug map.
warning: (arm64) failed to insert symbol '__ZNSt3__1L19piecewise_constructE' in the debug map.
warning: (arm64) failed to insert symbol '__ZNSt3__1L19piecewise_constructE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVNSt3__110__function6__funcIZN6dcsctp19RetransmissionQueueC1EN4absl11string_viewEPNS2_21DcSctpSocketCallbacksEN6webrtc11StrongAliasINS2_6TSNTagEjEEmRNS2_9SendQueueENS_8functionIFvNS2_10DurationMsEEEENSE_IFvvEEERNS2_5TimerERKNS2_13DcSctpOptionsEbbE3$_0NS_9allocatorISP_EEFbNS9_INS2_14IsUnorderedTagEbEENS9_INS2_11StreamIDTagEtEENS9_INS2_6MIDTagEjEEEEE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSNSt3__110__function6__funcIZN6dcsctp19RetransmissionQueueC1EN4absl11string_viewEPNS2_21DcSctpSocketCallbacksEN6webrtc11StrongAliasINS2_6TSNTagEjEEmRNS2_9SendQueueENS_8functionIFvNS2_10DurationMsEEEENSE_IFvvEEERNS2_5TimerERKNS2_13DcSctpOptionsEbbE3$_0NS_9allocatorISP_EEFbNS9_INS2_14IsUnorderedTagEbEENS9_INS2_11StreamIDTagEtEENS9_INS2_6MIDTagEjEEEEE' in the debug map.
warning: (arm64) failed to insert symbol '__ZNSt3__1L19piecewise_constructE' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_aes_gcm_openssl_alloc' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_aes_gcm_128_openssl_description' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_aes_gcm_test_case_0' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_aes_icm_openssl_alloc' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_aes_icm_128_openssl_description' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_aes_icm_128_test_case_0' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_aes_icm_128_test_case_0_nonce' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_null_cipher_alloc' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_null_cipher_description' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_hmac_alloc' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_hmac_description' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_hmac_test_case_0' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_null_auth_alloc' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_null_auth_description' in the debug map.
warning: (arm64) failed to insert symbol '_srtp_err_report_handler' in the debug map.
warning: (arm64) failed to insert symbol '_bit_string' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN3rtc16RefCountedObjectIN6webrtc12_GLOBAL__N_132IceTransportWithTransportChannelEEE' in the debug map.
warning: (arm64) failed to insert symbol '__ZTSN3rtc16RefCountedObjectIN6webrtc12_GLOBAL__N_132IceTransportWithTransportChannelEEE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_111g_unique_idE' in the debug map.
warning: (arm64) failed to insert symbol '__ZZN6webrtc19RtpReceiverInternal16GenerateUniqueIdEvE11g_unique_id' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtcL15kDtmfTonesTableE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_121kDefaultAudioSenderIdE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_110kTransportE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_121kValidIceServiceTypesE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_115kProfileLevelIdE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN12_GLOBAL__N_126kFakeCodecFactoryCodecNameE' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_125kVp8PostProcArmFieldTrialE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZTVN6webrtc12_GLOBAL__N_112LibvpxFacadeE' in the debug map.
warning: (arm64) failed to insert symbol '_bifilter4_coeff' in the debug map.
warning: (arm64) failed to insert symbol '_abs_filters' in the debug map.
warning: (arm64) failed to insert symbol '_qualify_inter_mb.ndx' in the debug map.
warning: (arm64) failed to insert symbol '_dc_qlookup' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '_pred' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '_kBands' in the debug map.
warning: (arm64) failed to insert symbol '_kCat3456' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '_initialize_dec.init_done' in the debug map.
warning: (arm64) failed to insert symbol '_plane_rd_mult' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '_dct_value_tokens' in the debug map.
warning: (arm64) failed to insert symbol '_vp8e_usage_cfg_map' in the debug map.
warning: (arm64) failed to insert symbol '_vp9_iht16x16_256_add_neon.IHT_16' in the debug map.
warning: (arm64) failed to insert symbol '_sub_pel_filters_8' in the debug map.
warning: (arm64) failed to insert symbol '_vp9_setup_mask.shift_32_y' in the debug map.
warning: (arm64) failed to insert symbol '_mv_ref_blocks' in the debug map.
warning: (arm64) failed to insert symbol '_dc_qlookup' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '_default_scan_4x4' in the debug map.
warning: (arm64) failed to insert symbol '_seg_feature_data_max' in the debug map.
warning: (arm64) failed to insert symbol '_mv_ref_blocks' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '_initialize_dec.init_done' in the debug map.
warning: (arm64) failed to insert symbol '_inv_remap_prob.inv_map_table' in the debug map.
warning: (arm64) failed to insert symbol '_VP9_VAR_OFFS' in the debug map.
warning: (arm64) failed to insert symbol '_write_interp_filter.filter_to_literal' in the debug map.
warning: (arm64) failed to insert symbol '_square' in the debug map.
warning: (arm64) failed to insert symbol '_vp9_var_part_nnconfig_64' in the debug map.
warning: (arm64) failed to insert symbol '_plane_rd_mult' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '_quantizer_to_qindex' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '_vp9_set_rd_speed_thresholds_sub8x8.thresh_mult' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '_band_counts' in the debug map.
warning: (arm64) failed to insert symbol '_vp9_down2_symodd_half_filter' in the debug map.
warning: (arm64) failed to insert symbol '_best_quality_mesh_pattern' in the debug map.
warning: (arm64) failed to insert symbol '_remap_prob.map_table' in the debug map.
warning: (arm64) failed to insert symbol '_update_bits' in the debug map.
warning: (arm64) failed to insert symbol '_skin_threshold' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '_once.lock' in the debug map.
warning: (arm64) failed to insert symbol '_g_worker_interface' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert symbol '__ZN6webrtc12_GLOBAL__N_111kFieldTrialE' in the debug map.
warning: (arm64) failed to insert symbol '__MergedGlobals' in the debug map.
warning: (arm64) failed to insert

ster_onkar/Mediasoup/dependencies/libmediasoupclient/src/Consumer.cpp:3:
In file included from /Users/onkar/Downloads/mediasoup-client-swift-master_onkar/Mediasoup/dependencies/libmediasoupclient/include/Consumer.hpp:5:
In file included from /Users/onkar/Downloads/mediasoup-client-swift-master_onkar/Mediasoup/dependencies/webrtc/src/api/media_stream_interface.h:27:
In file included from /Users/onkar/Downloads/mediasoup-client-swift-master_onkar/Mediasoup/dependencies/webrtc/src/api/video/recordable_encoded_frame.h:16:
/Users/onkar/Downloads/mediasoup-client-swift-master_onkar/Mediasoup/dependencies/webrtc/src/api/units/timestamp.h:90:43: error: no member named 'IsPlusInfinity' in 'webrtc::TimeDelta'
} else if (IsMinusInfinity() || delta.IsPlusInfinity()) {
~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 warnings and 20 errors generated.
make[2]: *** [libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Consumer.cpp.o] Error 1
make[1]: *** [libmediasoupclient/CMakeFiles/mediasoupclient.dir/all] Error 2
make: *** [all] Error 2

load device to set ice server option missing (available in android/ web)

Our repo - device.load(with: rtpCapabilities)
Android, web repo has extra parameters to set ICE server configuration - check last load function

`
code

        for (i in 0 until mIceServers!!.length()) {
            val server = mIceServers!!.getJSONObject(i)
            var iceServer = IceServer(
                server.getString("urls"),
                server.getString("username"),
                server.getString("credential")
            )
            serverList.add(iceServer)
        }
        val rtcConfiguration = RTCConfiguration(serverList)
        if (icePolicy == "relay") rtcConfiguration.iceTransportsType =
            org.webrtc.PeerConnection.IceTransportsType.RELAY
        mOptions!!.setRTCConfig(rtcConfiguration)
        mJMMediaDevice?.load(rtpCapabilities.toString(), mOptions)

`

so how to set ice server in iOS?
I can see send transport has few functions.
`
code

public func restartICE(with iceParameters: String) throws
public func updateICEServers(_ iceServers: String) throws
public func updateICETransportPolicy(_ transportPolicy: Mediasoup.ICETransportPolicy) throws

`

Question

  1. What is the right way to set ice server like android?
  2. Will updateICEServer work? do we need to call restartICE as well?
    Note - I tried this too. server is not receiving any ice server info. please help.

Allow DeviceWrapper to support custom RTCAudioDevice

Currently when creating a Device the SDK does the following:

public init() { self.device = DeviceWrapper() }

Which in turn calls the init of the DeviceWrapper

In the init function the SDK creates the RTCPeerConnection by doing:

auto pcFactoryBuilder = [[RTCPeerConnectionFactoryBuilder alloc] init]; [pcFactoryBuilder setAudioEncoderFactory:audioEncoderFactory]; [pcFactoryBuilder setAudioDecoderFactory:audioDecoderFactory]; [pcFactoryBuilder setVideoEncoderFactory:std::move(videoEncoderFactory)]; [pcFactoryBuilder setVideoDecoderFactory:std::move(videoDecoderFactory)]; [pcFactoryBuilder setAudioDeviceModule:webrtc::CreateAudioDeviceModule()];

The line [pcFactoryBuilder setAudioDeviceModule:webrtc::CreateAudioDeviceModule()]; creates a default RTCAudioDevice.

This prevents us from giving the RTC device a custom implementation of the RTCAudioDevice.

If possible we need to allow the DeviceWrapper to accept in it's initializer a RTCAudioDevice or a RTCPeerConnectionFactory from the Client app

Thanks

App Crash when creating and closing audio and video producers at the same time

when i keep creating and closing audio and video producers at the same time, i get this error below and the app crashes.

libc++abi: terminating with uncaught exception of type MediaSoupClientError: Failed to set remote answer sdp: Called in wrong state: stable
terminating with uncaught exception of type MediaSoupClientError: Failed to set remote answer sdp: Called in wrong state: stable

iOS 12 support

This library is supported from iOS 14 but there is no component used inside library related to the same.

Please just update the version to 12.0 from 14.0.

We have made the changes in the custom version and things are working fine. We are using the custom one for now but in future we are planning to use your version only for better maintenance support.

createproducer function returning nil

let producer = try? sendTransport.createProducer(for: audioTrack, encodings: nil, codecOptions: nil, appData: nil)

this is returning nil. please help me to resolve this

Sdp Issue

we have introduced voice call feature in our app. we are facing sdp issues while making video call from iOS to iOS due to packed web rtc version

Video capture function missing

[Update]

Looks like these functions are not available when trying to access using pod extensions.
any reason why?

Earlier we were using objc version of this lib.
(https://github.com/ethand91/mediasoup-ios-client
https://github.com/VLprojects/libmediasoupclient)

In this we were able to capture and send the camera feed using below code -
self.videoCapture = RTCCameraVideoCapturer(delegate: videoSource) guard let format = RTCCameraVideoCapturer.supportedFormats(for: cameraDevice).last else{return} let fps:Int = Int(format.videoSupportedFrameRateRanges.first?.maxFrameRate ?? 30) self.videoCapture?.startCapture(with: cameraDevice, format:format, fps: fps)

    Now in this swift version, there is nothing called as **RTCCameraVideoCapturer**.
    We can find **RTCVideoCapturer** but it doesn't have capture function and neither works directly. 
    
    please suggest here. _(In example also only audio transmission is present)_

./build.sh Failed When Cloning WebRTC

Refetch WebRTC? (f)ull clone | (r)eset local changes | (N)o: f
Cloning WebRTC
/Users/liuyang/Desktop/xxx/mediasoup-client-swift-master/Mediasoup/dependencies/depot_tools/vpython3: line 52: /Users/liuyang/Desktop/m112_vlm112.2/mediasoup-client-swift-master/Mediasoup/dependencies/depot_tools/.cipd_bin/vpython3: No such file or directory
/Users/liuyang/Desktop/m112_vlm112.2/mediasoup-client-swift-master/Mediasoup/dependencies/depot_tools/vpython3: line 52: exec: /Users/liuyang/Desktop/m112_vlm112.2/mediasoup-client-swift-master/Mediasoup/dependencies/depot_tools/.cipd_bin/vpython3: cannot execute: No such file or directory

H264 simulcast not working on ios

Hello, many thanks for you library which is very well done. Integration into my project has been really smooth. I have one issue with H264 simulcast. I try to produce 2 videos layers :
let lowEncoding = RTCRtpEncodingParameters()
lowEncoding.maxBitrateBps = 256_000
lowEncoding.scaleResolutionDownBy = 1

        let highEncoding = RTCRtpEncodingParameters()
        highEncoding.maxBitrateBps = 5_000_000
        highEncoding.scaleResolutionDownBy = 1

It works well with VP8 but with H264 it only produces one stream at 5M. Furthermore the resolution is quite low and doesn't delivers full hd.

What am I missing ? is there some specific configuration to be done for h264 ?

Thanks for your help.

Receive Transport Crash on second call

PS - Tried almost everything. Checked discourse group as well.

Case - First time everything works fine, able to leave the call as well BUT when trying to join again then its crashes in the beginning with below error

Screenshot 2023-09-11 at 2 47 28 PM

On leave -

  1. Attempt 1 - Tried setting to nil to all the property (consumer, producer, track, media, device close and nil) and socket disconnect
  2. Attempt 2 - Only socket disconnect
  3. Attempt 3 - consumer close, sent pause consumer socket and socket disconnect

What is the correct way to do this?

Transport callback handling
`
func onConnectionStateChange(transport: Transport, connectionState: TransportConnectionState) {
LOG.debug("Transport- Reconnect- (transport.id == sendTransport?.id ? "send" : "receive") onConnectionStateChange == (connectionState)")

    qJMMediaBGQueue.async {
        if connectionState == .disconnected && self.isCallEnded{
            LOG.error("Transport- End- transport closed")
            transport.close()
            return
        }
        
        if connectionState == .closed && transport.id == self.sendTransport?.id{
            LOG.error("Transport- End- transport sent closed - stop capture")
            self.videoCapture?.stopCapture()
        }
    }

`

How can i create producer?

Hello. I just have a problem about creating Producer.
I'm making video chat application using MQTT and Mediasoup.

When I call the "SendTransport.createProducer()" function, it returns nil always. I don't know why.

Could you give me some advices?

Here are my sample code

// Mediasoup Class
private func generateSendTransport(params: [String:Any]) {
    if(device == nil){
        return
    }

    do{
        let transportParams = try? JSONSerialization.data(withJSONObject: params)
        if(transportParams == nil){
            return
        }
        
        let decoded = try? JSONDecoder().decode(TransportParams.self, from: transportParams!)
        if(decoded == nil){
            return
        }
        
        let iceParameters = try JSONEncoder().encode(decoded!.iceParameters)
        let iceCandidates = try JSONEncoder().encode(decoded!.iceCandidates)
        let dtlsParameters = try JSONEncoder().encode(decoded!.dtlsParameters)
        let sctpParameters = try JSONEncoder().encode(decoded!.sctpParameters)
        let appData = try JSONEncoder().encode(decoded!.appData)
        
        sendTransport = try device!.createSendTransport(
            id: decoded!.id,
            iceParameters: String(data: iceParameters, encoding: .utf8)!,
            iceCandidates: String(data: iceCandidates, encoding: .utf8)!,
            dtlsParameters: String(data: dtlsParameters, encoding: .utf8)!,
            sctpParameters: String(data: sctpParameters, encoding: .utf8)!,
            appData: nil)
        sendTransport?.delegate = self
        
        DispatchQueue.global(qos: .background).asyncAfter(deadline: .now() + 1.0) {[self] in
            produce()
        }
    }catch{
        return
    }
  }
  
private func produce() {
      videoProducer = try? sendTransport?.createProducer(for: videoTrack!, encodings: nil, codecOptions: nil, codec: nil, appData: nil)
      audioProducer = try? sendTransport?.createProducer(for: audioTrack!, encodings: nil, codecOptions: nil, codec: nil, appData: nil)
}
// End of Mediasoup class


// Delegate of Transport
extension RfUnityRoom : SendTransportDelegate {
    func onProduce(transport: Mediasoup.Transport, kind: Mediasoup.MediaKind, rtpParameters: String, appData: String, callback: @escaping (String?) -> Void) {        
        let me = getMe()
        if(me == nil){
            return
        }
        mqtt?.sendMessage(topic: reqTopic, request: [
            "type": "produce",
            "payload": [
                "conferenceID": roomId,
                "endpointID": me!.uuid,
                "transportId": transport.id,
                "rtpParameters": rtpParameters,
                "kind": kind,
                "appData": appData,
            ] as[String:Any],
        ])
    }

    func onProduceData(transport: Mediasoup.Transport, sctpParameters: String, label: String, protocol dataProtocol: String, appData: String, callback: @escaping (String?) -> Void) {
    }

    func onConnect(transport: Mediasoup.Transport, dtlsParameters: String) {
        let me = getMe()
        if(me == nil){
            return
        }

        mqtt?.sendMessage(topic: reqTopic, request: [
            "type": "connectWebRtcTransport",
            "payload": [
                "conferenceID": roomId,
                "endpointID": me!.uuid,
                "transportId": transport.id,
                "dtlsParameters": dtlsParameters,
            ] as [String:Any],
        ])
    }

    func onConnectionStateChange(transport: Mediasoup.Transport, connectionState: Mediasoup.TransportConnectionState) {
    }
}

Laggy video in iPhone

Firstly, thanks for the package, it's awesome.
I'm facing an issue the video stream from iPhone is extremely laggy but iPad is working fine. with the same code.

iPhone 12 with iOS versions 15.5 and 16.6
iPad 2020 with iPadOS version 16.5.1

Pictures below show that when iPhone joins a room, the RAM goes up to 600mbs+, while iPad stays at 170mbs+
Screenshot 2023-08-08 at 14 38 12
Screenshot 2023-08-02 at 15 17 55

getting error while creating producer

Unexpected error: unknown(Error Domain=MediasoupClientErrorDomain Code=3 "The associated promise has been destructed prior to the associated state becoming ready." UserInfo={NSLocalizedDescription=The associated promise has been destructed prior to the associated state becoming ready.}).

memory consumption

app is consuming too much memory - ios app
build with mediasoup framework, when switching the cam function or screensharing too much memory is getitng used and app is geting crashed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.