Introduction To JMF [Java Media Framework]
Java Media Framework [JMF] is a java open source library that enables developers to add audio, video and other time based media to java applications. JMF was developed by Sun Microsystems. JMF is a framework for handling streaming media in Java programs. JMF is an optional package of Java 2 standard platform that allows developments of cross-platform multimedia applications.
Features Of JMF
- JMF supports many popular media formats such as JPEG, MPEG-1, MPEG-2,QuickTime, AVI, WAV, MP3, GSM, G723, H263, and MIDI.
- JMF supports popular media access protocols such as file, HTTP, HTTPS, FTP, RTP, and RTSP.
- JMF uses the "Factory" design pattern that simplifies the creation of JMF objects.
- The JMF support the reception and transmission of media streams using Real-time Transport Protocol (RTP) and JMF supports management of RTP sessions.
- JMF provides a plug-in architecture that allows JMF to be customized and extended.
JMF Architecture
The JMF architecture is very flexible, and its components can generally be classified in three groups.
- Input It describe some sort of media that is used for input.
- Process perform some action on the input. A process has differnt input and output. A large number of processes are available, and can be applied to an input or a group of inputs. These processes can be chained together so that the output from one process is used as an input to another process.
- Output is a destination to media.
JMF data processing model
Using A Player Interface in JMF
The javax.media package is the core package, containing the definitions of the Manager class and the Player interface that are two of the major pieces in building any JMF-based application.
Player States in JMF
- Prefetched
- Prefetching
- Realized
- Realizing
- Started
- Unrealized
Getting GUI Component
The Player interface exposes methods to obtain references to selected visual components.- player.getVisualComponent() is responsible for displaying any video.
- player.getControlPanelComponent() it handles time-based operations (start, stop, rewind).
- player.getGainControl().getControlComponent() it handles volume operations. The getGainControl() method returns a GainControl instance, which may be used to change gain levels programmatically.


