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

Function stream_quality_response

packages/server/src/api/routes.rs:1452–1465  ·  view source on GitHub ↗
(config: &Config)

Source from the content-addressed store, hash-verified

1450}
1451
1452fn stream_quality_response(config: &Config) -> Value {
1453 let video_codec = active_video_codec(config);
1454 let quality = current_stream_quality_state(video_codec.clone());
1455 json_value!({
1456 "ok": true,
1457 "quality": stream_quality_state_value(&quality),
1458 "videoCodec": video_codec,
1459 "profiles": STREAM_QUALITY_PROFILES
1460 .iter()
1461 .filter(|profile| VISIBLE_STREAM_QUALITY_PROFILE_IDS.contains(&profile.id))
1462 .map(stream_quality_profile_value)
1463 .collect::<Vec<_>>()
1464 })
1465}
1466
1467fn current_stream_quality_state(video_codec: String) -> ActiveStreamQualityState {
1468 let configured_profile = env::var("SIMDECK_STREAM_QUALITY_PROFILE")

Callers 1

Calls 3

active_video_codecFunction · 0.85
cloneMethod · 0.65

Tested by

no test coverage detected