From 53ece3db15534739610827f15a488a5d13e4e366 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 13:53:41 -0800 Subject: [PATCH 01/25] test(graphics): pin legacy image-file session ordering RED (Refs #5145) --- rust/obs-graphics/src/lib.rs | 1 + rust/obs-graphics/src/texture_file_data.rs | 26 +++++++ rust/obs-graphics/tests/render/main.rs | 1 + .../tests/render/texture_file_data.rs | 67 +++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 rust/obs-graphics/src/texture_file_data.rs create mode 100644 rust/obs-graphics/tests/render/texture_file_data.rs diff --git a/rust/obs-graphics/src/lib.rs b/rust/obs-graphics/src/lib.rs index 88515bdb8e..bdcbe97c95 100644 --- a/rust/obs-graphics/src/lib.rs +++ b/rust/obs-graphics/src/lib.rs @@ -109,6 +109,7 @@ pub mod stencil; pub mod target_size; pub mod texture_copy; pub mod texture_creators; +pub mod texture_file_data; pub mod texture_file_data2; pub mod texture_metadata; pub mod texture_planar_creators; diff --git a/rust/obs-graphics/src/texture_file_data.rs b/rust/obs-graphics/src/texture_file_data.rs new file mode 100644 index 0000000000..ee3ecb10fd --- /dev/null +++ b/rust/obs-graphics/src/texture_file_data.rs @@ -0,0 +1,26 @@ +//! Legacy image-file orchestration; FFmpeg state and callbacks stay C-owned. + +/// Post-decode metadata, published only when decoding returns pixels. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct Metadata { + pub format: i32, + pub width: u32, + pub height: u32, +} + +/// A private image session. Implementations retain ownership of decoder state; +/// the returned pixel allocation belongs to the caller. +pub trait Backend { + type Pixels; + fn init(&mut self) -> bool; + fn decode_straight(&mut self) -> Option; + fn metadata(&mut self) -> Metadata; + fn publish(&mut self, metadata: Metadata); + fn free(&mut self); +} + +/// Load legacy straight-alpha pixels and publish post-decode metadata before +/// releasing an initialized session. Failed initialization owns its cleanup. +pub fn create_texture_file_data(_backend: &mut B) -> Option { + todo!("#5145 legacy image-file orchestration") +} diff --git a/rust/obs-graphics/tests/render/main.rs b/rust/obs-graphics/tests/render/main.rs index 6b7e31acc2..3602db2cd0 100644 --- a/rust/obs-graphics/tests/render/main.rs +++ b/rust/obs-graphics/tests/render/main.rs @@ -77,6 +77,7 @@ mod texture_copy; mod texture_copy_parity; mod texture_creators; mod texture_creators_parity; +mod texture_file_data; mod texture_file_data2; mod texture_file_data2_parity; mod texture_metadata; diff --git a/rust/obs-graphics/tests/render/texture_file_data.rs b/rust/obs-graphics/tests/render/texture_file_data.rs new file mode 100644 index 0000000000..194a77cecb --- /dev/null +++ b/rust/obs-graphics/tests/render/texture_file_data.rs @@ -0,0 +1,67 @@ +//! Mirrors every assertion in test_texture_file_data_legacy.c over a safe session. +use obs_graphics::texture_file_data::{Backend, Metadata, create_texture_file_data}; + +const BEFORE: Metadata = Metadata { format: 5, width: 91, height: 92 }; +const AFTER: Metadata = Metadata { format: 3, width: 2, height: 1 }; +const PIXELS: [u8; 8] = [1, 2, 3, 128, 4, 5, 6, 0]; +struct Recording { + initialized: bool, + decoded: bool, + calls: Vec<&'static str>, + outputs: Metadata, + pixels: Option>, + identity: usize, +} +impl Backend for Recording { + type Pixels = Box<[u8; 8]>; + fn init(&mut self) -> bool { + assert!(self.calls.is_empty()); + self.calls.push("init"); + self.initialized + } + fn decode_straight(&mut self) -> Option { + assert_eq!(self.calls, ["init"]); + assert_eq!(self.outputs, BEFORE); + self.calls.push("decode-straight"); + self.pixels.take() + } + fn metadata(&mut self) -> Metadata { + assert_eq!(self.calls, ["init", "decode-straight"]); + self.calls.push("metadata"); + AFTER + } + fn publish(&mut self, metadata: Metadata) { + self.calls.push("publish"); + self.outputs = metadata; + } + fn free(&mut self) { + assert_eq!(self.outputs, if self.decoded { AFTER } else { BEFORE }); + self.calls.push("free"); + } +} +fn check_load(initialized: bool, decoded: bool) { + let pixels = decoded.then(|| Box::new(PIXELS)); + let identity = pixels.as_ref().map_or(0, |p| p.as_ptr() as usize); + let mut session = Recording { initialized, decoded, calls: vec![], outputs: BEFORE, pixels, identity }; + let result = create_texture_file_data(&mut session); + assert_eq!(result.is_some(), initialized && decoded); + if let Some(data) = result { + assert_eq!(data.as_ptr() as usize, session.identity); + assert_eq!(*data, PIXELS); + } + let expected: &[&str] = if !initialized { &["init"] } + else if !decoded { &["init", "decode-straight", "free"] } + else { &["init", "decode-straight", "metadata", "publish", "free"] }; + assert_eq!(session.calls, expected); + assert_eq!(session.outputs, if initialized && decoded { AFTER } else { BEFORE }); +} +#[test] +fn failed_init_has_no_decode_or_second_free() { check_load(false, false); } +#[test] +fn failed_decode_frees_without_output_writes() { check_load(true, false); } +#[test] +fn successful_decode_publishes_before_free() { check_load(true, true); } +#[test] +fn repeated_failure_and_success() { + for _ in 0..8 { check_load(false, false); check_load(true, false); check_load(true, true); } +} From c4377bd05ab9e548048359e72188d856b4b889b1 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 14:05:12 -0800 Subject: [PATCH 02/25] graphics: swap legacy image-file orchestration to Rust (Refs #5145) --- libobs/build/libobs.media+.h.c | 1 - ...ibobs.media-texture-file-data-adapter+.h.c | 5 + .../libobs.ported-texture-file-data+.h.c | 4 + .../ported-source-sets/texture-file-data.json | 5 + .../obs-graphics-texture_file_data.txt | 1 + rust/README.md | 1 + rust/obs-build/tests/native.rs | 2 + ...al_texture_file_data_swap_is_registered.rs | 21 + .../test_texture_file_data_steps.json | 51 + .../support/z-texture-file-data.json | 1082 +++++++++++++++++ .../oracle.d/texture-file-data-adapter.list | 1 + .../oracle.d/texture-file-data.list | 1 + rust/obs-c-oracle/oracle/texture_file_data.c | 171 +++ rust/obs-graphics/src/ffi/mod.rs | 1 + .../obs-graphics/src/ffi/texture_file_data.rs | 83 ++ rust/obs-graphics/src/texture_file_data.rs | 13 +- rust/obs-graphics/tests/render/main.rs | 1 + .../tests/render/texture_file_data.rs | 58 +- .../tests/render/texture_file_data_parity.rs | 63 + test/cmocka/test_texture_file_data_steps.c | 183 +++ .../test_texture_file_data_steps_rust.cmake | 2 + .../texture_file_data_link_support.cmake | 21 + 22 files changed, 1757 insertions(+), 14 deletions(-) create mode 100644 libobs/build/libobs.media-texture-file-data-adapter+.h.c create mode 100644 libobs/build/libobs.ported-texture-file-data+.h.c create mode 100644 libobs/build/ported-source-sets/texture-file-data.json create mode 100644 libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt create mode 100644 rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs create mode 100644 rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json create mode 100644 rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json create mode 100644 rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list create mode 100644 rust/obs-c-oracle/oracle.d/texture-file-data.list create mode 100644 rust/obs-c-oracle/oracle/texture_file_data.c create mode 100644 rust/obs-graphics/src/ffi/texture_file_data.rs create mode 100644 rust/obs-graphics/tests/render/texture_file_data_parity.rs create mode 100644 test/cmocka/test_texture_file_data_steps.c create mode 100644 test/cmocka/tests.d/test_texture_file_data_steps_rust.cmake create mode 100644 test/cmocka/tests.d/texture_file_data_link_support.cmake diff --git a/libobs/build/libobs.media+.h.c b/libobs/build/libobs.media+.h.c index 922bafb829..b94e306f31 100644 --- a/libobs/build/libobs.media+.h.c +++ b/libobs/build/libobs.media+.h.c @@ -4,6 +4,5 @@ #include "libobs/graphics/graphics-ffmpeg-init-adapter.c.h" #include "libobs/graphics/graphics-ffmpeg.c.h" -#include "libobs/graphics/graphics-texture-file-data.c.h" #include "libobs/media-io/media-remux-ffmpeg.c.h" #include "libobs/media-io/video-scaler-ffmpeg.c.h" diff --git a/libobs/build/libobs.media-texture-file-data-adapter+.h.c b/libobs/build/libobs.media-texture-file-data-adapter+.h.c new file mode 100644 index 0000000000..df4ba51938 --- /dev/null +++ b/libobs/build/libobs.media-texture-file-data-adapter+.h.c @@ -0,0 +1,5 @@ +/* C-owned image decoding and private opaque sessions. */ +#include "libobs/build/libobs-media.pch.h" + +#include "libobs/graphics/graphics-ffmpeg.c.h" +#include "libobs/graphics/graphics-texture-file-data-adapter.c.h" diff --git a/libobs/build/libobs.ported-texture-file-data+.h.c b/libobs/build/libobs.ported-texture-file-data+.h.c new file mode 100644 index 0000000000..d776f3dc0c --- /dev/null +++ b/libobs/build/libobs.ported-texture-file-data+.h.c @@ -0,0 +1,4 @@ +/* Original legacy image-file orchestration, C reference only. */ +#include "libobs/build/libobs-media.pch.h" + +#include "libobs/graphics/graphics-texture-file-data.c.h" diff --git a/libobs/build/ported-source-sets/texture-file-data.json b/libobs/build/ported-source-sets/texture-file-data.json new file mode 100644 index 0000000000..dbcf4df89e --- /dev/null +++ b/libobs/build/ported-source-sets/texture-file-data.json @@ -0,0 +1,5 @@ +{ + "LIBOBS_PORTED_SOURCES": [ + "build/libobs.ported-texture-file-data+.h.c" + ] +} diff --git a/libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt b/libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt new file mode 100644 index 0000000000..d52c2403b8 --- /dev/null +++ b/libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt @@ -0,0 +1 @@ +gs_create_texture_file_data diff --git a/rust/README.md b/rust/README.md index 98fe04f776..dd985b9734 100644 --- a/rust/README.md +++ b/rust/README.md @@ -169,6 +169,7 @@ The private output starting/encoder-demand queries use lazy safe Rust decisions | `libobs/graphics/graphics-shader-matrix-queries.c.h` | `obs-graphics::shader_matrix_queries` | Swapped in hybrid `libobs` (Refs #5185; prerequisite #5132/#5184). Safe Rust checks context before shader, then private C adapters dispatch the viewproj/world callback with the exact shader pointer and return the borrowed parameter unchanged, NULL included. Exact LOG_DEBUG messages and single dispatch agree with the reference-only C and a verbatim legacy oracle. Tier 1 mirrors unchanged `test_shader_matrix_queries`; Tier 3 compares boundary matrices and bounded random sequences through the real ABI and adapters in the existing Graphics category binary. No intentional differences; Tier 4 does not apply. | | `libobs/graphics/graphics-target-size.c.h` | `obs-graphics::target_size` | Swapped in hybrid `libobs` (Refs #5100; prerequisite #5087/#5107). Safe Rust checks context before private C layout/dispatch adapters, preserves zero scalar defaults and untouched outputs without context, and forwards nullable/aliased outputs unchanged. Exact LOG_DEBUG messages, device/output identities and single matching callbacks agree with the reference-only C and verbatim legacy oracle. Tier 1 mirrors unchanged `test_graphics_target_size`; Tier 3 covers boundary and bounded random queries in the existing Graphics category binary. No intentional differences; Tier 4 does not apply. | | `libobs/graphics/graphics-texture-copy.c.h` | `obs-graphics::texture_copy` | Swapped in hybrid `libobs` (Refs #5062; prerequisite #5074/#5059). Safe Rust preserves context-before-pointer validation, whole-copy destination-then-source guards and region-copy destination-only validation, including NULL sources, aliasing and all six unchanged offsets/extents. Private C adapters own layout and backend dispatch. Exact LOG_DEBUG messages, device and texture identity match the reference-only original C and verbatim Tier 3 legacy oracle. Tier 1 mirrors unchanged `test_graphics_texture_copy`; Tier 3 compares boundary matrices and bounded random inputs through the real ABI and adapters in the existing Graphics category binary. No intentional differences; Tier 4 does not apply. | +| `libobs/graphics/graphics-texture-file-data.c.h` | `obs-graphics::texture_file_data` | Legacy straight-alpha image-file orchestration in safe Rust, behind a thin C ABI shim. The private C session owns FFmpeg layouts, initialization, callback identities and decode; successful metadata is published before cleanup, failures preserve outputs, and the pixel allocation remains caller-owned. Unchanged C characterization plus real-loader coverage run OFF/ON; the Rust-static recording fixture reaches the Rust export. Graphics category tests mirror the characterization and compare the unchanged C oracle against the Rust export with recording dependencies. No intentional differences; Tier 4 is inapplicable. | | `libobs/graphics/graphics-viewport.c.h` | `obs-graphics::viewport` | Full-target viewport, pixel-space projection and optional maximum-texture capability policy (#4429). Context validation and backend dispatch remain C; callback zero overrides API fallbacks. Unchanged public-API C characterization, safe-core tests and exact original-C differential traces. No intentional differences. | | `libobs/graphics/shader-file.c.h` | `obs-graphics::shader_file` | File-backed vertex/pixel shader creation (#4306). Preserves context-first validation, reader semantics, exact logs, constructor argument identity and source cleanup. Tier 1 mirrors the C characterization; Tier 3 compares all control paths with the original C. No intentional differences. | | `libobs/graphics/shader-param-values.c.h` | `obs-graphics::shader_param_values` | Swapped in hybrid `libobs` (group `libobs.ported-graphics`, beside `shader-param-names.c.h`). The number reads of the shader parser (#3468), moved out of `shader-parser.c` first (an extraction into its own live group, checked old against new C over 1,758,330 scripted scenarios in 8 builds), as three functions declared in the internal `graphics/shader-param-values.h` without `EXPORT` and hidden (`shader-parser.h` is public and unchanged): `shader_param_array_count` (the count of `sp_parse_param_array`: `valid_int_str()` on the token's length, then `strtol()`; written only when valid), `shader_param_int_value` and `shader_param_float_value` (the `int` and `float` values of `sp_parse_param_assign_intfloat`: `strtol()` or `(float)os_strtod()` of the number token's text, negated after a `-` token). The `int` is the effect parser's rule (`effect_param_types::int_value_by`, #3464), so both parsers read the same `int` the same way, and the count reads with its `valid_int_str` and `strtol` steps; the float reads what `os_strtod()`'s `strncpy()` copies, each byte once up to the NUL or 63 bytes, and converts the copy with libobs's `os_strtod` through the private adapter `obs_graphics_os_strtod` (`obs-graphics-adapter.c.h`), so obs-graphics never pulls obs-util's host code into the cmocka `*_rust` tests that link the staticlib. `shader-parser.c` keeps every token call, the `CFTOKEN_NUM` tests, the `-` token, the value count of a `floatN` or `floatNxM` default (each byte read in place), the push of each value and every `cf_adderror()`. Characterized, not endorsed, and kept: a float or hex token reads as its leading digits as an `int` or a count; a count checks only the token's length while `strtol()` reads every digit after it; a float past `FLT_MAX` is an infinity, and `os_strtod()` reads at most 63 bytes; a bad row or column digit of `floatNxM` adds its error and still counts (`float5` keeps five values, `float1x` none). Two intentional differences (#3468): past `INT_MAX` the C depends on the width of `long` (an `int` of `4294967297` reads as 1 and a count of `3000000000` as -1294967296 on Linux and macOS; both saturate before the sign on Windows); the port reads the digits exactly and applies the sign, then saturates an `int` to `INT_MIN..INT_MAX` (the effect parser's rule) and refuses a count outside it, so `sp_parse_param_array` fails as for a count that is not a number, on every platform. A null text, which the C hands to `strtol()` or `os_strtod()`, reads as `""` and false. Tests: `test_shader_param_values_steps` (the moved C; no `_rust` variant, as its edge cases are the intentional difference) and `test_shader_number_defaults` (`shader_parse()` through the real libobs), Tier 1 `shader::shader_param_values`, Tier 3 `shader::shader_param_values_parity` (fixed tokens with more digits after them, random texts of up to 25 bytes at every length, float texts around 63 bytes, values outside `int` checked against the fixed contract). | diff --git a/rust/obs-build/tests/native.rs b/rust/obs-build/tests/native.rs index 0eba442cb5..0e71800347 100644 --- a/rust/obs-build/tests/native.rs +++ b/rust/obs-build/tests/native.rs @@ -61,6 +61,8 @@ mod canonical_source_show_active_counters_swap_is_registered; mod canonical_source_showing_active_swap_is_registered; #[path = "native/registration/canonical_source_texcoords_centered_setter_swap_is_registered.rs"] mod canonical_source_texcoords_centered_setter_swap_is_registered; +#[path = "native/registration/canonical_texture_file_data_swap_is_registered.rs"] +mod canonical_texture_file_data_swap_is_registered; #[path = "native/registration/canonical_websocket_helpers_is_registered.rs"] mod canonical_websocket_helpers_is_registered; #[path = "native/graph_host_configurations.rs"] diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs new file mode 100644 index 0000000000..0b93b298ea --- /dev/null +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -0,0 +1,21 @@ +use super::*; + +#[test] +fn canonical_texture_file_data_swap_is_registered() { + use obs_build::validation::graph::Graph; + let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let graph = Graph::load(&root.join("test/cmocka/build/test-graph.json")).unwrap(); + let name = "test_texture_file_data_steps_rust"; + for os in ["OS_LINUX", "OS_MACOS", "OS_WINDOWS"] { + let selected = graph + .select(&[(os.into(), true), ("HAVE_LIBOBS_RUST_STATIC".into(), true)].into()) + .unwrap(); + assert_eq!(selected.tests[name].target, name); + assert!(format!("{:?}", selected.targets[name]).contains("libobs_rust-static")); + } + let group = + fs::read_to_string(root.join("libobs/build/libobs.ported-texture-file-data+.h.c")).unwrap(); + assert!(group.contains("libobs/graphics/graphics-texture-file-data.c.h")); + let media = fs::read_to_string(root.join("libobs/build/libobs.media+.h.c")).unwrap(); + assert!(!media.contains("libobs/graphics/graphics-texture-file-data.c.h")); +} diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json new file mode 100644 index 0000000000..725fee4b0a --- /dev/null +++ b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json @@ -0,0 +1,51 @@ +{ + "schema": 1, + "targets": { + "test_texture_file_data_steps_rust": { + "sources": [ + "test/cmocka/test_texture_file_data_steps.c", + "libobs/graphics/effect-parser-lifecycle-adapter.c.h", + "libobs/graphics/obs-graphics-adapter.c.h", + "libobs/graphics/graphics-linear-srgb-fields.c.h", + "libobs/obs-graphics-effect-file-fields.c.h", + "test/cmocka/object-validity-query-link-stubs.c", + "libobs/build/libobs.image-decode-adapter+.h.c" + ], + "requires": "HAVE_LIBOBS_RUST_STATIC", + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "OBS::libobs", + "OBS::caption", + "OBS::native-test-cmocka", + "libobs_rust-static", + { + "name": "m", + "requires": { + "not": "MSVC" + } + }, + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + }, + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ], + "sanitizers": "address,undefined" + } + }, + "tests": { + "test_texture_file_data_steps_rust": { + "target": "test_texture_file_data_steps_rust", + "requires": "HAVE_LIBOBS_RUST_STATIC", + "command": [ + "${target}" + ] + } + } +} diff --git a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json new file mode 100644 index 0000000000..2918748112 --- /dev/null +++ b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json @@ -0,0 +1,1082 @@ +{ + "test_async_conversion_plan_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_async_frame_pacing_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_async_upload_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_audio_monitor_delay_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_coreaudio_device_rules_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_coreaudio_pacing_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_deinterlace_draw_plan_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_deinterlace_pacing_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_deinterlace_select_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_effect_param_types_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_effect_parser_blocks_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_effect_parser_compile_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_effect_parser_lifecycle_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_effect_parser_params_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_effect_parser_passes_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_effect_parser_shader_call_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_graphics_ffmpeg_pq_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_graphics_ffmpeg_route_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_graphics_ffmpeg_wic_checks_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_graphics_immediate_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_graphics_state_stacks_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_background_control": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_background_enum": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_background_press": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_background_trigger": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_binding_press_steps": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_getters_characterization": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_load": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_pair_steps": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_hotkey_press_steps": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_monitor_speaker_layout_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_monitor_video_sync_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_monitor_wasapi_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_nsgif_decode_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_portal_shortcuts": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_pulse_monitor_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_scene_audio_window_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_scene_bounds_place_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_scene_item_crop_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_scene_item_names_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_scene_item_order_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_scene_item_transform_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_scene_render_plan_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_scene_transform_update_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_service_handler_getters_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_audio_input_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_audio_place_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_audio_render_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_audio_timing_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_color_space_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_draw_plan_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_duplicate_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_filter_chain_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_frame_copy_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_init_context_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_media_admission_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_monitoring_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_ptm_gate_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_render_route_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_size_route_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_video_tick_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_source_volume_apply_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_sprite_geometry_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_transition_clock_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_transition_load_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_transition_render_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_transition_sample_time_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_transition_start_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_video_stop_requested_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_wayland_hotkeys": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_window_match_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + }, + "test_windows_keys_steps_rust": { + "sources": [ + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ], + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ] + } +} diff --git a/rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list b/rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list new file mode 100644 index 0000000000..83e2400f04 --- /dev/null +++ b/rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list @@ -0,0 +1 @@ +graphics-texture-file-data-adapter.inc|libobs/graphics/graphics-texture-file-data-adapter.c.h|#include "libobs/build/libobs-media.pch.h" diff --git a/rust/obs-c-oracle/oracle.d/texture-file-data.list b/rust/obs-c-oracle/oracle.d/texture-file-data.list new file mode 100644 index 0000000000..c3d1d66ff8 --- /dev/null +++ b/rust/obs-c-oracle/oracle.d/texture-file-data.list @@ -0,0 +1 @@ +graphics-texture-file-data.inc|libobs/graphics/graphics-texture-file-data.c.h|#include "libobs/build/libobs-media.pch.h" diff --git a/rust/obs-c-oracle/oracle/texture_file_data.c b/rust/obs-c-oracle/oracle/texture_file_data.c new file mode 100644 index 0000000000..e9c52c10da --- /dev/null +++ b/rust/obs-c-oracle/oracle/texture_file_data.c @@ -0,0 +1,171 @@ +/* The unchanged C loader and real private session adapter share deterministic + * dependencies. No FFmpeg layout is copied: include the real private type. */ +#include +#include +#include +#include +#include +#include "graphics/graphics.h" +#include "util/threading.h" +enum AVPixelFormat { TFD_INITIAL, TFD_DECODED }; +typedef struct AVFormatContext AVFormatContext; +typedef struct AVCodecContext AVCodecContext; +typedef struct AVCodec AVCodec; +typedef struct AVFrame AVFrame; +#include "graphics/graphics-ffmpeg-image-private.h" + +struct tfd_record { + const int32_t *config; + uint32_t *out; + enum gs_color_format *format; + uint32_t *width, *height; + const char *file; + struct ffmpeg_image *image; + uint8_t *pixels; + unsigned events; + int allocations; +}; +static THREAD_LOCAL struct tfd_record *tfd_current; +static void tfd_event(uint32_t event) +{ + struct tfd_record *r = tfd_current; + if (r->events < 16) + r->out[8 + r->events] = event; + r->out[7] = ++r->events; +} +static void tfd_check(bool condition) +{ + if (!condition) + tfd_current->out[6]++; +} +static void *tfd_alloc(size_t size) +{ + tfd_current->allocations++; + void *data = calloc(1, size); + if (!data) + abort(); + return data; +} +static void tfd_release(void *data) +{ + if (data) + tfd_current->allocations--; + free(data); +} +static uint32_t tfd_max_size(void) +{ + return 4096; +} +static bool tfd_check_size(struct ffmpeg_image *image, int cx, int cy) +{ + (void)image; + (void)cx; + (void)cy; + tfd_check(false); + return false; +} +static void *tfd_convert(struct ffmpeg_image *image, AVFrame *frame, enum gs_image_alpha_mode alpha) +{ + (void)image; + (void)frame; + (void)alpha; + tfd_check(false); + return NULL; +} +static bool tfd_init(struct ffmpeg_image *image, const char *file, uint32_t (*max_size)(void)) +{ + tfd_event(1); + tfd_check(file == tfd_current->file && max_size == tfd_max_size); + memset(image, 0, sizeof(*image)); + image->cx = 71; + image->cy = 72; + image->format = TFD_INITIAL; + tfd_current->image = image; + return tfd_current->config[0] != 0; +} +static void *tfd_decode(void *context, int alpha) +{ + tfd_event(2); + struct tfd_record *r = tfd_current; + struct gs_image_decode_context *decode = context; + tfd_check(decode->image == r->image && decode->check_size == tfd_check_size && decode->convert == tfd_convert); + tfd_check(alpha == GS_IMAGE_ALPHA_STRAIGHT); + tfd_check(*r->format == GS_BGRX && *r->width == 91 && *r->height == 92); + r->image->format = TFD_DECODED; + r->image->cx = r->config[2]; + r->image->cy = r->config[3]; + if (!r->config[1]) + return NULL; + static const uint8_t bytes[] = {1, 2, 3, 128, 4, 5, 6, 0}; + r->pixels = tfd_alloc(sizeof(bytes)); + memcpy(r->pixels, bytes, sizeof(bytes)); + return r->pixels; +} +static int tfd_format(int format) +{ + tfd_event(3); + tfd_check(format == TFD_DECODED); + return tfd_current->config[4]; +} +static void tfd_free(struct ffmpeg_image *image) +{ + tfd_event(4); + struct tfd_record *r = tfd_current; + tfd_check(image == r->image); + bool ok = r->config[1] != 0; + tfd_check((uint32_t)*r->format == (ok ? (uint32_t)r->config[4] : GS_BGRX)); + tfd_check(*r->width == (ok ? (uint32_t)r->config[2] : 91)); + tfd_check(*r->height == (ok ? (uint32_t)r->config[3] : 92)); +} +#define ffmpeg_image_init tfd_init +#define ffmpeg_image_free tfd_free +#define gs_image_max_texture_size tfd_max_size +#define ffmpeg_image_too_large tfd_check_size +#define ffmpeg_image_reformat_frame tfd_convert +#define gs_ffmpeg_image_decode tfd_decode +#define gs_ffmpeg_image_color_format tfd_format +#define bmalloc tfd_alloc +#define bzalloc tfd_alloc +#define bfree tfd_release +#include "graphics-texture-file-data-adapter.inc" +uint8_t *oracle_gs_create_texture_file_data(const char *, enum gs_color_format *, uint32_t *, uint32_t *); +#define gs_create_texture_file_data oracle_gs_create_texture_file_data +#include "graphics-texture-file-data.inc" +#undef gs_create_texture_file_data +#undef bfree +#undef bzalloc +#undef bmalloc +#undef gs_ffmpeg_image_color_format +#undef gs_ffmpeg_image_decode +#undef ffmpeg_image_reformat_frame +#undef ffmpeg_image_too_large +#undef gs_image_max_texture_size +#undef ffmpeg_image_free +#undef ffmpeg_image_init + +typedef uint8_t *(*tfd_loader)(const char *, enum gs_color_format *, uint32_t *, uint32_t *); +/* Thread-local recording of callback identities, ordering, publication, pixels + * and balanced ownership. Passing NULL selects the original C oracle. */ +void oracle_texture_file_data_run(tfd_loader loader, const int32_t *config, uint32_t *out); +void oracle_texture_file_data_run(tfd_loader loader, const int32_t *config, uint32_t *out) +{ + enum gs_color_format format = GS_BGRX; + uint32_t width = 91, height = 92; + const char file[] = "legacy-image.png"; + memset(out, 0, 24 * sizeof(*out)); + struct tfd_record record = {config, out, &format, &width, &height, file, NULL, NULL, 0, 0}; + tfd_current = &record; + uint8_t *result = (loader ? loader : oracle_gs_create_texture_file_data)(file, &format, &width, &height); + out[0] = (uint32_t)format; + out[1] = width; + out[2] = height; + out[3] = result != NULL; + out[4] = result == record.pixels; + if (result) { + static const uint8_t bytes[] = {1, 2, 3, 128, 4, 5, 6, 0}; + tfd_check(memcmp(result, bytes, sizeof(bytes)) == 0); + tfd_release(result); + } + out[5] = (uint32_t)record.allocations; + tfd_current = NULL; +} diff --git a/rust/obs-graphics/src/ffi/mod.rs b/rust/obs-graphics/src/ffi/mod.rs index 1b3f283168..1a5298b22a 100644 --- a/rust/obs-graphics/src/ffi/mod.rs +++ b/rust/obs-graphics/src/ffi/mod.rs @@ -63,6 +63,7 @@ pub mod stencil; pub mod target_size; pub mod texture_copy; pub mod texture_creators; +pub mod texture_file_data; pub mod texture_file_data2; pub mod texture_metadata; pub mod texture_planar_creators; diff --git a/rust/obs-graphics/src/ffi/texture_file_data.rs b/rust/obs-graphics/src/ffi/texture_file_data.rs new file mode 100644 index 0000000000..c45d8989eb --- /dev/null +++ b/rust/obs-graphics/src/ffi/texture_file_data.rs @@ -0,0 +1,83 @@ +//! Thin C boundary around an opaque, C-owned FFmpeg image session. +use crate::texture_file_data::{Backend, Metadata, create_texture_file_data}; +use crate::texture_render::ColorFormat; +use core::ffi::{c_char, c_void}; + +unsafe extern "C" { + fn obs_texture_file_data_open(file: *const c_char) -> *mut c_void; + fn obs_texture_file_data_decode(session: *mut c_void) -> *mut u8; + fn obs_texture_file_data_format(session: *mut c_void) -> i32; + fn obs_texture_file_data_width(session: *mut c_void) -> u32; + fn obs_texture_file_data_height(session: *mut c_void) -> u32; + fn obs_texture_file_data_close(session: *mut c_void); +} +struct Session { + file: *const c_char, + image: *mut c_void, + format: *mut ColorFormat, + width: *mut u32, + height: *mut u32, +} +impl Backend for Session { + type Pixels = *mut u8; + fn init(&mut self) -> bool { + // SAFETY: file retains the public entry point's C path contract. + self.image = unsafe { obs_texture_file_data_open(self.file) }; + !self.image.is_null() + } + fn decode_straight(&mut self) -> Option { + if self.image.is_null() { + return None; + } + // SAFETY: checked live session; C supplies the original callback pair. + let data = unsafe { obs_texture_file_data_decode(self.image) }; + (!data.is_null()).then_some(data) + } + fn metadata(&mut self) -> Metadata { + assert!(!self.image.is_null()); + // SAFETY: the non-null session remains alive until free, after publication. + unsafe { + Metadata { + format: obs_texture_file_data_format(self.image), + width: obs_texture_file_data_width(self.image), + height: obs_texture_file_data_height(self.image), + } + } + } + fn publish(&mut self, metadata: Metadata) { + // SAFETY: successful loads require writable public output slots. + unsafe { + *self.format = ColorFormat(metadata.format as u32); + *self.width = metadata.width; + *self.height = metadata.height; + } + } + fn free(&mut self) { + if !self.image.is_null() { + // SAFETY: close consumes this initialized session exactly once. + unsafe { obs_texture_file_data_close(self.image) }; + self.image = core::ptr::null_mut(); + } + } +} +/// Decode legacy straight-alpha image pixels. +/// +/// # Safety +/// `file` follows ffmpeg_image_init's path contract. On success all outputs +/// must be writable. The caller frees the returned bmalloc allocation. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn gs_create_texture_file_data( + file: *const c_char, + format: *mut ColorFormat, + width: *mut u32, + height: *mut u32, +) -> *mut u8 { + create_texture_file_data(&mut Session { + file, + image: core::ptr::null_mut(), + format, + width, + height, + }) + .unwrap_or(core::ptr::null_mut()) +} diff --git a/rust/obs-graphics/src/texture_file_data.rs b/rust/obs-graphics/src/texture_file_data.rs index ee3ecb10fd..4ed2235525 100644 --- a/rust/obs-graphics/src/texture_file_data.rs +++ b/rust/obs-graphics/src/texture_file_data.rs @@ -21,6 +21,15 @@ pub trait Backend { /// Load legacy straight-alpha pixels and publish post-decode metadata before /// releasing an initialized session. Failed initialization owns its cleanup. -pub fn create_texture_file_data(_backend: &mut B) -> Option { - todo!("#5145 legacy image-file orchestration") +pub fn create_texture_file_data(backend: &mut B) -> Option { + if !backend.init() { + return None; + } + let data = backend.decode_straight(); + if data.is_some() { + let metadata = backend.metadata(); + backend.publish(metadata); + } + backend.free(); + data } diff --git a/rust/obs-graphics/tests/render/main.rs b/rust/obs-graphics/tests/render/main.rs index 3602db2cd0..6710e1fb5e 100644 --- a/rust/obs-graphics/tests/render/main.rs +++ b/rust/obs-graphics/tests/render/main.rs @@ -80,6 +80,7 @@ mod texture_creators_parity; mod texture_file_data; mod texture_file_data2; mod texture_file_data2_parity; +mod texture_file_data_parity; mod texture_metadata; mod texture_metadata_parity; mod texture_planar_creators; diff --git a/rust/obs-graphics/tests/render/texture_file_data.rs b/rust/obs-graphics/tests/render/texture_file_data.rs index 194a77cecb..a2d43575fe 100644 --- a/rust/obs-graphics/tests/render/texture_file_data.rs +++ b/rust/obs-graphics/tests/render/texture_file_data.rs @@ -1,8 +1,16 @@ //! Mirrors every assertion in test_texture_file_data_legacy.c over a safe session. use obs_graphics::texture_file_data::{Backend, Metadata, create_texture_file_data}; -const BEFORE: Metadata = Metadata { format: 5, width: 91, height: 92 }; -const AFTER: Metadata = Metadata { format: 3, width: 2, height: 1 }; +const BEFORE: Metadata = Metadata { + format: 4, + width: 91, + height: 92, +}; +const AFTER: Metadata = Metadata { + format: 3, + width: 2, + height: 1, +}; const PIXELS: [u8; 8] = [1, 2, 3, 128, 4, 5, 6, 0]; struct Recording { initialized: bool, @@ -42,26 +50,54 @@ impl Backend for Recording { fn check_load(initialized: bool, decoded: bool) { let pixels = decoded.then(|| Box::new(PIXELS)); let identity = pixels.as_ref().map_or(0, |p| p.as_ptr() as usize); - let mut session = Recording { initialized, decoded, calls: vec![], outputs: BEFORE, pixels, identity }; + let mut session = Recording { + initialized, + decoded, + calls: vec![], + outputs: BEFORE, + pixels, + identity, + }; let result = create_texture_file_data(&mut session); assert_eq!(result.is_some(), initialized && decoded); if let Some(data) = result { assert_eq!(data.as_ptr() as usize, session.identity); assert_eq!(*data, PIXELS); } - let expected: &[&str] = if !initialized { &["init"] } - else if !decoded { &["init", "decode-straight", "free"] } - else { &["init", "decode-straight", "metadata", "publish", "free"] }; + let expected: &[&str] = if !initialized { + &["init"] + } else if !decoded { + &["init", "decode-straight", "free"] + } else { + &["init", "decode-straight", "metadata", "publish", "free"] + }; assert_eq!(session.calls, expected); - assert_eq!(session.outputs, if initialized && decoded { AFTER } else { BEFORE }); + assert_eq!( + session.outputs, + if initialized && decoded { + AFTER + } else { + BEFORE + } + ); } #[test] -fn failed_init_has_no_decode_or_second_free() { check_load(false, false); } +fn failed_init_has_no_decode_or_second_free() { + check_load(false, false); +} #[test] -fn failed_decode_frees_without_output_writes() { check_load(true, false); } +fn failed_decode_frees_without_output_writes() { + check_load(true, false); +} #[test] -fn successful_decode_publishes_before_free() { check_load(true, true); } +fn successful_decode_publishes_before_free() { + check_load(true, true); +} #[test] fn repeated_failure_and_success() { - for _ in 0..8 { check_load(false, false); check_load(true, false); check_load(true, true); } + for _ in 0..8 { + check_load(false, false); + check_load(true, false); + check_load(true, true); + } } diff --git a/rust/obs-graphics/tests/render/texture_file_data_parity.rs b/rust/obs-graphics/tests/render/texture_file_data_parity.rs new file mode 100644 index 0000000000..5ac3d02b65 --- /dev/null +++ b/rust/obs-graphics/tests/render/texture_file_data_parity.rs @@ -0,0 +1,63 @@ +//! Tier 3: unchanged C orchestration and real C adapter with recording FFmpeg +//! dependencies. No intentional differences. The C recorder is thread-local. +use core::ffi::c_char; +use obs_graphics::ffi::texture_file_data::gs_create_texture_file_data; +use obs_graphics::texture_render::ColorFormat; +use proptest::prelude::*; + +type Loader = unsafe extern "C" fn(*const c_char, *mut ColorFormat, *mut u32, *mut u32) -> *mut u8; +unsafe extern "C" { + fn oracle_texture_file_data_run(loader: Option, config: *const i32, out: *mut u32); +} +fn run(loader: Option, config: [i32; 5]) -> [u32; 24] { + let mut out = [0; 24]; + // SAFETY: recorder borrows these bounded arrays synchronously, and loader + // has the unchanged public C signature and writable outputs. + unsafe { oracle_texture_file_data_run(loader, config.as_ptr(), out.as_mut_ptr()) }; + assert_eq!(out[5], 0, "unbalanced pixel/session allocation"); + assert_eq!( + out[6], 0, + "callback identity, ordering, output or pixels differ" + ); + out +} +#[test] +fn characterization_matches_original_c() { + for _ in 0..8 { + for (init, decode) in [(0, 0), (1, 0), (1, 1)] { + let config = [init, decode, 2, 1, 3]; + let original = run(None, config); + assert_eq!(run(Some(gs_create_texture_file_data), config), original); + assert_eq!(original[3], (init != 0 && decode != 0) as u32); + assert_eq!(original[4], 1, "returned allocation identity"); + let events: &[u32] = if init == 0 { + &[1] + } else if decode == 0 { + &[1, 2, 4] + } else { + &[1, 2, 3, 4] + }; + assert_eq!(&original[8..8 + original[7] as usize], events); + } + } +} +#[test] +fn dimensions_and_formats_match_original_c() { + for size in [i32::MIN, -1, 0, 1, i32::MAX] { + for format in [0, 3, 5, i32::MAX] { + let config = [1, 1, size, size.wrapping_add(1), format]; + assert_eq!( + run(Some(gs_create_texture_file_data), config), + run(None, config) + ); + } + } +} +proptest! { + #![proptest_config(ProptestConfig::with_cases(obs_c_oracle::parity::cases(256)))] + #[test] + fn arbitrary_sessions_match_original_c(init in any::(), decode in any::(), width in any::(), height in any::(), format in 0i32..=i32::MAX) { + let config = [i32::from(init), i32::from(decode), width, height, format]; + prop_assert_eq!(run(Some(gs_create_texture_file_data), config), run(None, config)); + } +} diff --git a/test/cmocka/test_texture_file_data_steps.c b/test/cmocka/test_texture_file_data_steps.c new file mode 100644 index 0000000000..9cffea6495 --- /dev/null +++ b/test/cmocka/test_texture_file_data_steps.c @@ -0,0 +1,183 @@ +/* Rust-export recording characterization. The real private C adapter retains + * FFmpeg layout and callback plumbing; the orchestration comes from Rust. */ +#include +#include +#include +#include +#include "libobs/build/libobs-media.pch.h" + +static const char missing[] = "legacy-missing.png"; +static const char corrupt[] = "legacy-corrupt.png"; +static struct ffmpeg_image *session; +static enum gs_color_format *format_out; +static uint32_t *width_out, *height_out; +static unsigned calls; +static bool init_ok, decode_ok; +static uint8_t *pixels; +static const uint8_t expected_pixels[] = {1, 2, 3, 128, 4, 5, 6, 0}; + +static uint32_t record_max_size(void) +{ + return 4096; +} + +static bool record_size(struct ffmpeg_image *image, int cx, int cy) +{ + (void)image; + (void)cx; + (void)cy; + /* Only callback identity matters to the wrapper. */ + assert_true(false); + return false; +} + +static void *record_convert(struct ffmpeg_image *image, AVFrame *frame, enum gs_image_alpha_mode alpha) +{ + (void)image; + (void)frame; + (void)alpha; + assert_true(false); + return NULL; +} + +static bool record_init(struct ffmpeg_image *image, const char *file, uint32_t (*max_size)(void)) +{ + assert_int_equal(calls++, 0); + assert_ptr_equal(file, init_ok ? corrupt : missing); + assert_ptr_equal(max_size, record_max_size); + session = image; + memset(image, 0, sizeof(*image)); + image->format = AV_PIX_FMT_BGRA; + image->cx = 71; + image->cy = 72; + return init_ok; +} + +static void *record_decode(void *context, int alpha) +{ + assert_int_equal(calls++, 1); + struct gs_image_decode_context *decode = context; + assert_ptr_equal(decode->image, session); + assert_ptr_equal(decode->check_size, record_size); + assert_ptr_equal(decode->convert, record_convert); + assert_int_equal(alpha, GS_IMAGE_ALPHA_STRAIGHT); + assert_int_equal(*format_out, GS_BGRX); + assert_int_equal(*width_out, 91); + assert_int_equal(*height_out, 92); + /* Decode can change the image's dimensions/format (e.g. orientation). */ + session->format = AV_PIX_FMT_RGBA; + session->cx = 2; + session->cy = 1; + if (!decode_ok) + return NULL; + pixels = bmemdup(expected_pixels, sizeof(expected_pixels)); + return pixels; +} + +static int record_format(int format) +{ + assert_int_equal(calls++, 2); + assert_int_equal(format, AV_PIX_FMT_RGBA); + return GS_RGBA; +} + +static void record_free(struct ffmpeg_image *image) +{ + assert_ptr_equal(image, session); + assert_int_equal(calls++, decode_ok ? 3 : 2); + /* Pin publication before cleanup; failure must not write outputs. */ + assert_int_equal(*format_out, decode_ok ? GS_RGBA : GS_BGRX); + assert_int_equal(*width_out, decode_ok ? 2 : 91); + assert_int_equal(*height_out, decode_ok ? 1 : 92); + memset(image, 0, sizeof(*image)); +} + +#define gs_create_texture_file_data record_texture_file_data +#define ffmpeg_image_init record_init +#define ffmpeg_image_free record_free +#define gs_ffmpeg_image_decode record_decode +#define gs_ffmpeg_image_color_format record_format +#define gs_image_max_texture_size record_max_size +#define ffmpeg_image_too_large record_size +#define ffmpeg_image_reformat_frame record_convert +#include "libobs/graphics/graphics-texture-file-data-adapter.c.h" +#undef ffmpeg_image_reformat_frame +#undef ffmpeg_image_too_large +#undef gs_image_max_texture_size +#undef gs_ffmpeg_image_color_format +#undef gs_ffmpeg_image_decode +#undef ffmpeg_image_free +#undef ffmpeg_image_init +#undef gs_create_texture_file_data +#define record_texture_file_data gs_create_texture_file_data + +static void check_load(bool initialized, bool decoded) +{ + const long allocations = bnum_allocs(); + enum gs_color_format format = GS_BGRX; + uint32_t width = 91, height = 92; + format_out = &format; + width_out = &width; + height_out = &height; + calls = 0; + init_ok = initialized; + decode_ok = decoded; + pixels = NULL; + uint8_t *data = record_texture_file_data(initialized ? corrupt : missing, &format, &width, &height); + assert_int_equal(calls, !initialized ? 1 : decoded ? 4 : 3); + if (initialized && decoded) { + assert_ptr_equal(data, pixels); + assert_memory_equal(data, expected_pixels, sizeof(expected_pixels)); + assert_int_equal(format, GS_RGBA); + assert_int_equal(width, 2); + assert_int_equal(height, 1); + /* The caller owns the decode allocation after session cleanup. */ + assert_int_equal(bnum_allocs(), allocations + 1); + bfree(data); + } else { + assert_null(data); + assert_int_equal(format, GS_BGRX); + assert_int_equal(width, 91); + assert_int_equal(height, 92); + } + assert_int_equal(bnum_allocs(), allocations); +} + +static void failed_init_has_no_decode_or_second_free(void **state) +{ + (void)state; + check_load(false, false); +} + +static void failed_decode_frees_without_output_writes(void **state) +{ + (void)state; + check_load(true, false); +} + +static void successful_decode_publishes_before_free(void **state) +{ + (void)state; + check_load(true, true); +} + +static void repeated_failure_and_success(void **state) +{ + (void)state; + for (unsigned i = 0; i < 8; i++) { + check_load(false, false); + check_load(true, false); + check_load(true, true); + } +} + +int main(void) +{ + const struct CMUnitTest tests[] = {cmocka_unit_test(failed_init_has_no_decode_or_second_free), + cmocka_unit_test(failed_decode_frees_without_output_writes), + cmocka_unit_test(successful_decode_publishes_before_free), + cmocka_unit_test(repeated_failure_and_success)}; + return cmocka_run_group_tests(tests, NULL, NULL); +} + +#undef record_texture_file_data diff --git a/test/cmocka/tests.d/test_texture_file_data_steps_rust.cmake b/test/cmocka/tests.d/test_texture_file_data_steps_rust.cmake new file mode 100644 index 0000000000..d9a74f18ca --- /dev/null +++ b/test/cmocka/tests.d/test_texture_file_data_steps_rust.cmake @@ -0,0 +1,2 @@ +# Recording-session characterization calls the Rust export and real C adapter. +# Both target and test are declared in ../build/test-graph.json. diff --git a/test/cmocka/tests.d/texture_file_data_link_support.cmake b/test/cmocka/tests.d/texture_file_data_link_support.cmake new file mode 100644 index 0000000000..5cfd7367b2 --- /dev/null +++ b/test/cmocka/tests.d/texture_file_data_link_support.cmake @@ -0,0 +1,21 @@ +# Real image conversion and session glue for every standalone Rust consumer. +function(_texture_file_data_link_support) + add_library( + texture_file_data_link_support + STATIC + "${CMAKE_SOURCE_DIR}/libobs/build/libobs.media-texture-file-data-adapter+.h.c" + ) + target_include_directories(texture_file_data_link_support PRIVATE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/libobs") + target_link_libraries( + texture_file_data_link_support + PRIVATE OBS::libobs FFmpeg::avcodec FFmpeg::avformat FFmpeg::avutil FFmpeg::swscale + ) + 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 texture_file_data_link_support) + endif() + endforeach() +endfunction() +cmake_language(DEFER CALL _texture_file_data_link_support) From 2494511bba5a88b681bb07b917f33e6d88673b4b Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 14:14:13 -0800 Subject: [PATCH 03/25] graphics: retain real conversion dependencies in static consumers (Refs #5145) --- .../libobs.media-texture-file-data-adapter+.h.c | 5 +++-- ...anonical_texture_file_data_swap_is_registered.rs | 4 +++- .../test_hotkey_background_control.json | 13 +++++++++++-- ...ust.cmake => test_texture_file_data_steps.cmake} | 0 4 files changed, 17 insertions(+), 5 deletions(-) rename test/cmocka/tests.d/{test_texture_file_data_steps_rust.cmake => test_texture_file_data_steps.cmake} (100%) diff --git a/libobs/build/libobs.media-texture-file-data-adapter+.h.c b/libobs/build/libobs.media-texture-file-data-adapter+.h.c index df4ba51938..8e0854c692 100644 --- a/libobs/build/libobs.media-texture-file-data-adapter+.h.c +++ b/libobs/build/libobs.media-texture-file-data-adapter+.h.c @@ -1,5 +1,6 @@ -/* C-owned image decoding and private opaque sessions. */ +/* C-owned image conversion and private opaque sessions. */ #include "libobs/build/libobs-media.pch.h" -#include "libobs/graphics/graphics-ffmpeg.c.h" +#include "libobs/graphics/graphics-ffmpeg-orientation-adapter.c.h" #include "libobs/graphics/graphics-texture-file-data-adapter.c.h" +#include "libobs/graphics/graphics-texture-file-data-convert.c.h" diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 0b93b298ea..fbeb24359d 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -4,8 +4,10 @@ use super::*; fn canonical_texture_file_data_swap_is_registered() { use obs_build::validation::graph::Graph; let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); - let graph = Graph::load(&root.join("test/cmocka/build/test-graph.json")).unwrap(); + let mut graph = Graph::load(&root.join("test/cmocka/build/test-graph.json")).unwrap(); let name = "test_texture_file_data_steps_rust"; + graph.targets.retain(|key, _| key == name); + graph.tests.retain(|key, _| key == name); for os in ["OS_LINUX", "OS_MACOS", "OS_WINDOWS"] { let selected = graph .select(&[(os.into(), true), ("HAVE_LIBOBS_RUST_STATIC".into(), true)].into()) diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json index 1acd9b9256..d129a4aa69 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json @@ -4,7 +4,8 @@ "test_hotkey_background_control": { "sources": [ "test/cmocka/test_hotkey_background_control.c", - "libobs/obs-hotkey-background-control-fields.c.h" + "libobs/obs-hotkey-background-control-fields.c.h", + "libobs/build/libobs.media-texture-file-data-adapter+.h.c" ], "definitions": [ "obs=control_test_obs", @@ -21,7 +22,15 @@ "name": "OBS::w32-pthreads", "requires": "OS_WINDOWS" }, - "libobs_rust-static" + "libobs_rust-static", + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale" + ], + "includes": [ + ".", + "libobs" ] } }, diff --git a/test/cmocka/tests.d/test_texture_file_data_steps_rust.cmake b/test/cmocka/tests.d/test_texture_file_data_steps.cmake similarity index 100% rename from test/cmocka/tests.d/test_texture_file_data_steps_rust.cmake rename to test/cmocka/tests.d/test_texture_file_data_steps.cmake From befa4e3ca006f3d240c76c4d5271d6f3a57f09b3 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 14:25:57 -0800 Subject: [PATCH 04/25] test(graphics): complete static fixture dependencies and registrations (Refs #5145) --- ...nonical_rust_static_graphics_are_registered.rs | 8 +++++--- ...onical_texture_file_data_swap_is_registered.rs | 3 ++- .../graphics/test_texture_file_data_steps.json | 15 ++++++++++++++- .../rust-static/support/z-texture-file-data.json | 6 ------ rust/obs-c-oracle/oracle/texture_file_data.c | 2 +- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs b/rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs index 0414c22ca6..26fdd2fe15 100644 --- a/rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs @@ -8,19 +8,21 @@ static CASES: std::sync::LazyLock> = #[test] fn canonical_rust_static_graphics_are_registered() { let graph = rust_static_entries::assert_family(FAMILY); - assert_eq!(CASES.len(), 6); + assert_eq!(CASES.len(), 7); for windows in [false, true] { for msvc in [false, true] { for available in [false, true] { let facts = [ ("HAVE_LIBOBS_RUST_STATIC".into(), available), ("OS_WINDOWS".into(), windows), + ("OS_LINUX".into(), !windows), + ("OS_FREEBSD".into(), false), ("MSVC".into(), msvc), ] .into(); let selected = graph.select(&facts).unwrap(); - assert_eq!(selected.targets.len(), if available { 6 } else { 0 }); - assert_eq!(selected.tests.len(), if available { 6 } else { 0 }); + assert_eq!(selected.targets.len(), if available { 7 } else { 0 }); + assert_eq!(selected.tests.len(), if available { 7 } else { 0 }); } } } diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index fbeb24359d..605bc73ba5 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -10,7 +10,8 @@ fn canonical_texture_file_data_swap_is_registered() { graph.tests.retain(|key, _| key == name); for os in ["OS_LINUX", "OS_MACOS", "OS_WINDOWS"] { let selected = graph - .select(&[(os.into(), true), ("HAVE_LIBOBS_RUST_STATIC".into(), true)].into()) + .select(&[(os.into(), true), ("OS_FREEBSD".into(), false), + ("HAVE_LIBOBS_RUST_STATIC".into(), true)].into()) .unwrap(); assert_eq!(selected.tests[name].target, name); assert!(format!("{:?}", selected.targets[name]).contains("libobs_rust-static")); diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json index 725fee4b0a..80a8d999f5 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json @@ -34,7 +34,20 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ], "sanitizers": "address,undefined" } diff --git a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json index 2918748112..d7b3b462ae 100644 --- a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json +++ b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json @@ -540,9 +540,6 @@ ] }, "test_scene_audio_window_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" - ], "includes": [ ".", "libobs" @@ -630,9 +627,6 @@ ] }, "test_scene_render_plan_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" - ], "includes": [ ".", "libobs" diff --git a/rust/obs-c-oracle/oracle/texture_file_data.c b/rust/obs-c-oracle/oracle/texture_file_data.c index e9c52c10da..ec2e255867 100644 --- a/rust/obs-c-oracle/oracle/texture_file_data.c +++ b/rust/obs-c-oracle/oracle/texture_file_data.c @@ -7,7 +7,7 @@ #include #include "graphics/graphics.h" #include "util/threading.h" -enum AVPixelFormat { TFD_INITIAL, TFD_DECODED }; +enum AVPixelFormat { TFD_NONE = -1, TFD_INITIAL, TFD_DECODED }; typedef struct AVFormatContext AVFormatContext; typedef struct AVCodecContext AVCodecContext; typedef struct AVCodec AVCodec; From 606d2580c029383a042e733686a66eaa962abb77 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 14:28:15 -0800 Subject: [PATCH 05/25] test(graphics): link real logging bridge into image fixture (Refs #5145) --- .../cases/graphics/test_texture_file_data_steps.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json index 80a8d999f5..7e6fc090e6 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json @@ -9,7 +9,8 @@ "libobs/graphics/graphics-linear-srgb-fields.c.h", "libobs/obs-graphics-effect-file-fields.c.h", "test/cmocka/object-validity-query-link-stubs.c", - "libobs/build/libobs.image-decode-adapter+.h.c" + "libobs/build/libobs.image-decode-adapter+.h.c", + "libobs/util/base-variadic.c.h" ], "requires": "HAVE_LIBOBS_RUST_STATIC", "includes": [ From 337519539c9423c7c753baf930c4a09753b1ba39 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 14:35:57 -0800 Subject: [PATCH 06/25] style(graphics): format image-file native registration (Refs #5145) Ci-Attestation: {"at":1795041890,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":185,"stamp":"70ffe3d38701a236c0b561ce771f4e12","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041890,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":185,"stamp":"de24e2be838962f2efe1446916e88c81","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041890,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":185,"stamp":"c2d088005951ae695095dc3e2d593703","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041890,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":185,"stamp":"2a54f7e73f3b476d1dfb9672c6202824","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"general/all/client-lint","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"5802d44c226eddb5874a353c23c0e557","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041890,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":185,"stamp":"634f476774727c9ff6ca2a940b814e84","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"69d7e66bb6303ee0b6800fee73203cac","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"73925f06232fb85f366634fbce6804dd","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"0c0385c6ae169994e628defbc91a4620","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"4ed496cd5d1e3e889e46184d5bc11810","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"649871a702731d2cd3d6e155aac08e81","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"69aa2e8c4c0a22ab20b73f1f871c6733","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"a76f2d13aa318ea6885644f75cb6c79d","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"0b9b3dfd4f991ade03b611fff0abd681","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"21a7de19ba6a4a72dbf96d4eef48f3b4","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"6a5cc0b73efe001f418c95a24808c0c2","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"6dd14b3bd5e4cac3c702a73a49abf457","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795041704,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"a9d44f9b0115384b375d19aa7c9af24fca40d65ebb020c242b27250a99d4cc64","lane":"client-lint","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":345,"stamp":"283a587cac432bb798dc83926518ff56","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Ci-Attestation: {"at":1795042469,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"15eb5c90dd0d6c753fa3b4919ae12e10120574b5ad36c0bfb5d94d2fdaa131ee","lane":"client-test-x86_64-unknown-linux-gnu","parents":["345d97c766effc40fe42794d11a4b0afa8189576"],"secs":577,"stamp":"02a3a9dce0ceb5bac18a70f1aa773e59","tree":"00568d8d7ba3b955e185b46336fbae112215a56f","v":1,"via":"run"} Client-Checks: {"checks":{"base":"039da04e50ff95d875e627962cbbf4dcf032af4c","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.graphics+.h.c","libobs/build/libobs.media+.h.c","libobs/build/libobs.media-texture-file-data-adapter+.h.c","libobs/build/libobs.ported-texture-file-data+.h.c","libobs/build/modules.d/media.json","libobs/build/ported-source-sets/texture-file-data.json","libobs/build/source-sets.d/LIBOBS_SOURCES.json","libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt","libobs/graphics/graphics-ffmpeg.c.h","libobs/graphics/graphics-samplerstate-lifecycle.c.h","libobs/graphics/graphics-texture-file-data-adapter.c.h","libobs/graphics/graphics-texture-file-data-convert.c.h","libobs/graphics/graphics.c.h","libobs/obs-source-canvas-getter.c.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_private_link_rules_are_registered.rs","rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs","rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs","rust/obs-build/tests/native/registration/headless_characterizations_expected.json","rust/obs-build/tests/native/registration/portal_output_expected.json","rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_graphics_state_stacks.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_window_match_steps.json","rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json","rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list","rust/obs-c-oracle/oracle.d/texture-file-data.list","rust/obs-c-oracle/oracle/texture_file_data.c","rust/obs-graphics/src/ffi/mod.rs","rust/obs-graphics/src/ffi/texture_file_data.rs","rust/obs-graphics/src/lib.rs","rust/obs-graphics/src/texture_file_data.rs","rust/obs-graphics/tests/render/main.rs","rust/obs-graphics/tests/render/texture_file_data.rs","rust/obs-graphics/tests/render/texture_file_data_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/test_samplerstate_lifecycle.c","test/cmocka/test_source_canvas_getter.c","test/cmocka/test_texture_file_data_steps.c","test/cmocka/tests.d/test_samplerstate_lifecycle.cmake","test/cmocka/tests.d/test_source_canvas_getter.cmake","test/cmocka/tests.d/test_texture_file_data_steps.cmake","test/cmocka/tests.d/texture_file_data_link_support.cmake"],"head":"65a6b0f56562bcce9469db45bc4966c131984f8f","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":"f9fc4affa473a1a19acdd3b98bb546a69e40f6f2993ec7b132fffda5409ca0b2","tree":"00568d8d7ba3b955e185b46336fbae112215a56f"}} --- .../canonical_texture_file_data_swap_is_registered.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 605bc73ba5..197082c2d2 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -10,8 +10,14 @@ fn canonical_texture_file_data_swap_is_registered() { graph.tests.retain(|key, _| key == name); for os in ["OS_LINUX", "OS_MACOS", "OS_WINDOWS"] { let selected = graph - .select(&[(os.into(), true), ("OS_FREEBSD".into(), false), - ("HAVE_LIBOBS_RUST_STATIC".into(), true)].into()) + .select( + &[ + (os.into(), true), + ("OS_FREEBSD".into(), false), + ("HAVE_LIBOBS_RUST_STATIC".into(), true), + ] + .into(), + ) .unwrap(); assert_eq!(selected.tests[name].target, name); assert!(format!("{:?}", selected.targets[name]).contains("libobs_rust-static")); From 5dd90dd91c937c1cfef842d962add6dfa70b934d Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 15:11:56 -0800 Subject: [PATCH 07/25] style(graphics): keep image-file graph registration in name order (Refs #5145) Ci-Attestation: {"at":1795043675,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":134,"stamp":"87b0f5529426b836b44d4ac7230ae02a","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043675,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":134,"stamp":"2765ad2d68950bab89c9870bbee64a9c","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043675,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":134,"stamp":"0dbe1d8bd9928a5d03a76fac8f2ad558","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043675,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":134,"stamp":"2fc01af8eeebeedf670f71c05b7cc449","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043538,"gate":"general/all/client-lint","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"7258937618ad33dea98c4ae0c1d479b3","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043675,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":134,"stamp":"4c228a84334acdc4eaa5621f27b7686f","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"6d420dc3c1321ba86a940e38d894d753","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"3fc0f8dd8fdc66f15a2bab3d14ec22ba","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"dedf098bb78500098778b2b8296671f9","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"f916564c301271b94a13dfc5266c98a4","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"abcec638bbdd674c78282499422f8ba3","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"b2cce496f1b59aec8c7600ebbf922655","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"dad6fdaa142426949d8fc67f606be46c","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"1edacfa5dd003285982294b3722c6b1b","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"5b3ca7216cacc5f5b8d3fa4de634cd8b","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043539,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"fc812688bb9804f00d343e690f5dc348","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043538,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"a03d7f7f236f4be96e4daf43b950c9e1","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795043538,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"6b2ce4cb8e6ffcf6625aa37fa81768ec76968120778756c8b1db564e2d4fb924","lane":"client-lint","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":20,"stamp":"1c2342eb6d5fadceb76b27f17d7abee3","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Ci-Attestation: {"at":1795044161,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"e83bd7120d2d600c36057f5fccb7dc33ef97c498cc2a8d6256e1b0fa86dbf911","lane":"client-test-x86_64-unknown-linux-gnu","parents":["1acfa137d98931e8478c45cec7bd398a297bef27"],"secs":485,"stamp":"010d43506dae35e67c508214db759eed","tree":"4970b30235d3a367057f571a7823fb9b863de116","v":1,"via":"run"} Client-Checks: {"checks":{"base":"0ad536f7ba5743a2475a53863acf41cb38a47bb3","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.media+.h.c","libobs/build/libobs.media-texture-file-data-adapter+.h.c","libobs/build/libobs.ported-texture-file-data+.h.c","libobs/build/modules.d/media.json","libobs/build/ported-source-sets/texture-file-data.json","libobs/build/source-sets.d/LIBOBS_SOURCES.json","libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt","libobs/graphics/graphics-ffmpeg.c.h","libobs/graphics/graphics-texture-file-data-adapter.c.h","libobs/graphics/graphics-texture-file-data-convert.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_private_link_rules_are_registered.rs","rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs","rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs","rust/obs-build/tests/native/registration/headless_characterizations_expected.json","rust/obs-build/tests/native/registration/portal_output_expected.json","rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_graphics_state_stacks.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_window_match_steps.json","rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json","rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list","rust/obs-c-oracle/oracle.d/texture-file-data.list","rust/obs-c-oracle/oracle/texture_file_data.c","rust/obs-graphics/src/ffi/mod.rs","rust/obs-graphics/src/ffi/texture_file_data.rs","rust/obs-graphics/src/lib.rs","rust/obs-graphics/src/texture_file_data.rs","rust/obs-graphics/tests/render/main.rs","rust/obs-graphics/tests/render/texture_file_data.rs","rust/obs-graphics/tests/render/texture_file_data_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/test_texture_file_data_steps.c","test/cmocka/tests.d/test_texture_file_data_steps.cmake","test/cmocka/tests.d/texture_file_data_link_support.cmake"],"head":"db27119d12c1aa0c2ed762429f0871d2c94dbadb","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":"d9322ddf589a15ff8b3af56be66a53dd09c4c5422658438e03fbcf919f6d96be","tree":"4970b30235d3a367057f571a7823fb9b863de116"}} --- test/cmocka/build/test-graph.json | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index 163caa36f1..9bf38a4166 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -19995,6 +19995,57 @@ "libobs/graphics/graphics-texture-file-data.c.h" ] }, + "test_texture_file_data_steps_rust": { + "sources": [ + "test/cmocka/test_texture_file_data_steps.c", + "libobs/graphics/effect-parser-lifecycle-adapter.c.h", + "libobs/graphics/obs-graphics-adapter.c.h", + "libobs/graphics/graphics-linear-srgb-fields.c.h", + "libobs/obs-graphics-effect-file-fields.c.h", + "test/cmocka/object-validity-query-link-stubs.c", + "libobs/build/libobs.image-decode-adapter+.h.c", + "libobs/util/base-variadic.c.h" + ], + "requires": "HAVE_LIBOBS_RUST_STATIC", + "includes": [ + ".", + "libobs" + ], + "libraries": [ + "OBS::libobs", + "OBS::caption", + "OBS::native-test-cmocka", + "libobs_rust-static", + { + "name": "m", + "requires": { + "not": "MSVC" + } + }, + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + }, + "FFmpeg::avcodec", + "FFmpeg::avformat", + "FFmpeg::avutil", + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } + ], + "sanitizers": "address,undefined" + }, "test_texture_render": { "sources": [ "test/cmocka/test_texture_render.c" @@ -30456,6 +30507,13 @@ "${target}" ] }, + "test_texture_file_data_steps_rust": { + "target": "test_texture_file_data_steps_rust", + "requires": "HAVE_LIBOBS_RUST_STATIC", + "command": [ + "${target}" + ] + }, "test_texture_render": { "target": "test_texture_render", "command": [ From 7ae68f529436375394dd7a3268489b52057886a2 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 16:18:23 -0800 Subject: [PATCH 08/25] test(graphics): require standalone image maximum-size callback support (Refs #5145) --- ...al_texture_file_data_swap_is_registered.rs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 197082c2d2..ed3365cb0c 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -28,3 +28,27 @@ fn canonical_texture_file_data_swap_is_registered() { let media = fs::read_to_string(root.join("libobs/build/libobs.media+.h.c")).unwrap(); assert!(!media.contains("libobs/graphics/graphics-texture-file-data.c.h")); } + +#[test] +fn standalone_texture_file_data_adapters_supply_private_max_size_callback() { + let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let graph: serde_json::Value = + serde_json::from_slice(&fs::read(root.join("test/cmocka/build/test-graph.json")).unwrap()) + .unwrap(); + let adapter = "libobs/build/libobs.media-texture-file-data-adapter+.h.c"; + let callback = "test/cmocka/texture-file-data-max-size-link-stub.c"; + let mut consumers = 0; + for (name, target) in graph["targets"].as_object().unwrap() { + let sources = target["sources"].as_array().unwrap(); + if sources.contains(&serde_json::json!(adapter)) { + consumers += 1; + assert!(sources.contains(&serde_json::json!(callback)), "{name}"); + } + } + assert!(consumers > 0); + let fragment = fs::read_to_string( + root.join("test/cmocka/tests.d/texture_file_data_link_support.cmake"), + ) + .unwrap(); + assert!(fragment.contains(callback)); +} From abcb369c645fe2e9e90054bcfb99c17d19a12425 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 16:39:52 -0800 Subject: [PATCH 09/25] fix(graphics): complete standalone image adapter link support (Refs #5145) Ci-Attestation: {"at":1795049363,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":94,"stamp":"dc5138dd753bace457235baff3312439","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049363,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":94,"stamp":"7e577a5a25ed38d7e25624b923211288","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049363,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":94,"stamp":"f853cac938a4cd037b68773f2220363c","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049363,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":94,"stamp":"1fe7761e14eac3e837b777143a69e925","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049267,"gate":"general/all/client-lint","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"0fcfe87309cf1ed049cff3afbfd1dbe6","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049363,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":94,"stamp":"6e0a74247ecdee41b3d652804fae9c17","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049268,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"7eac911ef232322f70e86d1abbaf99c1","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049268,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"a9ee4291e436113d493af6f7845693a0","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049267,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"baaceff95aa6758bc9e0f6ba89a2c216","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049268,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"f1f5134590136472b6e0d2ef14033176","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049267,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"c6658e4f995fe2160fc6e154ef13be21","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049267,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"928757cbb96ba6628df00e915e43a1ee","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049268,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"39c90fee7a98d2a1e7618478ad759f3c","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049268,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"f4f3085c23a5c3a1554cf6b428869475","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049267,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"f4c0964302dc84f0dc4f211b963104e5","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049267,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"f7f7760f95b09b58d8b4519c712eb2eb","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049267,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"a0e94a5644baf251e1c0924f8e1a4c4b","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795049267,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e041d0804a1940c1813f690c2cf74018616efdd81810f1b5fcd1e3cd341569af","lane":"client-lint","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":347,"stamp":"ed59daff4b4ba56e8da66a46d82fb8a5","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Ci-Attestation: {"at":1795050002,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"6574ed6819a56e3d701f6b883254cc05538ce2aa0fbf8ccb383071c3156b93d5","lane":"client-test-x86_64-unknown-linux-gnu","parents":["311c66fc906fed11758b0ab4ccf28a44e1062b77"],"secs":637,"stamp":"3540ecfec231449e9b113812e20661db","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d","v":1,"via":"run"} Client-Checks: {"checks":{"base":"a62bfe717d5d9610a5136ca211273e66a1ae1f84","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.media+.h.c","libobs/build/libobs.media-texture-file-data-adapter+.h.c","libobs/build/libobs.ported-texture-file-data+.h.c","libobs/build/modules.d/media.json","libobs/build/ported-source-sets/texture-file-data.json","libobs/build/source-sets.d/LIBOBS_SOURCES.json","libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt","libobs/graphics/graphics-ffmpeg.c.h","libobs/graphics/graphics-texture-file-data-adapter.c.h","libobs/graphics/graphics-texture-file-data-convert.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_private_link_rules_are_registered.rs","rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs","rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs","rust/obs-build/tests/native/registration/headless_characterizations_expected.json","rust/obs-build/tests/native/registration/portal_output_expected.json","rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_graphics_state_stacks.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_window_match_steps.json","rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json","rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list","rust/obs-c-oracle/oracle.d/texture-file-data.list","rust/obs-c-oracle/oracle/texture_file_data.c","rust/obs-graphics/src/ffi/mod.rs","rust/obs-graphics/src/ffi/texture_file_data.rs","rust/obs-graphics/src/lib.rs","rust/obs-graphics/src/texture_file_data.rs","rust/obs-graphics/tests/render/main.rs","rust/obs-graphics/tests/render/texture_file_data.rs","rust/obs-graphics/tests/render/texture_file_data_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/test_texture_file_data_steps.c","test/cmocka/tests.d/test_texture_file_data_steps.cmake","test/cmocka/tests.d/texture_file_data_link_support.cmake","test/cmocka/texture-file-data-max-size-link-stub.c"],"head":"fff44be9914d0327e12f3856066a887e99fe9395","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":"14ae07b8e7293a75a44bea9e26915df55bbe5110b48146d6fb915a2c56ecf0e2","tree":"eb02153f9f6c493d2a26cb97a9c054902045441d"}} --- ...al_texture_file_data_swap_is_registered.rs | 7 +- .../test_hotkey_background_control.json | 3 +- .../support/z-texture-file-data.json | 446 ++++++++++++++---- .../texture_file_data_link_support.cmake | 2 + .../texture-file-data-max-size-link-stub.c | 13 + 5 files changed, 368 insertions(+), 103 deletions(-) create mode 100644 test/cmocka/texture-file-data-max-size-link-stub.c diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index ed3365cb0c..c60ac65228 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -46,9 +46,8 @@ fn standalone_texture_file_data_adapters_supply_private_max_size_callback() { } } assert!(consumers > 0); - let fragment = fs::read_to_string( - root.join("test/cmocka/tests.d/texture_file_data_link_support.cmake"), - ) - .unwrap(); + let fragment = + fs::read_to_string(root.join("test/cmocka/tests.d/texture_file_data_link_support.cmake")) + .unwrap(); assert!(fragment.contains(callback)); } diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json index d129a4aa69..c49719a4af 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json @@ -5,7 +5,8 @@ "sources": [ "test/cmocka/test_hotkey_background_control.c", "libobs/obs-hotkey-background-control-fields.c.h", - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "definitions": [ "obs=control_test_obs", diff --git a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json index d7b3b462ae..74858de766 100644 --- a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json +++ b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json @@ -1,7 +1,8 @@ { "test_async_conversion_plan_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -16,7 +17,8 @@ }, "test_async_frame_pacing_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -31,7 +33,8 @@ }, "test_async_upload_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -46,7 +49,8 @@ }, "test_audio_monitor_delay_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -61,7 +65,8 @@ }, "test_coreaudio_device_rules_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -76,7 +81,8 @@ }, "test_coreaudio_pacing_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -91,7 +97,8 @@ }, "test_deinterlace_draw_plan_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -106,7 +113,8 @@ }, "test_deinterlace_pacing_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -121,7 +129,8 @@ }, "test_deinterlace_select_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -136,7 +145,9 @@ }, "test_effect_param_types_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -146,12 +157,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_effect_parser_blocks_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -161,12 +187,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_effect_parser_compile_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -176,12 +217,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_effect_parser_lifecycle_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -191,12 +247,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_effect_parser_params_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -206,12 +277,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_effect_parser_passes_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -221,12 +307,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_effect_parser_shader_call_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -236,12 +337,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_graphics_ffmpeg_pq_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -251,12 +367,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_graphics_ffmpeg_route_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -266,12 +397,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_graphics_ffmpeg_wic_checks_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -281,12 +427,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_graphics_immediate_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -296,12 +457,27 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_graphics_state_stacks_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -311,12 +487,26 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_hotkey_background_control": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -331,7 +521,8 @@ }, "test_hotkey_background_enum": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -346,7 +537,8 @@ }, "test_hotkey_background_press": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -361,7 +553,8 @@ }, "test_hotkey_background_trigger": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -376,7 +569,8 @@ }, "test_hotkey_binding_press_steps": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -391,7 +585,8 @@ }, "test_hotkey_getters_characterization": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -406,7 +601,8 @@ }, "test_hotkey_load": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -421,7 +617,8 @@ }, "test_hotkey_pair_steps": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -436,7 +633,8 @@ }, "test_hotkey_press_steps": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -451,7 +649,8 @@ }, "test_monitor_speaker_layout_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -466,7 +665,8 @@ }, "test_monitor_video_sync_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -481,7 +681,8 @@ }, "test_monitor_wasapi_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -496,7 +697,9 @@ }, "test_nsgif_decode_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -506,12 +709,26 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_portal_shortcuts": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -526,7 +743,8 @@ }, "test_pulse_monitor_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -553,7 +771,8 @@ }, "test_scene_bounds_place_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -568,7 +787,8 @@ }, "test_scene_item_crop_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -583,7 +803,8 @@ }, "test_scene_item_names_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -598,7 +819,8 @@ }, "test_scene_item_order_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -613,7 +835,8 @@ }, "test_scene_item_transform_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -640,22 +863,8 @@ }, "test_scene_transform_update_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_service_handler_getters_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -670,7 +879,8 @@ }, "test_source_audio_input_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -685,7 +895,8 @@ }, "test_source_audio_place_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -700,7 +911,8 @@ }, "test_source_audio_render_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -715,7 +927,8 @@ }, "test_source_audio_timing_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -730,7 +943,8 @@ }, "test_source_color_space_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -745,7 +959,8 @@ }, "test_source_draw_plan_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -760,7 +975,8 @@ }, "test_source_duplicate_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -775,7 +991,8 @@ }, "test_source_filter_chain_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -790,7 +1007,8 @@ }, "test_source_frame_copy_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -805,7 +1023,8 @@ }, "test_source_init_context_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -820,7 +1039,8 @@ }, "test_source_media_admission_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -835,7 +1055,8 @@ }, "test_source_monitoring_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -850,7 +1071,8 @@ }, "test_source_ptm_gate_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -865,7 +1087,8 @@ }, "test_source_render_route_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -880,7 +1103,8 @@ }, "test_source_size_route_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -895,7 +1119,8 @@ }, "test_source_video_tick_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -910,7 +1135,8 @@ }, "test_source_volume_apply_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -925,7 +1151,9 @@ }, "test_sprite_geometry_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c", + "libobs/util/base-variadic.c.h" ], "includes": [ ".", @@ -935,12 +1163,26 @@ "FFmpeg::avcodec", "FFmpeg::avformat", "FFmpeg::avutil", - "FFmpeg::swscale" + "FFmpeg::swscale", + { + "name": "PkgConfig::_window_match_test_gio", + "requires": "HAVE_WINDOW_MATCH_TEST_GIO" + }, + { + "name": "LibUUID::LibUUID", + "requires": { + "any": [ + "OS_LINUX", + "OS_FREEBSD" + ] + } + } ] }, "test_transition_clock_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -955,7 +1197,8 @@ }, "test_transition_load_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -970,7 +1213,8 @@ }, "test_transition_render_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -985,7 +1229,8 @@ }, "test_transition_sample_time_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -1000,7 +1245,8 @@ }, "test_transition_start_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -1015,7 +1261,8 @@ }, "test_video_stop_requested_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -1030,7 +1277,8 @@ }, "test_wayland_hotkeys": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -1045,7 +1293,8 @@ }, "test_window_match_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", @@ -1060,7 +1309,8 @@ }, "test_windows_keys_steps_rust": { "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "libobs/build/libobs.media-texture-file-data-adapter+.h.c", + "test/cmocka/texture-file-data-max-size-link-stub.c" ], "includes": [ ".", diff --git a/test/cmocka/tests.d/texture_file_data_link_support.cmake b/test/cmocka/tests.d/texture_file_data_link_support.cmake index 5cfd7367b2..1dc6fde044 100644 --- a/test/cmocka/tests.d/texture_file_data_link_support.cmake +++ b/test/cmocka/tests.d/texture_file_data_link_support.cmake @@ -1,9 +1,11 @@ # Real image conversion and session glue for every standalone Rust consumer. +# Keep the unused private graphics callback in its own lazy archive member. function(_texture_file_data_link_support) add_library( texture_file_data_link_support STATIC "${CMAKE_SOURCE_DIR}/libobs/build/libobs.media-texture-file-data-adapter+.h.c" + "${CMAKE_SOURCE_DIR}/test/cmocka/texture-file-data-max-size-link-stub.c" ) target_include_directories(texture_file_data_link_support PRIVATE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/libobs") target_link_libraries( diff --git a/test/cmocka/texture-file-data-max-size-link-stub.c b/test/cmocka/texture-file-data-max-size-link-stub.c new file mode 100644 index 0000000000..28f21f50a5 --- /dev/null +++ b/test/cmocka/texture-file-data-max-size-link-stub.c @@ -0,0 +1,13 @@ +/* Standalone Rust-static fixtures pull the real image session adapter through + * unrelated archive members, but never initialize graphics or load an image. + * This private callback is not exported by libobs. Abort if that contract changes; + * image-loading characterizations provide their own recording callback instead. */ +#include +#include + +uint32_t gs_image_max_texture_size(void); + +uint32_t gs_image_max_texture_size(void) +{ + abort(); +} From ea672804404e874e767c86454c5c00bc57c833fe Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 17:13:40 -0800 Subject: [PATCH 10/25] test(graphics): require Windows timer imports for static consumers RED (Refs #5145) --- ...al_texture_file_data_swap_is_registered.rs | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index c60ac65228..8a7a5272b7 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -51,3 +51,71 @@ fn standalone_texture_file_data_adapters_supply_private_max_size_callback() { .unwrap(); assert!(fragment.contains(callback)); } + +#[test] +fn standalone_image_adapter_supplies_windows_timer_imports() { + let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let root = root.to_string_lossy().replace('\\', "/"); + for (system, windows) in [("Windows", true), ("Linux", false)] { + let directory = tempfile::tempdir().unwrap(); + fs::write( + directory.path().join("probe.c"), + "int main(void) { return 0; }\n", + ) + .unwrap(); + fs::write( + directory.path().join("CMakeLists.txt"), + format!( + r#"cmake_minimum_required(VERSION 3.28) +project(image-adapter-link-contract C) +set(CMAKE_SYSTEM_NAME "{system}") +set(CMAKE_SOURCE_DIR "{root}") +foreach(dependency IN ITEMS OBS::libobs FFmpeg::avcodec FFmpeg::avformat FFmpeg::avutil FFmpeg::swscale) + add_library(${{dependency}} INTERFACE IMPORTED) +endforeach() +add_library(libobs_rust-static INTERFACE) +foreach(consumer IN ITEMS test_video_stop_requested_rust test_texture_file_data_steps_rust) + add_executable(${{consumer}} "${{CMAKE_CURRENT_SOURCE_DIR}}/probe.c") + target_link_libraries(${{consumer}} PRIVATE libobs_rust-static) +endforeach() +add_executable(reference_consumer "${{CMAKE_CURRENT_SOURCE_DIR}}/probe.c") +include("{root}/test/cmocka/tests.d/texture_file_data_link_support.cmake") +"# + ), + ) + .unwrap(); + let build = directory.path().join("build"); + let configure = std::process::Command::new("cmake") + .arg("-S") + .arg(directory.path()) + .arg("-B") + .arg(&build) + .args(["-G", "Ninja"]) + .output() + .unwrap(); + assert!( + configure.status.success(), + "{}", + String::from_utf8_lossy(&configure.stderr) + ); + for consumer in [ + "test_video_stop_requested_rust", + "test_texture_file_data_steps_rust", + "reference_consumer", + ] { + let commands = std::process::Command::new("cmake") + .arg("--build") + .arg(&build) + .args(["--target", consumer, "--", "-n", "-v"]) + .output() + .unwrap(); + assert!(commands.status.success()); + let commands = String::from_utf8_lossy(&commands.stdout); + assert_eq!( + commands.contains("winmm"), + windows && consumer != "reference_consumer", + "{system}/{consumer}: {commands}" + ); + } + } +} From 272a17656ab9e33ae9d0dcaee7dd18c969f7c440 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 17:19:44 -0800 Subject: [PATCH 11/25] fix(graphics): propagate Windows timer library to static consumers (Refs #5145) --- test/cmocka/tests.d/texture_file_data_link_support.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/cmocka/tests.d/texture_file_data_link_support.cmake b/test/cmocka/tests.d/texture_file_data_link_support.cmake index 1dc6fde044..1e3112034e 100644 --- a/test/cmocka/tests.d/texture_file_data_link_support.cmake +++ b/test/cmocka/tests.d/texture_file_data_link_support.cmake @@ -10,7 +10,13 @@ function(_texture_file_data_link_support) target_include_directories(texture_file_data_link_support PRIVATE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/libobs") target_link_libraries( texture_file_data_link_support - PRIVATE OBS::libobs FFmpeg::avcodec FFmpeg::avformat FFmpeg::avutil FFmpeg::swscale + PRIVATE + OBS::libobs + FFmpeg::avcodec + FFmpeg::avformat + FFmpeg::avutil + FFmpeg::swscale + "$<$:winmm>" ) get_directory_property(_targets BUILDSYSTEM_TARGETS) foreach(_target IN LISTS _targets) From 2c4b302717c907ac4d8375ef82bf43ddb5c58031 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 17:27:00 -0800 Subject: [PATCH 12/25] test(graphics): cover Windows RPC and private logger linkage RED (Refs #5145) --- ...al_texture_file_data_swap_is_registered.rs | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 8a7a5272b7..9c11533b86 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -53,8 +53,14 @@ fn standalone_texture_file_data_adapters_supply_private_max_size_callback() { } #[test] -fn standalone_image_adapter_supplies_windows_timer_imports() { +fn standalone_image_adapter_supplies_windows_host_imports() { let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let graph: serde_json::Value = + serde_json::from_slice(&fs::read(root.join("test/cmocka/build/test-graph.json")).unwrap()) + .unwrap(); + let graph = serde_json::json!({"targets": { + "test_video_stop_requested_rust": graph["targets"]["test_video_stop_requested_rust"] + }}); let root = root.to_string_lossy().replace('\\', "/"); for (system, windows) in [("Windows", true), ("Linux", false)] { let directory = tempfile::tempdir().unwrap(); @@ -63,13 +69,15 @@ fn standalone_image_adapter_supplies_windows_timer_imports() { "int main(void) { return 0; }\n", ) .unwrap(); + fs::write(directory.path().join("graph.json"), graph.to_string()).unwrap(); fs::write( directory.path().join("CMakeLists.txt"), format!( - r#"cmake_minimum_required(VERSION 3.28) + r##"cmake_minimum_required(VERSION 3.28) project(image-adapter-link-contract C) set(CMAKE_SYSTEM_NAME "{system}") set(CMAKE_SOURCE_DIR "{root}") +set(OS_WINDOWS {windows}) foreach(dependency IN ITEMS OBS::libobs FFmpeg::avcodec FFmpeg::avformat FFmpeg::avutil FFmpeg::swscale) add_library(${{dependency}} INTERFACE IMPORTED) endforeach() @@ -79,8 +87,15 @@ foreach(consumer IN ITEMS test_video_stop_requested_rust test_texture_file_data_ target_link_libraries(${{consumer}} PRIVATE libobs_rust-static) endforeach() add_executable(reference_consumer "${{CMAKE_CURRENT_SOURCE_DIR}}/probe.c") +include("{root}/test/cmocka/native-test-graph.cmake") +file(READ "${{CMAKE_CURRENT_SOURCE_DIR}}/graph.json" graph) +_obs_test_graph_sources(video_sources "${{graph}}" test_video_stop_requested_rust) +if("libobs/util/base-variadic.c.h" IN_LIST video_sources) + file(WRITE "${{CMAKE_CURRENT_BINARY_DIR}}/base-variadic-provider.c" "#include \"{root}/libobs/util/base-variadic.c.h\"\n") + target_sources(test_video_stop_requested_rust PRIVATE "${{CMAKE_CURRENT_BINARY_DIR}}/base-variadic-provider.c") +endif() include("{root}/test/cmocka/tests.d/texture_file_data_link_support.cmake") -"# +"## ), ) .unwrap(); @@ -111,9 +126,24 @@ include("{root}/test/cmocka/tests.d/texture_file_data_link_support.cmake") .unwrap(); assert!(commands.status.success()); let commands = String::from_utf8_lossy(&commands.stdout); + let lower = commands.to_ascii_lowercase(); + let links = |library| { + lower.split_whitespace().any(|token| { + let token = token.trim_matches('"'); + token == format!("-l{library}") || token == format!("{library}.lib") + }) + }; assert_eq!( - commands.contains("winmm"), - windows && consumer != "reference_consumer", + ( + links("winmm"), + links("rpcrt4"), + commands.contains("base-variadic-provider.c") + ), + ( + windows && consumer != "reference_consumer", + windows && consumer != "reference_consumer", + windows && consumer == "test_video_stop_requested_rust" + ), "{system}/{consumer}: {commands}" ); } From c62c9e8cb4011b6ed5d88989ed6e2e5b1ea49baf Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 17:30:36 -0800 Subject: [PATCH 13/25] fix(graphics): complete Windows UUID and private logger linkage (Refs #5145) Ci-Attestation: {"at":1795052321,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":80,"stamp":"3dbda325c03366d3478e23be4c2e0b9f","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052321,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":80,"stamp":"1cfc2318055bc123931c520b9b4f606f","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052321,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":80,"stamp":"2f253d17d41add26e706dada51f1be05","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052321,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":80,"stamp":"94163b53e40df1f603b79e974ccde3b3","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"general/all/client-lint","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"6b4c4d1ae76873296c6be31de5f4b9af","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052321,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":80,"stamp":"575d5f3d3fb8325f46b2989d48d76807","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"5be37812ef91a6da973f97c2b38a5700","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052240,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"6e62547ced1c5ec4708e5dbeceed0ddb","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"42a95385aaa1584cead83c2b6398ad20","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"9357503a9d6e79cb7c4d929d51691f76","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"a9e07f17d32215d1ae5a2e64aee17232","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"ebf87bdf0ab429fca262ee317af55fde","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"ad71a9d52564e55764273f19cab40834","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"9b59312ad83c4a7dc8101a6484b5b461","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"1618bde725f72d2dabe440d1112f5ef0","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"f0b91dd1ec7d8f6671d00eb74436ff4d","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"f8633a99e41a128271f6e10fcd181bf8","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052239,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"fff3455a0e4e5771df4a23ced595df6fa8a9a7895bb2571047274ed148c2b56d","lane":"client-lint","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":317,"stamp":"4ef298ccf1eb3f3b1f4db46016fd3a5c","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Ci-Attestation: {"at":1795052787,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"7c1809583056913583f81a41714206057a628c0363eac36e88d5cb29089e4509","lane":"client-test-x86_64-unknown-linux-gnu","parents":["fcc98e6e93169b8bd4e7f037e4357522da3a551b"],"secs":465,"stamp":"17298c7108b0ce2564ab7f4408ef11fb","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1","v":1,"via":"run"} Client-Checks: {"checks":{"base":"a62bfe717d5d9610a5136ca211273e66a1ae1f84","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.media+.h.c","libobs/build/libobs.media-texture-file-data-adapter+.h.c","libobs/build/libobs.ported-texture-file-data+.h.c","libobs/build/modules.d/media.json","libobs/build/ported-source-sets/texture-file-data.json","libobs/build/source-sets.d/LIBOBS_SOURCES.json","libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt","libobs/graphics/graphics-ffmpeg.c.h","libobs/graphics/graphics-texture-file-data-adapter.c.h","libobs/graphics/graphics-texture-file-data-convert.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_private_link_rules_are_registered.rs","rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs","rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs","rust/obs-build/tests/native/registration/headless_characterizations_expected.json","rust/obs-build/tests/native/registration/portal_output_expected.json","rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_graphics_state_stacks.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_window_match_steps.json","rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json","rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list","rust/obs-c-oracle/oracle.d/texture-file-data.list","rust/obs-c-oracle/oracle/texture_file_data.c","rust/obs-graphics/src/ffi/mod.rs","rust/obs-graphics/src/ffi/texture_file_data.rs","rust/obs-graphics/src/lib.rs","rust/obs-graphics/src/texture_file_data.rs","rust/obs-graphics/tests/render/main.rs","rust/obs-graphics/tests/render/texture_file_data.rs","rust/obs-graphics/tests/render/texture_file_data_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/test_texture_file_data_steps.c","test/cmocka/tests.d/test_texture_file_data_steps.cmake","test/cmocka/tests.d/texture_file_data_link_support.cmake","test/cmocka/texture-file-data-max-size-link-stub.c"],"head":"baba0c17e4995400d4fd76d3ad7850eb32f290e1","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":"049358fdb1c4219deabba4e873a5596440e2af63c883a4649e51345940c962d7","tree":"ec7374862eeaab2291ce7a6f8ae12e2190c72af1"}} --- .../rust-static/support/z-texture-file-data.json | 6 +++++- test/cmocka/tests.d/texture_file_data_link_support.cmake | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json index 74858de766..5756f58783 100644 --- a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json +++ b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json @@ -1262,7 +1262,11 @@ "test_video_stop_requested_rust": { "sources": [ "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" + "test/cmocka/texture-file-data-max-size-link-stub.c", + { + "path": "libobs/util/base-variadic.c.h", + "requires": "OS_WINDOWS" + } ], "includes": [ ".", diff --git a/test/cmocka/tests.d/texture_file_data_link_support.cmake b/test/cmocka/tests.d/texture_file_data_link_support.cmake index 1e3112034e..7d48b9dddb 100644 --- a/test/cmocka/tests.d/texture_file_data_link_support.cmake +++ b/test/cmocka/tests.d/texture_file_data_link_support.cmake @@ -16,6 +16,7 @@ function(_texture_file_data_link_support) FFmpeg::avformat FFmpeg::avutil FFmpeg::swscale + "$<$:rpcrt4>" "$<$:winmm>" ) get_directory_property(_targets BUILDSYSTEM_TARGETS) From 5f748e2a762433f9024620824bb254c729e44bab Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 18:01:25 -0800 Subject: [PATCH 14/25] test(graphics): reproduce shared-library fixture binding RED (Refs #5145) --- ...al_texture_file_data_swap_is_registered.rs | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 9c11533b86..5e437d0878 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -149,3 +149,88 @@ include("{root}/test/cmocka/tests.d/texture_file_data_link_support.cmake") } } } + +#[test] +fn standalone_graphics_fixtures_bind_the_static_implementation() { + let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let graph: serde_json::Value = + serde_json::from_slice(&fs::read(root.join("test/cmocka/build/test-graph.json")).unwrap()) + .unwrap(); + for name in [ + "test_texture_file_data_steps_rust", + "test_effect_parser_lifecycle_rust", + ] { + let directory = tempfile::tempdir().unwrap(); + fs::write( + directory.path().join("shared.c"), + "int implementation(void) { return 1; }\n", + ) + .unwrap(); + fs::write( + directory.path().join("static.c"), + "int implementation(void) { return 0; }\n", + ) + .unwrap(); + fs::write( + directory.path().join("main.c"), + "int implementation(void); int main(void) { return implementation(); }\n", + ) + .unwrap(); + let libraries: Vec<_> = graph["targets"][name]["libraries"] + .as_array() + .unwrap() + .iter() + .filter_map(|library| match library.as_str() { + Some("OBS::libobs") => Some("shared_provider"), + Some("libobs_rust-static") => Some("static_provider"), + _ => None, + }) + .collect(); + fs::write( + directory.path().join("CMakeLists.txt"), + format!( + r#"cmake_minimum_required(VERSION 3.28) +project(static-implementation-binding C) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +add_library(shared_provider SHARED shared.c) +add_library(static_provider STATIC static.c) +add_executable(probe main.c) +target_link_libraries(probe PRIVATE {}) +"#, + libraries.join(" ") + ), + ) + .unwrap(); + let output = std::process::Command::new("cmake") + .args(["-S", ".", "-B", "build", "-G", "Ninja"]) + .current_dir(directory.path()) + .output() + .unwrap(); + assert!( + output.status.success(), + "{}", + String::from_utf8_lossy(&output.stderr) + ); + let output = std::process::Command::new("cmake") + .args(["--build", "build"]) + .current_dir(directory.path()) + .output() + .unwrap(); + assert!( + output.status.success(), + "{}", + String::from_utf8_lossy(&output.stderr) + ); + let status = std::process::Command::new( + directory + .path() + .join(format!("build/probe{}", std::env::consts::EXE_SUFFIX)), + ) + .status() + .unwrap(); + assert!( + status.success(), + "{name} selected shared libobs ahead of the Rust archive" + ); + } +} From 2cc2999fa08bdfa1e4d6c6438d09fc27e9d8dd39 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 18 Nov 2026 18:08:11 -0800 Subject: [PATCH 15/25] fix(graphics): keep native fixture calls and cleanup local (Refs #5145) Ci-Attestation: {"at":1795054445,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":148,"stamp":"9f9d7afec73029b889d97a81dfdfa921","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054445,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":148,"stamp":"9e019baa68abff598c04a77956be3047","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054445,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":148,"stamp":"8fdab3993ba98c3193569c394075edbd","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054445,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":148,"stamp":"a1a1d56aceb22976525f03119b712da3","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054294,"gate":"general/all/client-lint","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"b7766ee5b31419eaaa51064934531a60","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054445,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":148,"stamp":"d4b3992f51f86dbd843967ae38275b99","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"4f611bf20c9cfbc9c9f1a87ce670017d","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054296,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"60156aecc0001ff2188cd6234472aa30","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"4ed2c0437c9f49369d895463774e1c0d","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"ec0d567302d8f20bf414d1aeabc7c86c","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"1ac8734d8cee154ceb732590ee730168","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"41c12f61a972f4f7ea765b6ed0da1197","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"d35bb8b47838211180acb51ec8bd3812","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"987d18926fa8fe53efb0bd55c3fa2451","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"ae38dcf24204fcb9beee68cdaaa92d7d","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"cf1912ad028b245f4a1dddef32790c33","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"3a6e9ec466aece449da4f72fe4a58c5c","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054295,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e3406043242168140cf263f2ba5eb13976a365796dc6a9cb300ba128d02206c1","lane":"client-lint","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":180,"stamp":"c1a40ccf63bccc92c0b8e5e0e55c22ef","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Ci-Attestation: {"at":1795054777,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"0e28eb984357ce801697b8456b30648337c87d6fba9d6b250a0bf1b56235174b","lane":"client-test-x86_64-unknown-linux-gnu","parents":["70b92bd281da629d7aa135acd7f5e356202f157c"],"secs":331,"stamp":"98e88ccde5616ebb8bab070ee5de1720","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38","v":1,"via":"run"} Client-Checks: {"checks":{"base":"a62bfe717d5d9610a5136ca211273e66a1ae1f84","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.media+.h.c","libobs/build/libobs.media-texture-file-data-adapter+.h.c","libobs/build/libobs.ported-texture-file-data+.h.c","libobs/build/modules.d/media.json","libobs/build/ported-source-sets/texture-file-data.json","libobs/build/source-sets.d/LIBOBS_SOURCES.json","libobs/cmake/rust-exports.d/obs-graphics-texture_file_data.txt","libobs/graphics/graphics-ffmpeg.c.h","libobs/graphics/graphics-texture-file-data-adapter.c.h","libobs/graphics/graphics-texture-file-data-convert.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_private_link_rules_are_registered.rs","rust/obs-build/tests/native/registration/canonical_rust_static_graphics_are_registered.rs","rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs","rust/obs-build/tests/native/registration/headless_characterizations_expected.json","rust/obs-build/tests/native/registration/portal_output_expected.json","rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_effect_parser_lifecycle.json","rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_graphics_state_stacks.json","rust/obs-build/tests/native/registration/rust-static/cases/private-link-rules/test_window_match_steps.json","rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json","rust/obs-c-oracle/oracle.d/texture-file-data-adapter.list","rust/obs-c-oracle/oracle.d/texture-file-data.list","rust/obs-c-oracle/oracle/texture_file_data.c","rust/obs-graphics/src/ffi/mod.rs","rust/obs-graphics/src/ffi/texture_file_data.rs","rust/obs-graphics/src/lib.rs","rust/obs-graphics/src/texture_file_data.rs","rust/obs-graphics/tests/render/main.rs","rust/obs-graphics/tests/render/texture_file_data.rs","rust/obs-graphics/tests/render/texture_file_data_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/test_texture_file_data_steps.c","test/cmocka/tests.d/test_effect_parser_lifecycle.cmake","test/cmocka/tests.d/test_texture_file_data_steps.cmake","test/cmocka/tests.d/texture_file_data_link_support.cmake","test/cmocka/texture-file-data-max-size-link-stub.c"],"head":"07fa09ab1b4ba920fe5e4c5bd02e96aa72fc947f","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":"df4f0d3a31e6a91ee01a023313a3e13eae33289c84d1f69771b52192aaf061f7","tree":"0cf26fac2203285a8253fdcf6c35fb185b20ac38"}} --- .../cases/graphics/test_effect_parser_lifecycle.json | 5 +++-- .../cases/graphics/test_texture_file_data_steps.json | 2 +- test/cmocka/build/test-graph.json | 5 +++-- test/cmocka/tests.d/test_effect_parser_lifecycle.cmake | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_effect_parser_lifecycle.json b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_effect_parser_lifecycle.json index 76c4d9feae..89212828c1 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_effect_parser_lifecycle.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_effect_parser_lifecycle.json @@ -6,7 +6,8 @@ "test/cmocka/test_effect_parser_lifecycle.c", "libobs/graphics/effect-parser-lifecycle-adapter.c.h", "libobs/graphics/obs-graphics-adapter.c.h", - "libobs/graphics/graphics-linear-srgb-fields.c.h" + "libobs/graphics/graphics-linear-srgb-fields.c.h", + "libobs/util/cf-lexer.c.h" ], "requires": "HAVE_LIBOBS_RUST_STATIC", "includes": [ @@ -14,10 +15,10 @@ "libobs" ], "libraries": [ + "libobs_rust-static", "OBS::libobs", "OBS::caption", "OBS::native-test-cmocka", - "libobs_rust-static", { "name": "OBS::w32-pthreads", "requires": "OS_WINDOWS" diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json index 7e6fc090e6..0c7f70eb91 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json @@ -18,10 +18,10 @@ "libobs" ], "libraries": [ + "libobs_rust-static", "OBS::libobs", "OBS::caption", "OBS::native-test-cmocka", - "libobs_rust-static", { "name": "m", "requires": { diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index 9bf38a4166..344db8e921 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -3117,6 +3117,7 @@ "libobs/graphics/effect-parser-lifecycle-adapter.c.h", "libobs/graphics/obs-graphics-adapter.c.h", "libobs/graphics/graphics-linear-srgb-fields.c.h", + "libobs/util/cf-lexer.c.h", "libobs/obs-graphics-effect-file-fields.c.h", "test/cmocka/object-validity-query-link-stubs.c", "test/cmocka/source-update-properties-link-support.c", @@ -3128,10 +3129,10 @@ "libobs" ], "libraries": [ + "libobs_rust-static", "OBS::libobs", "OBS::caption", "OBS::native-test-cmocka", - "libobs_rust-static", { "name": "OBS::w32-pthreads", "requires": "OS_WINDOWS" @@ -20012,10 +20013,10 @@ "libobs" ], "libraries": [ + "libobs_rust-static", "OBS::libobs", "OBS::caption", "OBS::native-test-cmocka", - "libobs_rust-static", { "name": "m", "requires": { diff --git a/test/cmocka/tests.d/test_effect_parser_lifecycle.cmake b/test/cmocka/tests.d/test_effect_parser_lifecycle.cmake index c318421bd1..f472dad2a1 100644 --- a/test/cmocka/tests.d/test_effect_parser_lifecycle.cmake +++ b/test/cmocka/tests.d/test_effect_parser_lifecycle.cmake @@ -1,4 +1,4 @@ # The unchanged C characterization and its Rust-static variant are declared -# in ../build/test-graph.json. Preserve the private graphics adapters and -# conditional Windows pthread imports; hidden functions come from the exact -# production Rust static archive, with public APIs supplied by selected libobs. +# in ../build/test-graph.json. The Rust archive precedes shared libobs so the +# fixture exercises the Rust exports. Compile the real C preprocessor locally: +# its cleanup must use the same allocator as header-inline parser setup on macOS. From d6853749d0182c68078aabc2f290824aa3f54509 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 01:37:33 -0800 Subject: [PATCH 16/25] graphics: reuse landed shared support after master rebase (Refs #5145) --- ...ibobs.media-texture-file-data-adapter+.h.c | 6 - ...al_texture_file_data_swap_is_registered.rs | 55 +- .../test_hotkey_background_control.json | 14 +- .../support/z-texture-file-data.json | 1330 ----------------- test/cmocka/build/rust-static-support.json | 2 +- .../texture_file_data_link_support.cmake | 30 - .../texture-file-data-max-size-link-stub.c | 13 - .../texture-file-data-session-link-support.c | 2 + 8 files changed, 39 insertions(+), 1413 deletions(-) delete mode 100644 libobs/build/libobs.media-texture-file-data-adapter+.h.c delete mode 100644 rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json delete mode 100644 test/cmocka/tests.d/texture_file_data_link_support.cmake delete mode 100644 test/cmocka/texture-file-data-max-size-link-stub.c create mode 100644 test/cmocka/texture-file-data-session-link-support.c diff --git a/libobs/build/libobs.media-texture-file-data-adapter+.h.c b/libobs/build/libobs.media-texture-file-data-adapter+.h.c deleted file mode 100644 index 8e0854c692..0000000000 --- a/libobs/build/libobs.media-texture-file-data-adapter+.h.c +++ /dev/null @@ -1,6 +0,0 @@ -/* C-owned image conversion and private opaque sessions. */ -#include "libobs/build/libobs-media.pch.h" - -#include "libobs/graphics/graphics-ffmpeg-orientation-adapter.c.h" -#include "libobs/graphics/graphics-texture-file-data-adapter.c.h" -#include "libobs/graphics/graphics-texture-file-data-convert.c.h" diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 5e437d0878..7f7f7965be 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -35,21 +35,35 @@ fn standalone_texture_file_data_adapters_supply_private_max_size_callback() { let graph: serde_json::Value = serde_json::from_slice(&fs::read(root.join("test/cmocka/build/test-graph.json")).unwrap()) .unwrap(); - let adapter = "libobs/build/libobs.media-texture-file-data-adapter+.h.c"; - let callback = "test/cmocka/texture-file-data-max-size-link-stub.c"; - let mut consumers = 0; + let support: serde_json::Value = serde_json::from_slice( + &fs::read(root.join("test/cmocka/build/rust-static-support.json")).unwrap(), + ) + .unwrap(); + let sources = support["sources"].as_array().unwrap(); + for source in [ + "test/cmocka/texture-file-data-session-link-support.c", + "test/cmocka/graphics-image-convert-link-support.c", + "test/cmocka/graphics-image-max-size-link-support.c", + ] { + assert!(sources.contains(&serde_json::json!(source)), "{source}"); + } + let adapter = + fs::read_to_string(root.join("test/cmocka/texture-file-data-session-link-support.c")) + .unwrap(); + assert!(adapter.contains("libobs/graphics/graphics-texture-file-data-adapter.c.h")); + let callback = + fs::read_to_string(root.join("test/cmocka/graphics-image-max-size-link-support.c")) + .unwrap(); + assert!(callback.contains("libobs/graphics/graphics-image-max-size.c.h")); for (name, target) in graph["targets"].as_object().unwrap() { let sources = target["sources"].as_array().unwrap(); - if sources.contains(&serde_json::json!(adapter)) { - consumers += 1; - assert!(sources.contains(&serde_json::json!(callback)), "{name}"); - } + assert!( + !sources.contains(&serde_json::json!( + "test/cmocka/texture-file-data-max-size-link-stub.c" + )), + "{name}" + ); } - assert!(consumers > 0); - let fragment = - fs::read_to_string(root.join("test/cmocka/tests.d/texture_file_data_link_support.cmake")) - .unwrap(); - assert!(fragment.contains(callback)); } #[test] @@ -78,7 +92,7 @@ project(image-adapter-link-contract C) set(CMAKE_SYSTEM_NAME "{system}") set(CMAKE_SOURCE_DIR "{root}") set(OS_WINDOWS {windows}) -foreach(dependency IN ITEMS OBS::libobs FFmpeg::avcodec FFmpeg::avformat FFmpeg::avutil FFmpeg::swscale) +foreach(dependency IN ITEMS OBS::libobs OBS::caption OBS::w32-pthreads Uthash::Uthash FFmpeg::avcodec FFmpeg::avformat FFmpeg::avutil FFmpeg::swscale) add_library(${{dependency}} INTERFACE IMPORTED) endforeach() add_library(libobs_rust-static INTERFACE) @@ -88,13 +102,12 @@ foreach(consumer IN ITEMS test_video_stop_requested_rust test_texture_file_data_ endforeach() add_executable(reference_consumer "${{CMAKE_CURRENT_SOURCE_DIR}}/probe.c") include("{root}/test/cmocka/native-test-graph.cmake") -file(READ "${{CMAKE_CURRENT_SOURCE_DIR}}/graph.json" graph) -_obs_test_graph_sources(video_sources "${{graph}}" test_video_stop_requested_rust) -if("libobs/util/base-variadic.c.h" IN_LIST video_sources) - file(WRITE "${{CMAKE_CURRENT_BINARY_DIR}}/base-variadic-provider.c" "#include \"{root}/libobs/util/base-variadic.c.h\"\n") - target_sources(test_video_stop_requested_rust PRIVATE "${{CMAKE_CURRENT_BINARY_DIR}}/base-variadic-provider.c") +add_library(native_owner INTERFACE) +if(OS_WINDOWS) + target_link_libraries(native_owner INTERFACE winmm rpcrt4) endif() -include("{root}/test/cmocka/tests.d/texture_file_data_link_support.cmake") +include("{root}/test/cmocka/rust-static-link-support.cmake") +obs_add_rust_static_support("{root}" native_owner) "## ), ) @@ -137,12 +150,12 @@ include("{root}/test/cmocka/tests.d/texture_file_data_link_support.cmake") ( links("winmm"), links("rpcrt4"), - commands.contains("base-variadic-provider.c") + commands.contains("base-variadic-link-support.c") ), ( windows && consumer != "reference_consumer", windows && consumer != "reference_consumer", - windows && consumer == "test_video_stop_requested_rust" + consumer != "reference_consumer" ), "{system}/{consumer}: {commands}" ); diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json index c49719a4af..1acd9b9256 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json @@ -4,9 +4,7 @@ "test_hotkey_background_control": { "sources": [ "test/cmocka/test_hotkey_background_control.c", - "libobs/obs-hotkey-background-control-fields.c.h", - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" + "libobs/obs-hotkey-background-control-fields.c.h" ], "definitions": [ "obs=control_test_obs", @@ -23,15 +21,7 @@ "name": "OBS::w32-pthreads", "requires": "OS_WINDOWS" }, - "libobs_rust-static", - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ], - "includes": [ - ".", - "libobs" + "libobs_rust-static" ] } }, diff --git a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json b/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json deleted file mode 100644 index 5756f58783..0000000000 --- a/rust/obs-build/tests/native/registration/rust-static/support/z-texture-file-data.json +++ /dev/null @@ -1,1330 +0,0 @@ -{ - "test_async_conversion_plan_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_async_frame_pacing_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_async_upload_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_audio_monitor_delay_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_coreaudio_device_rules_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_coreaudio_pacing_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_deinterlace_draw_plan_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_deinterlace_pacing_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_deinterlace_select_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_effect_param_types_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_effect_parser_blocks_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_effect_parser_compile_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_effect_parser_lifecycle_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_effect_parser_params_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_effect_parser_passes_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_effect_parser_shader_call_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_graphics_ffmpeg_pq_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_graphics_ffmpeg_route_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_graphics_ffmpeg_wic_checks_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_graphics_immediate_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_graphics_state_stacks_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_hotkey_background_control": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_hotkey_background_enum": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_hotkey_background_press": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_hotkey_background_trigger": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_hotkey_binding_press_steps": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_hotkey_getters_characterization": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_hotkey_load": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_hotkey_pair_steps": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_hotkey_press_steps": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_monitor_speaker_layout_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_monitor_video_sync_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_monitor_wasapi_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_nsgif_decode_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_portal_shortcuts": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_pulse_monitor_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_scene_audio_window_steps_rust": { - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_scene_bounds_place_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_scene_item_crop_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_scene_item_names_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_scene_item_order_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_scene_item_transform_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_scene_render_plan_steps_rust": { - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_scene_transform_update_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_audio_input_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_audio_place_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_audio_render_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_audio_timing_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_color_space_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_draw_plan_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_duplicate_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_filter_chain_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_frame_copy_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_init_context_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_media_admission_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_monitoring_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_ptm_gate_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_render_route_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_size_route_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_video_tick_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_source_volume_apply_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_sprite_geometry_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - "libobs/util/base-variadic.c.h" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale", - { - "name": "PkgConfig::_window_match_test_gio", - "requires": "HAVE_WINDOW_MATCH_TEST_GIO" - }, - { - "name": "LibUUID::LibUUID", - "requires": { - "any": [ - "OS_LINUX", - "OS_FREEBSD" - ] - } - } - ] - }, - "test_transition_clock_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_transition_load_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_transition_render_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_transition_sample_time_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_transition_start_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_video_stop_requested_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c", - { - "path": "libobs/util/base-variadic.c.h", - "requires": "OS_WINDOWS" - } - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_wayland_hotkeys": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_window_match_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - }, - "test_windows_keys_steps_rust": { - "sources": [ - "libobs/build/libobs.media-texture-file-data-adapter+.h.c", - "test/cmocka/texture-file-data-max-size-link-stub.c" - ], - "includes": [ - ".", - "libobs" - ], - "libraries": [ - "FFmpeg::avcodec", - "FFmpeg::avformat", - "FFmpeg::avutil", - "FFmpeg::swscale" - ] - } -} diff --git a/test/cmocka/build/rust-static-support.json b/test/cmocka/build/rust-static-support.json index 57bea7502e..f7657510ce 100644 --- a/test/cmocka/build/rust-static-support.json +++ b/test/cmocka/build/rust-static-support.json @@ -32,7 +32,6 @@ "test/cmocka/graphics-indexbuffer-maintenance-link-support.c", "test/cmocka/graphics-preprocessor-link-support.c", "test/cmocka/graphics-runtime-link-support.c", - "test/cmocka/graphics-texture-file-data-link-support.c", "test/cmocka/hotkey-fields-link-support.c", "test/cmocka/hotkey-key-translation-link-support.c", "test/cmocka/load-sources-link-support.c", @@ -59,6 +58,7 @@ "test/cmocka/source-weak-refs-link-support.c", "test/cmocka/task-queue-link-support.c", "test/cmocka/texture-creators-fields-link-support.c", + "test/cmocka/texture-file-data-session-link-support.c", "test/cmocka/video-active-link-support.c", "test/cmocka/video-info-query-link-support.c", "test/cmocka/video-scaler-ffmpeg-link-support.c", diff --git a/test/cmocka/tests.d/texture_file_data_link_support.cmake b/test/cmocka/tests.d/texture_file_data_link_support.cmake deleted file mode 100644 index 7d48b9dddb..0000000000 --- a/test/cmocka/tests.d/texture_file_data_link_support.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# Real image conversion and session glue for every standalone Rust consumer. -# Keep the unused private graphics callback in its own lazy archive member. -function(_texture_file_data_link_support) - add_library( - texture_file_data_link_support - STATIC - "${CMAKE_SOURCE_DIR}/libobs/build/libobs.media-texture-file-data-adapter+.h.c" - "${CMAKE_SOURCE_DIR}/test/cmocka/texture-file-data-max-size-link-stub.c" - ) - target_include_directories(texture_file_data_link_support PRIVATE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/libobs") - target_link_libraries( - texture_file_data_link_support - PRIVATE - OBS::libobs - FFmpeg::avcodec - FFmpeg::avformat - FFmpeg::avutil - FFmpeg::swscale - "$<$:rpcrt4>" - "$<$:winmm>" - ) - 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 texture_file_data_link_support) - endif() - endforeach() -endfunction() -cmake_language(DEFER CALL _texture_file_data_link_support) diff --git a/test/cmocka/texture-file-data-max-size-link-stub.c b/test/cmocka/texture-file-data-max-size-link-stub.c deleted file mode 100644 index 28f21f50a5..0000000000 --- a/test/cmocka/texture-file-data-max-size-link-stub.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Standalone Rust-static fixtures pull the real image session adapter through - * unrelated archive members, but never initialize graphics or load an image. - * This private callback is not exported by libobs. Abort if that contract changes; - * image-loading characterizations provide their own recording callback instead. */ -#include -#include - -uint32_t gs_image_max_texture_size(void); - -uint32_t gs_image_max_texture_size(void) -{ - abort(); -} diff --git a/test/cmocka/texture-file-data-session-link-support.c b/test/cmocka/texture-file-data-session-link-support.c new file mode 100644 index 0000000000..6278b99c39 --- /dev/null +++ b/test/cmocka/texture-file-data-session-link-support.c @@ -0,0 +1,2 @@ +/* The real opaque session adapter, selected only when Rust needs it. */ +#include "libobs/graphics/graphics-texture-file-data-adapter.c.h" From ef025498bbac0ad2e2203c8b133a48843ecf56e0 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 02:04:04 -0800 Subject: [PATCH 17/25] test(graphics): require real vertexbuffer teardown support RED (Refs #5145) --- .../canonical_texture_file_data_swap_is_registered.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 7f7f7965be..0d0e322960 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -44,6 +44,7 @@ fn standalone_texture_file_data_adapters_supply_private_max_size_callback() { "test/cmocka/texture-file-data-session-link-support.c", "test/cmocka/graphics-image-convert-link-support.c", "test/cmocka/graphics-image-max-size-link-support.c", + "test/cmocka/vertexbuffer-destroy-link-support.c", ] { assert!(sources.contains(&serde_json::json!(source)), "{source}"); } From 96fcd3258eddfb1a142b188ede8fd1a03ac137d6 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 02:04:48 -0800 Subject: [PATCH 18/25] graphics: link real vertexbuffer teardown through shared support (Refs #5145) Ci-Attestation: {"at":1795602434,"gate":"general/all/client-lint","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"80167d6895bb1d172734f6922b09d313","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602437,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"24fcdf44c93ba5489c79fa1af5309022","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602438,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"d0a31b34dd2c7ef43b2bdb727b9a4311","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602436,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"9c8b3e42272c0fabe36875c874cd2005","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602436,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"cf7226960cc6ed8b696dcdf3986b58a9","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602435,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"784baa1ab3fe2049cfcee64d53522be7","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602435,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"b51887d4d3d2bf6a778345003a4b9b60","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602436,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"884aeda74fadb8c195a12862508aa5a4","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602437,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"807afdb8ca486cea7a5e82b1c67d701f","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602435,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"2c386de2a3e1957ecc6b2673f67e277c","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602435,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"a25c583fe282a788456271aba3d1570c","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602434,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"25b3cf62cf6abbcbc610d2db0bf1a466","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} Ci-Attestation: {"at":1795602434,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"dd47cff8d792ee409b5136620c76fcec6239bbbab4944f0819aefa9540eb446d","lane":"client-lint","parents":["9770f849c13c3bdb6b3ea14d8852b858fbc94067"],"secs":606,"stamp":"e16e16d8d8a8f204b4d0ed260530ac90","tree":"6a100ad091b6ce9502417376a2740d6925063219","v":1,"via":"run"} --- test/cmocka/build/rust-static-support.json | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cmocka/build/rust-static-support.json b/test/cmocka/build/rust-static-support.json index f7657510ce..abd5fdedcf 100644 --- a/test/cmocka/build/rust-static-support.json +++ b/test/cmocka/build/rust-static-support.json @@ -59,6 +59,7 @@ "test/cmocka/task-queue-link-support.c", "test/cmocka/texture-creators-fields-link-support.c", "test/cmocka/texture-file-data-session-link-support.c", + "test/cmocka/vertexbuffer-destroy-link-support.c", "test/cmocka/video-active-link-support.c", "test/cmocka/video-info-query-link-support.c", "test/cmocka/video-scaler-ffmpeg-link-support.c", From dc9f8d0388f14233928fe523d2391d280acf3e5d Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 03:17:23 -0800 Subject: [PATCH 19/25] test: require a sole static provider for image recording fixture (Refs #5145) --- .../canonical_texture_file_data_swap_is_registered.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 0d0e322960..d3823b440e 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -21,6 +21,14 @@ fn canonical_texture_file_data_swap_is_registered() { .unwrap(); assert_eq!(selected.tests[name].target, name); assert!(format!("{:?}", selected.targets[name]).contains("libobs_rust-static")); + // A dylib can satisfy the public entry point before the archive member + // is extracted, bypassing this executable's recording session on Darwin. + let target = &selected.targets[name]; + assert!( + !format!("{:?}", target.libraries).contains("\"OBS::libobs\""), + "{os}: the recording fixture must have only the static provider" + ); + assert!(target.header_libraries.iter().any(|name| name == "OBS::libobs")); } let group = fs::read_to_string(root.join("libobs/build/libobs.ported-texture-file-data+.h.c")).unwrap(); From b124cb10d506a233728413f75d0706241a90ee04 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 03:18:30 -0800 Subject: [PATCH 20/25] test: isolate image recording fixture from shared libobs binding (Refs #5145) --- .../cases/graphics/test_texture_file_data_steps.json | 7 +++++-- test/cmocka/build/test-graph.json | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json index 0c7f70eb91..84bcc5d335 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json @@ -19,7 +19,6 @@ ], "libraries": [ "libobs_rust-static", - "OBS::libobs", "OBS::caption", "OBS::native-test-cmocka", { @@ -50,7 +49,11 @@ } } ], - "sanitizers": "address,undefined" + "sanitizers": "address,undefined", + "header_libraries": [ + "OBS::libobs" + ], + "inherit_header_definitions": true } }, "tests": { diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index 344db8e921..cc99b81e52 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -20014,7 +20014,6 @@ ], "libraries": [ "libobs_rust-static", - "OBS::libobs", "OBS::caption", "OBS::native-test-cmocka", { @@ -20045,7 +20044,11 @@ } } ], - "sanitizers": "address,undefined" + "sanitizers": "address,undefined", + "header_libraries": [ + "OBS::libobs" + ], + "inherit_header_definitions": true }, "test_texture_render": { "sources": [ From f3d18b3690033d4374e404652df55507f083a6eb Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 03:23:21 -0800 Subject: [PATCH 21/25] test: expose eager adapter selection in isolated recording fixture (Refs #5145) --- ci/test_rust_static_link_support.py | 27 +++++++++++++++++++ ...al_texture_file_data_swap_is_registered.rs | 1 + 2 files changed, 28 insertions(+) diff --git a/ci/test_rust_static_link_support.py b/ci/test_rust_static_link_support.py index 47f409fe5a..e1c27616e1 100644 --- a/ci/test_rust_static_link_support.py +++ b/ci/test_rust_static_link_support.py @@ -57,6 +57,33 @@ def test_non_msvc_preserves_declared_shared_binding(self): def test_non_msvc_preserves_declared_static_binding(self): self.check_fixture(False, False, True) + def test_isolated_recording_fixture_selects_only_needed_support(self): + with tempfile.TemporaryDirectory() as directory: + source = Path(directory) + for name, body in { + "main.c": "int rust_entry(void); int main(void) { return rust_entry() != 22; }\n", + "rust.c": "int adapter_value(void); int rust_entry(void) { return adapter_value(); }\n", + "fallback.c": "int adapter_value(void) { return 99; }\n", + "recording-link-support.c": "int adapter_value(void) { return 22; }\n", + "unused-link-support.c": "int unavailable(void); int unused_adapter(void) { return unavailable(); }\n", + }.items(): + (source / name).write_text(body) + (source / "CMakeLists.txt").write_text( + "cmake_minimum_required(VERSION 3.28)\nproject(isolated_recording C)\n" + "set(MSVC FALSE)\n" + "add_library(libobs_rust-static STATIC rust.c)\n" + "add_library(support STATIC fallback.c)\n" + "add_executable(test_texture_file_data_steps_rust main.c recording-link-support.c unused-link-support.c)\n" + "target_link_libraries(test_texture_file_data_steps_rust PRIVATE libobs_rust-static)\n" + f'include("{(ROOT / "test/cmocka/tests.d/test_texture_file_data_steps.cmake").as_posix()}")\n' + f'include("{HELPER.as_posix()}")\n' + "obs_rust_static_consumers(support missing_owner)\n" + ) + build = source / "build" + self.run_command(["cmake", "-S", str(source), "-B", str(build)]) + self.run_command(["cmake", "--build", str(build)]) + self.run_command([str(build / "test_texture_file_data_steps_rust")]) + def test_real_logger_members_preserve_fixture_owned_guards(self): with tempfile.TemporaryDirectory() as directory: source = Path(directory) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index d3823b440e..2e921260ea 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -24,6 +24,7 @@ fn canonical_texture_file_data_swap_is_registered() { // A dylib can satisfy the public entry point before the archive member // is extracted, bypassing this executable's recording session on Darwin. let target = &selected.targets[name]; + assert_eq!(target.sources.len(), 1, "{os}: adapters must be demand linked"); assert!( !format!("{:?}", target.libraries).contains("\"OBS::libobs\""), "{os}: the recording fixture must have only the static provider" From 4914c2c33386d2f57f830ae197f80ac07e4bd0b3 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 03:24:02 -0800 Subject: [PATCH 22/25] test: demand-link real support in the isolated image fixture (Refs #5145) --- .../cases/graphics/test_texture_file_data_steps.json | 9 +-------- test/cmocka/build/test-graph.json | 9 +-------- test/cmocka/rust-static-link-support.cmake | 11 +++++++---- .../cmocka/tests.d/test_texture_file_data_steps.cmake | 3 +++ 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json index 84bcc5d335..ebd9f008fe 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/graphics/test_texture_file_data_steps.json @@ -3,14 +3,7 @@ "targets": { "test_texture_file_data_steps_rust": { "sources": [ - "test/cmocka/test_texture_file_data_steps.c", - "libobs/graphics/effect-parser-lifecycle-adapter.c.h", - "libobs/graphics/obs-graphics-adapter.c.h", - "libobs/graphics/graphics-linear-srgb-fields.c.h", - "libobs/obs-graphics-effect-file-fields.c.h", - "test/cmocka/object-validity-query-link-stubs.c", - "libobs/build/libobs.image-decode-adapter+.h.c", - "libobs/util/base-variadic.c.h" + "test/cmocka/test_texture_file_data_steps.c" ], "requires": "HAVE_LIBOBS_RUST_STATIC", "includes": [ diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index cc99b81e52..399edb9c52 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -19998,14 +19998,7 @@ }, "test_texture_file_data_steps_rust": { "sources": [ - "test/cmocka/test_texture_file_data_steps.c", - "libobs/graphics/effect-parser-lifecycle-adapter.c.h", - "libobs/graphics/obs-graphics-adapter.c.h", - "libobs/graphics/graphics-linear-srgb-fields.c.h", - "libobs/obs-graphics-effect-file-fields.c.h", - "test/cmocka/object-validity-query-link-stubs.c", - "libobs/build/libobs.image-decode-adapter+.h.c", - "libobs/util/base-variadic.c.h" + "test/cmocka/test_texture_file_data_steps.c" ], "requires": "HAVE_LIBOBS_RUST_STATIC", "includes": [ diff --git a/test/cmocka/rust-static-link-support.cmake b/test/cmocka/rust-static-link-support.cmake index 29ca67af65..6ae182146d 100644 --- a/test/cmocka/rust-static-link-support.cmake +++ b/test/cmocka/rust-static-link-support.cmake @@ -58,6 +58,10 @@ function(_obs_demand_rust_static_support) if(NOT type STREQUAL "EXECUTABLE") continue() endif() + get_target_property(isolated "${target}" OBS_RUST_STATIC_ISOLATED) + if(NOT MSVC AND NOT isolated) + continue() + endif() _obs_uses_rust_static("${target}" "" uses_rust) if(uses_rust STREQUAL "0") continue() @@ -204,10 +208,9 @@ function(obs_rust_static_consumers support native_owner) endif() endif() endforeach() - if(MSVC) - # Run after every legacy deferred fragment has supplied its real adapters. - cmake_language(DEFER CALL _obs_demand_rust_static_support) - endif() + # Run after every legacy deferred fragment has supplied its real adapters. + # Non-MSVC fixtures opt in when they must exclude a shared implementation. + cmake_language(DEFER CALL _obs_demand_rust_static_support) endfunction() # Shared by the complete cmocka project and independent graph fixture projects. diff --git a/test/cmocka/tests.d/test_texture_file_data_steps.cmake b/test/cmocka/tests.d/test_texture_file_data_steps.cmake index d9a74f18ca..b745df9e39 100644 --- a/test/cmocka/tests.d/test_texture_file_data_steps.cmake +++ b/test/cmocka/tests.d/test_texture_file_data_steps.cmake @@ -1,2 +1,5 @@ # Recording-session characterization calls the Rust export and real C adapter. # Both target and test are declared in ../build/test-graph.json. +if(TARGET test_texture_file_data_steps_rust) + set_property(TARGET test_texture_file_data_steps_rust PROPERTY OBS_RUST_STATIC_ISOLATED TRUE) +endif() From 4d60b05e446e5f933c910c2a6f23ca5fa81d7dcd Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 03:24:51 -0800 Subject: [PATCH 23/25] test: replay root graph creation order for recording isolation (Refs #5145) --- ci/test_rust_static_link_support.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/test_rust_static_link_support.py b/ci/test_rust_static_link_support.py index e1c27616e1..1c34c17cb6 100644 --- a/ci/test_rust_static_link_support.py +++ b/ci/test_rust_static_link_support.py @@ -73,9 +73,10 @@ def test_isolated_recording_fixture_selects_only_needed_support(self): "set(MSVC FALSE)\n" "add_library(libobs_rust-static STATIC rust.c)\n" "add_library(support STATIC fallback.c)\n" + # The root project reads fragments before creating graph targets. + f'include("{(ROOT / "test/cmocka/tests.d/test_texture_file_data_steps.cmake").as_posix()}")\n' "add_executable(test_texture_file_data_steps_rust main.c recording-link-support.c unused-link-support.c)\n" "target_link_libraries(test_texture_file_data_steps_rust PRIVATE libobs_rust-static)\n" - f'include("{(ROOT / "test/cmocka/tests.d/test_texture_file_data_steps.cmake").as_posix()}")\n' f'include("{HELPER.as_posix()}")\n' "obs_rust_static_consumers(support missing_owner)\n" ) From d1eac62ef19130a1159dde2d723264312f3f56f8 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 03:25:32 -0800 Subject: [PATCH 24/25] test: defer recording isolation until graph targets exist (Refs #5145) --- .../cmocka/tests.d/test_texture_file_data_steps.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/cmocka/tests.d/test_texture_file_data_steps.cmake b/test/cmocka/tests.d/test_texture_file_data_steps.cmake index b745df9e39..926134f6c9 100644 --- a/test/cmocka/tests.d/test_texture_file_data_steps.cmake +++ b/test/cmocka/tests.d/test_texture_file_data_steps.cmake @@ -1,5 +1,10 @@ # Recording-session characterization calls the Rust export and real C adapter. # Both target and test are declared in ../build/test-graph.json. -if(TARGET test_texture_file_data_steps_rust) - set_property(TARGET test_texture_file_data_steps_rust PROPERTY OBS_RUST_STATIC_ISOLATED TRUE) -endif() +function(_obs_isolate_texture_file_data_recording) + if(TARGET test_texture_file_data_steps_rust) + set_property(TARGET test_texture_file_data_steps_rust PROPERTY OBS_RUST_STATIC_ISOLATED TRUE) + endif() +endfunction() + +# Fragments are read before canonical graph targets are created. +cmake_language(DEFER CALL _obs_isolate_texture_file_data_recording) From 4f161330b0d22b2d6f4b9b0274e5eddd99199056 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 25 Nov 2026 03:34:07 -0800 Subject: [PATCH 25/25] style: format image recording registration assertions (Refs #5145) Ci-Attestation: {"at":1795607096,"gate":"general/all/client-lint","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"6e2398ae9ae83b9ed36f429eb24526c6","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607097,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"ae3bf631fd12dd0fe61127c28704418d","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607097,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"3fc32b3a9d856a92d140e87a14c3eefb","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607097,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"b2d3c52011b28dc04edd7c1e6f2afe78","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607097,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"ac5442638879cc2381c732e694557b2f","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607096,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"cef037eec3d0f2d7c0aca35b3aaccea4","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607096,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"06376de5437efffa84adceb964610b9e","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607097,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"f6288ef8ce0f8796ec7b171f840d30e7","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607097,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"656fa5e188c28224c77ea1f4e8b042eb","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607096,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"bb08e6db93550935b938447bc1ff6fbf","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607097,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"05de40a31105e841b3280e2171fe452e","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607096,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"c43614e849f17aa9a44bc5f2cdd7f373","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} Ci-Attestation: {"at":1795607096,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"757692e1ebbbd92504e25e3bf79d7a63d268254c6654f3845eae5dde5f42aa40","lane":"client-lint","parents":["d1eac62ef19130a1159dde2d723264312f3f56f8"],"secs":172,"stamp":"64b0c7831e72750cb917557858daa9f2","tree":"0e48437ae7cd3ae4c63871d27b9e3adf59a571c1","v":1,"via":"run"} --- ...anonical_texture_file_data_swap_is_registered.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs index 2e921260ea..c87aab90be 100644 --- a/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs +++ b/rust/obs-build/tests/native/registration/canonical_texture_file_data_swap_is_registered.rs @@ -24,12 +24,21 @@ fn canonical_texture_file_data_swap_is_registered() { // A dylib can satisfy the public entry point before the archive member // is extracted, bypassing this executable's recording session on Darwin. let target = &selected.targets[name]; - assert_eq!(target.sources.len(), 1, "{os}: adapters must be demand linked"); + assert_eq!( + target.sources.len(), + 1, + "{os}: adapters must be demand linked" + ); assert!( !format!("{:?}", target.libraries).contains("\"OBS::libobs\""), "{os}: the recording fixture must have only the static provider" ); - assert!(target.header_libraries.iter().any(|name| name == "OBS::libobs")); + assert!( + target + .header_libraries + .iter() + .any(|name| name == "OBS::libobs") + ); } let group = fs::read_to_string(root.join("libobs/build/libobs.ported-texture-file-data+.h.c")).unwrap();