mpv_kit 0.1.0-dev.6
mpv_kit: ^0.1.0-dev.6 copied to clipboard
Complete, low-overhead Dart FFI bindings for libmpv (mpv 0.41, client API 2.5): the full client API, mpv_node conversion, an isolate-safe event loop and a typed high-level Player. Rendering lives in m [...]
0.1.0-dev.6 #
- Changed: software decoding at 8K and above now uses at most 8 threads
(
vd-lavc-threads), the same cap as 4K. mpv's automatic value is up to 16 frame threads, and each thread holds a full frame: measured on 8K HEVC Main10 50 fps (16-thread x64,hwdec=no), peak RSS 3433 -> 2213 MiB (-1.2 GiB) for about 8% less decode throughput (20.6 -> 18.9 s of video decoded per 20 s). 12 threads was not a better trade: 525 MiB more for 2% throughput. Values at 4K and below are unchanged, and avd-lavc-threadsyou set yourself is still never changed.
0.1.0-dev.5 #
- Added:
Player.demuxerCacheState(MpvDemuxerCacheState,MpvSeekableRange): bytes queued ahead and in total, buffered duration, source read rate and seekable ranges fromdemuxer-cache-state. Observed only from the first access; the parser never throws on malformed nodes. - Added:
Player.eventQueueOverflows, fired when mpv's event queue for the client overflowed (discrete events such as log messages were dropped; property values and command replies are not lost). - Changed: software decoding uses at most 4 threads up to 1080p and 8 up to
4K (
vd-lavc-threads, set per file before the decoder starts; 8K keeps mpv's automatic count). Measured on a 16-thread x64: 1080p peak RSS 153 -> 82 MiB, 4K60 484 -> 303 MiB, both still decoding at well over their frame rate. Avd-lavc-threadsyou set yourself is never changed. - Changed: the frame-size demuxer budget no longer goes below mpv's own 150 MiB default (640x360 got 21 MiB, which could starve readahead with high-bitrate audio). Local files only fill a few MiB of it.
- Added:
autoTuneDemuxerparameter onPlayer()andPlayer.wrap(defaulttrue, unchanged behaviour);falsekeeps the configureddemuxer-max-bytes/demuxer-max-back-bytesfor every file.
0.1.0-dev.4 #
- Changed:
MpvLibrary.open(and soMpv.create/PlayerwithlibraryPath) is strict about explicitly named libraries. An explicitpath, else a non-emptyMPV_KIT_LIBMPV_PATH, is tried alone; if it fails to load (missing file, unresolved dependency, incompatible client API) it throwsMpvLibraryNotFoundcarrying the loader's reason instead of silently falling back to the next candidate (which ran the wrong libmpv). The platform default names are only tried when neither is given. Signatures are unchanged. - Fixed: disposing an
Mpvwhile clients created from it were still alive hung forever;dispose()now disposes those clients first. - Fixed: custom stream protocols always answer a claimed request: a source
whose
sizegetter throws, or a URI that is not valid UTF-8, fails the load instead of freezing it, and an opener that does not complete within 30 s fails withloadingFailed(a source arriving later is closed). - Changed:
Playerno longer hardware-decodes FFV1 by default (hwdec-codecsexcludesffv1, mpv #18255); override it throughoptions. - Changed (behavior):
Playernow defaultshwdecto a per-platform, zero-copy-first list instead of one shared list: Windowsvulkan,d3d11va,d3d11va-copy,auto-safe, Linuxvulkan,vaapi,auto-safe, macOSvideotoolbox,auto-safe, otherauto-safe(wasvulkan,d3d11va-copy,auto-safeeverywhere). An explicithwdecinoptionsstill wins. See ADR 0006.
0.1.0-dev.3 #
- No API changes; released together with mpv_kit_libs 0.1.0-dev.3.
0.1.0-dev.2 #
- Fixed: reading
audioDevicesno longer crashes on machines without an audio output device (fixed in libmpv, see mpv_kit_libs). The device tests now run on every CI target.
0.1.0-dev.1 #
- Music and audio state for drop-in replacement of media_kit:
metadata(tags, ICY titles),audioParams,audioDevices/setAudioDevice,bufferedPosition,setLoopMode/loopMode(MpvLoopMode),setReplayGain,MpvTrack.isAlbumArt. Seedocs/MIGRATING_FROM_MEDIA_KIT.md. - Known issue: reading
audioDeviceson a machine without any audio output device (e.g. headless CI VMs) crashes inside mpv's CoreAudio / WASAPI device enumeration. Device listing is lazy, so playback never triggers it; machines with an audio device are unaffected. Mpv: bindings for the full libmpv 0.41 client API (client API 2.5): commands (sync, async, abortable), properties viampv_node, property observers as streams, typed events, hooks, log messages, sub-clients.- Isolate-safe event loop driven by mpv's wakeup callback through
NativeCallable.listener. - Secure defaults (
Mpv.secureDefaultOptions): config files, scripts, ytdl, OSC and default key bindings disabled unless requested. Player: typed high-level player withMpvState<T>state streams, playlist, track, subtitle, audio/video adjustment and screenshot commands,errorsandlogsstreams, andaddDisposeHookfor render contexts.MpvOptions: typedMpvOption<T>for every option of the bundled libmpv, withMpv.getOptionValue/Mpv.setOptionValue.mpvProperties,mpvCommands,mpvOptions: catalog generated from mpv's documentation.- Custom stream protocols served from Dart (
Mpv.registerStreamProtocol,MpvStreamSource,MpvMemoryStreamSource) on libmpv builds with the mpv_kit stream bridge (patch 0006). MpvLibrary: libmpv lookup via explicit path,MPV_KIT_LIBMPV_PATHor platform default names, with a client API version check.