3

I'm thinking about using VLC as an ActiveX control for my WPF application, but I'm unsure of whether or not it would accept a System.IO.Stream object as an input parameter and be able to stream media that way. I haven't been able to find any definitive answers to this, so before I actually go ahead with this, I'd like to be sure that VLC can do this.

The System.Windows.Controls.MediaElement is out of the question for me since it only accepts URIs as input parameters for the source. The same goes for AxWindowsMediaPlayer, which I thought would work.

rafale
  • 1,704
  • 6
  • 29
  • 43
  • 1
    Why did you ask this question multiple times? http://stackoverflow.com/questions/7134135/wpf-do-vlc-or-wmp-activex-controls-accept-stream-objects/7142490#7142490 – taxilian Aug 22 '11 at 02:03

1 Answers1

1

It will not be able to accept "non-primitive" types such as streams. These are .Net types which haves no direct analogue in COM. It would have to have been explicitly designed to work with streams via COM interop.

Tim Lloyd
  • 37,954
  • 10
  • 100
  • 130
  • Does it accept byte[]? I can call Stream.BeginRead, which reads the stream into the byte[] buffer which I'll then pass into the VLC ActiveX control. – rafale Aug 21 '11 at 21:53
  • Perhaps you should be asking, how do I use VLC with C#. – Tim Lloyd Aug 21 '11 at 21:57
  • That's another issue... I haven't been able to find any C# documentation for libvlc. Otherwise it would've been a lot simpler to have a look at what options I've got. So far, it doesn't look like it'll be able to play a stream using a byte array. – rafale Aug 21 '11 at 22:08
  • I have answered your question. – Tim Lloyd Aug 22 '11 at 06:31