问题
I've got a WCF service that stories media files and returns them to consuming applications in the form of a Stream object. The issue arises when the consuming application wants to stream the media using MediaElement. As you all know, MediaElement doesn't accept Stream objects.
Can I get around this by using a VLC or WMP ActiveX control? Would either of these two controls allow me to play streaming media?
回答1:
Both of those two activex controls support various types of streaming media, but neither will allow you to use a C# Stream object, which is a managed object. Niether of those two activex controls use any managed code at all, as far as I am aware; it is possible that WMP may, but it wouldn't be exposed via the COM interface in any case.
If memory serves, I think you can provide a MediaElement with individual frames (even H.264 frames), so you could possibly extract the stream yourself and feed it into the MediaObject.
来源:https://stackoverflow.com/questions/7134135/do-vlc-or-wmp-activex-controls-accept-stream-objects