Just curious to see if this is possible. I have a windows application that reads all the bytes from a .avi file situated on my pc and then stores it in a byte[]. So now I have the avi file in memory, and I want to load it into some sort of a video player control, directly from memory. I've tried using the wmplayer control, apparently this is not possible. I've read suggestion about using the DirectShow and VLC plugins, but I have no idea where to even start using those two and I haven't seen any sample code of this being down. Anybody have any ideas to elaborate on the mentioned plugins, or have a different approach to it?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
For DirectShow, an in-memory source filter may be required. I am not aware of such a filter being available, but one can be based on Async Filter Sample from DirectShow samples. This is in C++ though.
For .NET, DirectShow.NET library can be used. A sample GSSF filter there may be a good start for an in-memory source filter implementation. This library also provides COM Interop for DirectShow that could be used to build a test player application that instantiates this filter.