(&mut self, quality: crate::codec::Quality)
| 168 | } |
| 169 | |
| 170 | fn set_quality(&mut self, quality: crate::codec::Quality) -> ResultType<()> { |
| 171 | let b = Self::convert_quality(&self.config.name, quality); |
| 172 | let mut bitrate = base_bitrate(self.config.width as _, self.config.height as _) * b / 100; |
| 173 | if bitrate > 0 { |
| 174 | bitrate = Self::check_bitrate_range(&self.config, self.bitrate); |
| 175 | self.encoder.set_bitrate(bitrate as _).ok(); |
| 176 | self.bitrate = bitrate; |
| 177 | } |
| 178 | Ok(()) |
| 179 | } |
| 180 | |
| 181 | fn bitrate(&self) -> u32 { |
| 182 | self.bitrate |
nothing calls this directly
no test coverage detected