@@ -23,8 +23,8 @@ use crate::files::{
2323} ;
2424use crate :: lock:: Lock ;
2525use crate :: logger:: Logger ;
26- use crate :: shell:: { run_shell_command_by_os , Command } ;
27- use crate :: { format_one_arg, format_three_args, format_two_args} ;
26+ use crate :: shell:: Command ;
27+ use crate :: { format_one_arg, format_three_args, format_two_args, run_shell_command_with_log } ;
2828use anyhow:: Error ;
2929use reqwest:: Client ;
3030use std:: fs;
@@ -42,7 +42,7 @@ const FFMPEG_RECORD_FRAME_RATE: &str = "30";
4242const FFMPEG_RECORD_DESKTOP_WINDOWS_COMMAND : & str = "{} -f gdigrab -i desktop -r {} -q:v 1 -y {}" ;
4343const FFMPEG_RECORD_DESKTOP_LINUX_COMMAND : & str =
4444 "{} -f x11grab -i $DISPLAY -r {} -vcodec huffyuv -y {}" ;
45- const FFMPEG_RECORD_DESKTOP_MACOS_COMMAND : & str = "{} -f avfoundation -i \" 1 \" -r {} -y {}" ;
45+ const FFMPEG_RECORD_DESKTOP_MACOS_COMMAND : & str = "{} -f avfoundation -i $DISPLAY -r {} -y {}" ;
4646const FFMPEG_RECORDING_EXTENSION : & str = "avi" ;
4747const FFMPEG_RECORDING_FOLDER : & str = "recordings" ;
4848
@@ -213,6 +213,6 @@ pub fn record_desktop_with_ffmpeg(
213213 FFMPEG_RECORD_FRAME_RATE ,
214214 & recording_name,
215215 ) ) ;
216- run_shell_command_by_os ( os, command) . unwrap ( ) ;
216+ run_shell_command_with_log ( log , os, command) . unwrap ( ) ;
217217 Ok ( ( ) )
218218}
0 commit comments