Repository navigation
libobs: characterize and extract obs_get_video (Refs #5353) - #5419
Merged
Merged
Conversation
Pins the borrowed main-canvas video getter before it moves out of obs.c.h: no mix answers NULL, a mix's current video comes back by identity without touching the canvas's references or the mix bytes, and an auxiliary canvas's mix is never the answer. Not registered yet, so the build has no such target. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Moves the body unchanged from obs.c.h into obs-get-video.c.h, a member of the core unity group, and registers test_get_video in the canonical test graph so it runs against hybrid libobs and the C reference. The Rust swap is #5354. Co-Authored-By: Claude Opus 5.5 <[email protected]> Ci-Attestation: {"at":1795292213,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":63,"stamp":"37f9de6eded8bc19db1f26ece7efaa32","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292213,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":63,"stamp":"5f7598e6afd966016c7f8f08b15ef2d7","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292213,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":63,"stamp":"b1555affd32d8f2924ee181be4427625","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292213,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":63,"stamp":"30271f7270571a17bcf2b7f5054b76dc","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"general/all/client-lint","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"db54cd97abf2b4064c1abf269d8680fc","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292213,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":63,"stamp":"0879491ef786799b07bb82dc9c5a0098","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"cc89d455ee6401771621e24be2fce029","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"bcb9d1e01536ea12538c126ddb428fea","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"df2aee92c42d4e1439bc2abf9a55a47c","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"2590b6acd6316c75132c01a3d264ad21","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"9bc0bdf0e9b5c243430647d38ea379ed","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"0708b8fa9ef40379647ba28f9e632c43","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"a0a6509db92a61c73d65f01649aedee6","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"1523f28e598bb02b45416b38ef2bfcf1","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"bb8b0628d4d886b111b290d2413d0e3e","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"ecc0387410dc56a63317521e9666de52","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"17ec3ba3c7a1374fd9e3950913d83902","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292149,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"944a16025986cc6df3739a8f8b41b9e785f3cd19e58d91d20cfa87c0c9501d85","lane":"client-lint","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":11,"stamp":"91edbd0bd35146ca594f4cc60ab92ddf","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Ci-Attestation: {"at":1795292478,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"5b85581538a061eb342a1bf3e9df49cdf879abbc0582c846789e99a866c8904c","lane":"client-test-x86_64-unknown-linux-gnu","parents":["0658379b6999d8fb9ad0966f9fe3f29771a2607a"],"secs":265,"stamp":"f93a42f6253d87fa84a387e88da87cef","tree":"396c24984ad9870629db5156cc8779786ca1712b","v":1,"via":"run"} Client-Checks: {"checks":{"base":"a98b199d3fc02ef274f861915dea5aecbdd448f0","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core+.h.c","libobs/obs-get-video.c.h","libobs/obs.c.h","test/cmocka/build/test-graph.json","test/cmocka/test_get_video.c","test/cmocka/tests.d/test_get_video.cmake"],"head":"34194ec3cd99749d072b5d2c299160eadd5a54ef","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.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-GITv2.15.4\n compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"630147907cc823cba11cc8a2cb9bee5201858b56688a01aa3a8e08cad16d1558","tree":"396c24984ad9870629db5156cc8779786ca1712b"}}
This was referenced Nov 21, 2026
rdoupe
enabled auto-merge
November 21, 2026 20:38
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 21, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 21, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a C characterization of
obs_get_video, then moves its body verbatim fromlibobs/obs.c.hintolibobs/obs-get-video.c.h, a member of the core unity group (libobs/build/libobs.core+.h.c, alphabetical).test_get_videois registered once in the canonical test graph with itstests.dmarker. No behavior change; existing C tests and public headers are unchanged.Refs #5353. This is the C-only prerequisite; the Rust swap is #5354.
What the test pins
Three cases, each on a fresh
obs_startup()core, with the main canvas's mix swapped for a zeroed stand-in so no graphics or video reset is needed (the getter never dereferences thevideo_t):videoby identity, follows a change of it, answers NULL when it is NULL, and leaves the mix bytes, the canvas's mix pointer and its reference counts untouched;The issue also lists "NULL main canvas returns NULL". That state is not reachable in a live core through any API, and the
obscore global is hidden from test executables (my first draft wroteobs->data.main_canvasand failed to link). That case belongs to the Rust swap's field-adapter parity in #5354, where the main-canvas read is a seam; I'll note it there.Evidence
0658379b6): adds the characterization without registering it.git show 0658379b6:test/cmocka/build/test-graph.json | grep -c test_get_videoprints0, so the build has notest_get_videotarget.aac60aaa3): registers the test and extracts the body.cmpof the extracted body against lines 1718-1724 of the originalobs.c.his identical.OBS_CTEST_JOBS=10 uv run rust/tools/linux-validate/run.py --repeat 25 --tests '^test_get_video$': full Linux Tier 2 passed against the C reference (1074/1074) and hybrid libobs (1074/1074), thentest_get_videopassed 25 repeats against each.xvfb-run:[ PASSED ] 3 test(s)against/build/tree/libobs/libobs.so.30and again withLD_LIBRARY_PATH=/build/tree/libobs-c-reference(lddconfirmed each library)../lintpassed;git diff --checkclean.Not run locally: native Windows/macOS. Tier 1/3 and Tier 4 do not apply to a C-only extraction.
🤖 Generated with Claude Code