This article, the first of a two-part series, focuses on the JMF architecture. Part 2 will focus mostly on the code that shows how to register the capture devices, and to play and capture audio and video data.
JMF, currently at version 2.1, is Sun's initiative to bring time-based media processing to Java. Time-based media is data that changes meaningfully with respect to time, such as audio and video clips, MIDI sequences, and animations. Note that Sun recently announced it would release the JMF 2.1 source code under the Sun Community Source Licensing Program (SCSL). Also a complete reference implementation, JMF 2.1 will enable you to do anything imaginable with multimedia. Among others uses, JMF can:
However, before you write a JMF application, you need to fully understand the JMF architecture, its interfaces, and its classes.
To easily understand the JMF architecture, take your stereo system as a comparison. When you play a Sarah Vaughan CD with your CD player, the CD provides the music data to the system. This data has been previously captured using microphones and other devices in the recording studio. The microphone serves as an audio capture device. The CD itself is a data source to the stereo system.
The CD player outputs the music signal to the speaker -- the output device. However, from the CD player we can also plug in an earphone. In this case, the earphone acts as the output device.
JMF uses the same model. As you read on, you will come across terms such as:
Let's look at these terms in more detail.
A data source encapsulates the media stream much like a music CD. In JMF, a DataSource object represents the audio media, video media, or a combination of the two. A DataSource can be a file or an incoming stream from the Internet. The good thing about this class is, once you determine its location
or protocol, the DataSource encapsulates both the media location, and the protocol and software used to deliver the media. Once created, a DataSource can be fed into a Player to be rendered, with the Player unconcerned about where the DataSource originated or what was its original form.
EXCELLENT WORKBy Anonymous on November 5, 2009, 9:21 amVERY WELL EXPLAINED
Reply | Read entire comment
Good JobBy Anonymous on September 16, 2009, 4:56 amThank you for all these explanations. It is very interesting. Moreover, you explain everything really clearly. So, thank you again!
Reply | Read entire comment
View all comments