pamvotis.sources
Class VideoSource

java.lang.Object
  extended by pamvotis.sources.Source
      extended by pamvotis.sources.VideoSource

public class VideoSource
extends Source

Represents a source generating video traffic according to 3GPP TR 25.892 V6.0.0

Author:
Dimitris El. Vassis

Field Summary
 
Fields inherited from class pamvotis.sources.Source
_sourceId, generator, interArTime, packetToBeTransmittedID, pktLength, session, slot
 
Constructor Summary
VideoSource(int sourceId, int frameRate, int packetsPerFrame, float pktSize, float pktSizeMax, float pktIntArr, float pktIntArrMax)
          Instantiates a video source according to specified parameters.
 
Method Summary
 void getNextPacket()
          If the session is not empty, it takes the first packet of the session in order to be born when its interarrival timer expires.
 void synchronize()
          When the frame interarrival timer expires, a new session is created, which is actually a new frame.
 
Methods inherited from class pamvotis.sources.Source
genRv, genRv, genRv, genRv
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoSource

public VideoSource(int sourceId,
                   int frameRate,
                   int packetsPerFrame,
                   float pktSize,
                   float pktSizeMax,
                   float pktIntArr,
                   float pktIntArrMax)
Instantiates a video source according to specified parameters. See 3GPP TR 25.892 V6.0.0 for more details.

Parameters:
sourceId - The ID of the source
frameRate - The video frame rate in frames/sec
packetsPerFrame - The packets of a frame
pktSize - The averaga size of each packet in bits
pktSizeMax - The maximum size of each packet in bits
pktIntArr - The average packet interarrival time in seconds (can be float as well)
pktIntArrMax - The maximum packet interarival interval in seconds (can be float as well)
Method Detail

getNextPacket

public void getNextPacket()
If the session is not empty, it takes the first packet of the session in order to be born when its interarrival timer expires. If the session is empty, it just adds dummy packets, that actually represent an off interval.

Specified by:
getNextPacket in class Source

synchronize

public void synchronize()
When the frame interarrival timer expires, a new session is created, which is actually a new frame.

Specified by:
synchronize in class Source