public class TranscodingDataSource
extends javax.media.protocol.DataSource
| Constructor and Description |
|---|
TranscodingDataSource(javax.media.protocol.DataSource inputDataSource,
javax.media.Format outputFormat)
Initializes a new TranscodingDataSource instance to transcode
the tracks of a specific DataSource into a specific output
Format.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Implements
DataSource.connect(). |
void |
disconnect()
Implements
DataSource.disconnect(). |
String |
getContentType()
Implements
DataSource.getContentType(). |
Object |
getControl(String controlType)
Implements
Controls.getControl(String). |
Object[] |
getControls()
Implements
Controls.getControls(). |
javax.media.Time |
getDuration()
Implements
Duration.getDuration(). |
javax.media.protocol.SourceStream[] |
getStreams()
Gets the output streams that this instance provides.
|
javax.media.Processor |
getTranscodingProcessor()
Returns this instance's Processor object
|
void |
start()
Implements
DataSource.start(). |
void |
stop()
Implements
DataSource.stop(). |
public TranscodingDataSource(javax.media.protocol.DataSource inputDataSource,
javax.media.Format outputFormat)
inputDataSource - the DataSource which is to have its
tracks transcoded in a specific output FormatoutputFormat - the Format in which the new instance is to
transcode the tracks of inputDataSourcepublic void connect()
throws IOException
DataSource.connect(). Sets up the very transcoding
process and just does not start it i.e. creates a Processor on
the inputDataSource, sets outputFormat on its tracks
(which support a Format compatible with outputFormat)
and connects to its output DataSource.connect in class javax.media.protocol.DataSourceIOException - if creating the transcoding Processor,
setting its Format or connecting to it failspublic void disconnect()
DataSource.disconnect(). Stops and undoes the whole
setup of the very transcoding process i.e. disconnects from the output
DataSource of the transcodingProcessor and disposes of the
transcodingProcessor.disconnect in class javax.media.protocol.DataSourcepublic String getContentType()
DataSource.getContentType(). Delegates to the actual
output of the transcoding.getContentType in class javax.media.protocol.DataSourcepublic Object getControl(String controlType)
Controls.getControl(String). Delegates to the actual
output of the transcoding.controlType - a String value which names the type of the
control to be retrievedpublic Object[] getControls()
Controls.getControls(). Delegates to the actual
output of the transcoding.public javax.media.Time getDuration()
Duration.getDuration(). Delegates to the actual
output of the transcoding.public javax.media.protocol.SourceStream[] getStreams()
public void start()
throws IOException
DataSource.start(). Starts the actual transcoding
process already set up with connect().start in class javax.media.protocol.DataSourceIOException - if starting the transcoding failspublic void stop()
throws IOException
DataSource.stop(). Stops the actual transcoding
process if it has already been set up with connect().stop in class javax.media.protocol.DataSourceIOException - if stopping the transcoding failspublic javax.media.Processor getTranscodingProcessor()
Copyright © 2021 jitsi.org. All rights reserved.