Slave mode bugs (?) and Java Swing embedding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



On Wednesday 01 October 2008 15:00:33 Kevin DeKorte wrote:
> Alex Sherwin wrote:
> > I do this in a  Java now.  You can use Swing or SWT (SWT is actually
> > easier, they expose the window handle  on frames, in Swing you have to
> > use a hack that is not "supported" in the JDK, but exists and works
> > from 1.4.2 to the latest 1.6)
> >
> > Unfortunately, if you read the man page for the -wid option, you will
> > see that it only works on Windows.  I've spent awhile trying to find a
> > way to make a x-platform java Swing or SWT app that will embed MPlayer
> > on Windows Linux and OS X through Java Web Start.  The closest I've
> > been able to come is to deliver an app that embeds MPlayer on Windows,
> > and provides a slimmed down interface on Linux and OS X to control
> > mplayer, which will open its own video display window.
> >
> > I spent a bit of time on this mailing list and the IRC channel trying
> > to figure out a way, and had someone point me to the code where the
> > MPlayer GUI manages to embed the player, but this is able to do it
> > using shared memory segments to paint the display (which you would not
> > be able to accomplish with Java)
> >
> > Good luck on Linux, but I'm going to say its not possible...
>
> Incorrect, the -wid option works perfectly fine on X (Linux/BSD).
>
> Kevin

Here's some x-platform code that I use to get the wid of an awt canvas. Works 
fine on Linux and Windows.
The ExtendedCanvas.java is used to generate the ExtendedCanvas.h header file
The C file I've created  myself. 


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux