-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Forward error codes through pipeline #183
Comments
Status codes
Port to statusesinit_statusReplace 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.
refreshReturn and forward status from refresh().
sessions
routingReturn 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 & writerFix error reporting in fec::BlockReader and fec::BlockWriter.
control operationsReturn statuses when creating slots, endpoints, etc. Forwards statuses through pipeline tasks.
network operationsMigrate TCP classes to roc_status codes. SocketError enum should be hidden implementation detail.
device operationsReturn status codes for operations.
API
|
This commit implements small part of roc-streaminggh-183, needed for status codes in frame readers & writers (roc-streaminggh-614), which in turn is needed for partial reads & PLC. Changes: - add codes from task - rename StatusNoData => StatusDrain - remove StatusLimit (instead use StatusNoMem) - remove StatusConflict (instead use StatusNoRoute) - remove StatusUnknown Sponsored-by: waspd
This commit implements small part of roc-streaminggh-183, needed for status codes in frame readers & writers (roc-streaminggh-614), which in turn is needed for partial reads & PLC. Changes: - add codes from task - rename StatusNoData => StatusDrain - remove StatusLimit (instead use StatusNoMem) - remove StatusConflict (instead use StatusNoRoute) - remove StatusUnknown Sponsored-by: waspd
This commit implements small part of roc-streaminggh-183, needed for status codes in frame readers & writers (roc-streaminggh-614), which in turn is needed for partial reads & PLC. Changes: - add codes from task - rename StatusNoData => StatusDrain - remove StatusLimit (instead use StatusNoMem) - remove StatusConflict (instead use StatusNoRoute) - remove StatusUnknown Sponsored-by: waspd
Replace is_valid() with init_status() and forward initialization errors through pipeline.
This commit implements small part of roc-streaminggh-183, needed for status codes in frame readers & writers (roc-streaminggh-614), which in turn is needed for partial reads & PLC. Changes: - add codes from task - rename StatusNoData => StatusDrain - remove StatusLimit (instead use StatusNoMem) - remove StatusConflict (instead use StatusNoRoute) - remove StatusUnknown Sponsored-by: waspd
Replace is_valid() with init_status() and forward initialization errors through pipeline. Sponsored-by: waspd
This commit implements small part of roc-streaminggh-183, needed for status codes in frame readers & writers (roc-streaminggh-614), which in turn is needed for partial reads & PLC. Changes: - add codes from task - rename StatusNoData => StatusDrain - remove StatusLimit (instead use StatusNoMem) - remove StatusConflict (instead use StatusNoRoute) - remove StatusUnknown Sponsored-by: waspd
Replace is_valid() with init_status() and forward initialization errors through pipeline. Sponsored-by: waspd
This commit implements a part of roc-streaminggh-183 (pipeline error forwarding), needed for roc-streaminggh-614 (status codes for frame writers/readers). It updates the list of status codes to be up-to-date with the task. Most of the codes are not yet actually used. Changes: - add missing codes from task - rename StatusNoData => StatusDrain - remove StatusLimit (instead use StatusNoMem) - remove StatusConflict (instead use StatusNoRoute) - remove StatusUnknown Sponsored-by: waspd
This commit implements a part of roc-streaminggh-183 (pipeline error forwarding), needed for roc-streaminggh-614 (status codes for frame writers/readers). It replaces is_valid() in pipeline elements with init_status(), and forwards initialization errors through pipeline. Without it, when a function should forward a status, and both initialization and read/write errors can happen, it wouldn't be clear what status to return in case of initialization error. Sponsored-by: waspd
Handle statuses that can be now returned when routing packet. Sponsored-by: waspd
Since IFrameReader::read() now can return status, and this status can be status::StatusAbort, we need to be able to remember it and return from refresh(). This commit updates refresh() calls to return statuses. Sponsored-by: waspd
…e packet status This commit does not change behavior, but restructures code of Depacketizer so that we can update it to handle status codes from packet reader and return errors or partial reads. Sponsored-by: waspd
If underlying packet reader returns error (not StatusOK and not StatusDrain), Depacketizer forwards this error. Sponsored-by: waspd
This commit implements a part of roc-streaminggh-183 (pipeline error forwarding), needed for roc-streaminggh-614 (status codes for frame writers/readers). It updates the list of status codes to be up-to-date with the task. Most of the codes are not yet actually used. Changes: - add missing codes from task - rename StatusNoData => StatusDrain - remove StatusLimit (instead use StatusNoMem) - remove StatusConflict (instead use StatusNoRoute) - remove StatusUnknown Sponsored-by: waspd
This commit implements a part of roc-streaminggh-183 (pipeline error forwarding), needed for roc-streaminggh-614 (status codes for frame writers/readers). It replaces is_valid() in pipeline elements with init_status(), and forwards initialization errors through pipeline. Without it, when a function should forward a status, and both initialization and read/write errors can happen, it wouldn't be clear what status to return in case of initialization error. Sponsored-by: waspd
Handle statuses that can be now returned when routing packet. Sponsored-by: waspd
Since IFrameReader::read() now can return status, and this status can be status::StatusAbort, we need to be able to remember it and return from refresh(). This commit updates refresh() calls to return statuses. Sponsored-by: waspd
…handle packet status This commit does not change behavior, but restructures code of Depacketizer so that we can update it to handle status codes from packet reader and return errors or partial reads. Sponsored-by: waspd
If underlying packet reader returns error (not StatusOK and not StatusDrain), Depacketizer forwards this error. Sponsored-by: waspd
This commit implements a part of roc-streaminggh-183 (pipeline error forwarding), needed for roc-streaminggh-614 (status codes for frame writers/readers). It updates the list of status codes to be up-to-date with the task. Most of the codes are not yet actually used. Changes: - add missing codes from task - rename StatusNoData => StatusDrain - remove StatusLimit (instead use StatusNoMem) - remove StatusConflict (instead use StatusNoRoute) - remove StatusUnknown Sponsored-by: waspd
This commit implements a part of roc-streaminggh-183 (pipeline error forwarding), needed for roc-streaminggh-614 (status codes for frame writers/readers). It replaces is_valid() in pipeline elements with init_status(), and forwards initialization errors through pipeline. Without it, when a function should forward a status, and both initialization and read/write errors can happen, it wouldn't be clear what status to return in case of initialization error. Sponsored-by: waspd
Handle statuses that can be now returned when routing packet. Sponsored-by: waspd
Since IFrameReader::read() now can return status, and this status can be status::StatusAbort, we need to be able to remember it and return from refresh(). This commit updates refresh() calls to return statuses. Sponsored-by: waspd
… handle packet status This commit does not change behavior, but restructures code of Depacketizer so that we can update it to handle status codes from packet reader and return errors or partial reads. Sponsored-by: waspd
If underlying packet reader returns error (not StatusOK and not StatusDrain), Depacketizer forwards this error. Sponsored-by: waspd
is_alive() mechanism is replaces with status codes and is no longer used.
- forward internal failures via status codes (some were ignored, some were using panics) - remove outdated is_alive() mechanism and rely on status codes instead - expect that after reporting failure, read() and write() is never called again
roc_status: - remove StatusConflict (use StatusBadArg) - rename StatusEnd to StatusFinish - allow StatusFinish for both read and write - add StatusBadState roc_audio: - both mixer and fanout now handle StatusFinish roc_sndio: - new state DeviceState_Broken roc_pipeline: - sessions: when session is broken, all operations become no-op, refresh() reports error - sink/source: when sink/source is broken, all operations return StatusBadState - state tracker: set_broken, is_broken
is_alive() mechanism is replaces with status codes and is no longer used.
- forward internal failures via status codes (some were ignored, some were using panics) - remove outdated is_alive() mechanism and rely on status codes instead - expect that after reporting failure, read() and write() is never called again
roc_status: - remove StatusConflict (use StatusBadArg) - rename StatusEnd to StatusFinish - allow StatusFinish for both read and write - add StatusBadState roc_audio: - both mixer and fanout now handle StatusFinish roc_sndio: - new state DeviceState_Broken roc_pipeline: - sessions: when session is broken, all operations become no-op, refresh() reports error - sink/source: when sink/source is broken, all operations return StatusBadState - state tracker: set_broken, is_broken
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.
The text was updated successfully, but these errors were encountered: