MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / normalize_video_codec

Function normalize_video_codec

packages/server/src/api/routes.rs:1008–1015  ·  view source on GitHub ↗
(codec: &str)

Source from the content-addressed store, hash-verified

1006}
1007
1008fn normalize_video_codec(codec: &str) -> Option<&'static str> {
1009 match codec.trim().to_ascii_lowercase().as_str() {
1010 "auto" => Some("auto"),
1011 "hardware" => Some("hardware"),
1012 "software" => Some("software"),
1013 _ => None,
1014 }
1015}
1016
1017fn normalize_android_gpu(mode: &str) -> Option<&'static str> {
1018 match mode.trim().to_ascii_lowercase().replace('-', "_").as_str() {

Callers 2

active_video_codecFunction · 0.85

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected