[vlc-devel] Re: Multiple instances of vlc have incorrect instance references
filippo at carone.org
Thu May 10 23:34:43 CEST 2007
Tony Anecito ha scritto:
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.
> 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,
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel