From b98263b15870ccd134c23e40625b076ce5d23563 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 18:21:01 -0800 Subject: [PATCH 1/9] test(obs-core): mirror video-info query against Rust stub (Refs #5179) --- rust/obs-core/src/lib.rs | 1 + rust/obs-core/src/video_info_query.rs | 9 +++ rust/obs-core/tests/obs_core/main.rs | 1 + .../tests/obs_core/video_info_query.rs | 70 +++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 rust/obs-core/src/video_info_query.rs create mode 100644 rust/obs-core/tests/obs_core/video_info_query.rs diff --git a/rust/obs-core/src/lib.rs b/rust/obs-core/src/lib.rs index 0e8debb79e..be355ae810 100644 --- a/rust/obs-core/src/lib.rs +++ b/rust/obs-core/src/lib.rs @@ -182,6 +182,7 @@ pub mod video_copy_plan; pub mod video_frame_copy; pub mod video_frame_timing; pub mod video_graphics_tasks; +pub mod video_info_query; pub mod video_output_step; pub mod video_pacing; pub mod video_plan; diff --git a/rust/obs-core/src/video_info_query.rs b/rust/obs-core/src/video_info_query.rs new file mode 100644 index 0000000000..39064c08b7 --- /dev/null +++ b/rust/obs-core/src/video_info_query.rs @@ -0,0 +1,9 @@ +//! Lazy selection for the core video-info query. +/// Return the stored snapshot only after the core and graphics gates pass. +pub fn video_info( + _core: Option, + _graphics: impl FnOnce(&C) -> bool, + _mix: impl FnOnce(C) -> Option, +) -> Option { + todo!("port obs_get_video_info") +} diff --git a/rust/obs-core/tests/obs_core/main.rs b/rust/obs-core/tests/obs_core/main.rs index 6702ed11d7..c48fe258ec 100644 --- a/rust/obs-core/tests/obs_core/main.rs +++ b/rust/obs-core/tests/obs_core/main.rs @@ -148,6 +148,7 @@ mod video_frame_copy_parity; mod video_frame_timing; mod video_frame_timing_parity; mod video_graphics_tasks; +mod video_info_query; mod video_graphics_tasks_parity; mod video_output_step; mod video_output_step_parity; diff --git a/rust/obs-core/tests/obs_core/video_info_query.rs b/rust/obs-core/tests/obs_core/video_info_query.rs new file mode 100644 index 0000000000..a6e23d7ce6 --- /dev/null +++ b/rust/obs-core/tests/obs_core/video_info_query.rs @@ -0,0 +1,70 @@ +//! Safe mirrors of test/cmocka/test_video_info_query.c. +use obs_core::video_info_query::video_info; + +#[test] +fn test_video_info_query_no_core() { + assert_eq!(video_info::<(), u8>(None, |_| panic!("no core"), |_| panic!("no core")), None); +} + +#[test] +fn test_video_info_query_no_graphics() { + for canvas in [None, Some(())] { + assert_eq!(video_info(Some(canvas), |_| false, |_| -> Option { panic!("no graphics") }), None); + } +} + +#[test] +fn test_video_info_query_no_mix() { + assert_eq!(video_info(Some(()), |_| true, |_| None::), None); +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +struct Info<'a> { + graphics_module: Option<&'a str>, + fps_num: u32, + fps_den: u32, + base_width: u32, + base_height: u32, + output_width: u32, + output_height: u32, + output_format: i32, + adapter: u32, + gpu_conversion: bool, + colorspace: i32, + range: i32, + scale_type: i32, +} + +#[test] +fn test_video_info_query_complete_copy() { + for alternate in [false, true] { + let stored = Info { + graphics_module: (!alternate).then_some("borrowed graphics module"), + fps_num: if alternate { 0 } else { u32::MAX }, + fps_den: if alternate { u32::MAX } else { 0 }, + base_width: u32::from(alternate), base_height: 7919, + output_width: u32::MAX, output_height: 101, + output_format: if alternate { 6 } else { 2 }, adapter: 0x12345678, + gpu_conversion: alternate, colorspace: if alternate { 2 } else { 3 }, + range: if alternate { 2 } else { 1 }, scale_type: if alternate { 1 } else { 4 }, + }; + let before = stored; + let output = video_info(Some(&stored), |_| true, Some).unwrap(); + assert_eq!(output, &before); + assert!(core::ptr::eq(output, &stored)); + assert_eq!(stored, before); + } +} + +#[test] +fn unavailable_preserves_every_output_byte() { + for byte in 0..=u8::MAX { + let mut output = [byte; 64]; + for (core, graphics, mixed) in [(false, true, true), (true, false, true), (true, true, false)] { + if let Some(info) = video_info(core.then_some(()), |_| graphics, |_| mixed.then_some([0; 64])) { + output = info; + } + assert_eq!(output, [byte; 64]); + } + } +} From bb33d794296af5a7fecbeeb770a89b5e199d4080 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 18:31:10 -0800 Subject: [PATCH 2/9] obs-core: swap core video-info query to safe Rust (Refs #5179) --- libobs/build/libobs.core+.h.c | 3 +- .../build/libobs.ported-video-info-query+.h.c | 4 + .../ported-source-sets/video-info-query.json | 5 + .../obs-core-video_info_query.txt | 1 + libobs/obs-core-state.c.h | 4 + libobs/obs-internal.h | 6 ++ libobs/obs-video-info-query-fields.c.h | 21 ++++ libobs/obs.c.h | 2 - rust/README.md | 1 + rust/obs-build/tests/native.rs | 2 + ...anonical_video_info_query_is_registered.rs | 46 +++++++++ .../cases/header/test_video_info_query.json | 40 ++++++++ .../oracle.d/video-info-query.list | 1 + rust/obs-c-oracle/oracle/platform.c | 12 ++- rust/obs-c-oracle/oracle/video_info_query.c | 89 +++++++++++++++++ rust/obs-core/src/ffi/mod.rs | 1 + rust/obs-core/src/ffi/video_info_query.rs | 43 ++++++++ rust/obs-core/src/video_info_query.rs | 8 +- rust/obs-core/tests/obs_core/main.rs | 3 +- .../tests/obs_core/video_info_query.rs | 41 ++++++-- .../tests/obs_core/video_info_query_parity.rs | 98 +++++++++++++++++++ test/cmocka/build/test-graph.json | 33 +++++++ test/cmocka/core-state-link-support.c | 2 + .../video_info_query_link_support.cmake | 25 +++++ test/cmocka/video-info-query-link-support.c | 2 + 25 files changed, 473 insertions(+), 20 deletions(-) create mode 100644 libobs/build/libobs.ported-video-info-query+.h.c create mode 100644 libobs/build/ported-source-sets/video-info-query.json create mode 100644 libobs/cmake/rust-exports.d/obs-core-video_info_query.txt create mode 100644 libobs/obs-core-state.c.h create mode 100644 libobs/obs-video-info-query-fields.c.h create mode 100644 rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs create mode 100644 rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json create mode 100644 rust/obs-c-oracle/oracle.d/video-info-query.list create mode 100644 rust/obs-c-oracle/oracle/video_info_query.c create mode 100644 rust/obs-core/src/ffi/video_info_query.rs create mode 100644 rust/obs-core/tests/obs_core/video_info_query_parity.rs create mode 100644 test/cmocka/core-state-link-support.c create mode 100644 test/cmocka/tests.d/video_info_query_link_support.cmake create mode 100644 test/cmocka/video-info-query-link-support.c diff --git a/libobs/build/libobs.core+.h.c b/libobs/build/libobs.core+.h.c index de9eb6df88..051d17d560 100644 --- a/libobs/build/libobs.core+.h.c +++ b/libobs/build/libobs.core+.h.c @@ -9,6 +9,7 @@ #include "libobs/obs-core-initialized-fields.c.h" #include "libobs/obs-core-monitoring-device-fields.c.h" #include "libobs/obs-core-output-protocol-registry-fields.c.h" +#include "libobs/obs-core-state.c.h" #include "libobs/obs-core-texture-activity-fields.c.h" #include "libobs/obs-core-tick-callbacks-fields.c.h" #include "libobs/obs-enum-scenes-fields.c.h" @@ -49,7 +50,7 @@ #include "libobs/obs-set-output-source-fields.c.h" #include "libobs/obs-shutdown-detach.c.h" #include "libobs/obs-ui-task-handler-fields.c.h" -#include "libobs/obs-video-info-query.c.h" +#include "libobs/obs-video-info-query-fields.c.h" #include "libobs/obs-video-level-queries.c.h" #include "libobs/obs-weak-object-expired-fields.c.h" #include "libobs/obs-weak-object-identity-fields.c.h" diff --git a/libobs/build/libobs.ported-video-info-query+.h.c b/libobs/build/libobs.ported-video-info-query+.h.c new file mode 100644 index 0000000000..7ebc427605 --- /dev/null +++ b/libobs/build/libobs.ported-video-info-query+.h.c @@ -0,0 +1,4 @@ +/* Unity group (BUILD.md): original core video-info query, reference only. */ +#include "libobs/build/libobs.pch.h" + +#include "libobs/obs-video-info-query.c.h" diff --git a/libobs/build/ported-source-sets/video-info-query.json b/libobs/build/ported-source-sets/video-info-query.json new file mode 100644 index 0000000000..51eecfd450 --- /dev/null +++ b/libobs/build/ported-source-sets/video-info-query.json @@ -0,0 +1,5 @@ +{ + "LIBOBS_PORTED_SOURCES": [ + "build/libobs.ported-video-info-query+.h.c" + ] +} diff --git a/libobs/cmake/rust-exports.d/obs-core-video_info_query.txt b/libobs/cmake/rust-exports.d/obs-core-video_info_query.txt new file mode 100644 index 0000000000..270cd2c1e4 --- /dev/null +++ b/libobs/cmake/rust-exports.d/obs-core-video_info_query.txt @@ -0,0 +1 @@ +obs_get_video_info diff --git a/libobs/obs-core-state.c.h b/libobs/obs-core-state.c.h new file mode 100644 index 0000000000..7740a50555 --- /dev/null +++ b/libobs/obs-core-state.c.h @@ -0,0 +1,4 @@ +#include "libobs/build/libobs.pch.h" + +/* The production core pointer, also linked by standalone real-adapter tests. */ +struct obs_core *obs = NULL; diff --git a/libobs/obs-internal.h b/libobs/obs-internal.h index 3ce38884f6..30d9797aae 100644 --- a/libobs/obs-internal.h +++ b/libobs/obs-internal.h @@ -843,6 +843,12 @@ extern struct obs_core_texture_activity_fields obs_core_texture_activity_fields( /* Borrowed argument snapshot; setter/shutdown retain allocation ownership. */ extern struct obs_cmdline_args *obs_core_cmdline_args_field(void); +/* Core video-info seam: every owner must be checked before field access. */ +extern const struct obs_core *obs_video_info_query_core(void); +extern graphics_t *const *obs_video_info_query_graphics_field(const struct obs_core *core); +extern struct obs_core_video_mix *const *obs_video_info_query_mix_field(const struct obs_core *core); +extern const struct obs_video_info *obs_video_info_query_value_field(const struct obs_core_video_mix *mix); + /* Frame interval seam: check core presence before obtaining the member address. */ extern const struct obs_core *obs_core_frame_interval_core(void); extern const uint64_t *obs_core_frame_interval_field(const struct obs_core *core); diff --git a/libobs/obs-video-info-query-fields.c.h b/libobs/obs-video-info-query-fields.c.h new file mode 100644 index 0000000000..e205e7a4cc --- /dev/null +++ b/libobs/obs-video-info-query-fields.c.h @@ -0,0 +1,21 @@ +#include "libobs/build/libobs.pch.h" + +const struct obs_core *obs_video_info_query_core(void) +{ + return obs; +} + +graphics_t *const *obs_video_info_query_graphics_field(const struct obs_core *core) +{ + return &core->video.graphics; +} + +struct obs_core_video_mix *const *obs_video_info_query_mix_field(const struct obs_core *core) +{ + return &core->data.main_canvas->mix; +} + +const struct obs_video_info *obs_video_info_query_value_field(const struct obs_core_video_mix *mix) +{ + return &mix->ovi; +} diff --git a/libobs/obs.c.h b/libobs/obs.c.h index b290c46583..9fd5b28ac4 100644 --- a/libobs/obs.c.h +++ b/libobs/obs.c.h @@ -17,8 +17,6 @@ #include "libobs/build/libobs.pch.h" -struct obs_core *obs = NULL; - extern char *find_libobs_data_file(const char *file); static void obs_free_render_textures(struct obs_core_video_mix *video); diff --git a/rust/README.md b/rust/README.md index 7d15ef9960..b891d13de3 100644 --- a/rust/README.md +++ b/rust/README.md @@ -547,6 +547,7 @@ and compares their exported symbols. `OBS_LIBOBS_BACKEND=C` is temporary rollbac | `libobs/obs-video-frame-timing.c.h` | `obs-core::video_frame_timing` | Swapped in hybrid `libobs` (group `libobs.ported-video-frame-timing`). Two pure functions on plain values, declared in `obs-video-frame-timing.h` without `EXPORT` and hidden: `obs_video_frame_timing_tick` (`tick_sources()`: the last tick time one interval back on the first frame, the wrapping delta, and its seconds as `(float)((double)delta / 1e9)`) and `obs_video_frame_timing_stats` (the end of `obs_graphics_thread_loop()`: the render time, frame time and frame sums, and at one second of frame time the `double` fps, the average render time and the reset). `obs-video.c` keeps the clock, the tick callbacks and the source list with their mutexes, the profiler and `obs_video_stats_set_timing()`. Intentional difference, unreachable: a report with the frame count wrapped to 0 gives an average of 0 (the C divides by zero). Tier 1 ports `test_video_frame_timing_steps`; Tier 3 parity compares the float and double results bit for bit (#2754). | | `libobs/obs-video-graphics-tasks.c.h` | `obs-core::video_graphics_tasks` | Swapped in hybrid `libobs` (group `libobs.ported-video-graphics-tasks`, the original C as the C reference). `execute_graphics_tasks()`, the graphics thread's per-frame drain of the `OBS_TASK_GRAPHICS` queue, is a C bridge to `obs_video_graphics_tasks_execute`, declared in `obs-video-graphics-tasks.h` without `EXPORT` and hidden. The bridge passes the core and accessors for `task_mutex`, `tasks.size` and a pop of one `struct obs_task_info`, so the deque and its mutex stay C-owned and the Rust reads no private layout. The Rust takes the mutex; while the queue is not empty it pops the oldest task, releases the mutex, runs the task and takes the mutex again; then it releases it, so a task queued meanwhile runs in the same pass. The unchanged `test_video_graphics_tasks` runs against hybrid `libobs` and the C reference. Tier 3 runs the original C and the Rust over the same real core, mutex and deque with trees of tasks that queue tasks, and compares the tasks run, in order, whether the mutex was held for each, the drained queue and the released mutex. One intentional difference: a NULL task, which `obs_queue_task()` does not refuse and the C calls and crashes on, is skipped, as the audio task drain does (`null_task_is_skipped`). | | `libobs/obs-shutdown-detach.c.h` | `obs-core::shutdown_detach` | Swapped in hybrid `libobs` (group `libobs.ported-shutdown-detach`, the original C as the C reference). `obs_shutdown_detach_scene_items()`, which `obs_free_data()` calls once at shutdown so a scene the host left alive releases what its items hold before the source tables are walked (#3458), is a C bridge to `obs_shutdown_detach_scene_items_run`, declared in `obs-shutdown-detach.h` without `EXPORT` and hidden. The bridge passes the core's `struct obs_core_data` and a table of calls: the lock and unlock of `sources_mutex`, a walk of the UUID source table (the `HASH_ITER` stays in C), `obs_source_get_ref`, `obs_scene_from_source`, `obs_group_from_source`, `obs_scene_enum_items`, `obs_sceneitem_remove`, `obs_source_release` and the wait on `obs->destruction_task_thread`, so the Rust reads no private layout and names no libobs symbol. The Rust keeps the C's order: under the lock, a strong reference to every table member it can get (a failed one is skipped); then, unlocked, each member's items removed when it is a scene, or else a group (`obs_shutdown_remove_scene_item` always continues); then every snapshot reference released, only after all removals; then waits until the queue reports no work, with no bound. The unchanged `test_shutdown_detach` runs against hybrid `libobs` and the C reference. Tier 3 runs the original C and the Rust, through the production bridge, over the same real UUID table, with the libobs calls going to one model of sources, scenes, groups and the destruction queue, and compares every call (locks, references, checks, enumerations, removals, releases, waits) and the end state over random graphs with failed references, any table order and a queue that reports more work. No intentional differences. | +| `libobs/obs-video-info-query.c.h` | `obs-core::video_info_query` | Swapped in hybrid libobs (#5179): core, graphics and main-mix gates retain their short-circuit order and leave output untouched on failure; success copies the complete stored struct and borrowed module pointer. Unchanged C characterization, real-header layout and differential parity. No intentional differences; Tier 4 does not apply. | | `libobs/obs-video-output-step.c.h` | `obs-core::video_output_step` | Swapped in hybrid `libobs` (group `libobs.ported-video-output-step`). Ten pure functions on plain values, declared in `obs-video-output-step.h` without `EXPORT` and hidden: `obs_video_step_activation` (`update_active_state()`: a counter above 0 is active; the base, raw and GPU frame data clears for each that was not active and is now, and the new was flags), `obs_video_step_stage` (`stage_output_texture()`: copy surface 0 from the output texture without GPU conversion, `channel_count` surfaces from the convert textures once converted, else nothing), `obs_video_step_queue`, `_queue_copy_uv` and `_queue_count` (`queue_frame()`: a duplicate when no frame is free or a repeat finds one queued, else a copy for raw output or a repeat, else a swap; the separate UV copy unless the host's NV12 planes share a texture; the count left), `obs_video_step_render_targets` and `obs_video_step_render` (`render_video()`: outputs for raw or GPU, from the encode textures for GPU; then convert, encode, stage), and `obs_video_step_ring`, `_download` and `_output` (`output_frame()`: the texture before and after `cur_texture`, wrapping at exactly `NUM_TEXTURES`; download and output for raw output). `obs-video.c.h` keeps every `gs_*` call in its order and under its conditions, the deques (and the `deque_data()` NULL check when texture-based encoding stops), `os_sem_post()`, the texture-frame host calls, `obs_host_nv12_planes_share_texture()` and `obs_host_gpu_encode_surfaces()` (it passes their answers, asked where they were), `download_frame()`'s maps, the mix list and its mutex, and both atomic loads (it passes the loaded `long`s). The decisions are split where the C asked a host or read a field between them, so no call moves. The six structs cross as `#[repr(C)]` mirrors whose layout Tier 3 checks; the queue action as its C value. Intentional difference, unreachable: where the C's `int` arithmetic overflows (undefined: `--count` at `INT_MIN`, the ring's prev of `INT_MIN` and next of `INT_MAX`), the port wraps. `test_video_output_step_steps` compiles the C into itself; it has no `_rust` variant, for the reason `test_video_copy_plan_steps` has none (the shims' archive member needs libobs). `test_video_output_formats`, `test_raw_output_video_reset`, `test_encoding_lag_rescale`, `test_scaled_mix_alpha`, `test_video_output_plan` and the texture encoder tests see the swap through the hybrid libobs. Tier 3 compares every result exactly over every flag, the counters at the `long` and `int` edges, channel counts and queue sizes at the `size_t` edges, counts and ring values over every `int` from -200,000 to 200,000 and the ends, and proptests over full-range values. | | `libobs/obs-video-pacing.c.h` | `obs-core::video_pacing` | Swapped in hybrid `libobs` (group `libobs.ported-video-pacing`). Two pure functions on plain values, declared in `obs-video-pacing.h` without `EXPORT` and hidden: `obs_video_pacing_step` (`video_sleep()`: after a sleep that reached the next frame time, the next frame time and 1; after a late wake-up, the clock difference read as `int64_t`, at least one interval, the whole intervals truncated to `int` as the C cast does, and the frame time that many intervals on, wrapping) and `obs_video_pacing_group_starts` (all encoders of a ready encoder's group started and no start timestamp yet). `obs-video.c` keeps the sleep, the clock read, the stats, the encoder groups and their mutexes, and the frame info pushes. Intentional difference, unreachable: an interval of 0 after a late wake-up gives a count of 0 and the frame time unchanged (the C divides by zero; libobs computes the interval from the frame rate). Tier 1 ports `test_video_pacing_steps`; Tier 3 parity is exhaustive over the edges and full range by proptest (#2738). | | `libobs/obs-video-render-passes.c.h` | `obs-core::video_render_passes` | Mix canvas copy and conversion pass orchestration through synchronous graphics callbacks; hidden ABI with no shared layouts. Preserves ignored begin-pass failure and framebuffer sRGB reset to false. Unchanged C recording assertions exercise the Rust replacement; Tier 3 compares original C and Rust call traces. Internal helpers only: no GPU image-quality or Tier 4 claim. | diff --git a/rust/obs-build/tests/native.rs b/rust/obs-build/tests/native.rs index 0f0bc2ef22..f91b37a8af 100644 --- a/rust/obs-build/tests/native.rs +++ b/rust/obs-build/tests/native.rs @@ -487,6 +487,8 @@ mod canonical_transport_helpers_are_registered; mod canonical_undo_stack_is_registered; #[path = "native/registration/canonical_vaapi_device_select_is_registered.rs"] mod canonical_vaapi_device_select_is_registered; +#[path = "native/registration/canonical_video_info_query_is_registered.rs"] +mod canonical_video_info_query_is_registered; #[path = "native/registration/canonical_video_output_compatibility_is_registered.rs"] mod canonical_video_output_compatibility_is_registered; #[path = "native/registration/canonical_video_scaler_direct_is_registered.rs"] diff --git a/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs new file mode 100644 index 0000000000..d4d29844ca --- /dev/null +++ b/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs @@ -0,0 +1,46 @@ +use super::*; + +#[test] +fn canonical_video_info_query_is_registered() { + use obs_build::validation::graph::{Graph, Source}; + let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let mut graph = Graph::load(&root.join("test/cmocka/build/test-graph.json")).unwrap(); + let c = &graph.targets["test_video_info_query"]; + let rust = &graph.targets["test_video_info_query_rust"]; + assert!( + matches!(&c.sources[0], Source::Path(path) if path == "test/cmocka/test_video_info_query.c") + ); + assert!( + matches!(&rust.sources[0], Source::Path(path) if path == "test/cmocka/test_video_info_query.c") + ); + assert!( + matches!(&c.sources[1], Source::Path(path) if path == "libobs/obs-video-info-query.c.h") + ); + assert!( + matches!(&rust.sources[1], Source::Path(path) if path == "test/cmocka/video-info-query-link-support.c") + ); + graph + .targets + .retain(|name, _| name.starts_with("test_video_info_query")); + graph + .tests + .retain(|name, _| name.starts_with("test_video_info_query")); + for os in ["OS_LINUX", "OS_MACOS", "OS_WINDOWS"] { + let selected = graph + .select(&[(os.into(), true), ("HAVE_LIBOBS_RUST_STATIC".into(), true)].into()) + .unwrap(); + for name in ["test_video_info_query", "test_video_info_query_rust"] { + assert!(selected.targets.contains_key(name), "{os}: {name}"); + assert!(selected.tests.contains_key(name), "{os}: {name}"); + } + assert!( + selected.targets["test_video_info_query_rust"] + .libraries + .iter() + .any(|lib| matches!(lib, obs_build::validation::graph::ConditionalValue::Name(name) if name == "libobs_rust-static")) + ); + } + let group = fs::read_to_string(root.join("libobs/build/libobs.core+.h.c")).unwrap(); + assert!(group.contains("obs-video-info-query-fields.c.h")); + assert!(!group.contains("\"libobs/obs-video-info-query.c.h\"")); +} diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json b/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json new file mode 100644 index 0000000000..90724c8fe9 --- /dev/null +++ b/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json @@ -0,0 +1,40 @@ +{ + "schema": 1, + "targets": { + "test_video_info_query_rust": { + "sources": [ + "test/cmocka/test_video_info_query.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/source-getter-log-link-stub.c" + ], + "libraries": [ + "libobs_rust-static", + "OBS::caption", + "Uthash::Uthash", + "OBS::native-test-cmocka", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "includes": [ + ".", + "libobs" + ], + "requires": "HAVE_LIBOBS_RUST_STATIC" + } + }, + "tests": { + "test_video_info_query_rust": { + "target": "test_video_info_query_rust", + "command": [ + "${target}" + ], + "requires": "HAVE_LIBOBS_RUST_STATIC" + } + } +} diff --git a/rust/obs-c-oracle/oracle.d/video-info-query.list b/rust/obs-c-oracle/oracle.d/video-info-query.list new file mode 100644 index 0000000000..30b81059a5 --- /dev/null +++ b/rust/obs-c-oracle/oracle.d/video-info-query.list @@ -0,0 +1 @@ +video_info_query.inc|libobs/obs-video-info-query.c.h|auto diff --git a/rust/obs-c-oracle/oracle/platform.c b/rust/obs-c-oracle/oracle/platform.c index 51a207bffc..74bea59565 100644 --- a/rust/obs-c-oracle/oracle/platform.c +++ b/rust/obs-c-oracle/oracle/platform.c @@ -178,8 +178,8 @@ size_t oracle_timespec_offset_tv_nsec(void) * from Rust over FFI (src/platform_filename.rs). * * Intentionally different from the original: the real obs_get_video_info is - * in libobs/obs.c, which pulls in the whole video pipeline that the oracle - * does not build. Both the C (oracle_obs_get_video_info, through the rename + * supplied by obs-core when that crate is linked. The utility-only harness + * retains a fallback for its filename fixture. Both the C (oracle_obs_get_video_info, through the rename * above) and the Rust shim (the plain obs_get_video_info, which libobs * provides in libobs-with-rust) read the same fixture: it copies the set * struct and returns the set result, and counts its calls. The fixture and @@ -197,11 +197,17 @@ bool obs_get_video_info(struct obs_video_info *ovi) } #undef obs_get_video_info +/* The real Rust export wins in core/category consumers. Keep the existing + * filename fixture only as a fallback in the utility-only harness. */ +#if defined(_MSC_VER) +#pragma comment(linker, "/alternatename:obs_get_video_info=oracle_obs_get_video_info") +#else bool obs_get_video_info(struct obs_video_info *ovi); -bool obs_get_video_info(struct obs_video_info *ovi) +__attribute__((weak)) bool obs_get_video_info(struct obs_video_info *ovi) { return oracle_obs_get_video_info(ovi); } +#endif void oracle_platform_filename_set_time(int64_t now); void oracle_platform_filename_set_video_info(const struct obs_video_info *ovi, bool result); diff --git a/rust/obs-c-oracle/oracle/video_info_query.c b/rust/obs-c-oracle/oracle/video_info_query.c new file mode 100644 index 0000000000..ebf6c9238e --- /dev/null +++ b/rust/obs-c-oracle/oracle/video_info_query.c @@ -0,0 +1,89 @@ +/* Original extracted C, real headers and real adapters on thread-local state. */ +#include +#include +#include +#include "obs-internal.h" + +#if defined(_MSC_VER) +#define VIDEO_INFO_THREAD_LOCAL __declspec(thread) +#else +#define VIDEO_INFO_THREAD_LOCAL __thread +#endif +static VIDEO_INFO_THREAD_LOCAL struct obs_core *video_info_current; +#undef VIDEO_INFO_THREAD_LOCAL +#define obs video_info_current +bool oracle_video_info_query_get(struct obs_video_info *ovi); +#define obs_get_video_info oracle_video_info_query_get +#include "video_info_query.inc" +#undef obs_get_video_info +#include "video_info_query_fields.inc" +#undef obs + +typedef bool (*video_info_getter)(struct obs_video_info *); +void oracle_video_info_query_layout(size_t *layout); +void oracle_video_info_query_layout(size_t *layout) +{ + layout[0] = sizeof(struct obs_video_info); + layout[1] = _Alignof(struct obs_video_info); +#define VIDEO_INFO_OFFSET(n, field) layout[n] = offsetof(struct obs_video_info, field) + VIDEO_INFO_OFFSET(2, graphics_module); + VIDEO_INFO_OFFSET(3, fps_num); + VIDEO_INFO_OFFSET(4, fps_den); + VIDEO_INFO_OFFSET(5, base_width); + VIDEO_INFO_OFFSET(6, base_height); + VIDEO_INFO_OFFSET(7, output_width); + VIDEO_INFO_OFFSET(8, output_height); + VIDEO_INFO_OFFSET(9, output_format); + VIDEO_INFO_OFFSET(10, adapter); + VIDEO_INFO_OFFSET(11, gpu_conversion); + VIDEO_INFO_OFFSET(12, colorspace); + VIDEO_INFO_OFFSET(13, range); + VIDEO_INFO_OFFSET(14, scale_type); +#undef VIDEO_INFO_OFFSET +} + +bool oracle_video_info_query_check(video_info_getter candidate, bool present, bool graphics, bool mixed, + bool null_canvas, bool null_output, bool null_module, uint8_t value, uint32_t word); +bool oracle_video_info_query_check(video_info_getter candidate, bool present, bool graphics, bool mixed, + bool null_canvas, bool null_output, bool null_module, uint8_t value, uint32_t word) +{ + struct obs_core *core = calloc(1, sizeof(*core)); + struct obs_core *before = malloc(sizeof(*core)); + struct obs_canvas canvas = {0}, canvas_before; + struct obs_core_video_mix mix, mix_before; + struct obs_video_info actual, expected; + char token = (char)value; + if (!core || !before) { + free(core); + free(before); + return false; + } + memset(&mix, 0, sizeof(mix)); + memset(&mix.ovi, value, sizeof(mix.ovi)); + mix.ovi.graphics_module = null_module ? NULL : &token; + mix.ovi.gpu_conversion = value & 1; + mix.ovi.fps_num = word; + mix.ovi.fps_den = ~word; + mix.ovi.output_height = word ^ 0x12345678; + core->video.graphics = graphics ? (graphics_t *)&token : NULL; + core->data.main_canvas = null_canvas ? NULL : &canvas; + canvas.mix = mixed ? &mix : NULL; + memcpy(before, core, sizeof(*core)); + memcpy(&canvas_before, &canvas, sizeof(canvas)); + memcpy(&mix_before, &mix, sizeof(mix)); + memset(&actual, 0xa5, sizeof(actual)); + memset(&expected, 0xa5, sizeof(expected)); + video_info_current = present ? core : NULL; + bool c = oracle_video_info_query_get(null_output ? NULL : &expected); + bool rust = candidate(null_output ? NULL : &actual); + bool alias = !c || (oracle_video_info_query_get(&mix.ovi) && candidate(&mix.ovi)); + bool equal = alias && c == rust && c == (present && graphics && mixed) && + memcmp(&actual, &expected, sizeof(actual)) == 0 && + memcmp(&canvas, &canvas_before, sizeof(canvas)) == 0 && + memcmp(&mix, &mix_before, sizeof(mix)) == 0 && memcmp(core, before, sizeof(*core)) == 0 && + token == (char)value && video_info_current == (present ? core : NULL); + video_info_current = NULL; + free(before); + free(core); + return equal; +} diff --git a/rust/obs-core/src/ffi/mod.rs b/rust/obs-core/src/ffi/mod.rs index 8cb6562fdd..1c267f4eeb 100644 --- a/rust/obs-core/src/ffi/mod.rs +++ b/rust/obs-core/src/ffi/mod.rs @@ -72,6 +72,7 @@ pub mod video_copy_plan; pub mod video_frame_copy; pub mod video_frame_timing; pub mod video_graphics_tasks; +pub mod video_info_query; pub mod video_output_step; pub mod video_pacing; pub mod video_plan; diff --git a/rust/obs-core/src/ffi/video_info_query.rs b/rust/obs-core/src/ffi/video_info_query.rs new file mode 100644 index 0000000000..00724d7ea3 --- /dev/null +++ b/rust/obs-core/src/ffi/video_info_query.rs @@ -0,0 +1,43 @@ +//! Private C layouts remain at field adapters; selection lives in the safe core. +use core::ffi::c_void; +use core::ptr::NonNull; + +pub use super::canvas_video_info_getter::VideoInfo; + +unsafe extern "C" { + fn obs_video_info_query_core() -> *const c_void; + fn obs_video_info_query_graphics_field(core: *const c_void) -> *const *mut c_void; + fn obs_video_info_query_mix_field(core: *const c_void) -> *const *mut c_void; + fn obs_video_info_query_value_field(mix: *const c_void) -> *const VideoInfo; +} + +/// # Safety +/// OBS state must be synchronized as for the C getter. With graphics, the main +/// canvas must be live; with its mix, `output` must be writable. A NULL output +/// is accepted only when the core, graphics or mix is unavailable. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn obs_get_video_info(output: *mut VideoInfo) -> bool { + // SAFETY: reading the global pointer forms no address through its value. + let core = NonNull::new(unsafe { obs_video_info_query_core() }.cast_mut()); + let info = crate::video_info_query::video_info( + core, + |core| { + // SAFETY: the safe core invokes this only after the NULL core gate. + !unsafe { *obs_video_info_query_graphics_field(core.as_ptr()) }.is_null() + }, + |core| { + // SAFETY: core and graphics are present; the C precondition requires + // a live main canvas. No main-canvas field is read before graphics. + NonNull::new(unsafe { *obs_video_info_query_mix_field(core.as_ptr()) }).map(|mix| { + // SAFETY: the present mix owns a readable stored video-info value. + unsafe { obs_video_info_query_value_field(mix.as_ptr()) } + }) + }, + ); + info.is_some_and(|info| { + // SAFETY: success requires a writable output. Raw copy preserves the + // complete struct including borrowed pointer and padding; aliasing is OK. + unsafe { core::ptr::copy(info, output, 1) }; + true + }) +} diff --git a/rust/obs-core/src/video_info_query.rs b/rust/obs-core/src/video_info_query.rs index 39064c08b7..603ef94ecf 100644 --- a/rust/obs-core/src/video_info_query.rs +++ b/rust/obs-core/src/video_info_query.rs @@ -1,9 +1,9 @@ //! Lazy selection for the core video-info query. /// Return the stored snapshot only after the core and graphics gates pass. pub fn video_info( - _core: Option, - _graphics: impl FnOnce(&C) -> bool, - _mix: impl FnOnce(C) -> Option, + core: Option, + graphics: impl FnOnce(&C) -> bool, + mix: impl FnOnce(C) -> Option, ) -> Option { - todo!("port obs_get_video_info") + core.filter(graphics).and_then(mix) } diff --git a/rust/obs-core/tests/obs_core/main.rs b/rust/obs-core/tests/obs_core/main.rs index c48fe258ec..10de45f9b7 100644 --- a/rust/obs-core/tests/obs_core/main.rs +++ b/rust/obs-core/tests/obs_core/main.rs @@ -148,8 +148,9 @@ mod video_frame_copy_parity; mod video_frame_timing; mod video_frame_timing_parity; mod video_graphics_tasks; -mod video_info_query; mod video_graphics_tasks_parity; +mod video_info_query; +mod video_info_query_parity; mod video_output_step; mod video_output_step_parity; mod video_pacing; diff --git a/rust/obs-core/tests/obs_core/video_info_query.rs b/rust/obs-core/tests/obs_core/video_info_query.rs index a6e23d7ce6..847ac1c80e 100644 --- a/rust/obs-core/tests/obs_core/video_info_query.rs +++ b/rust/obs-core/tests/obs_core/video_info_query.rs @@ -3,13 +3,23 @@ use obs_core::video_info_query::video_info; #[test] fn test_video_info_query_no_core() { - assert_eq!(video_info::<(), u8>(None, |_| panic!("no core"), |_| panic!("no core")), None); + assert_eq!( + video_info::<(), u8>(None, |_| panic!("no core"), |_| panic!("no core")), + None + ); } #[test] fn test_video_info_query_no_graphics() { for canvas in [None, Some(())] { - assert_eq!(video_info(Some(canvas), |_| false, |_| -> Option { panic!("no graphics") }), None); + assert_eq!( + video_info( + Some(canvas), + |_| false, + |_| -> Option { panic!("no graphics") } + ), + None + ); } } @@ -42,11 +52,16 @@ fn test_video_info_query_complete_copy() { graphics_module: (!alternate).then_some("borrowed graphics module"), fps_num: if alternate { 0 } else { u32::MAX }, fps_den: if alternate { u32::MAX } else { 0 }, - base_width: u32::from(alternate), base_height: 7919, - output_width: u32::MAX, output_height: 101, - output_format: if alternate { 6 } else { 2 }, adapter: 0x12345678, - gpu_conversion: alternate, colorspace: if alternate { 2 } else { 3 }, - range: if alternate { 2 } else { 1 }, scale_type: if alternate { 1 } else { 4 }, + base_width: u32::from(alternate), + base_height: 7919, + output_width: u32::MAX, + output_height: 101, + output_format: if alternate { 6 } else { 2 }, + adapter: 0x12345678, + gpu_conversion: alternate, + colorspace: if alternate { 2 } else { 3 }, + range: if alternate { 2 } else { 1 }, + scale_type: if alternate { 1 } else { 4 }, }; let before = stored; let output = video_info(Some(&stored), |_| true, Some).unwrap(); @@ -60,8 +75,16 @@ fn test_video_info_query_complete_copy() { fn unavailable_preserves_every_output_byte() { for byte in 0..=u8::MAX { let mut output = [byte; 64]; - for (core, graphics, mixed) in [(false, true, true), (true, false, true), (true, true, false)] { - if let Some(info) = video_info(core.then_some(()), |_| graphics, |_| mixed.then_some([0; 64])) { + for (core, graphics, mixed) in [ + (false, true, true), + (true, false, true), + (true, true, false), + ] { + if let Some(info) = video_info( + core.then_some(()), + |_| graphics, + |_| mixed.then_some([0; 64]), + ) { output = info; } assert_eq!(output, [byte; 64]); diff --git a/rust/obs-core/tests/obs_core/video_info_query_parity.rs b/rust/obs-core/tests/obs_core/video_info_query_parity.rs new file mode 100644 index 0000000000..1b90be5fe4 --- /dev/null +++ b/rust/obs-core/tests/obs_core/video_info_query_parity.rs @@ -0,0 +1,98 @@ +//! Real-header ABI and exact differential parity, including untouched storage. +use core::mem::{align_of, offset_of, size_of}; +use obs_core::ffi::video_info_query::{VideoInfo, obs_get_video_info}; +use proptest::prelude::*; + +type Getter = unsafe extern "C" fn(*mut VideoInfo) -> bool; +unsafe extern "C" { + fn oracle_video_info_query_layout(layout: *mut usize); + fn oracle_video_info_query_check( + candidate: Getter, + present: bool, + graphics: bool, + mixed: bool, + null_canvas: bool, + null_output: bool, + null_module: bool, + value: u8, + word: u32, + ) -> bool; +} + +#[test] +fn real_header_layout() { + let mut layout = [0; 15]; + // SAFETY: the C oracle writes exactly fifteen values into this array. + unsafe { oracle_video_info_query_layout(layout.as_mut_ptr()) }; + assert_eq!( + layout, + [ + size_of::(), + align_of::(), + offset_of!(VideoInfo, graphics_module), + offset_of!(VideoInfo, fps_num), + offset_of!(VideoInfo, fps_den), + offset_of!(VideoInfo, base_width), + offset_of!(VideoInfo, base_height), + offset_of!(VideoInfo, output_width), + offset_of!(VideoInfo, output_height), + offset_of!(VideoInfo, output_format), + offset_of!(VideoInfo, adapter), + offset_of!(VideoInfo, gpu_conversion), + offset_of!(VideoInfo, colorspace), + offset_of!(VideoInfo, range), + offset_of!(VideoInfo, scale_type) + ] + ); +} + +fn check(flags: [bool; 6], value: u8, word: u32) { + let [ + present, + graphics, + mixed, + null_canvas, + null_output, + null_module, + ] = flags; + // Exclude exactly C's undefined inputs: live graphics with NULL canvas, + // or writable output missing on success. Unavailable paths allow NULL output. + if present && graphics && (null_canvas || (mixed && null_output)) { + return; + } + // SAFETY: the oracle owns and snapshots all real-layout state per thread; + // only the valid C inputs above reach either getter. + assert!(unsafe { + oracle_video_info_query_check( + obs_get_video_info, + present, + graphics, + mixed, + null_canvas, + null_output, + null_module, + value, + word, + ) + }); +} + +#[test] +fn characterized_edges() { + for bits in 0..64 { + let flags = core::array::from_fn(|bit| bits & (1 << bit) != 0); + for value in [0, 1, 0x5a, 0xa5, u8::MAX] { + for word in [0, 1, 7919, 0x12345678, u32::MAX] { + check(flags, value, word); + } + } + } +} + +proptest! { + #![proptest_config(ProptestConfig { cases: obs_c_oracle::parity::cases(512), failure_persistence: None, ..ProptestConfig::default() })] + #[test] + fn output_and_state_match_c(flags in any::<[bool; 6]>(), value in any::(), word in any::()) { + check(flags, value, word); + } +} diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index 0cf6356dcd..4b4662773f 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -19293,6 +19293,32 @@ } ] }, + "test_video_info_query_rust": { + "sources": [ + "test/cmocka/test_video_info_query.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/source-getter-log-link-stub.c" + ], + "libraries": [ + "libobs_rust-static", + "OBS::caption", + "Uthash::Uthash", + "OBS::native-test-cmocka", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "includes": [ + ".", + "libobs" + ], + "requires": "HAVE_LIBOBS_RUST_STATIC" + }, "test_video_io_hidden": { "sources": [ "test/cmocka/test_video_io_hidden.c", @@ -27842,6 +27868,13 @@ "${target}" ] }, + "test_video_info_query_rust": { + "target": "test_video_info_query_rust", + "command": [ + "${target}" + ], + "requires": "HAVE_LIBOBS_RUST_STATIC" + }, "test_video_io_hidden": { "target": "test_video_io_hidden", "suite": "graphics", diff --git a/test/cmocka/core-state-link-support.c b/test/cmocka/core-state-link-support.c new file mode 100644 index 0000000000..e8dc0b9ae4 --- /dev/null +++ b/test/cmocka/core-state-link-support.c @@ -0,0 +1,2 @@ +/* Share production storage when a standalone consumer has no fixture core. */ +#include "libobs/obs-core-state.c.h" diff --git a/test/cmocka/tests.d/video_info_query_link_support.cmake b/test/cmocka/tests.d/video_info_query_link_support.cmake new file mode 100644 index 0000000000..f6295fe5f0 --- /dev/null +++ b/test/cmocka/tests.d/video_info_query_link_support.cmake @@ -0,0 +1,25 @@ +# Keep global-dependent adapters in an archive: unrelated consumers need no core. +function(_video_info_query_link_support) + add_library( + video_info_query_link_support + STATIC + "${CMAKE_CURRENT_SOURCE_DIR}/video-info-query-link-support.c" + "${CMAKE_CURRENT_SOURCE_DIR}/core-state-link-support.c" + ) + target_include_directories( + video_info_query_link_support + PRIVATE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/libobs" "${CMAKE_BINARY_DIR}/config" + ) + target_link_libraries( + video_info_query_link_support + PRIVATE OBS::caption Uthash::Uthash $<$:OBS::w32-pthreads> + ) + get_directory_property(_targets BUILDSYSTEM_TARGETS) + foreach(_target IN LISTS _targets) + get_target_property(_links ${_target} LINK_LIBRARIES) + if("libobs_rust-static" IN_LIST _links) + target_link_libraries(${_target} PRIVATE video_info_query_link_support) + endif() + endforeach() +endfunction() +cmake_language(DEFER CALL _video_info_query_link_support) diff --git a/test/cmocka/video-info-query-link-support.c b/test/cmocka/video-info-query-link-support.c new file mode 100644 index 0000000000..7d2b9cd0e8 --- /dev/null +++ b/test/cmocka/video-info-query-link-support.c @@ -0,0 +1,2 @@ +/* Link the real private-layout adapter; the fixture owns its core. */ +#include "libobs/obs-video-info-query-fields.c.h" From 05386ead71017925498cd28ab4dc779ce384ba3a Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 18:35:05 -0800 Subject: [PATCH 3/9] test: register real video-info adapters for native standalone consumers (Refs #5179) --- .../rust-static/support/video-info-query.json | 695 ++++++++++++++++++ test/cmocka/build/test-graph.json | 72 +- .../video_info_query_link_support.cmake | 2 +- 3 files changed, 766 insertions(+), 3 deletions(-) create mode 100644 rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json diff --git a/rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json b/rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json new file mode 100644 index 0000000000..8dace7ee85 --- /dev/null +++ b/rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json @@ -0,0 +1,695 @@ +{ + "test_async_conversion_plan_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_async_frame_pacing_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_async_upload_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_audio_monitor_delay_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_coreaudio_device_rules_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_coreaudio_pacing_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_deinterlace_draw_plan_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_deinterlace_pacing_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_deinterlace_select_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_monitor_speaker_layout_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_monitor_video_sync_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_monitor_wasapi_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_pulse_monitor_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_scene_audio_window_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_scene_render_plan_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_service_handler_getters_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_audio_input_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_audio_place_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_audio_render_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_audio_timing_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_color_space_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_draw_plan_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_frame_copy_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_media_admission_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_monitoring_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_ptm_gate_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_render_route_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_size_route_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_video_tick_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_source_volume_apply_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_transition_load_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_transition_render_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + }, + "test_transition_start_steps_rust": { + "sources": [ + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" + ], + "includes": [ + "." + ], + "header_libraries": [ + "OBS::libobs", + "SIMDe::SIMDe" + ], + "libraries": [ + "OBS::caption", + "Uthash::Uthash", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ] + } +} diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index 4b4662773f..4333d99ab9 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -303,6 +303,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -423,6 +425,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -531,6 +535,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -688,6 +694,8 @@ "test/cmocka/output-pause-query-link-stubs.c", "test/cmocka/output-service-getter-link-stub.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -1607,6 +1615,8 @@ "test/cmocka/output-pause-query-link-stubs.c", "test/cmocka/output-service-getter-link-stub.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -1699,6 +1709,8 @@ "test/cmocka/output-pause-query-link-stubs.c", "test/cmocka/output-service-getter-link-stub.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -1965,6 +1977,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -2059,6 +2073,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -2130,6 +2146,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -8250,6 +8268,8 @@ "test/cmocka/output-pause-query-link-stubs.c", "test/cmocka/output-service-getter-link-stub.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -8308,6 +8328,8 @@ "test/cmocka/output-pause-query-link-stubs.c", "test/cmocka/output-service-getter-link-stub.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -8367,6 +8389,8 @@ "test/cmocka/output-pause-query-link-stubs.c", "test/cmocka/output-service-getter-link-stub.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -12093,6 +12117,8 @@ "test/cmocka/output-pause-query-link-stubs.c", "test/cmocka/output-service-getter-link-stub.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -13354,6 +13380,8 @@ "test/cmocka/scene-item-visible-link-support.c", "test/cmocka/scene-source-getter-link-stubs.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -14221,6 +14249,8 @@ "test/cmocka/scene-item-visible-link-support.c", "test/cmocka/scene-source-getter-link-stubs.c", "test/cmocka/source-handler-getter-link-support.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -14610,7 +14640,9 @@ "sources": [ "test/cmocka/test_service_handler_getters.c", "test/cmocka/service-handler-getters-link-support.c", - "libobs/util/base-variadic.c.h" + "libobs/util/base-variadic.c.h", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c" ], "requires": "HAVE_LIBOBS_RUST_STATIC", "includes": [ @@ -14628,7 +14660,9 @@ { "name": "OBS::w32-pthreads", "requires": "OS_WINDOWS" - } + }, + "OBS::caption", + "Uthash::Uthash" ], "header_libraries": [ "OBS::libobs", @@ -15258,6 +15292,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -15342,6 +15378,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -15432,6 +15470,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -15535,6 +15575,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -15650,6 +15692,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -15805,6 +15849,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -16028,6 +16074,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -16281,6 +16329,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -16405,6 +16455,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -16566,6 +16618,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -16678,6 +16732,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -16773,6 +16829,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -17148,6 +17206,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -17222,6 +17282,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -18034,6 +18096,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -18149,6 +18213,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", @@ -18360,6 +18426,8 @@ "test/cmocka/source-identity-getter-link-stubs.c", "test/cmocka/source-push-query-link-stubs.c", "test/cmocka/source-state-getter-link-stubs.c", + "test/cmocka/video-info-query-link-support.c", + "test/cmocka/core-state-link-support.c", "test/cmocka/weak-encoder-identity-link-stub.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c", diff --git a/test/cmocka/tests.d/video_info_query_link_support.cmake b/test/cmocka/tests.d/video_info_query_link_support.cmake index f6295fe5f0..964136b0cf 100644 --- a/test/cmocka/tests.d/video_info_query_link_support.cmake +++ b/test/cmocka/tests.d/video_info_query_link_support.cmake @@ -17,7 +17,7 @@ function(_video_info_query_link_support) get_directory_property(_targets BUILDSYSTEM_TARGETS) foreach(_target IN LISTS _targets) get_target_property(_links ${_target} LINK_LIBRARIES) - if("libobs_rust-static" IN_LIST _links) + if("libobs_rust-static" IN_LIST _links AND NOT "OBS::libobs" IN_LIST _links) target_link_libraries(${_target} PRIVATE video_info_query_link_support) endif() endforeach() From ebd5cf276562299fafbe0823dccd8bb2c884888e Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 18:43:47 -0800 Subject: [PATCH 4/9] test: carry MSVC video-info fallback directives into static consumers (Refs #5179) --- rust/obs-c-oracle/build.rs | 13 +++++++++++++ .../link-support/video-info-query-fallback.c | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 rust/obs-c-oracle/link-support/video-info-query-fallback.c diff --git a/rust/obs-c-oracle/build.rs b/rust/obs-c-oracle/build.rs index 37340d02dd..2150397749 100644 --- a/rust/obs-c-oracle/build.rs +++ b/rust/obs-c-oracle/build.rs @@ -867,6 +867,7 @@ fn main() { .join("cmocka/video-scale-effects-caller.c"); let roots = [ manifest.join("oracle"), + manifest.join("link-support"), manifest.join("legacy"), manifest.join("vendor"), libobs.clone(), @@ -934,6 +935,18 @@ fn main() { _ => {} } oracle.compile("obs_c_oracle"); + if windows && oracle.get_compiler().is_like_msvc() { + // MSVC cannot discover an /alternatename directive in an unselected + // platform.o. Carry this directive-only archive into every consumer; + // a real Rust definition still takes precedence over the fallback. + let source = manifest.join("link-support/video-info-query-fallback.c"); + println!("cargo:rerun-if-changed={}", source.display()); + cc::Build::new() + .file(source) + .cargo_metadata(false) + .compile("obs_video_info_query_fallback"); + println!("cargo:rustc-link-lib=static:+whole-archive=obs_video_info_query_fallback"); + } // Jansson 2.14.1 for cargo test. libobs links its own copy, so this // staticlib stays on the oracle and is not a rustc-link-lib of obs-data. diff --git a/rust/obs-c-oracle/link-support/video-info-query-fallback.c b/rust/obs-c-oracle/link-support/video-info-query-fallback.c new file mode 100644 index 0000000000..aba31e2c63 --- /dev/null +++ b/rust/obs-c-oracle/link-support/video-info-query-fallback.c @@ -0,0 +1,4 @@ +/* This directive must be loaded even when no platform oracle is referenced. + * /alternatename in an unselected archive member cannot resolve a new caller. */ +#pragma comment(linker, "/alternatename:obs_get_video_info=oracle_obs_get_video_info") +typedef int obs_video_info_query_fallback_directive; From 1c7aca254b26f03ff1a74b78fd09e345d54207a1 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 18:52:48 -0800 Subject: [PATCH 5/9] test: use real logging and preserve pure scene registration contracts (Refs #5179) --- .../cases/header/test_video_info_query.json | 2 +- .../rust-static/support/video-info-query.json | 42 ------------------- test/cmocka/build/test-graph.json | 6 +-- 3 files changed, 2 insertions(+), 48 deletions(-) diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json b/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json index 90724c8fe9..39ed217613 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json @@ -5,7 +5,7 @@ "sources": [ "test/cmocka/test_video_info_query.c", "test/cmocka/video-info-query-link-support.c", - "test/cmocka/source-getter-log-link-stub.c" + "libobs/util/base-variadic.c.h" ], "libraries": [ "libobs_rust-static", diff --git a/rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json b/rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json index 8dace7ee85..9f20bb8264 100644 --- a/rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json +++ b/rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json @@ -272,48 +272,6 @@ } ] }, - "test_scene_audio_window_steps_rust": { - "sources": [ - "test/cmocka/video-info-query-link-support.c", - "test/cmocka/core-state-link-support.c" - ], - "includes": [ - "." - ], - "header_libraries": [ - "OBS::libobs", - "SIMDe::SIMDe" - ], - "libraries": [ - "OBS::caption", - "Uthash::Uthash", - { - "name": "OBS::w32-pthreads", - "requires": "OS_WINDOWS" - } - ] - }, - "test_scene_render_plan_steps_rust": { - "sources": [ - "test/cmocka/video-info-query-link-support.c", - "test/cmocka/core-state-link-support.c" - ], - "includes": [ - "." - ], - "header_libraries": [ - "OBS::libobs", - "SIMDe::SIMDe" - ], - "libraries": [ - "OBS::caption", - "Uthash::Uthash", - { - "name": "OBS::w32-pthreads", - "requires": "OS_WINDOWS" - } - ] - }, "test_service_handler_getters_rust": { "sources": [ "test/cmocka/video-info-query-link-support.c", diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index 4333d99ab9..0ced894838 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -13380,8 +13380,6 @@ "test/cmocka/scene-item-visible-link-support.c", "test/cmocka/scene-source-getter-link-stubs.c", "test/cmocka/source-handler-getter-link-support.c", - "test/cmocka/video-info-query-link-support.c", - "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -14249,8 +14247,6 @@ "test/cmocka/scene-item-visible-link-support.c", "test/cmocka/scene-source-getter-link-stubs.c", "test/cmocka/source-handler-getter-link-support.c", - "test/cmocka/video-info-query-link-support.c", - "test/cmocka/core-state-link-support.c", "test/cmocka/weak-object-identity-link-stub.c", "libobs/build/libobs.image-decode-adapter+.h.c" ], @@ -19365,7 +19361,7 @@ "sources": [ "test/cmocka/test_video_info_query.c", "test/cmocka/video-info-query-link-support.c", - "test/cmocka/source-getter-log-link-stub.c" + "libobs/util/base-variadic.c.h" ], "libraries": [ "libobs_rust-static", From b7faa338015ec16829a17905af8a6e8447aaaa82 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 18:56:44 -0800 Subject: [PATCH 6/9] test: declare real-logger host dependencies for the query fixture (Refs #5179) Ci-Attestation: {"at":1795057902,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":144,"stamp":"125cef8820d8ae5c859231d9442107e3","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057902,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":144,"stamp":"081ec4f439d5b02cf41ceca89132ba1d","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057902,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":144,"stamp":"d125ca0ba175bb5a31f0a97959b1bca2","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057902,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":144,"stamp":"f8478f83a1dd61cef611465b6e8ac0a9","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"general/all/client-lint","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"209ea5dddeb8e7ee08bf23c59ee65006","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057902,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":144,"stamp":"1017782eddd9020884b5bce12a80372a","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"7f0cfd37856bf9ad5e7aba8e1e295e99","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"7008807757638823d88f5cab6ac29717","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"ff396829feb22fe35a1ea5c64214148f","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"71d7a4124078725e384f239bc742f209","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"dc327b4f5432f8bbb2660d80a7240af6","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"e575c1c2ce6d81f223e0909f940f5fc0","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"ca824c3a3c9a67d251d5df244674ceae","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"04f2fb9168934beb58ac86ac40b7b777","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"a2764ea57ae31a62abf9ff08a8afa949","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"afedc92be30b2c9453e4eb12c6dcf5d1","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"c29411acd7ed35b734e666aaa49a2c42","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} Ci-Attestation: {"at":1795057757,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"da4d1da7b8e3afcccea50e10b9d5e2c4f531acc506b8149eae69805e340124fd","lane":"client-lint","parents":["a0ef5cc39c4091178478292fab0be719f5be38d8"],"secs":370,"stamp":"1f30739c75ccd70f48f6fcd9794dbdd1","tree":"fc5588ddda5949ebc1a35211a3329e539b48c253","v":1,"via":"run"} --- .../cases/header/test_video_info_query.json | 20 +++++++++++++++++++ test/cmocka/build/test-graph.json | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json b/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json index 39ed217613..f54867c180 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json @@ -15,6 +15,26 @@ { "name": "OBS::w32-pthreads", "requires": "OS_WINDOWS" + }, + { + "name": "LibUUID::LibUUID", + "requires": "OS_LINUX" + }, + { + "name": "gio::gio", + "requires": "HAVE_PORTAL_TEST_GIO" + }, + { + "name": "PkgConfig::PORTAL_TEST_GLIB", + "requires": "HAVE_PORTAL_TEST_GIO" + }, + { + "name": "Rpcrt4", + "requires": "OS_WINDOWS" + }, + { + "name": "winmm", + "requires": "OS_WINDOWS" } ], "header_libraries": [ diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index 0ced894838..7ee681eea4 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -19371,6 +19371,26 @@ { "name": "OBS::w32-pthreads", "requires": "OS_WINDOWS" + }, + { + "name": "LibUUID::LibUUID", + "requires": "OS_LINUX" + }, + { + "name": "gio::gio", + "requires": "HAVE_PORTAL_TEST_GIO" + }, + { + "name": "PkgConfig::PORTAL_TEST_GLIB", + "requires": "HAVE_PORTAL_TEST_GIO" + }, + { + "name": "Rpcrt4", + "requires": "OS_WINDOWS" + }, + { + "name": "winmm", + "requires": "OS_WINDOWS" } ], "header_libraries": [ From c7d8f93c98bd348e9d07839a1f4db4525d2fce19 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 19:22:08 -0800 Subject: [PATCH 7/9] test: load the video-info fallback for GNU COFF consumers too (Refs #5179) Ci-Attestation: {"at":1795062193,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":207,"stamp":"b914f5adfb816d815608cdd476d3b7e4","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795062193,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":207,"stamp":"52f08d36544152266999c464a1c9726e","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795062193,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":207,"stamp":"6a8f7dd5b02356c064abb3ae4fe408e6","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795062193,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":207,"stamp":"e2aa53cb359480e353419e96356ae6cd","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061983,"gate":"general/all/client-lint","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"13a00cc11ddbe84dc19bda964b553dcd","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795062193,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":207,"stamp":"e1d148ebf8f2e5b088be55be788d65be","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061984,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"2137b07749bdee90f5f84182b7518e8f","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061984,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"9967092a357923b72a821035309d4da8","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061984,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"b955dd9bff4eb6f6c40e1fd152563517","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061984,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"16a9e1cb3195eb38627890407a9d140f","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061983,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"d6f85d133c4c7dd16ff72fb0d7951d4f","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061983,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"0560e7feca33a67e807a4c9293880209","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061984,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"c3c41331cefe4e6ee367586a347e2e0d","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061984,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"2b60a50d5d10135a21fbd0f08fea068e","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061984,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"e55aeabff9c195e5a4906863a85e8a04","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061984,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"c94ec54ec09790b3c288b02d40f5f56a","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061983,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"8f6c5a52027c504b782da3819b8ef197","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795061983,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"c41914352d437ab576099755a7d91cbf4b56c2dce472ec3aa9d853f66616b132","lane":"client-lint","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":187,"stamp":"051cd270cdd9089d115f2256552f9db4","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Ci-Attestation: {"at":1795062939,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"b44fcde19a38bf69ed2f4fb76c54677337bb7974ec4e324b966c4b64de326147","lane":"client-test-x86_64-unknown-linux-gnu","parents":["f39347fa14a59e7e30455f34591fc5d4d4c98978"],"secs":745,"stamp":"4f63ee251715bc5e8edb7e3655c4094f","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4","v":1,"via":"run"} Client-Checks: {"checks":{"base":"21667f4da05037469c03778e9c504c96bd6d5c49","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core+.h.c","libobs/build/libobs.ported-video-info-query+.h.c","libobs/build/ported-source-sets/video-info-query.json","libobs/cmake/rust-exports.d/obs-core-video_info_query.txt","libobs/obs-core-state.c.h","libobs/obs-internal.h","libobs/obs-video-info-query-fields.c.h","libobs/obs.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs","rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json","rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json","rust/obs-c-oracle/build.rs","rust/obs-c-oracle/link-support/video-info-query-fallback.c","rust/obs-c-oracle/oracle.d/video-info-query.list","rust/obs-c-oracle/oracle/platform.c","rust/obs-c-oracle/oracle/video_info_query.c","rust/obs-core/src/ffi/mod.rs","rust/obs-core/src/ffi/video_info_query.rs","rust/obs-core/src/lib.rs","rust/obs-core/src/video_info_query.rs","rust/obs-core/tests/obs_core/main.rs","rust/obs-core/tests/obs_core/video_info_query.rs","rust/obs-core/tests/obs_core/video_info_query_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/core-state-link-support.c","test/cmocka/tests.d/video_info_query_link_support.cmake","test/cmocka/video-info-query-link-support.c"],"head":"195d6fd7f0587559aca6ee499fb6af6787cf1455","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"8307c8446a9673ea5dcc7bb9ca7d7a99b05ffc8d2f68d0169ce33446e165e7b1","tree":"7a64ec61c3e148cc171b3b07304388605521d3b4"}} --- rust/obs-c-oracle/build.rs | 8 ++++---- .../link-support/video-info-query-fallback.c | 14 ++++++++++++-- rust/obs-c-oracle/oracle/platform.c | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/rust/obs-c-oracle/build.rs b/rust/obs-c-oracle/build.rs index 2150397749..e6dcbb870c 100644 --- a/rust/obs-c-oracle/build.rs +++ b/rust/obs-c-oracle/build.rs @@ -935,10 +935,10 @@ fn main() { _ => {} } oracle.compile("obs_c_oracle"); - if windows && oracle.get_compiler().is_like_msvc() { - // MSVC cannot discover an /alternatename directive in an unselected - // platform.o. Carry this directive-only archive into every consumer; - // a real Rust definition still takes precedence over the fallback. + if windows { + // COFF cannot discover a fallback in an unselected platform.o. + // Carry its directive/weak definition into every consumer; a real + // Rust definition still takes precedence over the fallback. let source = manifest.join("link-support/video-info-query-fallback.c"); println!("cargo:rerun-if-changed={}", source.display()); cc::Build::new() diff --git a/rust/obs-c-oracle/link-support/video-info-query-fallback.c b/rust/obs-c-oracle/link-support/video-info-query-fallback.c index aba31e2c63..911b67d7bb 100644 --- a/rust/obs-c-oracle/link-support/video-info-query-fallback.c +++ b/rust/obs-c-oracle/link-support/video-info-query-fallback.c @@ -1,4 +1,14 @@ -/* This directive must be loaded even when no platform oracle is referenced. - * /alternatename in an unselected archive member cannot resolve a new caller. */ +/* COFF fallbacks must be loaded even when no platform oracle is referenced. */ +#if defined(_MSC_VER) #pragma comment(linker, "/alternatename:obs_get_video_info=oracle_obs_get_video_info") typedef int obs_video_info_query_fallback_directive; +#else +#include +struct obs_video_info; +bool oracle_obs_get_video_info(struct obs_video_info *info); +bool obs_get_video_info(struct obs_video_info *info); +__attribute__((weak)) bool obs_get_video_info(struct obs_video_info *info) +{ + return oracle_obs_get_video_info(info); +} +#endif diff --git a/rust/obs-c-oracle/oracle/platform.c b/rust/obs-c-oracle/oracle/platform.c index 74bea59565..a61d153bb3 100644 --- a/rust/obs-c-oracle/oracle/platform.c +++ b/rust/obs-c-oracle/oracle/platform.c @@ -201,7 +201,7 @@ bool obs_get_video_info(struct obs_video_info *ovi) * filename fixture only as a fallback in the utility-only harness. */ #if defined(_MSC_VER) #pragma comment(linker, "/alternatename:obs_get_video_info=oracle_obs_get_video_info") -#else +#elif !defined(_WIN32) bool obs_get_video_info(struct obs_video_info *ovi); __attribute__((weak)) bool obs_get_video_info(struct obs_video_info *ovi) { From c6aa39a182da0b61a19ce9622dd506391b4779cf Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 21:04:59 -0800 Subject: [PATCH 8/9] test: reproduce video-info adapters missing with shared libobs (Refs #5179) --- ...anonical_video_info_query_is_registered.rs | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs index d4d29844ca..453bd18bb9 100644 --- a/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs @@ -44,3 +44,66 @@ fn canonical_video_info_query_is_registered() { assert!(group.contains("obs-video-info-query-fields.c.h")); assert!(!group.contains("\"libobs/obs-video-info-query.c.h\"")); } + +/// Private adapters are hidden in shared libobs, so linking it must not exclude +/// a Rust-static consumer from the demand-linked real-adapter support archive. +#[test] +fn video_info_query_support_covers_all_rust_static_consumers() { + let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let temporary = tempfile::tempdir().unwrap(); + let source = temporary.path(); + fs::write(source.join("main.c"), "int main(void) { return 0; }\n").unwrap(); + fs::write( + source.join("CMakeLists.txt"), + format!( + r#"cmake_minimum_required(VERSION 3.28) +project(video_info_query_support C) +set(CMAKE_SOURCE_DIR "{root}") +set(CMAKE_CURRENT_SOURCE_DIR "{root}/test/cmocka") +add_library(libobs_rust-static INTERFACE) +add_library(OBS::libobs INTERFACE IMPORTED) +add_library(OBS::caption INTERFACE IMPORTED) +add_library(Uthash::Uthash INTERFACE IMPORTED) +add_library(OBS::w32-pthreads INTERFACE IMPORTED) +foreach(name IN ITEMS standalone with_shared future_consumer reference) + add_executable(${{name}} "{source}/main.c") + if(NOT name STREQUAL "reference") + target_link_libraries(${{name}} PRIVATE libobs_rust-static) + endif() +endforeach() +target_link_libraries(with_shared PRIVATE OBS::libobs) +target_link_libraries(reference PRIVATE OBS::libobs) +include("{root}/test/cmocka/tests.d/video_info_query_link_support.cmake") +function(check_support) + foreach(name IN ITEMS standalone with_shared future_consumer reference) + get_target_property(links ${{name}} LINK_LIBRARIES) + if(name STREQUAL "reference") + if("video_info_query_link_support" IN_LIST links) + message(FATAL_ERROR "${{name}}: unexpected Rust adapter support") + endif() + elseif(NOT "video_info_query_link_support" IN_LIST links) + message(FATAL_ERROR "${{name}}: missing private video-info adapters") + endif() + endforeach() +endfunction() +cmake_language(DEFER CALL check_support) +"#, + root = root.canonicalize().unwrap().to_string_lossy().replace('\\', "/"), + source = source.to_string_lossy().replace('\\', "/"), + ), + ) + .unwrap(); + let output = std::process::Command::new("cmake") + .arg("-S") + .arg(source) + .arg("-B") + .arg(source.join("build")) + .output() + .unwrap(); + assert!( + output.status.success(), + "{}{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + ); +} From 89bf15588cada7b4a1a2199a4970768b0b1a592b Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 21:06:37 -0800 Subject: [PATCH 9/9] fix: link video-info adapters for every Rust-static cmocka consumer (Refs #5179) Ci-Attestation: {"at":1795068034,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":121,"stamp":"ec372012eb2be0d85d6b5203b91184c9","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795068034,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":121,"stamp":"55c52f3c549619e743a4a44c2a3f247b","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795068034,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":121,"stamp":"bc301df4dfcc5562c95f8bcc7a99631b","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795068034,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":121,"stamp":"81932ebe75fa94b09efd95bd33b1dc9b","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067910,"gate":"general/all/client-lint","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"3d9eedcba51a4640e47ec938a07a3c57","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795068034,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":121,"stamp":"5484da559e349fd6336b78a7bccfda7c","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"b2909619ccac88f9d79a9957dfeae468","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"29a7fcd121c655dfbbe6a08ec744f80b","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"d191e53cc6d165fbee71ffc92031b0c7","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"440a66fd5f01c186fe88822260e68fee","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"92898ed68ddab2a5aec214ca70c0ca3f","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"6e3059f98fd7544cc0c81dc1d4e8ab3e","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"be7bdbc108e2411fa971ff35b1763548","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"22b2567768364424fdf37560551cba69","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"b234c724fd6c05327ccd3577cc257752","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067911,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"d9d2578849f149d6114141eb965c8aff","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067910,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"107a2faaae07a9a67bd40935b57151e2","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795067910,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"62cedaf1d634f3fd0c407ecf60f3c812fa1da04855d37b4f447bf0a642f9abff","lane":"client-lint","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":288,"stamp":"85ef3d29937370bfda398764f913f1f7","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Ci-Attestation: {"at":1795068694,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"bed9fa5e472cf180e90f3313927247a01a3bedfd556feeb40b027df73626601b","lane":"client-test-x86_64-unknown-linux-gnu","parents":["c6aa39a182da0b61a19ce9622dd506391b4779cf"],"secs":658,"stamp":"e6b99fdebbf4c09c2dda41dca08212d9","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead","v":1,"via":"run"} Client-Checks: {"checks":{"base":"1bad0135e0fbc45f9ab2164bfb94c54395b193c4","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core+.h.c","libobs/build/libobs.ported-video-info-query+.h.c","libobs/build/ported-source-sets/video-info-query.json","libobs/cmake/rust-exports.d/obs-core-video_info_query.txt","libobs/obs-core-state.c.h","libobs/obs-internal.h","libobs/obs-video-info-query-fields.c.h","libobs/obs.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs","rust/obs-build/tests/native/registration/rust-static/cases/header/test_video_info_query.json","rust/obs-build/tests/native/registration/rust-static/support/video-info-query.json","rust/obs-c-oracle/build.rs","rust/obs-c-oracle/link-support/video-info-query-fallback.c","rust/obs-c-oracle/oracle.d/video-info-query.list","rust/obs-c-oracle/oracle/platform.c","rust/obs-c-oracle/oracle/video_info_query.c","rust/obs-core/src/ffi/mod.rs","rust/obs-core/src/ffi/video_info_query.rs","rust/obs-core/src/lib.rs","rust/obs-core/src/video_info_query.rs","rust/obs-core/tests/obs_core/main.rs","rust/obs-core/tests/obs_core/video_info_query.rs","rust/obs-core/tests/obs_core/video_info_query_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/core-state-link-support.c","test/cmocka/tests.d/video_info_query_link_support.cmake","test/cmocka/video-info-query-link-support.c"],"head":"ac0bf348ad65a829866d64cc0781fdf94a1b8842","tools":{"orchestrator-python":"3.14.7 (main, Aug 14 2026, 15:35:28) [Clang 22.1.3 ]","schema-dependencies":"3.14.7 (main, Aug 14 2026, 15:35:28) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"d737c362626b5c5a8ba78b2c7275613bdcfce6397d8395ea7a76039512b968b4","tree":"dbe9e8c6f33627b20d7b27b5b7704147fda03ead"}} --- .../canonical_video_info_query_is_registered.rs | 5 ++++- test/cmocka/tests.d/video_info_query_link_support.cmake | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs index 453bd18bb9..ae0a43454c 100644 --- a/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs @@ -88,7 +88,10 @@ function(check_support) endfunction() cmake_language(DEFER CALL check_support) "#, - root = root.canonicalize().unwrap().to_string_lossy().replace('\\', "/"), + root = dunce::canonicalize(&root) + .unwrap() + .to_string_lossy() + .replace('\\', "/"), source = source.to_string_lossy().replace('\\', "/"), ), ) diff --git a/test/cmocka/tests.d/video_info_query_link_support.cmake b/test/cmocka/tests.d/video_info_query_link_support.cmake index 964136b0cf..3dafa2a2d8 100644 --- a/test/cmocka/tests.d/video_info_query_link_support.cmake +++ b/test/cmocka/tests.d/video_info_query_link_support.cmake @@ -1,4 +1,6 @@ -# Keep global-dependent adapters in an archive: unrelated consumers need no core. +# Keep global-dependent adapters in an archive: fixture-owned cores take precedence. +# Shared libobs hides these private adapters; every Rust-static consumer needs +# the support archive, including consumers that also link OBS::libobs. function(_video_info_query_link_support) add_library( video_info_query_link_support @@ -17,7 +19,7 @@ function(_video_info_query_link_support) get_directory_property(_targets BUILDSYSTEM_TARGETS) foreach(_target IN LISTS _targets) get_target_property(_links ${_target} LINK_LIBRARIES) - if("libobs_rust-static" IN_LIST _links AND NOT "OBS::libobs" IN_LIST _links) + if("libobs_rust-static" IN_LIST _links) target_link_libraries(${_target} PRIVATE video_info_query_link_support) endif() endforeach()