Java Reference
In-Depth Information
CHAPTER 16
Rendering Multimedia
Content
T oday's consumers increasingly demand the rich multimedia experience to which
they're accustomed from their personal computers or other devices, including mobile
wireless terminals and portable media players. At the same time, both to sate this
demand and distinguish a product from its competition, manufacturers increasingly
invest money in developing rich multimedia interfaces for their product. While pundits
may argue that much of this investment has been gratuitous—little of the glitz and
glamour of a cell phone's user interface today is truly necessary to make a call, for
example—much of it has not. Multimedia applications, from pedestrian audio and
video playback to sophisticated data-visualization applications, can both differentiate
products and add value. Through standardization efforts such as JSR 135, which
defines the MMAPI, and JSR 287, which defines support for Scalable 2D Vector
Graphics, Java ME provides a wealth of interfaces that enable you to build multimedia-
rich applications.
In this chapter, I show the interfaces these JSRs define. I begin by discussing the
MMAPI, because its support for audio and video makes it an important component of
many applications today. I explain how the MMAPI is organized and how it uses the
Java runtime and native support from the host hardware to render content from the
device's local storage and the network. Next, I turn attention to Java ME's support for
SVG—an exciting standard under development by the W3C and widely supported by
browsers as well as mobile devices. I show you how to render SVG images and anima-
tions using the classes provided by the optional Scalable 2D Vector Graphics API (which
I'll just call the SVGAPI for short), as well as how to build Java ME applications that
leverage SVG content for parts of their user interface. After going over the basics of all
the multimedia-supporting classes at your disposal, I present an example MIDlet that
plays audio, video, and SVG content and lets you interface with a device's camera to
capture images.
447
 
Search WWH ::




Custom Search