Stub for timestamp to fill in later

This commit is contained in:
Greg Shuflin
2025-12-24 00:04:50 -08:00
parent ff5eea30d4
commit 9900a844ff
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -230,5 +230,8 @@ opaque getCameraFormat : @& SDLCamera -> SDLIO CameraSpec
@[extern "sdl_acquire_camera_frame"]
opaque acquireCameraFrame : (camera : @& SDLCamera) → SDLIO SDLSurface
-- TODO: support returning the timestampNS too
/- @[extern "sdl_acquire_camera_frame"] -/
/- opaque acquireCameraFrame : (camera : @& SDLCamera) → SDLIO (SDLSurface × UInt64) -/
end SDL
+2 -2
View File
@@ -497,8 +497,8 @@ uint32_t sdl_CameraSpec_get_framerate_denominator(lean_object* camera_spec_obj)
lean_obj_res sdl_acquire_camera_frame(lean_obj_arg camera_obj) {
SDL_Camera* camera = (SDL_Camera*)lean_get_external_data(camera_obj);
SDL_Surface* frame = SDL_AcquireCameraFrame(camera, NULL);
uint64_t timestamp = 0;
SDL_Surface* frame = SDL_AcquireCameraFrame(camera, &timestamp);
if (!frame) {
return lean_io_result_mk_error(lean_mk_string(SDL_GetError()));
}