amazon-kinesis-video-streams-webrtc-sdk-c icon indicating copy to clipboard operation
amazon-kinesis-video-streams-webrtc-sdk-c copied to clipboard

Default stack size change and Rolling buffer config rework

Open disa6302 opened this issue 1 year ago • 1 comments
trafficstars

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 RtcRtpTransceiverInit struct (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.
  • createRollingBufferConfig API

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.

disa6302 avatar Jun 12 '24 23:06 disa6302

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.

codecov-commenter avatar Jun 13 '24 00:06 codecov-commenter

Superseded by the linked PRs.

sirknightj avatar Nov 25 '24 19:11 sirknightj