X-Git-Url: http://git.scottworley.com/srec/blobdiff_plain/5bb94ece79ceeb409f656352ed2e5623f7b32185..b3399b18f91a2f2e12ac9858f8f8e008a60138cd:/srec.py diff --git a/srec.py b/srec.py index e905483..8207c91 100644 --- a/srec.py +++ b/srec.py @@ -20,7 +20,7 @@ from gi.repository import GLib # nopep8 pylint: disable=wrong-import-position @dataclass -class Recording: +class Stream: process: subprocess.Popen[bytes] def stop(self) -> None: @@ -34,7 +34,7 @@ class Recording: self.process.wait() -recording: Recording | None = None +recording: Stream | None = None def make_filename() -> str: @@ -86,7 +86,7 @@ def on_start_recording(_: Gtk.Button, stack: Gtk.Stack) -> None: 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")