I have successfully implemented a video player inside Urho3D that can play video/audio files from file, url, video capture devices such as webcam or DVB tuners. Everything works fine, however, I am trying to integrate the video player as Resource, so it can be loaded by the ResourceCache, possibly like this:
auto video = cache->GetResource<Video>("video.avi");
This I’ve done easily by implementing a custom resource which overrides BeginLoad()/EndLoad().
The problem is, when I try to load custom url that the video player supports, for example “device://camera0” or “rtsp://url…/”, the ResourceCache tries to resolve that as file on the disk and then passes it as Deserializer in BeginLoad() and since such file doesn’t exist, loading fails.
The question: Am I trying to use the ResourceCache in the wrong way ? Should it be used only for actual file loading and parsing ?