roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.09k stars 213 forks source link

Return status code from openfec codec #767

Open gavv opened 3 months ago

gavv commented 3 months ago

Summary

fec::IBlockEncoder and fec::IBlockDecoder are interfaces for codec-specific encoding and decoding of FEC packets used for packet loss recovery. See documentation.

They both have begin_block() method which can report error by returning status::StatusCode.

We need to update their other methods so that they return status code as well (currently they are void): end_block(), set_buffer(), fill_buffers(), repair_buffer().

Implementation

spran180 commented 3 months ago

Hey @gavv, I am interested in solving this issue.

gavv commented 3 months ago

@spran180 You're welcome, thanks!

spran180 commented 3 months ago

Hey @gavv, do we need to update all functions that are void and uses roc_panic to status::code in OpenfecEncoder and OpenfecDecoder, such as update_() or decode_(), or do we just need to update the specified function?

gavv commented 3 months ago

Hey @gavv, do we need to update all functions that are void and uses roc_panic to status::code in OpenfecEncoder and OpenfecDecoder, such as update_() or decode_(), or do we just need to update the specified function?

The first. Ideally, we need to handle and forward errors from every of_xxx() function.