amazon-kinesis-video-streams-pic
amazon-kinesis-video-streams-pic copied to clipboard
Handle stop stream in streaming state
Issue #, if available:
Description of changes:
When getStreamData
is invoked, we have checks in place to see if the stop streaming was requested from the application. If so, we set status EOS and signal the stop()
call to terminate streaming. However, these checks are limited to the UPLOAD HANDLE state being in READY state or TERMINATED state. In case of an error, if the application requests that streaming be stopped and no frames are actively being put into the buffer, and we get into the STREAMING state transition, the stop() call times out because as per the SDK, we are in active streaming state. This PR fixes the issue by including handling for the streaming state. If the stop stream is requested and there are no more frames in the buffer, we allow stop() to terminate gracefully.
Testing:
- Tested with the application by enforcing streaming error conditions. (https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/tree/callback-sample)
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
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
792e0db
) 80.42% compared to head (3e0f3d3
) 80.42%.
:exclamation: Current head 3e0f3d3 differs from pull request most recent head 5c89a59. Consider uploading reports for the commit 5c89a59 to get more accurate results
Files | Patch % | Lines |
---|---|---|
src/client/src/Stream.c | 85.71% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #222 +/- ##
========================================
Coverage 80.42% 80.42%
========================================
Files 52 52
Lines 10762 10770 +8
========================================
+ Hits 8655 8662 +7
- Misses 2107 2108 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.