Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » possible to play videos in an SWT app?
possible to play videos in an SWT app? [message #440864] Sun, 08 August 2004 01:44 Go to next message
Tony Wang is currently offline Tony WangFriend
Messages: 3
Registered: July 2009
Junior Member
Hi,

I am wondering what is the best way to play video files (say mpeg1) in a
java app. Are there existing API that can decode them? Is it possible to
link to activex and take advantage of media player on windows using swt?
would the best way be to launch external programs for .mpeg?

I really have no experience with activex, and just started learning
about swt, thanks for any advice!

-Tony
Re: possible to play videos in an SWT app? [message #440868 is a reply to message #440864] Sun, 08 August 2004 10:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: v.j.b

"Tony Wang" <wang4@wangtony.com> wrote in message
news:cf40ln$qqc$1@eclipse.org...
> Is it possible to link to activex and take advantage of media player on
windows using swt?

Don't know about the other options you gave, but some time ago i went down
the ActiveX road. I wrapped MediaPlayer 6.4 in a Java class, together with
all it's OLE constants and method ID's. Tell me if your interested; it's not
production quality, but it does work, always room for improvement.
Re: possible to play videos in an SWT app? [message #441017 is a reply to message #440864] Mon, 09 August 2004 21:39 Go to previous messageGo to next message
Christophe Cornu is currently offline Christophe CornuFriend
Messages: 304
Registered: July 2009
Senior Member
> take advantage of media player on windows using swt
On Windows, you can also use the SWT Browser widget to embed Media Player
into HTML on Windows. Once you have an HTML page that embeds Media Player
- see link below - you can load it with Browser.setUrl or Browser.setText.
Just a suggestion...

http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/wmplay10/mmp_sdk/embeddingtheplayercontrolinawebpage.as p


Chris
Re: possible to play videos in an SWT app? [message #441018 is a reply to message #440868] Tue, 10 August 2004 01:26 Go to previous messageGo to next message
Tony Wang is currently offline Tony WangFriend
Messages: 3
Registered: July 2009
Junior Member
Hi varname, if it's no trouble, any snippet of code would be helpful. It
would give me an idea whether this is a viable approach. From your
description, MediaPlayer 6.4 means strictly with 6.4?

maybe using Browser would work, as someone mentioned.

thanks,
Tony

varname wrote:
> "Tony Wang" <wang4@wangtony.com> wrote in message
> news:cf40ln$qqc$1@eclipse.org...
>
>>Is it possible to link to activex and take advantage of media player on
>
> windows using swt?
>
> Don't know about the other options you gave, but some time ago i went down
> the ActiveX road. I wrapped MediaPlayer 6.4 in a Java class, together with
> all it's OLE constants and method ID's. Tell me if your interested; it's not
> production quality, but it does work, always room for improvement.
>
>
Re: possible to play videos in an SWT app? [message #441021 is a reply to message #440864] Tue, 10 August 2004 07:15 Go to previous messageGo to next message
Elmar Bartowitsch is currently offline Elmar BartowitschFriend
Messages: 10
Registered: July 2009
Junior Member
Tony Wang wrote:

> I am wondering what is the best way to play video files (say mpeg1) in a
> java app.

For a platform-independent solution, you could try Quicktime for Java
[1]. So far I found it rather easy to use. It's bound to AWT though, so
you'll need to do some wrapping with SWT_AWT in order to use it in an
SWT application.

eb

[1] http://developer.apple.com/quicktime/qtjava/index.html
Re: possible to play videos in an SWT app? [message #441024 is a reply to message #441021] Tue, 10 August 2004 08:19 Go to previous messageGo to next message
Brion Vibber is currently offline Brion VibberFriend
Messages: 21
Registered: July 2009
Junior Member
Elmar Bartowitsch wrote:
> Tony Wang wrote:
>> I am wondering what is the best way to play video files (say mpeg1) in
>> a java app.
>
> For a platform-independent solution, you could try Quicktime for Java
> [1]. So far I found it rather easy to use. It's bound to AWT though, so
> you'll need to do some wrapping with SWT_AWT in order to use it in an
> SWT application.

As far as I can tell QuickTime for Java does not work with SWT on Mac OS
X. (I've tried, without success.) It brings in AWT, which instantly
deadlocks the application -- SWT and AWT are not compatible on Mac OS X;
their event loops fight and they both require running on thread 0.

QuickTime for Java is also not available on any platform other than
Macintosh and Windows, so this is basically a Windows-only solution.

-- brion vibber (brion @ pobox.com)
Re: possible to play videos in an SWT app? [message #441026 is a reply to message #441024] Tue, 10 August 2004 11:10 Go to previous messageGo to next message
Elmar Bartowitsch is currently offline Elmar BartowitschFriend
Messages: 10
Registered: July 2009
Junior Member
Brion Vibber wrote:

> As far as I can tell QuickTime for Java does not work with SWT on Mac OS
> X. (I've tried, without success.) It brings in AWT, which instantly
> deadlocks the application -- SWT and AWT are not compatible on Mac OS X;
> their event loops fight and they both require running on thread 0.

According to the QTJ homepage, versions prior to 6.4 wouldn't work with
Java 1.4.1 on Mac OS X, but v6.4 does... haven't tried it out myself
yet, though.
Re: possible to play videos in an SWT app? [message #441124 is a reply to message #441018] Tue, 10 August 2004 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: v.j.b

> From your description, MediaPlayer 6.4 means strictly with 6.4?

yep, here you go:

http://elektron.its.tudelft.nl/~vdhoor46/SWT_MPlayer.zip
Re: possible to play videos in an SWT app? [message #441180 is a reply to message #441026] Tue, 10 August 2004 21:11 Go to previous message
Brion Vibber is currently offline Brion VibberFriend
Messages: 21
Registered: July 2009
Junior Member
Elmar Bartowitsch wrote:
> Brion Vibber wrote:
>> As far as I can tell QuickTime for Java does not work with SWT on Mac
>> OS X. (I've tried, without success.) It brings in AWT, which instantly
>> deadlocks the application -- SWT and AWT are not compatible on Mac OS
>> X; their event loops fight and they both require running on thread 0.
>
> According to the QTJ homepage, versions prior to 6.4 wouldn't work with
> Java 1.4.1 on Mac OS X, but v6.4 does... haven't tried it out myself
> yet, though.

It's SWT that's the trouble, not Java 1.4.1. The appropriate version of
QuickTime for Java for Java 1.4.x comes with the system.

-- brion vibber (brion @ pobox.com)
Previous Topic:standAlone application
Next Topic:XTestFakeKeyEvent
Goto Forum:
  


Current Time: Thu Apr 25 21:12:59 GMT 2024

Powered by FUDForum. Page generated in 0.03561 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top