Signature
stream_status_t dynamic_buffer_stream_create_stream(stream_t **out, const dynamic_buffer_stream_cfg_t *cfg, const dynamic_buffer_stream_env_t *env)
Create a dynamic_buffer_stream instance directly.
stream_status_t
Public status codes used by the stream port.
Configuration type for the dynamic_buffer_stream adapter.
Injected dependencies for the dynamic_buffer_stream adapter.
Private handle structure for a stream_t.
Purpose
Create a dynamic_buffer_stream instance directly.
Preconditions
Invalid arguments
out must not be NULL.
cfg must not be NULL.
env must not be NULL.
Success
- Returns
STREAM_STATUS_OK.
- Stores a valid newly created stream handle in
*out.
Failure
- Returns
STREAM_STATUS_INVALID for invalid arguments.
- Returns
STREAM_STATUS_OOM if memory allocation fails.
- Leaves
*out unchanged if out is not NULL.
Ownership
- On success, ownership of the newly created stream handle is transferred to the caller.
- The produced stream handle must later be destroyed via
stream_destroy().
- On failure, no stream ownership is transferred.