[vlc-devel] Re: Embedding VLC into Java programs

Markus Kern markus-kern at gmx.net
Fri Mar 12 12:42:06 CET 2004


On Thursday, March 11, 2004, 10:29:05 PM Jeff Hansen <sqrammi at hotmail.com> wrote:

> I am writing a program to embed VLC into Java programs (like the Mozilla
> plugin, kinda), and it works great in Linux, but when I try to set the
> window id of VLC when running Windows, I get the following error:

> An unexpected exception has been detected in native code outside the VM.
> Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at
> PC=0x2EFFC70
> Function=Java_sun_awt_windows_WColor_getDefaultColor+0x6AE
> Library=D:\Java\j2sdk1.4.2\jre\bin\awt.dll

<snip error details>

> I'm wondering if anyone else has ever run into this wonderful JVM exception.
>   I can try using the wingdi output module instead, but it doesn't let me
> paint on a specic window ID (only the directx module will).  Any help would
> be greatly appreciated.  Thanks in advance!

I have not tried to use VLC with java and am not sure if this is related but
the the directx module is broken in that it does not forward unhandled
window messages to the externally specified window.
I have written the attached patch to fix this.

The patch works fine with a C wrapper for libVLC I have written:
http://cvs.sourceforge.net/viewcvs.py/kceasy/kceasy/controls/VLC/

Since not forwarding unhandled messages to the previous window proc is
clearly incorrect behaviour it would be nice if the attached patch
could be applied to the official VLC tree.

- Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: directx_msg_handling.diff
Type: application/octet-stream
Size: 3733 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20040312/858d39cc/attachment.obj>


More information about the vlc-devel mailing list