octoshape.osa2
Class TimeInfo

java.lang.Object
  extended by octoshape.osa2.TimeInfo
Direct Known Subclasses:
TimeInfoLive, TimeInfoOnDemand

public class TimeInfo
extends java.lang.Object

Argument to the TimeInfoListener.gotTimeInfo method.

Note that TimeInfo events gives time information about when data have been delivered from the client to the media player, not about when the media player actually played some data.

About OctoTime:
Octoshape maintains a global time called the octotime throughout the whole streaming system. This time is also maintained on the client computers on which this code runs. The time is an approximate estimate of the number of UT1 milliseconds since 0:00 UTC on 1 January 1970. When live data enters the Octoshape system on the encoder, it is timestamped with the current octotime. This timestamp is available on the client through this listener.

See Also:
TimeInfoListener, StreamPlayer.requestTimeInfo(octoshape.osa2.listeners.TimeInfoListener), StreamPlayer.requestTimeInfoOnNewFrame(octoshape.osa2.listeners.TimeInfoListener)

Field Summary
 long current
          The octotime of the most recent data packet send to the player.
 boolean isLive
          True if the stream is a live stream, false if it is an on-demand stream.
 long wallClock
          The octotime as it is right now.
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isLive

public final boolean isLive
True if the stream is a live stream, false if it is an on-demand stream.

Can be used to determine to cast the object to TimeInfoLive or TimeInfoOnDemand.

 
  if(timeInfo.isLive){
    TimeInfoLive timeInfoLive = (TimeInfoLive) timeInfo;
    ...
  }else{
    TimeInfoOnDemand timeInfoOnDemand = (TimeInfoOnDemand) timeInfo;
    ...
  }


wallClock

public final long wallClock
The octotime as it is right now.


current

public final long current
The octotime of the most recent data packet send to the player.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object