Skip to content

Add support for custom application VFS

This pull request allows to solve the last big pending issue regarding the usage of libdvd* in Kodi - supporting opening dvd files (including menus) from remote filesystems (vfs implementations) such as nfs, smb, etc.

A lot of users just backup their dvds keeping the folder structure by stripping css (using tools such as dvdbackup) and store them on the network. Libdvd* fails to play such files since it only supports streaming .iso files (or local filesystem). For historical reasons, and for more than a decade now, kodi wraps the libdvd dll into a custom implementation and hooks into libc calls replacing the implementation. This is buggy, slow, breaks easily, it's hard to keep up with upstream and...it's quite a big hack.

This PR tries to solve this issue - getting inspiration from libbluray. It splits platform based filesystem access code into their respective implementations, abstracting the usage from common code (dvd_input and dvd_read). Provides a new "path" (DVDOpenFiles) that accepts receiving a custom filesystem implementation provided by the caller application.

The implementation was runtime tested and validated in linux, windows and android using this PoC branch of Kodi.

I really hope this manages to get in, I've spent quite a bit of time on it.

dvdnav companion PR: libdvdnav!48

Regards

Edited by Miguel Borges de Freitas

Merge request reports