File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ pub fn capture_thread(
44
44
api : impl PlatformApi + Sync ,
45
45
win_id : WindowId ,
46
46
time_codes : Arc < Mutex < Vec < u128 > > > ,
47
- tempdir : Arc < TempDir > ,
47
+ tempdir : Arc < Mutex < TempDir > > ,
48
48
frame_drop_strategy : & FrameDropStrategy ,
49
49
framerate : & Framerate ,
50
50
) -> Result < ( ) > {
@@ -130,19 +130,6 @@ pub fn capture_thread(
130
130
Ok ( ( ) )
131
131
}
132
132
133
- fn capture_and_save_frame (
134
- api : Arc < impl PlatformApi + Sync > ,
135
- win_id : WindowId ,
136
- timecode : u128 ,
137
- tempdir : Arc < Mutex < TempDir > > ,
138
- file_name_fn : fn ( & u128 , & str ) -> String ,
139
- ) -> Result < ( ) > {
140
- let mut result: Result < ( ) > = Ok ( ( ) ) ;
141
- rayon:: scope ( |s| s. spawn ( |_| { } ) ) ;
142
-
143
- Ok ( ( ) )
144
- }
145
-
146
133
/// saves a frame as a tga file
147
134
pub fn save_frame (
148
135
image : & ImageOnHeap ,
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ fn main() -> Result<()> {
81
81
let frame_drop_strategy = args
82
82
. is_present ( "natural-mode" )
83
83
. then ( || FrameDropStrategy :: DoNotDropAny )
84
- . unwrap_or_else ( || FrameDropStrategy :: DropIdenticalFrames ) ;
84
+ . unwrap_or ( FrameDropStrategy :: DropIdenticalFrames ) ;
85
85
let should_generate_gif = !args. is_present ( "video-only" ) ;
86
86
let should_generate_video = args. is_present ( "video" ) || args. is_present ( "video-only" ) ;
87
87
let ( start_delay, end_delay) = (
@@ -92,7 +92,7 @@ fn main() -> Result<()> {
92
92
. value_of ( "framerate" )
93
93
. unwrap ( )
94
94
. parse :: < u32 > ( )
95
- . map ( |f| Framerate :: new ( f ) )
95
+ . map ( Framerate :: new)
96
96
. context ( "Invalid value for framerate" ) ?;
97
97
98
98
if should_generate_gif {
You can’t perform that action at this time.
0 commit comments