Skip to content

Add explicit OBS session arming and lifecycle guards - #37

Draft
RioPlay wants to merge 1 commit into
mainfrom
feat/obs-session-arm
Draft

RioPlay wants to merge 1 commit into
mainfrom
feat/obs-session-arm

Conversation

@RioPlay

@RioPlay RioPlay commented Sep 13, 2026

Copy link
Copy Markdown
Owner

An authenticated OBS pipe had no command for granting capture consent to a session. This adds a separate, one-use Arm transaction bound to the prepared session and selected buses. The native worker checks idle state through one queued frontend task and only accepts a later STARTING → STARTED sequence. The desktop pipe requires the matching Arm reply before it accepts audio frames.

Authenticated I/O now handles partial transfers, peer revalidation, deadlines, cancellation and failed-read wiping. Authentication and unarmed readiness each remain bounded at 15 seconds; startup has a 30-second acknowledgement deadline, while armed waiting and a started session have no duration cutoff. Stop, replacement, revocation, disconnect and shutdown terminate the attempt. Numeric generations and closed gates make stale frontend callbacks harmless.

OBS can fail startup without emitting a public STOPPED event. The bridge therefore keeps startup, started and stopping states busy until an actual STOPPED event; false activity flags or elapsed time cannot clear that guard. A failed attempt can require a later completed stream lifecycle or OBS restart before fresh Arm. The pending desktop controller must explain this limitation and pass real frontend recovery acceptance.

Validation: 199 affected desktop tests pass without skips. All 34 native build/test commands pass, including actual Windows child-process I/O, injected event/transfer/probe failures, cancellation or deadline expiry during final peer validation, runtime thread/event races, queued frontend lifecycle and real-libobs vendor dispatch. The x64 DLL builds against pinned public headers, and headless smoke verifies initialization refusal, returned shutdown and unchanged fixed-store metadata. Independent source and receipt review is recorded in the Arm plan. Three existing linker warnings are confined to the test heap shim.

Stacked on draft PR #36, which contains pairing setup. This remains development source: no PCM callback, visible capture controller, live recognition, real OBS frontend/audio acceptance or plugin distribution is included. Future Start/PCM writes must remain serialized after the Arm reply. Native GPL source and licensing/toolchain gates remain separate from the desktop application and Android releases.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant