You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: Port libobs/obs-video-stats-queries.c.h to obs-core #5364
Port the extracted libobs/obs-video-stats-queries.c.h (obs_get_video_frame_time, obs_get_active_fps, obs_get_average_frame_time_ns, obs_get_total_frames, obs_get_lagged_frames) to rust/obs-core, keeping the public C API/ABI unchanged.
Phase and position
Phase 6 libobs core. Follow-up of the C-only prerequisite #5171, which landed in #5191 (the file and test/cmocka/test_video_stats_queries.c are on master).
Contract to preserve (pinned by test_video_stats_queries.c)
Each query is one call of its matching obs_video_stats_* helper on &obs->video.stats (one lock/read/unlock, the synchronization of #175), returning its value unchanged: u64 frame time and average frame time, double FPS (bit pattern kept), u32 total and lagged frames. No combined snapshot, no no-core defaults (a live core is required).
Test plan
RED: safe Tier 1 tests mirroring every C assertion in the existing obs-tests-core binary against a todo!() stub.
GREEN: safe core plus thin ABI shim; the C-owned stats struct and its mutex stay in C behind a real adapter (no copied layout, no aborting stubs); test_video_stats_race.c stays unchanged.
Tier 2: the unchanged C test against hybrid libobs and libobs-c-reference, identical exported symbols.
Tier 3: differential against the original extracted C, with a mutation shown failing.
Move the C unit to its own reference-only ported group. No public header, C test or websocket changes. Tier 4 does not apply.
Claiming: Rust swap of the five video-statistics queries on branch port/5363-5364-core-queries, batched with #5363 (same crate, one PR).
RED: safe Tier 1 tests mirroring test_video_stats_queries in obs-tests-core against a stub.
GREEN: safe core, thin ABI shim, the stats struct and mutex kept in C behind a real adapter, Tier 3 parity against the extracted C, C unit moved to a reference-only group, unchanged Tier 2 on hybrid and C reference.
Done in #5365 (merged 2026-11-20): the video statistics queries (obs_get_video_frame_time, obs_get_active_fps, obs_get_average_frame_time_ns, obs_get_total_frames, obs_get_lagged_frames) now run through safe Rust in obs-core, C unit moved to its reference-only ported group.
Activity
rdoupe commentedon Nov 20, 2026
/ready
Its only prerequisite, #5171, landed in #5191 (
libobs/obs-video-stats-queries.c.his on master).rdoupe commentedon Nov 20, 2026
Claiming: Rust swap of the five video-statistics queries on branch port/5363-5364-core-queries, batched with #5363 (same crate, one PR).
rdoupe commentedon Nov 20, 2026
Done in #5365 (merged 2026-11-20): the video statistics queries (obs_get_video_frame_time, obs_get_active_fps, obs_get_average_frame_time_ns, obs_get_total_frames, obs_get_lagged_frames) now run through safe Rust in obs-core, C unit moved to its reference-only ported group.
obs-core: swap audio-info and video-statistics queries to safe Rust (…