Embed framebuffer header before frame data in streaming protocol to
enable protocol channels to read header+data from contiguous memory
with zero-copy operations. Header contains width, height, pixformat
and compressed size.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Removes separate jpegbuffer_t and consolidates streaming/preview
functionality into the main framebuffer_t structure.
Main changes:
- Remove jpegbuffer_t structure and global jpegbuffer variable
- Add streaming fields (enabled, quality, lock, raw_w, raw_h) to framebuffer_t
- Replace framebuffer_update_jpeg_buffer() with framebuffer_update_preview()
API improvements:
- Rename framebuffer_init_image() -> framebuffer_to_image()
- Rename framebuffer_init_from_image() -> framebuffer_from_image()
- Add framebuffer_set_enabled() and framebuffer_set_preview() utilities
- Remove accessor macros, use direct field access (kept framebuffer_get_buffer_size)
- Update framebuffer_init() to accept enabled parameter
- Add configurable raw preview dimensions per framebuffer
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
framebuffer_update_jpeg_buffer was previously bugged as it always
updated the jpeg buffer from the frame buffer versus the image
object it was attached to. e.g. img.flush() always flushed the
frame buffer and not the image object it was called on.