[vlc-devel] CLI Bindings : AccessViolationException on player

Damien maitredede at gmail.com
Thu Dec 10 17:53:26 CET 2009

I am trying to use the CIL bindings of VLC found in vlc git in folder
/bindings/cil/src, it uses direct calls to the libvlc dll.

> _VLC = new VideoLan.VideoLanClient(_VLCPath, optsdebug);  <-- I specify the
> path, you do not
VLC Instance constructor only takes options as argument.
Either I append VLC path to environnement path, or I run my app directly
from VLC path.

> VideoLan.VlcMedia mx = _vlc.NewMedia(fn);
> and
> VideoLan.VlcMediaPlayer cplayer = _VLC.NewMediaPlayer(playwindow);
I derive my COM objects directly from the instantiated _VLC.
> You derive them as NEW and point to _VLC... I am not sure if this could be
> posing an issue or not (one would think not, but then again it is just
> code...... and could have a bug)
> Instance does not have methods to create these objects, but these object
have constructor that take the instance as argument, or an existing element
created with instance as parameter.

> Player player = new Player(_VLC);
> you should be using playwindow(the handle to your window) here:
> Player player = new Player(playwindow);

I have forgotten to set the HWND of player to window handle (I have needed
to change current source type from SafeHandle to IntPtr, or program would
not compile).
But even with this, the behavior is the same : crash at MediaPlayer.Play()

Can you send me directly the full source of what I should test please ?

But there is still the point of the different behavior of string marshalling
between frameworks...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091210/26565ffc/attachment.html>

More information about the vlc-devel mailing list