Loading a file with ActiveX control.

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
tonsofpcs
Cone that earned his stripes
Cone that earned his stripes
Posts: 363
Joined: 04 Jan 2006 10:03
Location: Binghamton, NY, USA
Contact:

Loading a file with ActiveX control.

Postby tonsofpcs » 09 Jan 2006 01:34

Tried with both VB6 (98) and VB2005, error occurs on the equivilant line in both. The line is:

VLCP.addTarget(dialogOpen.FileName, opts, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, n)

where n is [written directly in] 0 or -666 [as in the webpage sample]
and opts = "input-repeat=0" or ":input-repeat 0" (i have tried all combinations of n and opts listed herein).
The error in VB2005 is: "ArgumentException was unhandled": "Value does not fall within the expected range."
VB6/98 just gives "Run-time error '5':" - "Invalid procedure call or argument"

If this is how to load a file, does anyone know why I am receiving an error?
If this is not: does anyone know how to get the activex control to load a file?

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

Postby Quovodis » 09 Jan 2006 11:12

opts is not a string, but an array of string and you define it under VB as follow
Dim options() As Variant
options() = Array(":input-repeat=0")
VLCP.addTarget(dialogOpen.FileName, opts, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, n)

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 » 09 Jan 2006 17:31

Thank you. I will try this.
Would you happen to know how this is done in VB 2005? (array is a type and cannot be used as a function...)

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 » 09 Jan 2006 22:44

Update: I tried it in VB6, Now it works [missed the () the first time i put it in :)], but when i load in videos that play properly in the stand-alone vlc, it just 'plays' black in the activex control...

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

Postby Quovodis » 10 Jan 2006 11:14

try turning off overlay rendering in the video options in the player, and save that as preferences.

Jordan

Postby Jordan » 10 Mar 2006 22:20

I'm developing a quick front-end to VLC in Visual Basic 2005 Express Edition.

Code: Select all

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim path As String Dim options() As Object options() = Array(":input-repeat=0") OpenFileDialog1.ShowDialog() path = OpenFileDialog1.FileName Label1.Text = path 'load the file into VLC 'final.VLC.playlistClear() ' final.VLC.addTarget("G:\media_player\video.flv", 0, 2, 0) 'final.VLC.src() final.VLC.addTarget(path, options, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, 0) End Sub
Error 1 Number of indices is less than the number of dimensions of the indexed array. C:\Documents and Settings\username\My Documents\Visual Studio 2005\Projects\video_experiment\video_experiment\Form1.vb 6 16 video_experiment


Error 2 'Array' is a type and cannot be used as an expression. C:\Documents and Settings\username\My Documents\Visual Studio 2005\Projects\video_experiment\video_experiment\Form1.vb 6 21 video_experiment


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 30 guests