Skip to main content

## Module mpv_backend

Source

## Structs§

InternalState 🔒
MpvBackend
  MPV-based player backend for Linux

## Constants§

NORMALIZE_REF_LUFS 🔒
  Reference loudness the peak table is anchored at (Normal preset, −14 LUFS).
NORMALIZE_REF_PEAK 🔒
  Reference peak (`dynaudnorm` `p`, linear amplitude) for the default `VolumeLevel::Normal` (−14 LUFS) target, leaving −1.2 dB of headroom.

## Statics§

MPV_HANDLE 🔒
  The mpv handle of the backend this process created, for the video surface.

## Functions§

build_af_filter 🔒
  Build the full MPV `af` (audio filter) value from the audio settings.
detect_audio_system 🔒
  Detect which audio system is available on the system
eq_filter_entries 🔒
  Peaking-EQ filter entries (unwrapped), one ffmpeg `equalizer` (two-pole peaking) per band with a non-zero gain, e.g. `equalizer=f=31:width_type=o:width=1:g=5`. Returns an empty vec when the EQ is disabled or every gain is ~0. Gains are assumed already normalised by `AudioSettings::with_equalizer_normalised`; bands beyond `EQ_BANDS` are ignored.
get_stream_url 🔒
  Helper to get stream URL from MediaItem
normalize_filter_entry 🔒
  The loudness-normalization filter entry (unwrapped), or `None` when normalization is disabled. Uses ffmpeg’s `dynaudnorm`, a gentle real-time dynamic normalizer that avoids the gain “pumping” `loudnorm`’s single-pass mode can produce on very dynamic material.
registered_handle
  The registered handle, or null if no MPV backend was created (initialisation can fail, and the app falls back to a no-op backend rather than dying).