protocol
Class VoicePDUSender

java.lang.Object
  extended by protocol.VoicePDUSender
All Implemented Interfaces:
AudioInterface.Packetizer

public class VoicePDUSender
extends java.lang.Object
implements AudioInterface.Packetizer

Takes captured audio and sends it to the remote peer via UDP channel

Author:
Mikica B Kocic

Field Summary
private  AudioInterface audio
           
private  byte[] audioBuffer
           
private  CallContext call
           
private  long callStartTimestamp
           
private  long nextDueTimestamp
           
private  int timestamp
           
private  int voicePduSubclass
           
 
Constructor Summary
VoicePDUSender(AudioInterface audioInterface, CallContext call)
          Constructor for the VoicePDUSender object
 
Method Summary
 void send()
          Sends audio as payload encapsulated in VoicePDU
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

audio

private AudioInterface audio

call

private CallContext call

voicePduSubclass

private int voicePduSubclass

audioBuffer

private byte[] audioBuffer

callStartTimestamp

private long callStartTimestamp

nextDueTimestamp

private long nextDueTimestamp

timestamp

private int timestamp
Constructor Detail

VoicePDUSender

VoicePDUSender(AudioInterface audioInterface,
               CallContext call)
Constructor for the VoicePDUSender object

Parameters:
audioInterface - The audio interface
call - The call object
Method Detail

send

public void send()
          throws java.io.IOException
Sends audio as payload encapsulated in VoicePDU

Specified by:
send in interface AudioInterface.Packetizer
Throws:
java.io.IOException