ActiveX and Borland C++ Builder 6

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
pjamaajda
New Cone
New Cone
Posts: 4
Joined: 24 Apr 2006 13:35

ActiveX and Borland C++ Builder 6

Postby pjamaajda » 06 May 2006 22:03

I am unable to stream video to a file.
The problem seems to be the definition of the properties parameter. Looking at the source code that C++ Builder generates, the component is looking for a VARIANT type that contains a SAFEARRAY containing BSTRs. I have created such a type but to no avail, the media plays but does not record. Searching the net, I have found articles stating problems with VARIANT data types and C++ builder 6. Has anyone succeeded like this? Or at least can someone tell me how to get the debug data out. Please.

tonsofpcs
Cone that earned his stripes
Cone that earned his stripes
Posts: 363
Joined: 04 Jan 2006 10:03
Location: Binghamton, NY, USA
Contact:

Postby tonsofpcs » 06 May 2006 23:32

Can you show us the lines of code that you are using to make the call?

pjamaajda
New Cone
New Cone
Posts: 4
Joined: 24 Apr 2006 13:35

activex and c++ builder

Postby pjamaajda » 07 May 2006 12:53

The code I'm using is of the form

SAFEARRAY* psa;
SAFEARRAYBOUND rgsabound[1];
WideString w1 = ":sout=#duplicate{dst=display,dst=std{access=file,mux=ts,url=\"C:\\projects\\video\\copy.mpeg\"}}";
WideString w2 = "c:\\projects\\video\\original.mpeg";
VARIANT vOpt;
long aLong[1];

rgsabound[0].lLbound = 0;
rgsabound[0].cElements = 1;

psa = SafeArrayCreate(VT_VARIANT, 1, rgsabound);

if (psa)
{
VariantInit(&vOpt);
vOpt.vt= VT_BSTR; // set type
vOpt.bstrVal = w1.c_bstr();
aLong[0]= 0; // set index value
SafeArrayPutElement(pSA, aLong, &vOpt);
vlc_oblect->AddTarget(w2.c_bstr(), pSA, VLCPlayListReplaceAndGo, 0);
}

I get video but no copy.

feedbee

Postby feedbee » 09 May 2006 15:11

I had no problems to run movie under Delphi, but I have a problem to run it ender Buider...

The simplest code:

Code: Select all

if ( OpenDialog->Execute() ) { WideString w2 = OpenDialog->FileName; VLCPlugin1->addTarget(w2.c_bstr(), VARIANT(), VLCPlayListReplaceAndGo, 0); }
I need just to run the movie with no any additional options. But executing this code nothing changes. A state of VLCPlugin component doesn't change and there is no movie playing. But there isn't any error messages from the application too... Can u explane me whare is my problem and what should I do?

feedbee

Postby feedbee » 09 May 2006 15:25

Addition to previos post:

The Delphi code is working...
if OpenDialog1.Execute then begin
VLCPlugin1.addTarget(OpenDialog1.FileName, null, VLCPlayListReplace, 0);
VLCPlugin1.play;
end;
And when I put MRL in object Inspector in Builder, that MRL plays too.

tonsofpcs
Cone that earned his stripes
Cone that earned his stripes
Posts: 363
Joined: 04 Jan 2006 10:03
Location: Binghamton, NY, USA
Contact:

Re: activex and c++ builder

Postby tonsofpcs » 09 May 2006 23:51

pjamaajda, try adding an empty string ( "" ) as the last element in the options you pass

Guest

Postby Guest » 04 Jul 2006 11:15

I had no problems to run movie under Delphi, but I have a problem to run it ender Buider...

The simplest code:

Code: Select all

if ( OpenDialog->Execute() ) { WideString w2 = OpenDialog->FileName; VLCPlugin1->addTarget(w2.c_bstr(), VARIANT(), VLCPlayListReplaceAndGo, 0); }
I need just to run the movie with no any additional options. But executing this code nothing changes. A state of VLCPlugin component doesn't change and there is no movie playing. But there isn't any error messages from the application too... Can u explane me whare is my problem and what should I do?

I have the same problem.
I would like to play a simple movie, does anyobdy succeed ???


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 45 guests