jlibrtpDemos
Class SoundSenderDemo
java.lang.Object
jlibrtpDemos.SoundSenderDemo
- All Implemented Interfaces:
- RTPAppIntf
public class SoundSenderDemo
- extends java.lang.Object
- implements RTPAppIntf
- 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. |
static void |
main(java.lang.String[] args)
|
void |
receiveData(DataFrame dummy1,
Participant dummy2)
The callback method through which the application will receive
data from jlibrtp. |
void |
run()
|
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 |
rtpSession
public RTPSession rtpSession
pktCount
static int pktCount
dataCount
static int dataCount
filename
private java.lang.String filename
EXTERNAL_BUFFER_SIZE
private final int EXTERNAL_BUFFER_SIZE
- See Also:
- Constant Field Values
auline
javax.sound.sampled.SourceDataLine auline
curPosition
private SoundSenderDemo.Position curPosition
local
boolean local
SoundSenderDemo
public SoundSenderDemo(boolean isLocal)
main
public static void main(java.lang.String[] args)
- Parameters:
args
-
receiveData
public void receiveData(DataFrame dummy1,
Participant dummy2)
- 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:
dummy1
- the frame containing the datadummy2
- 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 eventparticipant
- 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
run
public void run()