Trouble with TVLCPlugin2

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
martinarcher
New Cone
New Cone
Posts: 4
Joined: 30 Sep 2016 14:57

Trouble with TVLCPlugin2

Postby martinarcher » 30 Sep 2016 22:45

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!

da2424
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 16 Apr 2013 16:57

Re: Trouble with TVLCPlugin2

Postby da2424 » 03 Oct 2016 12:43

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.

martinarcher
New Cone
New Cone
Posts: 4
Joined: 30 Sep 2016 14:57

Re: Trouble with TVLCPlugin2

Postby martinarcher » 03 Oct 2016 14:24

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!

martinarcher
New Cone
New Cone
Posts: 4
Joined: 30 Sep 2016 14:57

Re: Trouble with TVLCPlugin2

Postby martinarcher » 03 Oct 2016 21:46

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.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 16 guests