|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.protocol.DataSource
org.dvb.media.DripFeedDataSource
public class DripFeedDataSource
This class allows to create a source for a JMF player to be able to feed the decoder progressively with parts of a clip (e.g. I or P MPEG-2 frame) according to the drip-fed mode format defined in the MHP content format clause.
To start using the drip-feed mode, the application needs to instantiate a player representing a MPEG-2 video decoder and have its source be a DripFeedDataSource instance.
A DripFeedDataSource instance can be obtained by calling the default constructor of the class.
A player that will be bound to a MPEG-2 video decoder (when realized) can be created with a locator of the following text representation: "dripfeed://".
After having the DripFeedDataSource connected to a Player representing a
MPEG-2 video decoder, the following rules applies:
- If the feed method is called when the player is in the "prefetched" state
the image will be stored so that when the player goes in the "started" state
it will be automatically displayed.
- If the feed method is called when the player is in the "started" mode, the
frame shall be displayed immediately. In particular it is not required to
feed a second frame to the decoder to display the first frame.
- If the feed method is called when the player is in any other state (or if
the DripFeedDataSource is not connected to a player), it will be ignored by
the platform implementation.
Field Summary |
---|
Fields inherited from interface javax.media.Duration |
---|
DURATION_UNBOUNDED, DURATION_UNKNOWN |
Constructor Summary | |
---|---|
DripFeedDataSource()
Constructor. |
Method Summary | |
---|---|
void |
connect()
This method shall not be used and has no effect. |
void |
disconnect()
This method shall not be used and has no effect. |
void |
feed(byte[] clip_part)
This method allows an application to feed the decoder progressively with parts of a clip (e.g. |
java.lang.String |
getContentType()
This method shall return the content type for mpeg-2 video "drips" |
java.lang.Object |
getControl(java.lang.String controlType)
Obtain the object that implements the specified Class or Interface. |
java.lang.Object[] |
getControls()
Obtain the collection of objects that control this object. |
javax.media.Time |
getDuration()
This method shall not be used and has no effect. |
void |
start()
This method shall not be used and has no effect. |
void |
stop()
This method shall not be used and has no effect. |
Methods inherited from class javax.media.protocol.DataSource |
---|
getLocator, initCheck, setLocator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DripFeedDataSource()
Method Detail |
---|
public void feed(byte[] clip_part)
While in the prefetch state the drip feed data source is only required to correctly process a single invocation of this method where the data consists only of a single I frame. Possible additional invocations while in the prefetch state shall have implementation specific results.
clip_part
- Chunk of bytes compliant with the drip-fed mode format
defined in the MHP content format clause (i.e. one MPEG-2 frame with
optional synctactic MPEG-2 elements).public java.lang.String getContentType()
getContentType
in class javax.media.protocol.DataSource
public void connect() throws java.io.IOException
connect
in class javax.media.protocol.DataSource
java.io.IOException
- never thrown in this sub-classpublic void disconnect()
disconnect
in class javax.media.protocol.DataSource
public void start() throws java.io.IOException
start
in class javax.media.protocol.DataSource
java.io.IOException
- never thrown in this sub-classpublic void stop() throws java.io.IOException
stop
in class javax.media.protocol.DataSource
java.io.IOException
- never thrown in this sub-classpublic javax.media.Time getDuration()
public java.lang.Object[] getControls()
public java.lang.Object getControl(java.lang.String controlType)
controlType
- the full class or interface name of the requested control
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |