Repository navigation
libobs: extract core audio-info and video-statistics queries verbatim (Refs #5169, #5171) - #5191
Merged
Merged
Conversation
rdoupe
force-pushed
the
test/5169-5171-audio-info-video-stats
branch
from
November 19, 2026 04:38
a6b2371 to
a6f174c
Compare
rdoupe
enabled auto-merge
November 19, 2026 04:39
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 19, 2026
This was referenced Nov 19, 2026
rdoupe
force-pushed
the
test/5169-5171-audio-info-video-stats
branch
from
November 19, 2026 06:22
a6f174c to
0c19d90
Compare
rdoupe
enabled auto-merge
November 19, 2026 06:22
RED: the new focused test fails to build with "audio-info query extraction seam is missing" until the bodies move out of obs.c.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GREEN: move obs_get_audio_info and obs_get_audio_info2 unchanged into libobs/obs-audio-info-queries.c.h in the core unity group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RED: the new focused test fails to build with "video-statistics query extraction seam is missing" until the bodies move out of obs.c.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GREEN: move obs_get_video_frame_time, obs_get_active_fps,
obs_get_average_frame_time_ns, obs_get_total_frames and
obs_get_lagged_frames unchanged into libobs/obs-video-stats-queries.c.h
in the core unity group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1795073103,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":58,"stamp":"bdf48f85ca7ad91666656a6ca9e40b36","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073103,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":58,"stamp":"e916e97096a6fe41480070f6b995ac2e","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073103,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":58,"stamp":"76b8f40ba8613120efca9ff70ff1264e","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073103,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":58,"stamp":"0a9e1db55f5903d5ed8ad66de98c5a4d","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"general/all/client-lint","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"ed56ca5de0269a24338dee85091ce7c2","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073103,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":58,"stamp":"079adb0f1a11c50a81221d3c1b4b423d","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"b7f2cebef4addfdfda56df2c40486c82","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"c025a4579e7e6b893cf80754f8fdde3d","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"b635e8a04c26358123439562a6fd63ca","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"0c861ae10d9ab800cea6284482eaba43","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"c7a69109cdc8b9c9cc0250f7a2f9d89f","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"4a7e6f6fe37d13f389ea5406d5a16dc3","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"0fdeba4f7ae562c097b42d28f8639ddd","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"5f29838584ff35a764cb1668522fd707","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"5a3c7d11002c04ec3d2afa9f9ddedd0f","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"c3c7247acc3c4a74c6eac68dc8932f25","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"4c5687c51b507530eafb53562277859e","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073044,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"fe80deb2393cd35a8eb884d1f48037ab88695042ebc602a8aa5cc476c023a5b2","lane":"client-lint","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":65,"stamp":"8a2b78d6a01180882e2a5c2adcf76879","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Ci-Attestation: {"at":1795073323,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"f1bb71c2f1ba8eb2a774688db401e491819e57be0fb563fb02fa4243fd610b3f","lane":"client-test-x86_64-unknown-linux-gnu","parents":["7c1d3d60e57cb753edc275f2bad190e8d1dc087c"],"secs":220,"stamp":"01dd525b8353ea6069b3129648132d59","tree":"9f9dda86003a0753e3056b56f0fc45540665253c","v":1,"via":"run"}
Client-Checks: {"checks":{"base":"cd6fe2a83f6953d7f75e81a99ec1f7588737c9c8","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core+.h.c","libobs/obs-audio-info-queries.c.h","libobs/obs-video-stats-queries.c.h","libobs/obs.c.h","test/cmocka/build/test-graph.json","test/cmocka/test_audio_info_queries.c","test/cmocka/test_video_stats_queries.c","test/cmocka/tests.d/test_audio_info_queries.cmake","test/cmocka/tests.d/test_video_stats_queries.cmake"],"head":"a5948c909bfcce52a1c40b95e8f7e8b7444356e7","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":"0524efdefd51af2341b7eb282cc39526543e904ba25e6a300f15a26157ce3dd7","tree":"9f9dda86003a0753e3056b56f0fc45540665253c"}}
rdoupe
force-pushed
the
test/5169-5171-audio-info-video-stats
branch
from
November 19, 2026 07:28
0c19d90 to
107dfc2
Compare
Collaborator
Author
|
Rebased onto master after #5201 extracted |
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.
Refs #5169, #5171
Moves seven public core getters out of
libobs/obs.c.h, ready for their later Rust swap:obs_get_audio_info()/obs_get_audio_info2()intolibobs/obs-audio-info-queries.c.h(test: Extract and characterize core audio-info queries before Rust swap #5169)obs_get_video_frame_time(),obs_get_active_fps(),obs_get_average_frame_time_ns(),obs_get_total_frames(),obs_get_lagged_frames()intolibobs/obs-video-stats-queries.c.h(test: Extract and characterize core video-statistics queries before Rust swap #5171)Both files join the existing
coreunity group (libobs/build/libobs.core+.h.c, sorted). The bodies are byte-for-byte unchanged (diffed againstorigin/master'sobs.c.h), so nothing about their behavior changes. Both issues are small getter extractions out of the same file and the same unity group, so they land in one PR with a RED then GREEN commit pair each.Commits
test: characterize core audio-info queries: new cmocka testtest_audio_info_queries.libobs: extract core audio-info queries verbatim.test: characterize core video-statistics queries: new cmocka testtest_video_stats_queries.libobs: extract core video-statistics queries verbatim.What the tests pin
obsis hidden in libobs, so each test includes the exact extracted file under renamed entry points against a stackstruct obs_core.Audio info (
audio_output_get_infoandobs_core_setup_rules_buffer_msrouted through recording probes; the milliseconds arithmetic stays pinned by the existingtest_core_setup_rules_ms_steps):obs_get_audio_info: NULL output or noaudio->audioreturns false with no call and no write; on success exactly one info read, rate and speakers copied, across four rate/layout pairs including 0 andUINT32_MAX.obs_get_audio_info2: reads the info into its local before checking the extended output, so a NULLoai2still makes oneaudio_output_get_infocall; noaudio->audioreturns false with no call. On success rate, speakers,fixed_buffering(both states) andmax_buffering_msare copied, the helper gets the core'smax_buffering_ticksand the copied rate, in the order info read then helper, and itsintresult is cast straight touint32_t(-1reads back asUINT32_MAX).Video statistics (real
obs_video_statswith its real mutex):UINT64_MAX,UINT32_MAX,1e308) passed through without narrowing.obspointer: switching between two cores switches every value.set_frame_time,set_timing,add_framestwice) are the ones read back.A NULL core is outside the video getters' C contract and is not exercised. Existing coverage stays unchanged (
test_no_core_getters,test_obs_core_info_characterization,test_core_setup_rules_steps,test_core_setup_rules_ms_steps). Existing C tests, public headers, Rust code, workflows andplugins/obs-websocketare not touched. No user-visible change, so the features ledger is unchanged. Tier 1, Tier 3 and the real-adapter linkage belong to the Rust swaps that follow. Tier 4 doesn't apply.Evidence
RED: compiling each test from a
git archiveexport of its RED commit, in the Tier 2 image (obs-rust-linux-validate), stops at the missing seam. The GREEN export compiles cleanly (cc -fsyntax-only -Werror, same include paths and defines as the Tier 2 build'scompile_commands.json):GREEN: full Tier 2 against both libraries, then 25 repeats of each new test:
The tests never call
skip(). Running the binaries directly against each library shows every case ran:Mutation check, each test rebuilt in the Tier 2 image against a mutated copy of its extracted file:
./lintpasses.🤖 Generated with Claude Code