jlibrtp
Interface RTPAppIntf


public interface RTPAppIntf

This is the callback interface for RTP packets. It is mandatory, but you can inore the data if you like.

Author:
Arne Kepp

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.
 void receiveData(DataFrame frame, Participant participant)
          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.
 

Method Detail

receiveData

void receiveData(DataFrame frame,
                 Participant participant)
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.

Parameters:
frame - the frame containing the data
participant - the participant from which the data came

userEvent

void userEvent(int type,
               Participant[] participant)
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

Parameters:
type - the type of event
participant - the participants in question

frameSize

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. 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.

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