Chapter 8. Controlling and Processing Media with JMF

IN THIS CHAPTER

  • Detailed Time Model

  • The Control and Processing Chains

  • Managing the Complexity

  • It's All About Control

  • Sourcing Media and Media Format

  • MediaHandler

  • Playing Media

  • Conserving Media

  • PlugIns

  • Processing Media

  • Media Capture

This chapter covers control of time-based media with the JMF (Java Media Framework) API. It serves as the core chapter of three chapters that cover time-based media: Chapter 7, “Time-Based Media and the JMF: An Introduction,” serves as an introduction, and Chapter 9, “RTP and Advanced Time-Based Media Topics,” covers advanced and specialized topics.

In the context of this chapter, control is used in the broadest sense to cover all actions concerning time-based media. That encompassing definition includes what is traditionally considered processing: decoding, encoding, transcoding (decoding from one format and encoding as another), effects, filters, multiplexing, and demultiplexing, as well as sourcing the data itself: capturing, reading from a file, and outputting (presentation or saving).

In fact, the fundamental approach to control can be seen as falling into three steps:

1.
Source the media.

2.
Process the media.

3.
Output the media.

Figure 8.1 shows these three steps in control.

Figure 8.1. Three steps in control of media with the JMF.


This control can be chained: The output of one control stage can serve as the input to another. For instance, one control segment might secure a movie streaming across the Internet and demultiplex it into separate audio and video tracks that are saved to separate files. A second control module might then take that output audio data and add a reverb effect to one segment before multiplexing it back with the video track and saving the resulting movie.

Step 2, processing, can be an involved multistaged action, perhaps involving effects, codecs, multiplexers, and demultiplexers. Figure 8.2 is a schematic diagram showing multistage processing and chaining of control.

Figure 8.2. Chaining the processing of media.


The chapter falls into three broad modules, each consisting of the following sections:

  • Major steps and classes with roles in the control chain

  • Processing

  • Media Capture

The first module is a grab bag of topics covering the approach used by JMF in achieving control over media and is a necessary prelude to the details of the later modules. In particular, it includes a more detailed discussion of the JMF model of time (than that presented in the previous chapter) and an introduction to the key manager classes, as well as discussions of Controls, DataSources, and DataSinks.

The second module concerns processing and begins with a discussion of the expanded stop-time categories that the JMF employs for processing. The topics of the earlier sections of the chapter are then illustrated with a number of processing examples (such as transcoding).

The final module covers the topic of media capture—sampling audio or video directly from devices attached to the computer.

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

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