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

Mark datachannel specific code explicitly

Open widgetii opened this issue 3 years ago • 4 comments

The library has ENABLE_DATA_CHANNEL CMake option which seems doesn't work as planned (I thought it meant to disable datachannel specific code that uses a rather large usrsctp library). It turns out that setting the option to ON is not sufficient because compiled code still has external links to routines in usrsctp library and doesn't compile without it.

In our project, we use the library on devices with constrained RAM and ROM (IP cameras) and we don't use datachannel functions at all. Disabling unnecessary functions saves about 320Kb of the resulting binary compiled statically. I hope this will be useful for others struggling with space on embedded devices.

widgetii avatar Dec 31 '21 16:12 widgetii

Codecov Report

Patch coverage: 10.20% and project coverage change: -0.03 :warning:

Comparison is base (8f7ba52) 52.15% compared to head (6706af1) 52.12%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1362      +/-   ##
===========================================
- Coverage    52.15%   52.12%   -0.03%     
===========================================
  Files           46       46              
  Lines        12796    12832      +36     
===========================================
+ Hits          6674     6689      +15     
- Misses        6122     6143      +21     
Impacted Files Coverage Δ
samples/Common.c 0.00% <0.00%> (ø)
src/source/Ice/TurnConnection.c 0.00% <0.00%> (ø)
src/source/PeerConnection/PeerConnection.c 81.25% <ø> (ø)
src/source/Signaling/LwsApiCalls.c 1.53% <ø> (ø)
src/source/Ice/IceAgent.c 85.94% <17.39%> (+0.12%) :arrow_up:
src/source/Ice/IceAgentStateMachine.c 70.93% <100.00%> (+0.09%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Dec 31 '21 17:12 codecov-commenter

@widgetii I did this before. Maybe you want to take a look at this PR, https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/pull/846.

ycyang1229 avatar Jan 03 '22 06:01 ycyang1229

Thank you for sharing, I missed it. It turns out this feature needs more than one person I guess. Anyway, the current codebase is broken because ENABLE_DATA_CHANNEL option does nothing actually.

widgetii avatar Jan 03 '22 07:01 widgetii

This is a very old issue. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.

github-actions[bot] avatar Jul 13 '22 00:07 github-actions[bot]

This change has been merged through another PR where I applied your commits. This PR has a lot of unintended commits which is why I could not merge this one. Thanks for your contribution

niyatim23 avatar Mar 17 '23 18:03 niyatim23