Commit 007701a
Implement turns
NEW FEATURES:
- turns implementation
PERFORMANCE OPTIMIZATIONS:
Memory Management:
- Add PooledSegmentedBuffer<T> for efficient buffer pooling with ArrayPool<T> integration
- Implement MemoryOperations helper for optimized memory operations
- Add ValueStringBuilder for stack-allocated string building to reduce heap allocations
- Introduce SearchValues for optimized span-based searching
- Replace BufferUtils with more efficient memory operation primitives
- Use NetEscapades.EnumGenerators to optimize enum usage.
Socket and Network Layer:
- Refactor NetServices with connection pooling and reduced allocations
- Add SocketConnection abstraction with concrete implementations (SocketTcpConnection,
SocketUdpConnection, SocketTlsConnection) for better resource management
- Optimize IPSocket with span-based parsing and reduced string allocations
- Enhance PortRange with improved allocation patterns
System Utilities:
- Add BinaryOperations for bit manipulation optimizations
- Implement EncodingExtensions for efficient encoding/decoding operations
- Add HashExtensions for streamlined hash computations
Crypto and Security:
- Refactor Crypto class with reduced allocations
- Add SslClientAuthenticationOptions and SslStreamExtensions for down-level targets
- Optimize CRC32 implementation
Data Serialization:
- Add SipSorceryJsonSerializerContext for AOT-friendly JSON serialization
- Remove legacy JSONWriter and JsonParser in favor of System.Text.Json
Protocol Implementations:
- Optimize RTP/RTCP packet handling with span-based operations
- Refactor SCTP chunks for reduced allocations
- Improve SDP parsing with ValueStringBuilder
- Optimize STUN attribute handling
Codec Optimizations:
- Extensive refactoring of codes to otpimize memory usage
- Update AudioEncoder with more efficient buffer handling
HIGH-PERFORMANCE LOGGING:
Structured Logging Infrastructure:
- Introduce LoggerMessage source generator pattern across all modules
- Add domain-specific logging extensions for compile-time log message generation
Benefits:
- Zero-cost logging when log level is disabled
- Compile-time string formatting
- Reduced memory allocations in hot paths
- Type-safe structured logging
- Improved debuggability with consistent log patterns
MODERNIZATION:
- Standardize on .NET 10.0 and C# 14.0
- Used Meziantou.Polyfill for down-level targets
- Added other polyfills to keep the source code clean of conditional compilation symbols.
- Introduce BouncyCastleExtensions for down-level targets
SUPPORTING CHANGES:
Type System:
- Refactor TypeExtensions
- Add IByteSerializable interface for consistent serialization
- Add ProtocolTypeExtensions for protocol type handling
Testing:
- Update existing tests to use new optimized APIs
- Replaced Serilog with MartinCostello.Logging.XUnit1 parent 1331f5a commit 007701a
File tree
1,700 files changed
+59548
-270321
lines changed- SIPSorceryMedia.Abstractions
- src
- Encoders
- Enums
- Frames
- MediaEndPoints
- MediaFormats
- sys
- test/SIPSorceryMedia.Abstractions.UnitTest
- img
- SIPSorceryMedia.Windows
- src
- sys
- test/VideoCaptureTest
- examples
- AzureExamples
- TextToPcm
- FSharpExamples
- WebRTCOpenAI
- Miscellaneous/SctpClientTestConsole
- OpenAIExamples
- SIPExamples
- AndroidSIPGetStarted
- Assets
- Properties
- Resources
- layout
- mipmap-anydpi-v26
- mipmap-hdpi
- mipmap-mdpi
- mipmap-xhdpi
- mipmap-xxhdpi
- mipmap-xxxhdpi
- values
- AsteriskIce
- AttendedTransfer
- CallHoldAndTransfer
- CustomAudioCodec
- GetStartedNetFramework
- Properties
- GetStartedPortAudio
- GetStartedPortAudio
- ProjectCeilidh.PortAudio
- Native
- Platform
- Properties
- lib
- GetStartedVideo
- GetStartedWebSocket
- GetStarted
- NotifierClient
- PlaySounds
- Sounds
- ReceiveDtmf
- RecordCall
- RecordIncomingCall
- SIPCallResampleAudio
- SIPCallServer
- SIPCloudCallServer
- SIPProxy
- SendDtmf
- SendMusic
- UserAgentClient
- UserAgentRegister
- UserAgentServer
- Sounds
- VideoPhoneCmdLine
- Properties
- iOSSIPGetStarted
- Assets.xcassets/AppIcon.appiconset
- Properties
- Resources
- SIPScenarios
- AttendedTransferScenario
- DemoVideos
- Target
- Transferee
- Transferor
- BlindTransferScenario
- Target
- Transferee
- Transferor
- LoadTestScenario
- LoadClient
- LoadServer
- Properties
- OnHoldScenario
- Callee
- Caller
- Softphone
- Properties
- Signalling
- StunServer
- WebRTCExamples
- FfmpegToWebRTC
- certs
- JanusWebRTCStream
- RtspToWebRTCAudioAndVideo
- SIPToWebRtcBridgeVideo
- SIPToWebRtcBridge
- UnityVideoSink
- Assets
- Input
- Materials
- Plugins
- Prefabs
- Scenes
- Scripts
- Templates
- ExampleAssets
- Materials
- Models
- Prefabs
- Shaders
- Textures
- Concrete
- Drywall
- Metal
- Plastic
- Props
- Construction_Light
- Hammer
- HardHat
- Jigsaw
- Paint
- Wood
- Materials
- Presets
- Defaults
- Scenes
- Settings
- TextMesh Pro
- Documentation
- Fonts
- Resources
- Fonts & Materials
- Sprite Assets
- Style Sheets
- Shaders
- Sprites
- ProjectSettings
- UnityVideoSource
- Assets
- Input
- Materials
- Plugins
- Prefabs
- Scenes
- Scripts
- Templates
- ExampleAssets
- Materials
- Models
- Prefabs
- Shaders
- Textures
- Concrete
- Drywall
- Metal
- Plastic
- Props
- Construction_Light
- Hammer
- HardHat
- Jigsaw
- Paint
- Wood
- Materials
- Presets
- Defaults
- Scenes
- Settings
- TextMesh Pro
- Documentation
- Fonts
- Resources
- Fonts & Materials
- Sprite Assets
- Style Sheets
- Shaders
- Sprites
- ProjectSettings
- WebRTCAspNetMvc
- Controllers
- Models
- Properties
- Views
- Home
- certs
- media
- wwwroot
- css
- js
- lib
- bootstrap
- dist
- css
- js
- jquery-validation-unobtrusive
- jquery-validation
- dist
- jquery
- dist
- WebRTCClientVP8Net
- WebRTCClient
- WebRTCDaemon
- Properties
- certs
- media
- WebRTCEchoClient
- WebRTCEchoServer
- .azure
- deployscripts
- Properties
- wwwroot
- WebRTCFFmpegGetStarted
- Properties
- wwwroot
- WebRTCGetStartedDataChannel
- WebRTCGetStartedVP8Net
- WebRTCGetStarted
- WebRTCMp4Source
- media
- WebRTCNoSignalling
- media
- WebRTCOpenGL
- AudioScope
- shaders
- clear
- line
- WebRTCReceiveAudio
- WebRTCReceiver
- WebRTCSendAudio
- WebRTCTestPatternRest
- Properties
- WebRTCTestPatternServer
- Properties
- wwwroot
- WebRTCWebcamServer
- WebRTCtoFfplay
- certs
- sipjs
- WebRTCLightningExamples
- WebRTCLightningGetStarted
- BackgroundServices
- Enums
- Properties
- Protos
- Records
- Services
- StateMachines
- media
- wwwroot
- WebRTCScenarios
- DataChannelBandwidth
- DataChannelStressTest
- img
- notebooks
- sipcmdline
- webrtccmdline
- Properties
- img
- src
- app
- Media
- Codecs
- G729Codec
- Sources
- SIPRequestAuthoriser
- SIPUserAgents
- core
- DNS
- SIPCDR
- SIPEvents
- Dialog
- Presence
- SIPTransactions
- SIP
- Channels
- media
- net
- DtlsSrtp
- Transform
- HEP
- ICE
- RTCP
- RTP
- Packetisation
- RTPHeaderExtensions
- Streams
- RTSP
- SCTP
- Chunks
- SDP
- STUN
- STUNAttributes
- TURN
- WebRTC
- sys
- Crypto
- Formatting
- Net
- test
- integration
- app
- core
- net
- DNS
- DtlsSrtp
- ICE
- RTP
- STUN
- WebRTC
- sys/net
- unit
- app
- SIPUserAgents
- media
- core
- SIPEvents
- Dialog
- Presence
- SIPTransactions
- SIP
- Channels
- net
- ICE
- RTCP
- RTP
- RTSP
- SCTP
- SDP
- STUN
- WebRTC
- sys
- crypto
- net
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,700 files changed
+59548
-270321
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments