Methods Summary |
---|
public void | connect()Open a connection to the source described by
the MediaLocator .
The connect method initiates communication with the source.
input.connect();
|
javax.media.protocol.DataSource | createClone()Clone the original datasource, returning an object of the type
PushDataSource or PushBufferDataSource .
If the original data source was a
PullDataSource, then this will be a PushDataSource which pushes at
the same rate at which the CloneableDataSource is being pulled.
DataSource newSlave;
if ((input instanceof PullDataSource) ||
(input instanceof PushDataSource))
newSlave = new PushDataSourceSlave();
else // input is a Buffer type DataSource
newSlave = new PushBufferDataSourceSlave();
clones.addElement(newSlave);
try {
newSlave.connect();
} catch (IOException e) {
return null;
}
return newSlave;
|
public void | disconnect()Close the connection to the source described by the locator.
The disconnect method frees resources used to maintain a
connection to the source.
If no resources are in use, disconnect is ignored.
If stop hasn't already been called,
calling disconnect implies a stop.
input.disconnect();
|
public java.lang.String | getContentType()Get a string that describes the content-type of the media
that the source is providing.
It is an error to call getContentType if the source is
not connected.
return input.getContentType();
|
public java.lang.Object | getControl(java.lang.String controlType)Obtain the object that implements the specified
Class or Interface
The full class or interface name must be used.
If the control is not supported then null
is returned.
return input.getControl(controlType);
|
public java.lang.Object[] | getControls()Obtain the collection of objects that
control the object that implements this interface.
If no controls are supported, a zero length
array is returned.
return input.getControls();
|
public javax.media.Time | getDuration()Get the duration of the media represented
by this object.
The value returned is the media's duration
when played at the default rate.
If the duration can't be determined (for example, the media object is presenting live
video) getDuration returns DURATION_UNKNOWN .
return input.getDuration();
|
public void | start()Initiate data-transfer. The start method must be
called before data is available.
(You must call connect before calling start .)
input.start();
|
public void | stop()Stop the data-transfer.
If the source has not been connected and started,
stop does nothing.
input.stop();
|