Repository navigation
libobs: characterize and extract obs_get_audio (Refs #4807) - #4809
Conversation
9d2a579 to
c9285ad
Compare
c9285ad to
911be0a
Compare
|
Rebased onto Validation passed: formatting; 275 native-build tests; focused get-audio/raw-audio-remove/object-ref suites against both actual libraries (six suites); identical 1,768 exports; test-graph sorting; diff whitespace; full |
911be0a to
1b2c25e
Compare
|
Coordinator: rebased onto master |
vpacher
left a comment
There was a problem hiding this comment.
Coordinator review at 1b2c25e (after my rebase onto master).
- Correctness: the extraction is verbatim.
obs_get_audiomoves fromlibobs/obs.c.htolibobs/obs-get-audio.c.hwith the same body, and the new file is in the core unity group in alphabetical order (BUILD.md: the PCH include is the file's only include). - Order: the characterization commit (f799e80) comes before the extraction commit (1b2c25e), as coordination.md asks for a C-only extraction. The Rust swap with Tier 1 and the Tier 3 differential is #4810, so this PR does not need them.
- Tests:
test_get_audiois a new cmocka test with three cases: no audio before setup and after disable, the borrowed output tracking reset, mono and stereo and rate changes, and an active output that stays unchanged. No existing C test or public header changes. - Features ledger: no user-visible change, so no line is needed.
Queued once hosted CI on this head is green.
obs_get_audiois characterized through its exported C API and its complete definition is extracted verbatim intolibobs/obs-get-audio.c.h, registered alphabetically in the existing core unity group. Refs #4807. This C-only prerequisite preserves behavior and the public API; the separate Rust swap is #4810.Characterization commit
a2a61b19673ff1a9b36255b01e4efa29dbd449afprecedes the extraction commit, preserving test-before-extraction history. Three portable cases cover absent output before setup and after disabling, repeated borrowed reads, stereo/mono and sample-rate reconfiguration, reopening, current output identity through core/direct callback registration, unchanged idle/active state and sink registration, and shutdown without releasing borrowed handles. Calls require an initialized core. The tests use no hardware input, sleeps or frame waits.The original implementation session ran
test_get_audio, unchangedtest_raw_audio_remove, and unchangedtest_object_reffive times per actual hybrid and C-reference library before and after extraction: 60 suite executions, zero failures. Loader paths matched the intended libraries and all 1,768 dynamic exports matched. A preload mutant returning null failed both populated cases with cmocka exit 2; restoring the getter passed. The extracted definition is byte-for-byte identical.Rebased onto
9800296f87232b7c89478333bcc5666f6c21f1f7after #4785, #4814 and #4818. The sole conflict was the core unity list: the resolution retains the current main-canvas fields include, scene enumeration and all other upstream entries, then inserts the audio getter in alphabetical order.git range-diffconfirms the characterization patch is unchanged and only that context differs in the extraction patch. The characterization source, registration and extracted getter are byte-for-byte unchanged from previous headc9285ad1aa87e0f2213cff0cf31b898780984be8.Rebase validation:
soldr cargo fmt --all --checkpassed; all 275 selectedobs-tests-app native_build::tests passed;SOLDR_PORCELAIN=0 ./lintpassed in 133.6 s withrc=$?captured directly as 0. Test-graph ordering andgit diff --checkpassed.Focused Tier 2 replay rebuilt the actual hybrid and C-reference libraries using the repository Docker harness, with only its build target list and CTest selector narrowed in a scratch script.
test_get_audio, unchangedtest_raw_audio_remove, and unchangedtest_object_refeach passed once against each backend: six suite executions, zero failures. Loader paths matched each intended library, and all 1,768 dynamic exports matched.Rust safe Tier 1 and original-C differential Tier 3 belong to the separate swap. Tier 4 does not apply. Existing C tests, public headers, WebSocket and workflows are unchanged. No user-visible behavior change requires a features-ledger entry. Full Tier 2 and native Windows/macOS runtime remain subject to hosted validation.
Publication:
./pushreplacedc9285ad1aa87e0f2213cff0cf31b898780984be8with911be0ad27f79af6aba41b6d23af8afb43976e9busing an explicit force-with-lease pinned to the previous head. The current push script ignores arguments, so a temporary Git wrapper appends the exact lease only to this branch push. Complete client proof stopped at the arm64 Dylint lane because soldr has no pre-deployed driver for the selected nightly; no complete client evidence was stamped, and ordinary hosted PR CI remains required. The requested local lint and focused validation passed independently.