Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return status code from openfec codec #767

Open
gavv opened this issue Jul 27, 2024 · 4 comments
Open

Return status code from openfec codec #767

gavv opened this issue Jul 27, 2024 · 4 comments
Assignees
Labels
easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet refactoring

Comments

@gavv
Copy link
Member

gavv commented Jul 27, 2024

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

  • Update IBlockEncoder and IBlockDecoder interfaces and two implementations:
    • fec::OpenfecEncoder
    • fec::OpenfecDecoder
  • In OpenfecEncoder and OpenfecDecoder, find invocations of of_xxx() functions, check for errors, and return status code in case of error (currently errors are either unhandled or cause panic)
  • Update fec::BlockWriter and fec::BlockReader, which use IBlockEncoder and IBlockDecoder interfaces. When encoder or decoder return error code, writer and reader should forward it to upper level.
@gavv gavv added refactoring help wanted An important and awaited task but we have no human resources for it yet easy hacks The solution is expected to be straightforward even if you are new to the project labels Jul 27, 2024
@gavv gavv added this to Roc Toolkit Jul 27, 2024
@github-project-automation github-project-automation bot moved this to Frontlog in Roc Toolkit Jul 27, 2024
@gavv gavv moved this from Frontlog to Help wanted in Roc Toolkit Jul 27, 2024
@spran180
Copy link

spran180 commented Aug 7, 2024

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

@gavv
Copy link
Member Author

gavv commented Aug 7, 2024

@spran180 You're welcome, thanks!

@spran180
Copy link

spran180 commented Aug 11, 2024

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
Copy link
Member Author

gavv commented Aug 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet refactoring
Projects
Status: Help wanted
Development

No branches or pull requests

2 participants