Patrick Paulin is a trainer and consultant specializing in modular technologies such as OSGi and the Eclipse Rich Client Platform. He spends much of his time offering the RCP Quickstart course, which is meant to get software developers up to speed with Eclipse RCP. Patrick is also a regular speaker at technology conferences such as EclipseCon and Eclipse World. Patrick is a DZone MVB and is not an employee of DZone and has posted 24 posts at DZone. View Full User Profile

Video and Eclipse

  • submit to reddit

For an upcoming project I need to be able to show Flash videos inside of an RCP application. Java has never been known for its multimedia functionality so I didn’t have very high hopes.

Fortunately, with Java Media Components things seem to be moving in the right direction. JMC is an API that allows you to play media files using the video functionality of the underlying operating system (there is work being done to provide cross-platform codecs along with the API, but it’s unclear how extensive this will be). JMC is distributed as part of the JavaFX platform, but it can function independently inside of a regular Swing application.

Using this recent article as a guide, I managed to create an Eclipse plug-in that contributes a very rudimentary video player view to Eclipse or any other RCP application. If you’d like to try it yourself, click here for the source code (exported project). Note that the current code only works on Windows.

Video playing inside the Eclipse IDE

Above you can see a Flash video of Wipeout playing inside of my Eclipse IDE. Wipeout is my 5-year old daughter’s favorite show (if people are falling down, she’s laughing), so after 20 years as a software developer I’ve finally written some code she’d be interested in!

One thing to note is that JMC relies on the codecs installed on your machine. There have been some complaints that JMC is not finding or utilizing the codecs most people have installed, and hopefully this situation will improve. If you find that you’re getting MediaUnsupportedException errors when opening files, you may want to install a codec pack. The CCCP pack seems to work for most people.

Published at DZone with permission of Patrick Paulin, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



Whome Whome N/a replied on Mon, 2009/03/09 - 12:12pm

Do you happen to have a standalone example Swing application. I have not done much SWF/RCP applications, so ready to run example is one step forward.


edit: nothing anymore, an article url you gave has a standalone examples. thx.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.