I'm currently using MediaFoundation to read MP4 video from a remote server using HTTP. I create the media source using the source resolver method CreateObjectFromURL
.
This works perfectly fine and the video is great, except for one huge pain point:
All data received by the source seems to be cached to disk, specifically in ...AppData\Local\Microsoft\Windows\INetCache\IE
. This is not ideal as the streams can be open for an unlimited amount of time because the video is live.
At the moment the only real solution is to periodically disconnect, clean up temporary internet files, then reconnect again. This would need to be done every few hours to stop the machine from filling up and exploding. It is not really an acceptable long term solution for the end user of course.
I have tried to disable caching by setting the MFNETSOURCE_CACHEENABLED
attribute on the media source to false, but it doesn't seem to stop it caching at all.
Is there a trick I'm missing somewhere?