32 lines
996 B
Rust
32 lines
996 B
Rust
//! Module-path coverage for client-side H.264 decoder selection.
|
|
//!
|
|
//! Scope: include the client decoder selection helper directly.
|
|
//! Targets: `client/src/video_support.rs`.
|
|
//! Why: operator decoder overrides should fall back cleanly on machines with
|
|
//! different GStreamer plugin sets.
|
|
|
|
#[path = "../../client/src/video_support.rs"]
|
|
mod video_support;
|
|
|
|
use serial_test::serial;
|
|
use temp_env::with_var;
|
|
|
|
#[test]
|
|
#[serial]
|
|
fn decoder_override_accepts_decodebin_without_factory_lookup() {
|
|
with_var("LESAVKA_H264_DECODER", Some("decodebin"), || {
|
|
assert_eq!(video_support::pick_h264_decoder(), "decodebin");
|
|
});
|
|
}
|
|
|
|
#[test]
|
|
#[serial]
|
|
fn decoder_override_ignores_blank_or_unknown_values() {
|
|
with_var("LESAVKA_H264_DECODER", Some(" "), || {
|
|
assert!(!video_support::pick_h264_decoder().trim().is_empty());
|
|
});
|
|
with_var("LESAVKA_H264_DECODER", Some("not-a-real-decoder"), || {
|
|
assert!(!video_support::pick_h264_decoder().trim().is_empty());
|
|
});
|
|
}
|