<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Tony,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Try to use Sun JVM, I faced many problems with debugging other
than Sun JVM.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Try to use Sun JVM and netbeans, you will stay in safe side of
debagging and running application.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I am not saying that it will solve your current problem, but at
least, you are in safe side while using Sun JVM.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Good luck.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Ahmad.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
vlc-devel-bounce@videolan.org [mailto:vlc-devel-bounce@videolan.org] <b>On
Behalf Of </b>Tony Anecito<br>
<b>Sent:</b> Sunday, May 13, 2007 10:08 AM<br>
<b>To:</b> vlc-devel@videolan.org<br>
<b>Cc:</b> filippo@carone.org<br>
<b>Subject:</b> [vlc-devel] Re: Multiple instances of vlc have incorrect
instance references (vlc on windows unstable?)<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<p class=MsoNormal>Hi Filippo,<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>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.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>Lets try to figure this out quickly I hate to see such
unstable code in a project.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>Regards,<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>-Tony<br>
<br>
<b><i>Tony Anecito <adanecito@yahoo.com></i></b> wrote:<o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'>

<div>

<p class=MsoNormal>Hi Filippo,<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>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.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>Again, not sure why the logic is this way.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>Regards,<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>-Tony<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>/**<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>* Destroys the current
instance of jvlc, cleaning up objects.<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>* This is unreversible.<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>*/<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>public void destroy() {<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>beingDestroyed = true;<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>if (!beingDestroyed)<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>_destroy();<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><br>
<br>
<b><i>Filippo Carone <filippo@carone.org></i></b> wrote:<o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'>

<p class=MsoNormal style='margin-bottom:12.0pt'>Tony Anecito ha scritto:<br>
> ...<br>
<br>
Hi Tony,<br>
a workaround for avoiding the removal of the first libvlc instance,<br>
could the use of addNotify() and removeNotify() methods, as Daniel<br>
Kaufmann recently suggested to me. Java awt controls implement these 2<br>
methods, which are invoked when the window peer is created (-><br>
addNotify()) and removed (removeNotify()). A test I ask you to do could<br>
do would be:<br>
<br>
1. do not implement natively paint(), but leave the default implementation<br>
2. override addNotify to run the current native code used for paint()<br>
3. override removeNotify to destroy the libvlc instance<br>
<br>
this could help avoiding the vout window to be created without a peer. <br>
The problem you exposed could be a missing delay time between the play() <br>
command and the peer creation. If the operating system has not created <br>
the peer window and you run play() on jvlc, it will happen vlc will <br>
spawn a new window.<br>
<br>
> Now I run the same test but with only one child with the libvlc video<br>
> step 7 above has matching libvlc instances so get the correct window<br>
> handle back and the video plays int the canvas as expected.<br>
<br>
That's normal.<br>
<br>
> So I was curious where in the code the p_vout->p_libvlc is set since<br>
> that is part of the key for the retrieval of the window handle from<br>
> the var_Get( p_vout->p_libvlc, "drawable", &val )
function. The<br>
> other part of the key for retrieval is the "drawable" string.<br>
> <br>
> Does that help more?<br>
<br>
Let me know your thoughts about the above suggestion,<br>
cheers,<br>
Filippo<br>
<br>
-- <br>
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/<br>
To unsubscribe, please read http://developers.videolan.org/lists.html<o:p></o:p></p>

</blockquote>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<div class=MsoNormal align=center style='text-align:center'>

<hr size=1 width="100%" align=center>

</div>

<p class=MsoNormal><a
href="http://us.rd.yahoo.com/evt=49938/*http:/tools.search.yahoo.com/toolbar/features/mail/">Never
miss an email again!<br>
Yahoo! Toolbar</a> alerts you the instant new Mail arrives.<a
href="http://us.rd.yahoo.com/evt=49937/*http:/tools.search.yahoo.com/toolbar/features/mail/">
Check it out.</a><o:p></o:p></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p>  <o:p></o:p></p>

<div class=MsoNormal align=center style='text-align:center'>

<hr size=1 width="100%" align=center>

</div>

<p class=MsoNormal>Expecting? Get great news right away with <a
href="http://us.rd.yahoo.com/evt=49982/*http:/advision.webevents.yahoo.com/mailbeta/newmail_tools.html">email
Auto-Check.</a><br>
Try the <a
href="http://us.rd.yahoo.com/evt=49982/*http:/advision.webevents.yahoo.com/mailbeta/newmail_tools.html">Yahoo!
Mail Beta.</a><o:p></o:p></p>

</blockquote>

</div>

</body>

</html>