Showing results for 
Search instead for 
Did you mean: 

VLC activeX's Playlistadd() option (Variant type) not working

I have a VLC activeX plugin in my CVI project. I can playback video file in it, by defining the uri field of AXVLC_pIVLCPlaylistadd(). But when I try to stream from a camera using DirectShow, I cannot get the options field, which takes in ole automation variant type to work.

AXVLCObj_IVLCPlaylist playlist;
VARIANT variant1, variant2;
char mrl[100];

sprintf(mrl, "%s", "dshow://");
variant1.n1.n2.vt = VT_NULL;
variant2.n1.n2.vt = VT_BSTR;
variant2.n1.n2.n3.bstrVal = SysAllocString(L":dshow-vdev=Device Name with spaces");
hr = AXVLC_pIVLCPlaylistadd (playlist, &errorInfo, mrl, variant1, variant2, &itemId);

The output would be the directshow blankscreen that shows it cannot find any device connected. hr and errorInfo would show no error.

But when I try the same MRL and option in the VLC application, I can get the camera output. When I try with any other options, it also does not work in the activeX. Am I feeding the option string into the ole automation variant correctly?

0 Kudos
Message 1 of 1