|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Bridge encoded camera frames to ra8_io_stream sinks. More...
Go to the source code of this file.
Functions | |
| ra8_err_t | ra8_camera_codec_encode_to_stream (ra8_camera_codec_t *codec, const ra8_camera_frame_t *input, const ra8_camera_buffer_t *output_buffer, ra8_io_stream_t *stream, uint32_t *out_written) |
| Encode one frame and write the complete result to a byte stream. | |
Bridge encoded camera frames to ra8_io_stream sinks.
Keeps the base ra8_camera facade independent of output transports. Consumers opt into this ra8_camera_io bridge plus ra8_camera and ra8_io, then encode and write one complete frame with a single bounded operation.
Definition in file ra8_camera_stream.h.
|
nodiscard |
Encode one frame and write the complete result to a byte stream.
Calls ra8_camera_codec_encode, then one ra8_io_stream_write. It deliberately does not flush: callers may append a protocol trailer or batch several frames before committing a buffered sink.
| [in,out] | codec | Bound camera codec. |
| [in] | input | Valid source frame. |
| [in] | output_buffer | Caller-owned codec output storage. |
| [in,out] | stream | Bound output stream. |
| [out] | out_written | Bytes accepted by the stream, or NULL. |
| k_ra8_ok | Whole encoded frame written. |
| k_ra8_err_null_ptr | A required argument was NULL. |
| k_ra8_err_invalid_size | A nominally successful sink accepted only a prefix of the encoded frame. |
| other | Propagated from the codec or stream. |
Definition at line 26 of file ra8_camera_stream.c.
References ra8_camera_frame_t::bytes, ra8_camera_frame_t::data, k_ra8_err_invalid_size, k_ra8_err_null_ptr, k_ra8_ok, ra8_camera_codec_encode(), and ra8_io_stream_write().