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

Forward error codes through pipeline #183

Open gavv opened 5 years ago

gavv commented 5 years ago

This task tracks support for reporting errors (status codes) from pipeline operations (construction, read and write).

Errors should be forwarded through the whole pipeline up to the user, and exposed via C API.

Depends on #303 and #614.

gavv commented 1 year ago

Status codes

Port to statuses

init_status

Replace is_valid() with init_status(), and report initialization error codes.

readers & writers (#303, #614)

Update packet and frame readers and writers to return status, and report read/write error codes. Use StatusEnd instead of is_alive() to terminate sessions.

refresh

Return and forward status from refresh().

sessions

routing

Return and handle StatusNoRoute.

parsers & composers (#737, #766)

Update IParser & IComposer implementations to return statuses instead of booleans.

encoders & decoders (#739, #738, #767)

Update encoder and decoder implementations to return statuses instead of booleans.

fec reader & writer

Fix error reporting in fec::BlockReader and fec::BlockWriter.

control operations

Return statuses when creating slots, endpoints, etc. Forwards statuses through pipeline tasks.

network operations

Migrate TCP classes to roc_status codes. SocketError enum should be hidden implementation detail.

device operations

Return status codes for operations.

API