MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / usage_from_view

Function usage_from_view

src/config.cpp:217–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected