REVIEW - Programming with the Java media framework


Title:

Programming with the Java media framework

Author:

Sean C. Sullivan

ISBN:

Publisher:

John Wiley & Sons Inc (1998)

Pages:

357pp

Reviewer:

Peter Pilgrim

Reviewed:

October 1999

Rating:

★★★☆☆


This is book for expert Java developers who want to develop applications or applets that exploit multimedia in Java.

This is book for expert Java developers who want to develop applications or applets that exploit multimedia in Java. Since 1996 Sun and its Java development partners like Intel, Silicon Graphics and IBM have been writing core extension APIs to enhance Java's abilities. I supposed you could also paraphrase that as 'bloating' Java. However, the standard Java support for multimedia is quite weak. The current JDK 1.1.7 could only play audio files at 8,000 hertz and display graphics image files in only JPEG or GIF formats. You could not hope to play Microsoft WAVE files or view an MPEG or Quicktime movie file. This is where the Java Media Framework comes in and why the big four initial companies were interested in the first place. Since Java is an interpreted language, it does not lend itself to the processor intensive multimedia formats of today. Consequently, the media framework relies on native code deep within each vendor's implementation. However Sun has recently produced a pure Java software only media player, but you will need a good specification machine to get the best result from it. The book, by the way, comes with a handy CDROM with the Intel version of the Java Media Framework 1.0 which naturally only works on Windows 9X / NT systems. However the Intel media player is incredibly fast, as you would expect from the MMX inventor, when run from within a web browser.

The book is divided into three parts. The first part introduces the Java Media Framework. The second deliver practical examples of programming with the Java Media Player and the last part is a glossary and reference to the API. The book is aimed at multimedia programmers and possibly experienced Internet and web developers, who perhaps want to create a video player in a web-page, for example.

Programming with the Java Media Framework takes up where the standard and widely available JDK 1.1 leaves off with a Java applet that plays a simple AudioClip. This is the only media that the JDK up to 1.1.7 supports. The applet is then overturned and its internals replaced with Java Media Player to demonstrate how easy it is to have a multimedia player working in an applet. Assum-ing of course that you installed the software from the CD, then it is quite good and very educational.

So it is not very difficult to set up a Java Media Player in your application, as chapter three clearly shows. The complexity is thus hidden away in the media player object classes itself and chapter four begins to describe what a high learning curve this really is. The book carefully explains the fundamental objects and interfaces for the media framework. A `Clock', for example, in the JMF holds to two interpretations of time: namely, media time base and real time base. A `Controller' maintains a notion of media accessibility state (see later). A `Duration' object knows if a media content is bound, just like a quick time or MPEG video, or if it is unbound, think of a RealAudio data stream. A `MediaHandler' knows how to read or pull data from a media source. A `Player' can do all of the functions of the previous object classes and essentially knows how to start, stop, rewind, forward and pause the media as it plays.

A media player, basically, is a special type of `Controller' that has six different determinable set states:

unrealised, realising, realised, prefetching, prefetched and started . Looks familiar? Yes this is one of those finite state machine (FSM) algorithms where an external stimuli causes the entity (our media player) to move from one state to another state and possibly through a set of intermediate transition states. Thankfully the FSM is hidden away in the media playerimplementation and you do not have to do anything so difficult as becoming involved in state management, unless you advance to writing your own specialised media player.

The middle part of the book deals with practical examples of the JMF. All the examples in this section of the book come with complete source code, which is also on the CDROM.

The final section of the book is an annotated reference on the API, which is comprehensively documented with class diagrams, constructors, methods and attributes and has examples of code usage where applicable.

This is very nice book if you want to understand the Java Media Framework. In any case there are not many books out there that deal specifically with the JMF. The fact that it is written by a former member of the development team makes it essential reading. Be warned that this book only covers a portion of the overall media architecture. For example if you're searching for a book specifically on using Java and MIDI sound files for your digital synthesiser project then look else-where. However, if you're looking at an application slightly biased to video and with a somewhat lesser audio content then this book is a must-have.

The Intel JMF Software Development Kit has effectively been discontinued and since January 1999 is no longer downloadable. Intel provides email support until April 1999 and asks all developers to cross over to the Sun implementation instead. Some people think that the Intel JMF is still superior to the Sun JMF. Get the book while you can.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.