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

Ahmad Hamadallah ahmdprog at gmail.com
Sun May 13 08:54:32 CEST 2007


Hi Tony,

 

Try to use Sun JVM, I faced many problems with debugging other than Sun JVM.

Try to use Sun JVM and netbeans, you will stay in safe side of debagging and
running application.

 

I am not saying that it will solve your current problem, but at least, you
are in safe side while using Sun JVM.

 

Good luck.

 

Regards,

Ahmad.

 

From: vlc-devel-bounce at videolan.org [mailto:vlc-devel-bounce at videolan.org]
On Behalf Of Tony Anecito
Sent: Sunday, May 13, 2007 10:08 AM
To: vlc-devel at videolan.org
Cc: filippo at carone.org
Subject: [vlc-devel] Re: Multiple instances of vlc have incorrect instance
references (vlc on windows unstable?)

 

Hi Filippo,

 

When I correct the logic the destroy method kills the running application. I
used my debugger (Eclipse) and right when the destroy method is called the
application or in this case jre crashes. On the other hand if not fixed
there is a fairly big memory leak because I found out the instance of libvlc
stays in memory if destory is never called as indicated in the method I
pasted in previous email.

 

Lets try to figure this out quickly I hate to see such unstable code in a
project.

 

Regards,

-Tony

Tony Anecito <adanecito at yahoo.com> wrote:

Hi Filippo,

 

I figured out the problem. The destroy method in JVLC.java will never work.
The logic is wrong. I am not sure what was being attempted but being
destroyed should be false.

 

Again, not sure why the logic is this way.

 

Regards,

-Tony

 

/**

* Destroys the current instance of jvlc, cleaning up objects.

* This is unreversible.

*/

public void destroy() {

beingDestroyed = true;

if (!beingDestroyed)

{

_destroy();

}

}



Filippo Carone <filippo at carone.org> wrote:

Tony Anecito ha scritto:
> ...

Hi Tony,
a workaround for avoiding the removal of the first libvlc instance,
could the use of addNotify() and removeNotify() methods, as Daniel
Kaufmann recently suggested to me. Java awt controls implement these 2
methods, which are invoked when the window peer is created (->
addNotify()) and removed (removeNotify()). A test I ask you to do could
do would be:

1. do not implement natively paint(), but leave the default implementation
2. override addNotify to run the current native code used for paint()
3. override removeNotify to destroy the libvlc instance

this could help avoiding the vout window to be created without a peer. 
The problem you exposed could be a missing delay time between the play() 
command and the peer creation. If the operating system has not created 
the peer window and you run play() on jvlc, it will happen vlc will 
spawn a new window.

> Now I run the same test but with only one child with the libvlc video
> step 7 above has matching libvlc instances so get the correct window
> handle back and the video plays int the canvas as expected.

That's normal.

> So I was curious where in the code the p_vout->p_libvlc is set since
> that is part of the key for the retrieval of the window handle from
> the var_Get( p_vout->p_libvlc, "drawable", &val ) function. The
> other part of the key for retrieval is the "drawable" string.
> 
> Does that help more?

Let me know your thoughts about the above suggestion,
cheers,
Filippo

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

 

  _____  

Never
<http://us.rd.yahoo.com/evt=49938/*http:/tools.search.yahoo.com/toolbar/feat
ures/mail/>  miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
<http://us.rd.yahoo.com/evt=49937/*http:/tools.search.yahoo.com/toolbar/feat
ures/mail/>  Check it out.

 

  

  _____  

Expecting? Get great news right away with email
<http://us.rd.yahoo.com/evt=49982/*http:/advision.webevents.yahoo.com/mailbe
ta/newmail_tools.html>  Auto-Check.
Try the Yahoo!
<http://us.rd.yahoo.com/evt=49982/*http:/advision.webevents.yahoo.com/mailbe
ta/newmail_tools.html>  Mail Beta.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070513/478d0fc9/attachment.html>


More information about the vlc-devel mailing list