[vlc-devel] Re: Multiple instances of vlc have incorrect instance references (vlc on windows unstable?)

Tony Anecito adanecito at yahoo.com
Sun May 13 21:57:31 CEST 2007

Hi Filippo,
  Are you going to verify the destroy method logic? I had someone verify the method was correct for the 8.6 but somehow the logic since then has been changed such that destroy will not work.
  I did not put it on the forum if that is what you mean by public till I had verification of why the sequence removeNotify() _destroy() matters. There are still issues to be resolved like streaming for instance. Have you fixed that yet? I was hoping you would have that resolved by now so others can use steaming via the api. I am getting more emails from people that want to use the jvlc api but there are a few important issues left to resolve like streaming.

Filippo Carone <filippo at carone.org> wrote:
  Tony Anecito ha scritto:
> Hi Ahmad,
> I figured out how to keep vlc from crashing the Sun jvm. in the
> removeNotify() in the Cavas with the peer call the
> super.removeNotify() then the destroy. That seems the only way to
> keep things from crashing. Never call destroy while the peer it is
> associated with is still tied to the Canvas.
> Now at least the vout_RequestWindow has the correct windows handle
> but not the expected libvlc instance for the window.
> The jvlc and vlc team can decide what they want to do but at least I
> have a way to keep the jre/jvlc/vlc combination working when peers
> are destroyed when toFront() or moveToFront() is called.
> Regards, -Tony

Hi Tony,
as you figured out, the problem of the jvm crash was about the existance 
of the peer when calling destroy(). The destroy method deallocates the 
libvlc instance and all its objects, including vout. So the correct way 
of calling destroy is, as you said, after the peer has been deallocated.
I think that cleaning up the peer before calling destroy is up to the 

I'm going to override removenotify in order to tighen the cases of jvm 
crashes, but still calling jvlc.destroy() when the peer is still 
attached to the vout will cause a crash.

If there are other changes you did to vlc or to the java bindings, 
please make them public so that i can include them in the jvlc distribution.


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070513/2fedaac7/attachment.html>

More information about the vlc-devel mailing list