added kill method to encoder

This commit is contained in:
k4yt3x 2022-05-01 08:46:33 +00:00
parent 737646a248
commit 4b0ab5382c

View File

@ -119,6 +119,9 @@ class VideoEncoder:
self.pipe_printer = PipePrinter(self.encoder.stderr)
self.pipe_printer.start()
def kill(self):
self.encoder.send_signal(signal.SIGKILL)
def write(self, frame: Image.Image) -> None:
"""
write a frame into FFmpeg encoder's STDIN