()
| 499 | } |
| 500 | |
| 501 | pub fn check_available_hwcodec() { |
| 502 | let ctx = EncodeContext { |
| 503 | name: String::from(""), |
| 504 | mc_name: None, |
| 505 | width: 1280, |
| 506 | height: 720, |
| 507 | pixfmt: DEFAULT_PIXFMT, |
| 508 | align: HW_STRIDE_ALIGN as _, |
| 509 | kbs: 0, |
| 510 | timebase: DEFAULT_TIME_BASE, |
| 511 | gop: DEFAULT_GOP, |
| 512 | quality: DEFAULT_HW_QUALITY, |
| 513 | rc: DEFAULT_RC, |
| 514 | thread_count: 4, |
| 515 | }; |
| 516 | #[cfg(feature = "vram")] |
| 517 | let vram = crate::vram::check_available_vram(); |
| 518 | #[cfg(not(feature = "vram"))] |
| 519 | let vram = "".to_owned(); |
| 520 | let ram = Available { |
| 521 | e: Encoder::available_encoders(ctx, Some(vram.clone())), |
| 522 | d: Decoder::available_decoders(Some(vram.clone())), |
| 523 | }; |
| 524 | if let Ok(ram) = serde_json::to_string_pretty(&ram) { |
| 525 | HwCodecConfig { ram, vram }.store(); |
| 526 | } |
| 527 | } |
| 528 | |
| 529 | #[cfg(any(target_os = "windows", target_os = "linux"))] |
| 530 | pub fn start_check_process(force: bool) { |
nothing calls this directly
no test coverage detected