(
metadata: &ServiceMetadata,
options: &ServiceLaunchOptions,
)
| 2282 | } |
| 2283 | |
| 2284 | fn service_matches_launch_options( |
| 2285 | metadata: &ServiceMetadata, |
| 2286 | options: &ServiceLaunchOptions, |
| 2287 | ) -> bool { |
| 2288 | service_port_matches_launch_options(metadata.port, options) |
| 2289 | && metadata.bind == options.bind |
| 2290 | && metadata.advertise_host == options.advertise_host |
| 2291 | && metadata.client_root == options.client_root |
| 2292 | && metadata |
| 2293 | .video_codec |
| 2294 | .as_deref() |
| 2295 | .is_some_and(|codec| codec == options.video_codec.as_env_value()) |
| 2296 | && metadata |
| 2297 | .android_gpu |
| 2298 | .as_deref() |
| 2299 | .is_some_and(|gpu| gpu == options.android_gpu.as_emulator_value()) |
| 2300 | && metadata.low_latency == options.low_latency |
| 2301 | && metadata.realtime_stream |
| 2302 | == (options.realtime_stream || options.stream_quality_profile.is_some()) |
| 2303 | && metadata.stream_quality_profile == options.stream_quality_profile |
| 2304 | && metadata.local_stream_fps == options.local_stream_fps |
| 2305 | } |
| 2306 | |
| 2307 | fn service_port_matches_launch_options(actual: u16, options: &ServiceLaunchOptions) -> bool { |
| 2308 | let preferred = options.port.max(1024); |
no test coverage detected