@dataclass
-class Recording:
+class Stream:
process: subprocess.Popen[bytes]
def stop(self) -> None:
self.process.wait()
-recording: Recording | None = None
+recording: Stream | None = None
def make_filename() -> str:
command = (['ffmpeg', '-framerate', '25'] + video_source(stack) +
['-f', 'pulse', '-ac', '2', '-i', 'default', filename])
# pylint: disable=consider-using-with
- recording = Recording(
+ recording = Stream(
process=subprocess.Popen(command, stdin=subprocess.PIPE))
stack.set_visible_child_name("recording")