ActiveX, VB6, GetVariable

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
dh1nfj
New Cone
New Cone
Posts: 4
Joined: 10 Oct 2005 12:26

ActiveX, VB6, GetVariable

Postby dh1nfj » 10 Oct 2005 12:35

hello,

i'm using the activex.dll with vb6. i've tried to use the getvariable functions, but I can't get them to work. vlc_h = VLC.getVariable("height") courses an memory overflow error. can someone post me an example of using the get- und setvariable functions with vb6? is there a list auf variable which i can set und get? I'd like to check if the player is in fullscreen-mode oder no.

thanks, jochen

ps: i'm using vlc 0.84 beta

Pflaume
Blank Cone
Blank Cone
Posts: 21
Joined: 06 Jul 2005 20:31

ActiveX, VB6, GetVariable

Postby Pflaume » 10 Oct 2005 15:47

Hey,
you are getting a "Out of Memory" because the ActiveX is exepting a Codepage (_p_instance->getCodePage();). While you are using the ActiveX in VB / .Net, there is no Codepage available.

You have to change the Sourcecode to get it running.
I have tried it, but it is still not running.

For ex. (In VB6):

Dim val As Integer
val = VLC.getVariable("key-vol-mute")
VLC.setVariable "key-pressed", val

I get val = 109 and when I use setVariable, nothing happens...

Any Idea?

Regards
Stefan

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 11 Oct 2005 17:18

the "OUT OF MEMORY" error has been fixed in the repository, thanks for the report

Pflaume
Blank Cone
Blank Cone
Posts: 21
Joined: 06 Jul 2005 20:31

OUT OF MEMORY

Postby Pflaume » 11 Oct 2005 18:02

Quovodis:

Hey,
thank you for Fixing the Bug. When is the new svn available?

I have tried it by my own, but there are still a Problem with the setVariable.

Maybe you could help me.

1) I read out the Key for "key-audio-track"
X = VLC.getVariable("key-audio-track")

2) I should get "109" as Variant/Integer

3) I send the "109" with:
VLC.setVariable "key-pressed", X

4) Nothing happens...

From the Source Code I can see, that the "setVariable" should find the Type of Variable (eg. Integer) by it's own... But I dont know, how the "key-pressed" in VLC is working.

When I set the VLC.setVariable "key-audio-track", 109 the new Value of "key-audio-track" is allways "2", no metter witch Value I try to set. After that, I can access the key-audio-track with VLC.setVariable "key-pressed", 2
Maybe, there is a Problem with the:
VariantChangeType(&value, &arg, 0, VT_I4); ?

I you have any further Information, please let me know.

In the Moment, I am writing a App. that holds the VLC as an ActiveX and is downloading Playlists etc. from a VOD Server (VLS, VLC, ASP, SQL).
The Client- App has full Remote Control support! (Yes, IR Remote Control).
The Goal is a Windows XP embedded Application for an embedded STB to Watch DVD and Streams from the VOD Server. (Next Step is a Linux embedded STB (Sorry, but let me Start with MS first, I am a MS VB, VC .NET prof.))

Of Cours, it is open Source... A Sourceforge Project will be setup soon.

So, I can do a lot of debugging and reporting bugs for the activeX VLC plugin, if you are interestet.
Also I am working on putting the hole ActiveX into a VC Workspace. After that, it should be easy to implement a 100% compatible MFC/ATL table that can later be used under Cygwin to compile.

Please let me Know what you are thinking about it!

Regards
Stefan

P.S.: I am using VLC for several Years now and I think it is very, very good Work!

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 11 Oct 2005 18:55

Stefan,

you were right, the arguments for VariantChangeType were inverted, I have restored them in the right order.

VLC.setVariable "key-pressed", X

now works properly in Visual Basic.

the fix will be available in 0.8.4-test2, but if you like to live on the edge, you can grab the next nightly build @

http://nightlies.videolan.org

or use subversion to grab the latest source code, check out the developer page for more info

thanks for your help and good luck for your project, and don't forget to log those bugs

Damien

Pflaume
Blank Cone
Blank Cone
Posts: 21
Joined: 06 Jul 2005 20:31

Thank You

Postby Pflaume » 11 Oct 2005 19:11

Hey Damien,
I already use svn, so, I will compile the new svn release soon.
Thank You for Fixing the Bug.

I would be a great help to have a "ActiveX" chapter in the Bugzilla of VLC!
Could you do that?

I will send you further things, when I find something strange...

Thank you & Regards

Stefan

dh1nfj
New Cone
New Cone
Posts: 4
Joined: 10 Oct 2005 12:26

Postby dh1nfj » 13 Oct 2005 09:48

hello,

i've downloaded the newest version of vlc and it works fine!

thanks!

AtomicWaste
New Cone
New Cone
Posts: 3
Joined: 13 Jan 2006 00:28

Postby AtomicWaste » 13 Jan 2006 00:36

I want to toggle directx overlay while playing a video file (or while it's in pause mode) and thought setvariable should be the right way to do it (if you can do it at all while directx is initialised).

I'm using VB6 and

Code: Select all

val = vlc.getVariable("key-audio-track") vlc.setVariable "key-pressed", val
works fine, but which variables are there at all that can be modified by setvariable?

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 » 13 Jan 2006 05:05

Well, I've been working on this (you can find me in the IRC channel alot now-adays), and so far I have:
  • verbose
    key-pressed
    drawable
    drawableredraw
    drawablet
    drawablel
    drawableb
    drawabler
    drawablex
    drawabley
    drawablew
    drawableh
    drawableportx
    drawableporty
    volume-change
    open
Also, note that I have tested a good portion of the variables in this list, and those are the only ones that don't throw errors so far, note that I am currently testing *WITHOUT* any video playing in the player.
(looks like only src/libvlc.c variables)

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 » 13 Jan 2006 05:54

Update: It also seems that the 'config' names from /doc/lirc/example.lircrc work 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:

Postby tonsofpcs » 17 Jan 2006 01:06

Update: Documenting the ActiveX control on the wiki at http://wiki.videolan.org/index.php/ActiveX. Feel free to have a peek.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 4 guests