Reading Data from the Data Output of a Processor
[Custom DataSink]
|
|
Problem
To read the data from the output DataSource of a Processor.
Solution
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.
|
|
| Requirements |
|
| 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 |
|