Support Kodi VFS resources - #2107
Conversation
| int UTILS::CURL::CUrl::Open() | ||
| { | ||
| if (!m_file.CURLOpen(ADDON_READ_NO_CACHE | ADDON_READ_NO_BUFFER)) | ||
| if (m_isHttp) |
There was a problem hiding this comment.
I would like to have something like m_isVfs instead of m_isHttp so that its more clear that code is for VFS protocols (here and in all other code changes)
| double UTILS::CURL::CUrl::GetDownloadSpeed() | ||
| { | ||
| return m_file.GetFileDownloadSpeed(); | ||
| return m_isHttp ? m_file.GetFileDownloadSpeed() : 0.0; |
There was a problem hiding this comment.
Of course, if we don't have information about the download speed,
this will make it impossible to manage automatically the stream quality in "adaptive" streams
this should be documented, more likely on Wiki
It will need to be documented that also headers cannot be handled either,
they are usually important for most streaming services
I’m not familiar with VFS protocols, but i imagine that VFS sources are custom streams (?) and don’t require http headers but it’s best to point this out also this one on Wiki
There was a problem hiding this comment.
I'll see what we can do about download speed. I only tested with file:// URLs, in which case download speed isn't really an issue. So VFS support was initially for testing. But I want to use it with magnet:?xt=urn:btih:... URNs as well. Later I'll research this use case more, and come back with changes.
|
I've just taken a quick look |
No rush, my ultimate use case is to combine this with xbmc/xbmc#23696, which definitely isn't a v22 feature and far from being done. |
Description
Allow adaptive resources to be read through Kodi's VFS in addition to HTTP(S). Because I want to play
file:://URLs.AI use:
Extend URL resolution to support Kodi VFS schemes, including
file://URLs and URNs (such as potential v23magnet:links in xbmc/xbmc#23696) across nested playlist, init and segment URLs.Extend
CUrlso HTTP(S) keeps the existing CURL path while other schemes usekodi::vfs::CFile. Byte ranges use the existing HTTPRangeheader for HTTP(S), or seek and bounded reads for VFS resources.Update adaptive segment downloads to use the transport-independent range handling.
Motivation and context
InputStream Adaptive currently opens adaptive resources through Kodi's CURL interface, which limits playback to HTTP(S)-style resources.
This allows manifests and their referenced resources to be loaded from Kodi VFS URLs such as
file://, and enables VFS providers such as Kodi'smagnet:filesystem to be used by InputStream Adaptive without adding transport-specific code to the add-on.How has this been tested?
Tested on macOS ARM64 with Kodi 22 development builds.
file://.Types of change