(
index: usize,
permutations: &Vec<Permutation>,
calc_time: Option<Duration>,
log_eta: bool,
ignore_factor: c_float,
)
| 108 | } |
| 109 | |
| 110 | fn log_header( |
| 111 | index: usize, |
| 112 | permutations: &Vec<Permutation>, |
| 113 | calc_time: Option<Duration>, |
| 114 | log_eta: bool, |
| 115 | ignore_factor: c_float, |
| 116 | ) { |
| 117 | let mut permutation = permutations[index].clone(); |
| 118 | let metadata = permutation.get_metadata(); |
| 119 | if log_eta { |
| 120 | if calc_time.is_some() { |
| 121 | println!( |
| 122 | "[ETR: {}]", |
| 123 | format_dhms(calculate_eta( |
| 124 | calc_time.unwrap(), |
| 125 | index, |
| 126 | permutations.len(), |
| 127 | ignore_factor |
| 128 | )) |
| 129 | ); |
| 130 | } else { |
| 131 | println!("[ETR: Unknown until first permutation is done]"); |
| 132 | } |
| 133 | } |
| 134 | println!("[Permutation:\t{}/{}]", index + 1, permutations.len()); |
| 135 | if permutation.is_decoding { |
| 136 | if permutation.decode_run { |
| 137 | println!("[Decode Benchmark]"); |
| 138 | } else { |
| 139 | println!("[Encode Benchmark]"); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | println!("[Resolution:\t{}x{}]", metadata.width, metadata.height); |
| 144 | println!("[Encoder:\t{}]", permutation.encoder); |
| 145 | println!("[FPS:\t\t{}]", metadata.fps); |
| 146 | println!("[Bitrate:\t{}Mb/s]", permutation.bitrate); |
| 147 | println!("[{}]", permutation.encoder_settings); |
| 148 | } |
| 149 | |
| 150 | pub fn spawn_ffmpeg_child( |
| 151 | ffmpeg_args: &FfmpegArgs, |
no test coverage detected