net.sf.fmj.media.protocol.rtp
Class DataSource
java.lang.Object
javax.media.protocol.DataSource
javax.media.protocol.PushBufferDataSource
net.sf.fmj.media.protocol.rtp.DataSource
- All Implemented Interfaces:
- Controls, Duration
public class DataSource
- extends PushBufferDataSource
RTP protocol handler DataSource. Very basic; makes the connection, gets the underlying DataSource, and delegates
all calls to the underlying DataSource.
TODO: support the full URL format:
"rtp://address:port[:ssrc]/content-type/[ttl]"
address is an IP address, port is an integer port number, and content-type is a string such as video or audio. The SSRC (Synchronizing Source) and TTL (Time to Live) fields are optional.
TODO: the dimensions of the format (if video) are not known until a frame arrives.
We probably need to wrap ((PushBufferDataSource) dataSource).getStreams(); to somehow
get the first frame if it is video, and determine the format, and have our wrapper return the
full format when queried.
- Author:
- Ken Larson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSource
public DataSource()
connect
public void connect()
throws java.io.IOException
- Specified by:
connect
in class DataSource
- Throws:
java.io.IOException
getStreams
public PushBufferStream[] getStreams()
- Specified by:
getStreams
in class PushBufferDataSource
disconnect
public void disconnect()
- Specified by:
disconnect
in class DataSource
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in class DataSource
getControl
public java.lang.Object getControl(java.lang.String controlType)
- Specified by:
getControl
in interface Controls
- Specified by:
getControl
in class DataSource
getControls
public java.lang.Object[] getControls()
- Specified by:
getControls
in interface Controls
- Specified by:
getControls
in class DataSource
getDuration
public Time getDuration()
- Specified by:
getDuration
in interface Duration
- Specified by:
getDuration
in class DataSource
start
public void start()
throws java.io.IOException
- Specified by:
start
in class DataSource
- Throws:
java.io.IOException
stop
public void stop()
throws java.io.IOException
- Specified by:
stop
in class DataSource
- Throws:
java.io.IOException