| 215 | |
| 216 | template<class T> |
| 217 | ::std::optional<int> usage_from_view(const ::std::string_view &usage, const ::std::optional<int>(&original)) { |
| 218 | #define _CONVERT_(x) \ |
| 219 | if (usage == #x##sv) \ |
| 220 | return (int) T::x |
| 221 | _CONVERT_(lowlatency); |
| 222 | _CONVERT_(lowlatency_high_quality); |
| 223 | _CONVERT_(transcoding); |
| 224 | _CONVERT_(ultralowlatency); |
| 225 | _CONVERT_(webcam); |
| 226 | #undef _CONVERT_ |
| 227 | return original; |
| 228 | } |
| 229 | |
| 230 | int coder_from_view(const ::std::string_view &coder) { |
| 231 | if (coder == "auto"sv) { |
nothing calls this directly
no outgoing calls
no test coverage detected