public class DSMCCStream extends Object
The methods in this class relating to the NPT mechanism shall also be mapped onto the DVB timeline as defined in the main part of this specification. NOTE: The NPT mechanism and scheduled stream events that depend on it are known to be vulnerable to disruption in many digital TV distribution networks. Existing deployed network equipment that re-generates the STC is unlikely to be aware of NPT and hence will not make the necessary corresponding modification to STC values inside NPT reference descriptors. Applications should only use NPT where they are confident that the network where they are to be used does not have this problem.
DSMCCObject| Constructor and Description |
|---|
DSMCCStream(DSMCCObject aDSMCCObject)
Creates a Stream Object from a DSMCC Object.
|
DSMCCStream(String path)
Create a Stream Object from its pathname.
|
DSMCCStream(String path,
String name)
Create a DSMCCStream from its pathname.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNPTListener(NPTListener l)
Add a listener for timeline events on the
DSMCCStream object. |
long |
getDuration()
This function returns the duration in milliseconds of the DSMCC Stream.
|
Time |
getMediaTimeFromStream(long time,
Clock c)
Convert a time measured according to a timeline in the stream
into a JMF media time measured in a specified clock.
|
long |
getNPT()
This function is used to get value of the current timeline in milliseconds.
|
NPTRate |
getNPTRate()
Get the rate for the timeline referenced in the DSMCCStream object.
|
Locator |
getStreamLocator()
This function returned a Locator referencing the streams of
this collection.
|
boolean |
isAudio()
This function returns a boolean indicating if the Stream Object
refers to an audio stream.
|
boolean |
isData()
This function returns a boolean indicating if the Stream Object
refers to a data stream.
|
boolean |
isMPEGProgram()
This method will return true if the Stream(Event) BIOP message contains a
tap with use field BIOP_PROGRAM_USE, otherwise it will return false.
|
boolean |
isVideo()
This function returns a boolean indicating if the Stream Object
refers to an video stream.
|
void |
removeNPTListener(NPTListener l)
Remove a listener for timeline events on the
DSMCCStream object. |
public DSMCCStream(DSMCCObject aDSMCCObject) throws NotLoadedException, IllegalObjectTypeException
aDSMCCObject - the DSMCC object which describes the streamNotLoadedException - the DSMCCObject is not loaded.IllegalObjectTypeException - the DSMCCObject is
neither a DSMCC Stream nor a DSMCCStreamEventpublic DSMCCStream(String path) throws IOException, IllegalObjectTypeException
path - the pathname of the DSMCCStream Object.IOException - If an IO error occurred.IllegalObjectTypeException - the DSMCCObject is
neither a DSMCC Stream nor a DSMCCStreamEventpublic DSMCCStream(String path, String name) throws IOException, IllegalObjectTypeException
path - the directory path.name - the name of the DSMCCStream Object.IOException - If an IO error occurred.IllegalObjectTypeException - the DSMCCObject is
neither a DSMCC Stream nor a DSMCCStreamEventpublic long getDuration()
public long getNPT()
throws MPEGDeliveryException
MPEGDeliveryException - if there is an error in retrieving the timeline descriptorspublic Locator getStreamLocator()
isMPEGProgram method.public boolean isMPEGProgram()
public boolean isAudio()
public boolean isVideo()
public boolean isData()
public NPTRate getNPTRate() throws MPEGDeliveryException
throws - MPEGDeliveryException if there is an error in retrieving NPT reference descriptorsMPEGDeliveryExceptionpublic void addNPTListener(NPTListener l)
DSMCCStream object.
Adding the same listener a second time has no effect.l - the listenerpublic void removeNPTListener(NPTListener l)
DSMCCStream object.
Removing a non-subscribed listener has no effect.l - the listener to removepublic Time getMediaTimeFromStream(long time, Clock c)
time - the time measured according to the timeline in the streamc - the clock to express the media timeIllegalArgumentException - if the Clock is not a Player which is
presenting at least one of the streams of this collection
(as returned by getStreamLocator).Copyright © 2012 code4tv.com. All Rights Reserved.