-
- All Implemented Interfaces:
-
com.revesoft.itelmobiledialer.servermanager.ServerMessageProcessor
public class MediaDataRecv implements ServerMessageProcessor
-
-
Field Summary
Fields Modifier and Type Field Description public volatile booleanpausedpublic MediaInfomediaInfopublic AtomicIntegerreceivedPacketCountpublic intbaseSequenceNumberpublic intcurrentSequenceNumber
-
Constructor Summary
Constructors Constructor Description MediaDataRecv(SIPProvider sProvider, MediaInfo mInfo)
-
Method Summary
Modifier and Type Method Description voidprocessMediaData(DatagramPacket packet)voidpause()voidresumeMedia(String callID)voidsetNATMediaEnble(boolean flag)booleanisByteSaverEnabled()booleanisUniqueSequence(int seqNo)voidenqueueBuffer(Packet packet)voidenqueueBuffer(AudioFrame frame)voidrelease()static intgetDataReceivedSoFar()static intgetDataMissvedSoFar()static voidincreaseDataReceivedSoFar()static voidincreaseDataReceivedSoFar(int count)static voidincreaseDataMissedSoFar(int n)static voidresetDataReceivedSoFar()static voidresetDataMissedSoFar()voidstopBluetooth()voidstartBluetooth()voidstartSound()voidstopSound()voidresetPlayer()ContextgetContext()voidprocessReceivedMessage(ByteArray receivedMessage, String extension)Process received message from media based on the extensionimplemented from ServerMessageProcessor. booleanplayRBTData()Plays the Ring Back Tone (RBT) data.This method initiates the playback of the RBT data.The specific implementation details of how the RBT data is playedare dependent on the underlying system or library. -
-
Constructor Detail
-
MediaDataRecv
MediaDataRecv(SIPProvider sProvider, MediaInfo mInfo)
-
-
Method Detail
-
processMediaData
void processMediaData(DatagramPacket packet)
-
pause
void pause()
-
resumeMedia
void resumeMedia(String callID)
-
setNATMediaEnble
void setNATMediaEnble(boolean flag)
-
isByteSaverEnabled
boolean isByteSaverEnabled()
-
isUniqueSequence
boolean isUniqueSequence(int seqNo)
-
enqueueBuffer
void enqueueBuffer(Packet packet)
-
enqueueBuffer
void enqueueBuffer(AudioFrame frame)
-
release
void release()
-
getDataReceivedSoFar
static int getDataReceivedSoFar()
-
getDataMissvedSoFar
static int getDataMissvedSoFar()
-
increaseDataReceivedSoFar
static void increaseDataReceivedSoFar()
-
increaseDataReceivedSoFar
static void increaseDataReceivedSoFar(int count)
-
increaseDataMissedSoFar
static void increaseDataMissedSoFar(int n)
-
resetDataReceivedSoFar
static void resetDataReceivedSoFar()
-
resetDataMissedSoFar
static void resetDataMissedSoFar()
-
stopBluetooth
void stopBluetooth()
-
startBluetooth
void startBluetooth()
-
startSound
void startSound()
-
stopSound
void stopSound()
-
resetPlayer
void resetPlayer()
-
getContext
Context getContext()
-
processReceivedMessage
void processReceivedMessage(ByteArray receivedMessage, String extension)
Process received message from media based on the extensionimplemented from ServerMessageProcessor.
- Parameters:
receivedMessage- ByteArray in which data have been receivedif it is fixed port(mediaID > 0) then byte array will containheader + mediaID(2 bytes) + randomLen(2 bytes) + data + random data of randomLenelse it will containheader + dataextension- the media extension it has used to receive the data
-
playRBTData
boolean playRBTData()
Plays the Ring Back Tone (RBT) data.This method initiates the playback of the RBT data.The specific implementation details of how the RBT data is playedare dependent on the underlying system or library.
-
-
-
-