JMF 2.0 - API Changes
JMF 2.0 Documentation
API Changes since JMF 2.0 Beta
DataSink:
- 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.
AudioFormat:
- Added a computeDuration method that returns the duration based on the length of an audio chunk.
rtp.SessionManager:
- 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 javax.media.renderer.VisualContainer interface to indicate that a visual component contains multiple visual components inside.
- Added javax.media.protocol.FileTypeDescriptor, a subclass of ContentDescriptor, to indicate that the descriptor is a file format.
- Added the javax.media.Drainable interface for renderers.
API Changes from JMF 2.0 EA to JMF 2.0 Beta
- Merged Formatted, Formattable to form javax.media.control.FormatControl.
- Removed FormatChangeException, FormatChangeListener, UnsupportedFormatEvent.
- Moved Format from javax.media.format to javax.media.
- Moved javax.media.format.audio.* & javax.media.format.video.* to javax.media.format.*
- Changed TrackControl to extend FormatControl.
- Changed SizeChangeEvent to extend from FormatChangeEvent.
- Removed javax.media.control.CaptureDeviceControl
- Added javax.media.protocol.CaptureDevice interface. Capture data sources implemented this.
- Added javax.media.control.PortControl for setting both input and output ports.
- set/getOutputContentDescriptor changed to set/getContentDescriptor.
- Added getSupportedInputFormats, setNumTracks, setInputFormat.
- Removed javax.media.renderer.audio.AudioRenderer.
- Moved javax.media.video.renderer.* javax.media.renderer.*.
- Removed javax.media.util.CloneableDataSource & MergingDataSource
- Added Manager.createCloneableDataSource and Manager.createMergingDataSource.
- Added the javax.media.protocol.SourceCloneable interface.
- Added setHint and getHint.
- Changed contructors, getTrackCount etc.
- Removed readKeyFrame, willReadFrameBlock.
- Removed setPreProcessingEffect & setPostProcessingEffect.
- Changed setCodec to setCodecChain
- 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:
-
- javax.media.rtp - contains most of the classes previously from javax.media.rtp.session.
- javax.media.rtp.event - contains all the RTP event classes.
- javax.media.rtp.rtcp - 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 javax.media.MediaLocator.
- MalformedRTPMRLException is removed and replaced by the standard java.net.MalformedURLException.