BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Sun to Enhance Video Support with Java Media Components

by Geoffrey Wiseman on Jun 13, 2007 |

It's no secret to most developers that Java's support for media, and in particular, video, is not stellar. For some developers, this is a serious problem, particularly when some are choosing technologies for building new Rich Internet Applications (RIA) in Flash, Flex, Silverlight, Adobe Apollo/AIR and others. Each of these platforms treats media and video as a first-class capability, almost a foundation of their technologies.

Recently, some have argued that Java needs to fix its support for media and video, and fast, or risk losing its remaining chance to really participate in the desktop and in the rich internet application space. Chris Adamson, for instance, argued the point in a three-part article a follow-up BoF session at JavaOne, and a recent summary of the issue:

Flash is a more significant rival for Desktop Java than is generally understood. It is quite remarkable that the abililty to create Flash applications is so desirable that Adobe can charge hundreds of dollars a copy for its development tools, while Sun can hardly give theirs away (woo hoo, at least IBM can give theirs away). Why? Largely because it handles media so well. And this is serving to grow a generation of web-based JavaScript/ActionScript developers who see Java as "your father's programming language", much like C++ was for some of us who picked up Java 10 years ago.

So for those people, and to everyone who's been frustrated by the support for multimedia in Java, Chet Haase's entry on Java Media Components may bring some relief:

This new feature, hopefully shipping in Java SE 7, is intended to support basic playback support for Java applications. JMC is also, eventually, intended to address capture and streaming capabilities."

Java Media Components would start by introducing support for embedding native players (e.g. Windows Media Player, Flash, Quicktime):

The idea is to expose a simple API for playback control (e.g., play, stop, and rewind), and to allow a Java application to thus control playback of specified content through whatever was available on the native system. For example, playback of an AVI file on Windows might launch Windows Media Player. Moreover, the native player would be exposed through a GUI component that you could integrate into the rest of your application's interface. There would also, depending on the underlying native support, be options to either expose the native controls for the player (e.g., the Play button), or to allow the developer to skin their own controls around the player component.

This native-wrapper functionality is the easiest part of the whole JMC project. The main work is in the simple API design and the glue code to the various players on different platforms. In fact, we already have prototypes of this working for several players, including Windows Media Player and Flash.

A second effort would look to create a Java player that can use a common format on all platforms, without having to worry about which native players are installed.  More speculative and forward-looking features include giving Java developers access to the pixel data contained in video streams, or video capture and streaming.

In the comments that follow the announcement, you can see that some believe this is welcome news, others have suggestions about alternatives, and others still prognosticate that this is an effort that is already doomed.  Where does your opinion fall?  Are you excited, wary or unimpressed?  Either way, you can continue to follow the story as it develops at InfoQ.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

JMF by Enrique García

It will be cool. Is it going to be like the JMF but included in the standard VM so you wont have to download anything else to use video and audio?

Re: JMF by Geoffrey Wiseman

I definitely got the impression that inclusion in J2SE by default is the target, yes, although it would have a smaller footprint than JMF to make that possible, I would think.

Update (1:41 pm) by Geoffrey Wiseman

I've made a slight revision here to include a little more of Chet's announcement. It's just a minor content revision, but I thought it wise to comment in case the transition ends up being jarring for anyone.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

3 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT