What Is the JMF?

Fundamentally, the JMF is an extension to Java for handling audio and video. More rigorously, the JMF API (Java Media Framework Application Programming Interface) is one of the Official Java optional APIs that extends the functionality of the core Java Platform. Included in this group of optional APIs, freely available from Sun, are others such as Java 3D and Java Advanced Imaging (JAI).

JMF, as its name implies, is a collection of classes to enable the processing of (time-based) media objects. Sun Microsystems' JMF 2.1.1 Programmer's Documentation introduces the JMF as

Java Media Framework (JMF) provides a unified architecture and messaging protocol for managing the acquisition, processing, and delivery of time-based media data. JMF is designed to support most standard media content types, such as AIFF, AU, AVI, GSM, MIDI, MPEG, QuickTime, RMF, and WAV.

Sun's main JMF page has the following to say of the API:

The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to Java applications and applets. This optional API, which can capture, playback, stream and transcode multiple media formats, extends the multimedia capabilities on the J2SE platform, and gives multimedia developers a powerful toolkit to develop scalable, cross-platform technology.

Thus, the JMF is a collection of classes aimed at extending the Java Platform in the areas of video and audio processing, whether locally or across a network, and for both applets and applications.

Features of the JMF API

Amongst the key features of the API are

  • Platform independence. There is a reference implementation that will run anywhere Java runs.

  • Integrated and uniform handling of Audio and Video as media objects.

  • Support for a significant number of the major audio and video content types and codecs.

  • Playback of media.

  • Saving of media (to a file).

  • Capture of media from devices such as cameras and microphones.

  • Receipt of media streams transmitted across the network.

  • Transmission of media streams (across the network).

  • Multiplexing/Demultiplexing (combining and splitting) of media.

  • Transcoding (altering to a different format) media.

  • A unified processing framework that supports all operations on media (for example, effects) as processing.

  • Extensibility to support further formats and plug-ins.

  • Seamless integration with the existing Java API.

The Promise of JMF

Enumerating the features of JMF provides a rather bland view of the API. Only after the potential applications implemented using the JMF are considered can the true possibilities become clear.

Among the exciting possibilities, are the following:

  • Video conferencing across a range of platforms and networks

  • A complete video and audio editing suite

  • Empowering the latest mobile computing such as cellular phones and PDAs (Personal Digital Assistants)

  • Integrated multimedia applications entirely in Java and hence running on any platform

Video conferencing is often considered a “killer app,” bringing together a number of technologies in order to allow people to visually and verbally communicate in real-time. The availability of a video conferencing system of reasonable quality and independent of both hardware (particular cameras, microphones, hardware codecs) and software (particular operating systems) constraints would likely have a major impact in the conduct of both business and private life. The JMF, and Java more broadly, is a framework in which that can be achieved. The challenge remains bandwidth; but newer codecs (all of which can be incorporated into the JMF) and network services continue to whittle away at this hurdle.

The strength of the JMF lies not so much in the functionality of the API itself but in the broader context of the complete Java platform. This brings not only portability but also seamless integration with a number of other APIs and suites. For instance, a complete video and audio editing suite could be developed by using the JMF for handling the raw media, in combination with Java's AWT and Swing sets for presenting a GUI, and the JAI (Java Advanced Imaging) API for performing a number of the (video) effects.

Similarly, Java is a perfect solution in the consumer and embedded technologies area such as mobile phones, personal digital assistants, and TV-set-top boxes (for example, digital television set top boxes). Indeed one of the design goals of Java was to meet the security and portability demands of such a range of devices. The Java Micro Edition and related technologies deliver on that need. The advent of the next generation of these devices has seen the availability of increased processing power coupled with the demand for more sophisticated interfaces and content. The JMF is perfectly suited for these needs and is already being used to, among other things, stream video to the latest mobile phones.

With that said, it is worth remembering that the JMF is in its adolescence right now and, not being fully mature, it has some shortcomings. In particular a number of formats, including the important MPEG-2 and MPEG-4 standards, currently aren't part of the JMF distribution. That is expected to be addressed in the next JMF release, and Sun representatives have said that they have a continuing dedication to supporting the latest open standards.

Another catch for the unwary JMF programmer is that the JMF is a separate download and not part of the standard Java platform—a vanilla JVM (Java Virtual Machine) isn't capable of running a JMF program. This has implications for those people wanting to write applets using features of the JMF. To ensure that the widest audience can run them, the author must provide either instructions for downloading and installing the JMF (a difficult task for many users) or an automated mechanism for installing the necessary subset of the JMF classes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset