In recent years, the digital multimedia sector of the computer industry has
experienced tremendous growth, as evidenced by the enormous quantity of multimedia
content available on the Internet. Web sites have been transformed from text-based HTML
pages to multimedia-intensive experiences. Advances in hardware and software technologies
have allowed developers to integrate multimedia into the simplest applications. At the
high end of multimedia applications, the video game industry has used multimedia programming
to take advantage of the latest hardware technologies, such as 3D video cards
that create virtual reality experiences for users.
Acknowledging that Java applications should support digital video and audio capabilities,
Sun Microsystems, Intel and Silicon Graphics worked together to produce a multimedia
API known as the Java Media Framework (JMF). The JMF API is one of several
multimedia APIs in Java. Using the JMF API, programmers can create Java applications
that play, edit, stream and capture many popular media types. The first half of this chapter
discusses the JMF API.
IBM and Sun developed the latest JMF specification—version 2.0. Sun provides a reference
implementation—JMF 2.1.1—of the JMF specification which supports media file
types such as Microsoft Audio/Video Interleave (.avi), Macromedia Flash 2 movies
(.swf), Future Splash (.spl), MPEG Layer 3 Audio (.mp3), Musical Instrument Digital
Interface (MIDI;.mid), MPEG-1 videos (.mpeg, .mpg), QuickTime (.mov), Sun Audio
(.au), Wave audio (.wav), AIFF (.aiff) and GSM (.gsm) files. The JMF also supports
media from capture devices such as microphones and digital cameras.
experienced tremendous growth, as evidenced by the enormous quantity of multimedia
content available on the Internet. Web sites have been transformed from text-based HTML
pages to multimedia-intensive experiences. Advances in hardware and software technologies
have allowed developers to integrate multimedia into the simplest applications. At the
high end of multimedia applications, the video game industry has used multimedia programming
to take advantage of the latest hardware technologies, such as 3D video cards
that create virtual reality experiences for users.
Acknowledging that Java applications should support digital video and audio capabilities,
Sun Microsystems, Intel and Silicon Graphics worked together to produce a multimedia
API known as the Java Media Framework (JMF). The JMF API is one of several
multimedia APIs in Java. Using the JMF API, programmers can create Java applications
that play, edit, stream and capture many popular media types. The first half of this chapter
discusses the JMF API.
IBM and Sun developed the latest JMF specification—version 2.0. Sun provides a reference
implementation—JMF 2.1.1—of the JMF specification which supports media file
types such as Microsoft Audio/Video Interleave (.avi), Macromedia Flash 2 movies
(.swf), Future Splash (.spl), MPEG Layer 3 Audio (.mp3), Musical Instrument Digital
Interface (MIDI;.mid), MPEG-1 videos (.mpeg, .mpg), QuickTime (.mov), Sun Audio
(.au), Wave audio (.wav), AIFF (.aiff) and GSM (.gsm) files. The JMF also supports
media from capture devices such as microphones and digital cameras.
many Web sites offer an abundant supply of free-for-download audio and video clips. You
can download media clips from these sites (and many others on the Internet) and use them to
test the examples in this chapter. We present a list of sites here to get you started. Free Audio
Clips (www.freeaudioclips.com) is an excellent site for various types of audio files.
The 13 Even site (www.13-even.com/media.html) provides audio and video clips in
many formats for your personal use. If you are looking for MIDI audio files for use in Section
22.7, check out the free MIDI clips at www.freestuffgalore.commidi.asp. Funny
Video Clips (www.video-clips.co.uk) offers entertaining material. Microsoft’s
downloads site (msdn.microsoft.com/downloads) contains a multimedia section
providing audio clips and other media.
Currently, JMF is available as an extension package separate from the Java 2 Software
Development Kit. The CD that accompanies this book contains JMF 2.1.1. The most recent
JMF implementation can be downloaded from the official JMF Web site:
java.sun.com/products/java-media/jmf
The JMF Web site provides versions of the JMF that take advantage of the performance
features of the platform on which the JMF is running. For example, the JMF Windows Performance
Pack provides extensive media and device support for Java programs running on
Microsoft Windows platforms (Windows 95/98/NT 4.0/2000). JMF’s official Web site also
provides continually updated support, information and resources for JMF programmers.
我有电子版的这一章(配书CD中的)