vgpu in-guest producer in-tree, release CI, flexible vmie discovery

- src/si/vgpu-stream: in-guest vgpu producer built as a Windows cross-compiled target (if(WIN32))
- .gitea: release workflow — cross-build the agent and build/publish the deb against system vmie
- cmake/makefile: resolve vmie from a source tree (LIBVMIE_PATH) or installed libvmie-dev
This commit is contained in:
2026-06-22 18:35:12 +03:00
parent 9bde398b6c
commit bd8b966017
31 changed files with 2393 additions and 8 deletions
+55
View File
@@ -0,0 +1,55 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "region.h" /* win32 pinned region */
#include "ctx.h" /* win32 vgpu_ctx (embeds region-view) */
#include "present.h" /* present/pump lifecycle */
#include "stream.h" /* OS-agnostic status/error/backend setters */
#include "capture.h" /* backend table */
int main(int argc, char** argv) {
int fps = argc > 1 ? atoi(argv[1]) : 30;
if (fps <= 0) fps = 30;
vgpu_region_t region;
if (vgpu_region_create(&region) != 0) {
fprintf(stderr, "main: region_create failed\n");
return 1;
}
vgpu_ctx ctx;
if (vgpu_present_init(&ctx, &region, (uint32_t)fps) != 0) {
fprintf(stderr, "main: present_init failed\n");
vgpu_region_destroy(&region);
return 1;
}
const char* eyes = getenv("EYES");
int n = 0;
const capture_backend* bks = capture_backends(&n);
int started = 0;
for (int i = 0; i < n && !started; i++) {
if (eyes && _stricmp(eyes, bks[i].name) != 0) continue;
fprintf(stderr, "eyes: trying %s\n", bks[i].name);
started = bks[i].start(&ctx, fps);
if (!started) fprintf(stderr, "eyes: %s unavailable\n", bks[i].name);
}
if (!started) {
fprintf(stderr, "eyes: no capture backend available\n");
vgpu_set_status(&ctx.view, VGPU_ST_ERROR);
vgpu_set_error(&ctx.view, 2u);
vgpu_present_deinit(&ctx);
vgpu_region_destroy(&region);
return 1;
}
vgpu_set_backend(&ctx.view, ctx.backend);
vgpu_present_run(&ctx); /* never returns */
vgpu_present_deinit(&ctx);
vgpu_region_destroy(&region);
return 0;
}