JMF 2.0 - API Changes


JMF 2.0 Documentation

API Changes since JMF 2.0 Beta


  • FileWriterControl, FileWriterListener, FileWriterEvent, EndOfFileEvent, FileSizeLimitReachedEvent, and FileWritingErrorEvent have been removed from the API.
  • StreamWriterControl has been added, and essentially takes the place of FileWriterControl. It's less file-centric and can be implemented by either Multiplexers or DataSinks that output data.
  • DataSinkListener and DataSinkEvent have been added. This enables any DataSink to post events, not just a DataSink that writes data to a file.
  • EndOfStreamEvent has been added, and essentially takes the place of EndOfFileEvent.
  • DataSinkErrorEvent has been added, and essentially takes the place of FileWritingErrorEvent.
  • There's no longer a specific event indicating that the stream size limit has been reached.


  • Added a computeDuration method that returns the duration based on the length of an audio chunk.


  • Added a new verison of the startSession method which takes a new parameter called "localSenderAddress" to provide control over the sending port if needed.

New interface/objects:

  • Added the interface to indicate that a visual component contains multiple visual components inside.
  • Added, a subclass of ContentDescriptor, to indicate that the descriptor is a file format.
  • Added the interface for renderers.

API Changes from JMF 2.0 EA to JMF 2.0 Beta

  • Merged Formatted, Formattable to form
  • Removed FormatChangeException, FormatChangeListener, UnsupportedFormatEvent.
  • Moved Format from to
  • Moved* &* to*
  • Changed TrackControl to extend FormatControl.
  • Changed SizeChangeEvent to extend from FormatChangeEvent.
  • Removed
  • Added interface.  Capture data sources implemented this.
  • Added for setting both input and output ports.
  • set/getOutputContentDescriptor changed to set/getContentDescriptor.
  • Added getSupportedInputFormats, setNumTracks, setInputFormat.
  • Removed
  • Moved**.
  • Removed & MergingDataSource
  • Added Manager.createCloneableDataSource and Manager.createMergingDataSource.
  • Added the interface.
  • Added setHint and getHint.
  • Changed contructors, getTrackCount etc.
  • Removed readKeyFrame, willReadFrameBlock.
  • Removed setPreProcessingEffect & setPostProcessingEffect.
  • Changed setCodec to setCodecChain
  • Methods redefined.
  • Added replaceURL, showDocument().
  • Added replaceURL(), showDocument().
  • ImageConverter is broken down into:
    • BufferToImage: converting a JMF buffer into a JDK image.
    • ImageToBuffer: the other way round.
  • Repackaging:
    • - contains most of the classes previously from
    • - contains all the RTP event classes.
    • - contains classes related to RTCP.
  • Name changes:
    • Most RTP prefixes have been removed from class names.  Only generic class names like RTPHeader, RTPSocket and RTPEvent still carry the RTP prefix.
    • The abbreviated spelling "Recv" has been changed to "Receive".
    • RTPIODataSource is renamed to RTPPushDataSource.
    • PushDestStream is renamed to OutputDataStream.
  • RTPMediaLocator is removed and replaced by the standard
  • MalformedRTPMRLException is removed and replaced by the standard