validateCcrtp
Class CCRTPReceiver

java.lang.Object
  extended by validateCcrtp.CCRTPReceiver
All Implemented Interfaces:
RTPAppIntf

public class CCRTPReceiver
extends java.lang.Object
implements RTPAppIntf

Receives and prints packets sent by the rtpsend demo program in ccrtp 1.5.x Send them to port 6003, unless you modify this program.

Author:
Arne Kepp

Field Summary
(package private)  RTPSession rtpSession
           
 
Constructor Summary
CCRTPReceiver()
           
 
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 receiveData(DataFrame frame, Participant p)
          The callback method through which the application will receive data from jlibrtp.
 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
Constructor Detail

CCRTPReceiver

public CCRTPReceiver()
Method Detail

receiveData

public void receiveData(DataFrame frame,
                        Participant p)
Description copied from interface: RTPAppIntf
The callback method through which the application will receive data from jlibrtp. These calls are synchronous, so you will not receive any new packets until this call returns.

Specified by:
receiveData in interface RTPAppIntf
Parameters:
frame - the frame containing the data
p - 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 -