Files
vatrog-vm-signaling/src/si/vgpu-stream/win32/present.h
T

25 lines
1.1 KiB
C
Raw Normal View History

#ifndef VGPU_PRESENT_H
#define VGPU_PRESENT_H
/* present.h — win32 present/pump lifecycle: staging arena, submit handoff, and
* the publish loop driving the OS-agnostic engine over ctx's region-view. */
#include <stdint.h>
#include "ctx.h" /* win32 vgpu_ctx + vgpu_region_t */
/* Initialize present/staging state inside ctx over an already-created region.
* Allocates the staging+cursor arena. Returns 0 on success. */
int vgpu_present_init(vgpu_ctx* ctx, vgpu_region_t* region, uint32_t default_fps);
void vgpu_present_deinit(vgpu_ctx* ctx);
/* Capture backends submit a freshly captured desktop frame (any source pitch).
* Repacked tight into ctx->content_buf, clamped to max mode. Thread-safe. */
void vgpu_present_submit(vgpu_ctx* ctx, const uint8_t* bgra,
uint32_t width, uint32_t height, uint32_t src_pitch);
/* Run the publish pump: reconcile control, tick heartbeat, compose cursor,
* publish on change / on full_frame_req. Never returns (process lifetime). */
void vgpu_present_run(vgpu_ctx* ctx);
#endif /* VGPU_PRESENT_H */