JMF Solutions

Reading Data from the Data Output of a Processor
[Custom DataSink]

To read the data from the output DataSource of a Processor.

A custom DataSink is designed to read data from the output DataSource of a Processor. The DataSink handles both PushBufferDataSource and PullBufferDataSource which are the default types of output DataSource from Processors.

The sample application takes an input URL; creates a processor for it; set the output contentDescritpor to RAW; hook it up to the custom DataSink.

For the purpose of this sample, the custom DataSink reads the data and prints out simple statistics concerning the data.

A monitor is created if the "-monitor" flag is used and the processor supports MonitorControl.

When the monitor is enabled, a handy trick is used to enable the RawSyncBufferMux (by disabling RawBufferMux). This allows the audio and video track to synchronize for monitoring. Otherwise, the video will be processed as fast as possible independent of the audio.
Platform: JDK 1.1.6 or later
JMF API: 2.0 or later
Implementation: AJ, WPP, SPP *

* AJ = All Java, WPP = Windows Performance Pack, SPP = Solaris Performance Pack
Related Classes
How to run this sample
java DataSourceReader [-monitor] <URL>

java DataSourceReader -monitor file:/c:/temp/
Source Code
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
Duke's Choice Awards Nomination RHS

VTS OnDemand RHS Banner

Virtual Tech Summit Sept 2015 RHS banner

JavaOne 2014 Replay banner