From c1227a36471c2c3ab38ddfc2260923ad49240c7b Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 29 Jun 2026 05:34:22 -0400 Subject: refactor: split video-audio-recording.el into layered modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Break the 1025-line video-audio-recording.el into a thin public face plus two layered libraries, moving every function verbatim so behavior and public names are unchanged: - video-audio-recording-devices.el — base layer: PulseAudio source and sink discovery, the pactl output parsers, device labeling and sort/status helpers for completing-read, and the lookup predicates. Pure string and shell-query helpers with no dependency on recording state, config, or the engine. This is the heavily-tested core. - video-audio-recording-capture.el — engine: ffmpeg/wf-recorder command construction, the recording process lifecycle (sentinel, producer-first shutdown, exit polling), the modeline indicator, dependency checks, device acquisition and validation, and the start/stop entry points. Requires the devices layer. video-audio-recording.el keeps configuration and the recording process-handle state, the device-diagnostic and device-test commands, the toggle commands, and the C-; r keymap, and requires the two layers. The engine reads and updates the config and process-handle variables, which the top module owns, through forward declarations, so no layer requires the top module back. No function call crosses from a layer up into the top module, so the split needs no forward-declared functions. Every public name is preserved, so all 323 existing video-audio-recording tests pass unchanged through the require chain. The two new modules carry the load-graph and package headers and join the header-contract allowlist. Claude-Session: https://claude.ai/code/session_014fyKMTTqLrZpL3rDF3dYc3 --- tests/test-init-module-headers.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/test-init-module-headers.el') diff --git a/tests/test-init-module-headers.el b/tests/test-init-module-headers.el index 97e6aeb13..f395fd71f 100644 --- a/tests/test-init-module-headers.el +++ b/tests/test-init-module-headers.el @@ -135,6 +135,8 @@ "tramp-config" "transcription-config" "video-audio-recording" + "video-audio-recording-devices" + "video-audio-recording-capture" "weather-config" "wrap-up") "Modules annotated with the load-graph header contract. -- cgit v1.2.3