(&self)
| 82 | |
| 83 | impl AmfSettings { |
| 84 | fn to_string(&self) -> String { |
| 85 | let mut args = String::new(); |
| 86 | args.push_str("-usage "); |
| 87 | args.push_str(self.usage); |
| 88 | args.push_str(" -quality "); |
| 89 | args.push_str(self.quality); |
| 90 | args.push_str(" -profile:v "); |
| 91 | args.push_str(self.profile); |
| 92 | |
| 93 | if !self.profile_tier.is_empty() { |
| 94 | args.push_str(" -profile_tier "); |
| 95 | args.push_str(self.profile_tier); |
| 96 | } |
| 97 | |
| 98 | args.push_str(" -rc "); |
| 99 | args.push_str(self.rate_control); |
| 100 | // always set this to constant bit rate to ensure reliable stream |
| 101 | args.push_str(" -cbr true"); |
| 102 | args.push_str(" -gpu "); |
| 103 | args.push_str(self.gpu.to_string().as_str()); |
| 104 | |
| 105 | return args; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | impl Iterator for Amf { |
no test coverage detected