Releases: awslabs/amazon-kinesis-video-streams-webrtc-sdk-c
Release 1.12.0 of the Amazon Kinesis Video Streams WebRTC C SDK
Summary
Memory size reduction
- This release focuses primarily on memory footprint improvements and additional configurability.
Key highlights include:
- Reduced memory usage through optimized data structures and heap allocation.
- Added a new optional API for applications to configure the outbound transceiver's rolling buffer size.
- Made ICE stats calculations optional for improved performance.
What's New
- Added a new optional API
configureTransceiverRollingBuffer
to reduce the size of each transciever's RTP packet store from the default. (#2077)- Updated the
kvsWebrtcMaster.c
sample application's rolling buffer configuration using the newconfigureTransceiverRollingBuffer
API to fit the bitrate required by the included sample frames. (#2089)
- Updated the
Tip
For additional configureTransceiverRollingBuffer
details, refer to Controlling RTP rolling buffer capacity in the ReadMe.
SDK Changes
- Implemented new API
configureTransceiverRollingBuffer
. (#2077) - Moved the TWCC packet store and TWCC packets from the stack to the heap and reduced the store size. (#2075)
- Changed the underlying TWCC packet store implementation from an array to a hashTable. (#2075)
- Moved the remote description (SDP offer when this SDK is used as master) from the stack to the heap and shortened its lifetime between the session establishment. (#2070)
- Reduced the size of stats-related strings. (#2079)
- Reduced the size of hashTables holding codecs for SDP construction. (#2067)
- Added option to disable ICE stats calculations. (#2074)
- Moved SDK-internal ICE stat structs from the stack to the heap. (#2074)
Samples
- Disabled ICE stats calculation by default if
ENABLE_STATS_CALCULATION_CONTROL
is present. (#2074) - Changed the log level of metrics logs from
DEBUG
toINFO
. (#2074) kvsWebrtcMaster.c
: Reduced the size of RTP rolling buffers, using the newconfigureTransceiverRollingBuffer
API, to the bitrate required by the sample frames, demonstrating the potential memory savings. (#2089)
Bug Fixes/Improvements
- Fixed duplicate
nack pli
line in the SDP generation for H.264. (#2082) - Added missing
rtcp-fb
line in the SDP generation for H.265. (#2082) - Added missing
ENTERS()
,LEAVES()
, andCHK_LOG_ERR()
inPeerConnection.c
. (#2070)
Build Changes
Added CMake flags:
-DENABLE_STATS_CALCULATION_CONTROL
to enable the option to disable ICE stats calculation. (#2074)-DKVS_STACK_SIZE
to set the stack size configuration. (#2073)
Tip
Refer to the README for additional details for these build options.
Dependency Updates
- The
libkvsCommonLws
version has been updated from 1.5.3 to 1.5.4. (#2073) - Transitive: The
PIC
version has been updated from 1.1.0 to 1.2.0.
Developer Enhancements
- Revised the Git clone command in the README to avoid cloning extra branches.
- Reduced disk space from about 700 MB to about 30 MB when cloning the SDK repository. (#2083)
- Added a new action that runs
kvsWebrtcClientMaster
andkvsWebrtcClientViewer
withvalgrind
. (#2071)
Note
The development branch containing commits between this release (v1.12.0) and v1.11.0 has been archived into the release-v1.12.0 branch.
Release 1.11.0 of the Amazon Kinesis Video WebRTC C SDK
Summary
Important
With this release, the previously reported issue (#2038) concerning TURN connections has not been observed.
Time to First Frame (TTFF) Improvements
- This release has been tested for TTFF across a diverse range of platforms, including System-on-Chips (SoCs), operating systems, and network topologies (STUN/TURN). Our SDK sample applications, including camera, web browsers, and mobile viewers, were used for these tests. We observed an average improvement of 15-30% in TTFF without impacting other performance indicators, such as connection success rate.
Note
The performance metrics provided are based on testing in controlled environments. It is important to note that the actual performance, specifically the time between sending the offer and rendering the first frame, may vary based on factors such as bandwidth availability, latency, packet loss, and the crypto libraries used (MbedTLS or OpenSSL).
Added Support for H.265 Codec
- More details on running the SDK with H.265 can be found in the README.
What's New
SDK Changes
- TTFF enhancements:
- H.265 media transmission support. (#1965)
- Added new error codes. (#1824, #1829, #1854, #1896)
- Added new state machines: DTLS (for OpenSSL path) (#1824) and TURN (#1825)
- Added profiling and modified timeouts on ICE/TURN states to increase the connection success rate in constrained network conditions. (#1824, #1896)
- Windows:
- Added filtering on non-operation network interfaces. (#1937)
Samples
- Added option to use H.265 codec for video. (#1965)
- Added new sample (
kvsWebrtcClientViewerGstSample
) that writes media received from the master to the disk. (#1963) - Master samples:
- Send data channel message for the TTFF JS viewer timeline visualization, See Readme for details. (#1846)
- kvsWebRTCClientMasterGstSample:
- Added simple implementation of adaptive bitrate based on the detected packet loss percentage. (#1957)
Bug Fixes/Improvements
- Fixed trickle ICE to be session- and media-level instead of only a media-level attribute. (#1813)
- Windows:
- Fixed signaling cache file creation. (#1935)
- Master samples:
- Fixed sending frames too early before SRTP is ready. (#1833)
Build Changes
- Fixed static build issues for libkvsCommonLws and kvsWebRtcThreadpool libraries. (commit)
- Added support for the Release/Debug build option for both MbedTLS and usrsctp dependencies. (#1897)
- Fixed linking to the kvsWebRtcThreadpool library when the kvsWebRtcThreadpool option is enabled during the build process. (commit)
- Added CMake option (
-DIOT_CORE_ENABLE_CREDENTIALS
) to build the samples using IoT credentials mode, with Readme instructions on how to use IoT Credentials in the KVS WebRTC SDK. (#2056) - Added CMake option (
-DKVS_CA_CERT_PATH
) to specify the path to the CA certificate. (commit1, commit2)
Dependency Updates
- The libwebsockets version has been updated from 4.2.2 to 4.3.3. (#1820)
- Build changes have been added for libwebsockets on MIPS32 with old compilers (needed for GCC 5.4 cross-toolchain with uclibc). (commit)
- The libkvsCommonLws version has been updated from 1.5.1 to 1.5.3. (#2018)
- To resolve issue #1804.
- The MbedTLS version has been updated from 2.25.0 to 2.28.8. (commit)
- Build changes have been added for compiler errors with MbedTLS on Mac computers with Apple silicon chips. (commit)
Known Issues
- Compiler warnings during build regarding pointer casting across different platforms.
Release 1.10.2 of the Amazon Kinesis Video WebRTC C SDK
WARNING: This release is known to be affected by an issue with TURN connections as reported in Issue #2038
What’s new:
- Added support for H.265 codec. More details on running the SDK with H.265 can be found in the README (#1965)
Sample improvements:
- Added a sample TWCC callback implementation that demonstrates packet loss based bitrate change in the sample WebRTC GStreamer master pipeline. More details on TWCC can be found in the README (#1957)
- Introduced WebRTC GStreamer viewer sample that writes media received from the master to the disk (#1963)
Tested H.265 codec support by running C SDK as master with the following viewers:
- WebRTC GStreamer viewer sample with H.265 codec as specified in the README
- KVS JS SDK sample on Safari browser version 17.4.1 with WebRTC H.265 codec enabled
- Amazon Kinesis Video Streams WebRTC for Android SDK Version 1.1.0, using owt-deps-webrtc libwebrtc library which supports H265 codec
Additional Notes:
- H265 support is limited in browsers and on Android/iOS devices. If these environments are used for testing, please first ensure that H265 support is enabled and available for them.
Release 1.10.1 of the Amazon Kinesis Video WebRTC C SDK
WARNING: This release is known to be affected by an issue with TURN connections as reported in Issue #2038
Bug fixes / Improvements:
- Fixed a bug that could sometimes cause relay candidates to be not added to the list of local candidates if getIceServerConfig call takes time to resolve, causing connection establishment failure if TURN is the only viable path.
Release 1.10.0 of the Amazon Kinesis Video WebRTC C SDK
WARNING: This release is known to be affected by an issue with TURN connections as reported in Issue #2038
What’s new:
addConfigToServerList
API required to gather TURN candidates. Check samples for usage. The usage pattern showcases withENABLE_KVS_THREADPOOL
enabled and disabled- Improved time-to-first-frame latency with new CMAKE flag ENABLE_KVS_THREADPOOL. This flag is Enabled by default. KVS_USE_SIGNALING_CHANNEL_THREADPOOL has been deprecated now. (#1806)
- Added feature to send master time-to-first-frame for JS viewer timeline visualization; enable with enableSendingMetricsToViewerViaDc (#1846)
- Optimized time taken to gather TURN servers using GetIceServerConfig by supporting an async call pattern. In case of srflx based peer connection, this is a latency improvement since the SDK does not unnecessarily wait on getting TURN server URLs during signaling setup. ENABLE_KVS_THREADPOOL required (#1854). Sample change required to gather relay candidates
- Changed default build type from Debug to Release; use -CMAKE_BUILD_TYPE=Debug for debug mode. (#1897)
Sample bug fixes:
- Sending key frames before other frames in Samples. Frames are now sent only after SRTP is READY (#1833)
- Added checks for empty/null session token (#1874)
Bug fixes / Improvements:
- Fixed trickle ICE to be a session level and media level attribute instead of it being only a media level attribute (#1813)
- Optimized time taken for STUN DNS resolution to have STUN server address ready for srflx candidate gathering - ENABLE_KVS_THREADPOOL required (#1812)
- Improved DTLS handshake time by moving to a state transition based approach to be more responsive to the incoming DTLS handshake messages - ENABLE_KVS_THREADPOOL required (#1824)
- Optimized ICE and TURN state machine state transitions. They allow early state transitions if possible, instead of waiting for next timer iteration (#1825)
- Fixed stringop-overflow build issue with MBedTLS on GCC11 (#1823)
- Increasing timeout values on TURN allocation, create permission, and bind channel steps. This change is expected to improve connection establishment success rates in slower networks (#1896)
- Fixed signaling cache file creation failure issue on Windows (#1935)
- Added filtering-out of non-operation network interfaces in Windows (#1937)
Version bumps:
- Updated LWS version from 4.2.2 to 4.3.3 (#1820)
- Updated producer C version from 1.5.1 to 1.5.2 (v1.5.2)
Known issues:
- MBedTLS build fails on Mac M1 with current version
Release 1.9.1 of the Amazon Kinesis Video WebRTC C SDK
Bug fixes
- Fixes build error in release v1.9.0 when IOT_CORE_CREDENTIALS is enabled for samples. (Issue #1879)
Release 1.9.0 of the Amazon Kinesis Video WebRTC C SDK
What’s new:
- New support for WebRTC Ingestion [https://docs.aws.amazon.com/kinesisvideostreams-webrtc-dg/latest/devguide/webrtc-ingestion.html]
Sample:
- The Master samples have been updated to support WebRTC Ingestion
Bug fixes / Improvements:
- Fixed a bug in signaling cache
- Fix build on MacOS to no longer require setting of CPATH/LDFLAGS env vars when building with Clang
- Bug fixes around properly isolating use of usrsctp library only when data channel is enabled
Release 1.8.1 of the Amazon Kinesis Video WebRTC C SDK
Bug fixes:
- Fixed timestamp precision in log lines to appropriately represent 3-digit places in millisecond portion
Release 1.8.0 of the Amazon Kinesis Video WebRTC C SDK
What’s new:
- New latency measurement metrics available to read the time taken by different steps in the WebRTC peer set up process - PeerConnectionMetrics and KvsIceAgentMetrics
- Provision to use threadpool for thread management in signaling client to handle signaling messages. Control the size of the threadpool using SignalingClientInfo structure and enable usage by defining KVS_USE_SIGNALING_CHANNEL_THREADPOOL . Instructions are added to the README.md
- Provision to profile code section using PROFILE_* macros
- Added support for China (Beijing) region
Sample:
- Fixed potential memory leak in sample tear down
- Recreate signaling client if signaling client creation fails
- Changed GOP size of sample video from 10s to 2s
- Added RTSP source to gstreamer sample app
- Multiple bug fixes in samples
Bug fixes / Improvements:
- Fixed SDK build issues with libwebsockets on Windows
- Fixed poll() call failure on Windows
- Overwrite final entry in signaling cache if cache file reaches maximum entries
- Answer’s m line is generated based on the offer’s m line in SDP to avoid m line mismatch error when running with web browsers as the peer
- Build SCTP library only when ENABLE_DATA_CHANNEL flag is set
- Added jitter buffer overflow check to prevent frames from getting dropped due to timestamp integer overflow
- Fixed user agent string to be SDK and version specific
- Fixed crash from race condition in ConnectionListener teardown
- Improved latency in resolving TURN server URLs by directly parsing the IP from the getIceServerConfig response
- Logging improvements
Version bumps:
- OpenSSL updated from 1.1.1g to 1.1.1t
Release 1.7.3 of the Amazon Kinesis Video WebRTC C SDK
Release tagged at: ced19d0
Bug Fixes:
- Fixed an issue in sample applications where LWS context would not be usable after loss of connectivity
Other
- Added more logging for ICE and TURN both for error handling and debug cases.
- Clang format v14.0 applied
Sample Code Changes
- This release has changes in Common.c that apply to all samples. Particularly of note are the changes in sessionCleanupWait(). Please be sure to incorporate these changes into your applications.