Talk:ActiveX/Delphi

From VideoLAN Wiki
< Talk:ActiveX
Revision as of 10:49, 6 December 2006 by PaulTOTH (talk | contribs) (→‎To author:: ExternalAPI)
Jump to navigation Jump to search

Thanks to the article's author

I would like to extend my deepest thanks to the author of this article for simplifying the process of integrating VLC into the Delphi mainstream.

I find the tips in this article most helpful, and love the VideoLAN system immensley.

Simon

To author:

Thank you for your time and effort. Would it be too much to ask you to give us guidelines how to stream files using Delphi and ActiveX component?

(unsigned by Derran)

VLC and Delphi

Delphi can also use the ExternalAPI like in VideoLAN for Delphi :D

{ val:TValue }
val.AsInteger := IntToStr(Panel1.Width);
VLCLib.VLC_VariableSet('conf::width',val);
val.AsInteger := inttostr(Panel1.Height);
VLCLib.VLC_VariableSet('conf::height',val);

Controlling the size and client panel

The ActiveX runs like a champ, but it wants to create its own window to display. I need it to show on a panel (or anything else to set size and position) within an application. I was able to set the size by:

 val := inttostr(Panel1.Width);
 VLCPlugin1.setVariable('conf::width',val);
 val := inttostr(Panel1.Height);
 VLCPlugin1.setVariable('conf::height',val);

But this results in no display:

 val := inttostr(Panel1.Handle);
 VLCPlugin1.setVariable('drawable',val);

You can hear the sound when you continue with:

 VLCPlugin1.addTarget(OpenDialog.FileName, null, $1, 0);
 VLCPlugin1.play;

The 'drawable' variable is evidently not right, but it doesn't kick a compile error. What is the correct variable? Or is there a whole different way I should be doing this? Thanks.