jlibrtpDemos
Class XmlPacketPlayer

java.lang.Object
  extended by jlibrtpDemos.XmlPacketPlayer
All Implemented Interfaces:
RTPAppIntf

public class XmlPacketPlayer
extends java.lang.Object
implements RTPAppIntf


Field Summary
(package private)  int dataCount
           
(package private)  org.jdom.Document document
           
(package private)  long origStartTime
           
(package private)  int pktCount
           
(package private)  RTPSession rtpSession
           
(package private)  long startTime
           
 
Constructor Summary
XmlPacketPlayer(int rtpPortNum, int rtcpPortNum, java.lang.String address)
          Constructor
 
Method Summary
 int frameSize(int payloadType)
          The callback method through which the application can specify the number of packets that make up a frame for a given payload type.
static void main(java.lang.String[] args)
           
 void parseDocument(java.lang.String filename)
           
 void parseRTPpacket(org.jdom.Element elm)
           
 void parseSessionInfo(org.jdom.Element elm)
           
 void preSendSleep(long targetTime)
          This should be
 void receiveData(DataFrame frame, Participant participant)
          Dummy methods for the RTPAppinterface
 void userEvent(int type, Participant[] participant)
          The callback method through which the application will receive notifications about user updates, additions and byes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rtpSession

RTPSession rtpSession

document

org.jdom.Document document

origStartTime

long origStartTime

startTime

long startTime

dataCount

int dataCount

pktCount

int pktCount
Constructor Detail

XmlPacketPlayer

public XmlPacketPlayer(int rtpPortNum,
                       int rtcpPortNum,
                       java.lang.String address)
Constructor

Method Detail

parseDocument

public void parseDocument(java.lang.String filename)

parseSessionInfo

public void parseSessionInfo(org.jdom.Element elm)

parseRTPpacket

public void parseRTPpacket(org.jdom.Element elm)

preSendSleep

public void preSendSleep(long targetTime)
This should be

Parameters:
targetTime - the real UNIX timestamp of the packet

receiveData

public void receiveData(DataFrame frame,
                        Participant participant)
Dummy methods for the RTPAppinterface

Specified by:
receiveData in interface RTPAppIntf
Parameters:
frame - the frame containing the data
participant - the participant from which the data came

userEvent

public void userEvent(int type,
                      Participant[] participant)
Description copied from interface: RTPAppIntf
The callback method through which the application will receive notifications about user updates, additions and byes. Types: 1 - Bye 2 - New through RTP, check .getRtpSendSock() 3 - New through RTCP, check .getRtcpSendSock() 4 - SDES packet received, check the getCname() etc methods 5 - Matched SSRC to ip-address provided by application

Specified by:
userEvent in interface RTPAppIntf
Parameters:
type - the type of event
participant - the participants in question

frameSize

public int frameSize(int payloadType)
Description copied from interface: RTPAppIntf
The callback method through which the application can specify the number of packets that make up a frame for a given payload type. A negative value denotes frames of variable length, so jlibrtp will return whatever it has at the time. In most applications, this function can simply return 1. This should be implemented as something fast, such as an integer array with the indeces being the payload type.

Specified by:
frameSize in interface RTPAppIntf
Parameters:
payloadType - the payload type specified in the RTP packet
Returns:
the number of packets that make up a frame

main

public static void main(java.lang.String[] args)
Parameters:
args -