TimeSection Class Reference

This class is used to measure the elapsed time of a section (from PLAY to PAUSE) of a streaming session. More...

#include <TimeSection.hpp>

List of all members.


Public Member Functions

 TimeSection (int nr, ulong prebuffertime)
 default constructor
 ~TimeSection ()
 default destructor
void start ()
 Set start-timestamp of this timesection.
void stop ()
 Set stop-timestamp of this timesection.
ulong getMeasuredStarttime ()
ulong getMeasuredEndtime ()
ulong getPrebufferTime ()
ulong getRequestedFrom ()
ulong getClientReceived ()
ulong getServerPlayout ()
ulong getClientPlayout ()
ulong getCurrentMsecs ()
void setMeasuredStarttime (ulong measuredStarttime)
 set measured start-timestamp
void setMeasuredEndtime (ulong measuredEndtime)
 set measured stop-timestamp
void setRequestedFrom (ulong requestedFrom)
 set from-value, requested by the client
void setClientReceived (ulong clientReceived)
 set duration of section, received by the client
void setServerPlayout (ulong serverPlayout)
 set server-based estimation of elapsed time on client
void setClientPlayout (ulong clientPlayout)
 set elapsed time on client, requested from the client

Detailed Description

This class is used to measure the elapsed time of a section (from PLAY to PAUSE) of a streaming session.

Author:
Klaus Schoeffmann

Definition at line 73 of file TimeSection.hpp.


Member Function Documentation

ulong TimeSection::getClientPlayout  ) 
 

Returns:
elapsed time on client requested from the client
Definition at line 136 of file TimeSection.cpp.

Referenced by TimeMeasurement::getElapsedTime().

00137 { 00138 return clientPlayout; 00139 }

ulong TimeSection::getClientReceived  ) 
 

Returns:
duration of section, received by the client
Definition at line 124 of file TimeSection.cpp.

Referenced by TimeMeasurement::getElapsedTime().

00125 { 00126 return clientReceived; 00127 }

ulong TimeSection::getCurrentMsecs  ) 
 

Returns:
current time in msecs
Definition at line 74 of file TimeSection.cpp.

Referenced by TimeMeasurement::getElapsedTime(), start(), and stop().

00075 { 00076 //get current timestamp 00077 struct timeval currTime; 00078 gettimeofday(&currTime, NULL); 00079 00080 //calculate to msecs 00081 ulong currTimeMs = ((ulong)currTime.tv_sec*1000 + (ulong)currTime.tv_usec/1000); 00082 return currTimeMs; 00083 }

ulong TimeSection::getMeasuredEndtime  ) 
 

Returns:
measured stop-timestamp
Definition at line 106 of file TimeSection.cpp.

Referenced by TimeMeasurement::getElapsedTime().

00107 { 00108 return measuredEndtime; 00109 }

ulong TimeSection::getMeasuredStarttime  ) 
 

Returns:
measured start-timestamp
Definition at line 100 of file TimeSection.cpp.

Referenced by TimeMeasurement::getElapsedTime().

00101 { 00102 return measuredStarttime; 00103 }

ulong TimeSection::getPrebufferTime  ) 
 

Returns:
prebuffering time
Definition at line 112 of file TimeSection.cpp.

Referenced by TimeMeasurement::getElapsedTime().

00113 { 00114 return prebufferTime; 00115 }

ulong TimeSection::getRequestedFrom  ) 
 

Returns:
from-value, requested by the client
Definition at line 118 of file TimeSection.cpp.

Referenced by TimeMeasurement::setTSrequestedFrom().

00119 { 00120 return requestedFrom; 00121 }

ulong TimeSection::getServerPlayout  ) 
 

Returns:
server-based estimation of elapsed time on client
Definition at line 130 of file TimeSection.cpp.

Referenced by TimeMeasurement::getElapsedTime().

00131 { 00132 return serverPlayout; 00133 }


The documentation for this class was generated from the following files: