<div>I understand what you are saying and will give you more detail when I am in front of my computer at home.</div> <div> </div> <div>Here is more detail that hopefully does not confuse but it might be helpful.</div> <div> </div> <div>Environment: Windows 200, I have an java app and I am using jvlc bindings where I have two child windows (JInternalFrame) in a JDesktopPane.</div> <div> </div> <div>Sequence of events:</div> <div>1. I create two JInternalFrame one with a jvlc instance and one without (blank child).</div> <div>2. The JInternalFrame without the jvlc instance has focus initially.</div> <div>3. I then select via a mouse the JInternalFrame with the jvlc instance.</div> <div>4. I destroy the jvlc instance (libvlc instance) and create a new one for the Canvas since the jre destroys the windows peer that has the window handle for the Canvas.</div> <div>5. The new windows peer is created and after that occurs I create a new libvlc
instance.</div> <div>6. I then call the vlc libvlc_video_set_parent() via the jvlc bindings and the values for the p_instance and window handle are not zero from the debug statement I put into the code.</div> <div>7. The vlc calls the vout_RequestWindow() and the p_vout->p_libvlc is different value from the p_instance->p_libvlc_int that was used to store the windows handle using var_SetInteger and I get back the correct window handle value of 0 which causes a separate window to be drawn outside the java canvas.</div> <div> </div> <div> </div> <div>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.</div> <div> </div> <div>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.</div> <div> </div> <div>Does that help more?</div> <div> </div> <div>Thanks,</div> <div>-Tony<BR><BR><BR><BR><BR><B><I>Damien Fouilleul <damien.fouilleul@laposte.net></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Tony,<BR><BR>I don't really understand anything you are saying, it is not possible to <BR>have a have vout without a matching libvlc instance.<BR><BR>Damien<BR><BR><BR>Tony Anecito wrote:<BR>> Hi All,<BR>> <BR>> While working with vlc I noticed that there were multiple instances of <BR>> v_out with incorrect instance references to vlclib. I suspect this has <BR>> something to do with multiple windows being displayed and need to get <BR>> a question answered about vlc code in order to help.<BR>> <BR>> What I have discovered in
the windows environment that two calls to <BR>> get what should be the same instance to vlc come up with different <BR>> references. The fucntions I notice this in is:<BR>> <BR>> 1. Setting a window handle to an instance of libvlc<BR>> file: video.c (in vlc-trunk/src/control folder)<BR>> function: libvlc_video_set_parent()<BR>> statement: var_SetInteger(p_instance->p_libvlc_int, "drawable", (int)d);<BR>> <BR>> 2. Retrieveing a window handle to an instance of libvlc<BR>> file: vout_intf.c (in vlc-trunk/src/video_output folder)<BR>> function: vout_RequestWindow()<BR>> statement: var_Get( p_vout->p_libvlc, "drawable", &val );<BR>> <BR>> When I do a call to setParent() and when a video is started the <BR>> reference for libvlc is different when two windows (one without a vlc <BR>> lib instance) I GET TWO DIFFERENT LIBVLC INSTANCES and there should <BR>> only be one! What this does is when switching between an
application <BR>> with vlc embedded in a child window and in the same application a <BR>> child window without vlc the video pops out of the child window in a <BR>> separate standalone window because the call to RequestWindow points to <BR>> a different instance of vlc and the window handle returned from that <BR>> call in val is zero which causes a separate video output window to be <BR>> created.<BR>> <BR>> So in order to help figure this out and potentially help the team I <BR>> need to know where in the code the p_vout-p_libvlc gets set. I <BR>> verified the call to setParent occurs once. I tried tracking down the <BR>> p_libvlc variable but no luck on finding where.<BR>> <BR>> Thanks,<BR>> -Tony<BR>> <BR>><BR>> ------------------------------------------------------------------------<BR>> Ahhh...imagining that irresistible "new car" smell?<BR>> Check out new cars at Yahoo! Autos. <BR>> <HTTP:
evt="48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-" us.rd.yahoo.com><BR><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>Ahhh...imagining that irresistible "new car" smell?<br> Check out
<a href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new cars at Yahoo! Autos.</a>