From 532a5462c93bcb7af4bf74e614e9032485ddbb41 Mon Sep 17 00:00:00 2001 From: jonathan Date: Tue, 1 Jun 2021 14:38:16 +0200 Subject: [PATCH] migrate to pathlib, simplify COPY_BUFSIZE --- ffplayout/output/desktop.py | 5 ++--- ffplayout/output/stream.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ffplayout/output/desktop.py b/ffplayout/output/desktop.py index 053333fe..3132d2da 100644 --- a/ffplayout/output/desktop.py +++ b/ffplayout/output/desktop.py @@ -19,7 +19,7 @@ This module plays the compressed output directly on the desktop. """ -import os +from platform import system from subprocess import PIPE, Popen from threading import Thread @@ -29,8 +29,7 @@ from ..utils import (ff_proc, ffmpeg_stderr_reader, log, lower_third, messenger, playlist, pre, pre_audio_codec, stdin_args, terminate_processes) -_WINDOWS = os.name == 'nt' -COPY_BUFSIZE = 1024 * 1024 if _WINDOWS else 65424 +COPY_BUFSIZE = 1024 * 1024 if system() == 'Windows' else 65424 def output(): diff --git a/ffplayout/output/stream.py b/ffplayout/output/stream.py index 6821f4ce..6802945a 100644 --- a/ffplayout/output/stream.py +++ b/ffplayout/output/stream.py @@ -19,7 +19,7 @@ This module streams the files out to a remote target. """ -import os +from platform import system from subprocess import PIPE, Popen from threading import Thread @@ -29,8 +29,7 @@ from ..utils import (ff_proc, ffmpeg_stderr_reader, get_date, log, lower_third, messenger, playlist, playout, pre, pre_audio_codec, stdin_args, terminate_processes) -_WINDOWS = os.name == 'nt' -COPY_BUFSIZE = 1024 * 1024 if _WINDOWS else 65424 +COPY_BUFSIZE = 1024 * 1024 if system() == 'Windows' else 65424 def output():