Page 1 of 1

Trouble with TVLCPlugin2

Posted: 30 Sep 2016 22:45
by martinarcher
I'm trying to add the ActiveX plugin to a project in RAD Studio (C++). I added the ActiveX component with no trouble and can place an instance of TVNCPLugin2 on my form and named it VLCPLugin.

I threw some quick code together to try and stream an RTSP stream to the player on my form....

Code: Select all

VLCPlugin->Enabled = true; VLCPlugin->Show(); VLCPlugin->BaseURL = "rtsp://10.61.197.119"; FormJoyVIEW->VLCPlugin->playlist->play();
On the line assigning the BaseURL, I get an exception "member not found".

The IDE recognizes the BaseURL member and compiles fine. Is this the wrong way to assign a stream URL to the player and play it?

Thanks!

Re: Trouble with TVLCPlugin2

Posted: 03 Oct 2016 12:43
by da2424
In your case, the correct way should be to use playlist->add() (see https://wiki.videolan.org/Documentation ... ist_object)
BaseURL and some other properties are available to define some presets (as in HTML with attributes), they are used by MS Visual Studio.

Re: Trouble with TVLCPlugin2

Posted: 03 Oct 2016 14:24
by martinarcher
Thanks for the help. I appreciate it. I change the code to...

Code: Select all

FormJoyVIEW->VLCPlugin->Enabled = true; FormJoyVIEW->VLCPlugin->Show(); try { FormJoyVIEW->VLCPlugin->playlist->add(L"rtsp://10.61.197.119"); FormJoyVIEW->VLCPlugin->playlist->play(); } catch(Exception & E) { ShowMessage(E.Message); }
The program now throws an Access Violation when trying to execute the add(). Is there anything that needs done to the object to prepare it for a playlist. I don't see any reason this shouldn't work in the documentation.

Thanks!

Re: Trouble with TVLCPlugin2

Posted: 03 Oct 2016 21:46
by martinarcher
I figured it out. The optional parameters being of the add() method are not all optional. Looks like it requires at least one parameter of type VARIANT. I added that and took care of it.

I still will get an access violation here and there but I am streaming video now. I haven't got to the bottom of why it throws an access violation randomly.