public class EncapIPDataSource extends PushDataSource
DURATION_UNBOUNDED, DURATION_UNKNOWN| Constructor and Description |
|---|
EncapIPDataSource(MediaLocator mediaLoc)
Will create a stream for the locator
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Since EncapIPStream reads from a file, connect() is simulated
by starting the StreamReadingThread in EncapIPStream (calling
setOpen() on stream, if one doesn't exist (signalled by
open=false).
|
void |
disconnect()
Close the connection to the source described by the locator.
|
String |
getContentType()
Get a string that describes the content-type of the media
that the source is providing.
|
Object |
getControl(String control)
Obtain the object that implements the specified
Class or Interface
The full class or interface name must be used. |
Object[] |
getControls()
Obtain the collection of objects that
control the object that implements this interface.
|
Time |
getDuration()
Get the duration of the media represented
by this object.
|
PushSourceStream[] |
getStreams()
Get the collection of streams that this source
manages.
|
void |
start()
Initiate data-transfer.
|
void |
stop()
Stop the data-transfer.
|
getLocator, initCheck, setLocatorpublic EncapIPDataSource(MediaLocator mediaLoc) throws MalformedLocatorException
MalformedLocatorExceptionpublic String getContentType()
DataSource
It is an error to call getContentType if the source is
not connected.
getContentType in class DataSourcepublic void connect()
throws IOException
connect in class DataSourceIOException - Thrown if there are IO problems
when connect is called.public void disconnect()
DataSource
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.
disconnect in class DataSourcepublic void start()
throws IOException
DataSourcestart method must be
called before data is available.
(You must call connect before calling start.)start in class DataSourceIOException - Thrown if there are IO problems with the source
when start is called.public void stop()
throws IOException
DataSourcestop does nothing.stop in class DataSourceIOExceptionpublic Object[] getControls()
ControlsIf no controls are supported, a zero length array is returned.
public Object getControl(String control)
ControlsClass or Interface
The full class or interface name must be used.
If the control is not supported then null
is returned.
null.public Time getDuration()
DurationgetDuration returns DURATION_UNKNOWN.Time object representing the duration or DURATION_UNKNOWN.public PushSourceStream[] getStreams()
PushDataSourceContentDescriptor
of this DataSource provides the only indication of
what streams can be available on this connection.getStreams in class PushDataSourceCopyright © 2012 code4tv.com. All Rights Reserved.