<div>Hi Filippo,</div> <div> </div> <div>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.</div> <div> </div> <div>Again, not sure why the logic is this way.</div> <div> </div> <div>Regards,</div> <div>-Tony</div> <div> </div><FONT size=2> <div>/**</div> <div>* Destroys the current instance of jvlc, cleaning up objects.</div> <div>* This is unreversible.</div> <div>*/</div> <div>public void destroy() {</div> <div>beingDestroyed = true;</div> <div>if (!beingDestroyed)</div> <div>{</div> <div>_destroy();</div> <div>}</div> <div>}</div> <div></FONT><BR><BR><B><I>Filippo Carone <filippo@carone.org></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">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<BR><BR></BLOCKQUOTE><BR><p>
<hr size=1><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>