error-handling
Error Handling
Overview
In Python, ovstream raises ovstream.OvstreamError with descriptive messages on failure. The exception carries the C-side status code on .status (an ovstream.ApiStatus enum) so callers can pattern-match on expected failures.
In C, every API call returns ovstream_result_t. Inspect the .status field for OVSTREAM_API_SUCCESS (or use the OVSTREAM_OK(r) convenience macro), and on failure call ovstream_get_last_error() (thread-local) for the human-readable detail string. Status codes: OVSTREAM_API_SUCCESS, _ERROR, _TIMEOUT, _INVALID_ARGUMENT, _INVALID_STATE, _NOT_SUPPORTED.
A separate logging mechanism — the log_callback callback registered at initialize time — captures non-fatal warnings, info, and verbose chatter from the SDK and its dependencies (StreamSDK, GStreamer).