Skip to content

Commit 012aea1

Browse files
authored
Merge pull request #144 from GetStream/feature/uni-103-fix-ios-build-issues-undefined-symbols
Fix undefined symbols when building for iOS
2 parents e1dc31e + ea40303 commit 012aea1

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Packages/StreamVideo/Runtime/Libs/io.stream.unity.webrtc/Runtime/Scripts/AudioStreamTrack.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ public event AudioReadEventHandler onReceived
468468
_streamRenderer.onReceived -= value;
469469
}
470470
}
471-
471+
#if UNITY_ANDROID && !UNITY_EDITOR
472472
public void StartLocalAudioCapture(int deviceId, int sampleRate, int numChannels)
473473
{
474474
WebRTC.Context.StartAudioCapture(_trackSource.self, deviceId, sampleRate, numChannels);
@@ -483,6 +483,7 @@ public void StopLocalAudioCapture()
483483
{
484484
WebRTC.Context.StopAudioCapture(_trackSource.self);
485485
}
486+
#endif
486487
}
487488

488489
internal class AudioTrackSource : RefCountedObject

Packages/StreamVideo/Runtime/Libs/io.stream.unity.webrtc/Runtime/Scripts/Context.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ public void GetReceiverCapabilities(TrackKind kind, out IntPtr capabilities)
376376
NativeMethods.ContextGetReceiverCapabilities(self, kind, out capabilities);
377377
}
378378

379+
#if UNITY_ANDROID && !UNITY_EDITOR
379380
public void GetAudioProcessingModuleConfig(out bool enabled, out bool echoCancellationEnabled, out bool autoGainEnabled, out bool noiseSuppressionEnabled, out int noiseSuppressionLevel)
380381
{
381382
NativeMethods.GetAudioProcessingModuleConfig(self, out enabled, out echoCancellationEnabled, out autoGainEnabled, out noiseSuppressionEnabled, out noiseSuppressionLevel);
@@ -410,6 +411,7 @@ public void StopAudioPlayback()
410411
{
411412
NativeMethods.StopAudioPlayback(self);
412413
}
414+
#endif
413415

414416
internal void BatchUpdate(IntPtr batchData)
415417
{

Packages/StreamVideo/Runtime/Libs/io.stream.unity.webrtc/Runtime/Scripts/WebRTC.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,8 @@ public static void ConfigureNativeLogging(bool enableNativeLogging, NativeLoggin
898898
NativeMethods.RegisterDebugLog(null, false, nativeLoggingSeverity);
899899
}
900900
}
901-
901+
902+
#if UNITY_ANDROID && !UNITY_EDITOR
902903
/// <summary>
903904
/// Sets the graphics sync timeout.
904905
/// Graphics sync timeout determines how long the graphics device will wait on the frame copy for encoding before timing out.
@@ -909,6 +910,7 @@ public static void SetGraphicsSyncTimeout(uint nSecTimeout)
909910
{
910911
NativeMethods.SetGraphicsSyncTimeout(nSecTimeout);
911912
}
913+
#endif
912914

913915
internal static void DisposeInternal()
914916
{
@@ -1109,7 +1111,7 @@ public static TextureFormat GetSupportedTextureFormat(GraphicsDeviceType type)
11091111
var graphicsFormat = GetSupportedGraphicsFormat(type);
11101112
return GraphicsFormatUtility.GetTextureFormat(graphicsFormat);
11111113
}
1112-
1114+
#if UNITY_ANDROID && !UNITY_EDITOR
11131115
public static void SetAudioProcessingModule(bool enabled, bool echoCancellationEnabled, bool autoGainEnabled, bool noiseSuppressionEnabled, int noiseSuppressionLevel)
11141116
{
11151117
WebRTC.Context.SetAudioProcessingModule(enabled, echoCancellationEnabled, autoGainEnabled, noiseSuppressionEnabled, noiseSuppressionLevel);
@@ -1130,6 +1132,8 @@ public static void StopAudioPlayback()
11301132
Context.StopAudioPlayback();
11311133
}
11321134

1135+
#endif
1136+
11331137
class CallbackObject
11341138
{
11351139
public readonly IntPtr ptr;
@@ -1809,6 +1813,7 @@ public static extern IntPtr CreateVideoRenderer(
18091813
[DllImport(WebRTC.Lib)]
18101814
public static extern void FrameTransformerSendFrameToSink(IntPtr transform, IntPtr frame);
18111815

1816+
#if UNITY_ANDROID && !UNITY_EDITOR
18121817
[DllImport(WebRTC.Lib)]
18131818
public static extern void SetGraphicsSyncTimeout(uint nSecTimeout);
18141819

@@ -1833,7 +1838,7 @@ public static extern IntPtr CreateVideoRenderer(
18331838

18341839
[DllImport(WebRTC.Lib)]
18351840
public static extern void GetAudioProcessingModuleConfig(IntPtr context, out bool enabled, out bool echoCancellationEnabled, out bool autoGainEnabled, out bool noiseSuppressionEnabled, out int noiseSuppressionLevel);
1836-
1841+
#endif
18371842
}
18381843

18391844
internal static class VideoUpdateMethods

0 commit comments

Comments
 (0)