amazon-kinesis-video-streams-webrtc-sdk-c
amazon-kinesis-video-streams-webrtc-sdk-c copied to clipboard
Default stack size change and Rolling buffer config rework
Issue #, if available:
What was changed?
- Setting default stack size parameter to 0 (this means threads created with THREAD_CREATE will use platform specific thread stack size)
- Reworked the rolling buffer config setting to move from setting fields in the
RtcRtpTransceiverInitstruct (which causes garbage values for config if the application does not memset the struct, leading to a crash) to surfacing an API to set up the values. The parameters are now internal to the SDK and can only be set up via this API call. - Cleaned up readme to have memory optimization related section
Why was it changed?
- To ensure that devices do not run into stack overflow issues due to default 64KB constraint
- To ensure the SDK is protected from garbage values
How was it changed?
- Set KVS_STACK_SIZE to 0 in cmake if no value is provided explicitly.
createRollingBufferConfigAPI
What testing was done for the changes?
- Added unit tests to test the new code
- Added logging of the parameters to confirm the values are what they are supposed to be
- Unit test run.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.66%. Comparing base (
3824226) to head (2440dc0).
:exclamation: Current head 2440dc0 differs from pull request most recent head bd1420c
Please upload reports for the commit bd1420c to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## develop #2011 +/- ##
===========================================
- Coverage 88.68% 88.66% -0.02%
===========================================
Files 48 48
Lines 12726 12741 +15
===========================================
+ Hits 11286 11297 +11
- Misses 1440 1444 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Superseded by the linked PRs.