Sun to Enhance Video Support with Java Media Components
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:
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.
Mike Hartington Jul 26, 2015