Class CodecUtils
java.lang.Object
com.exxothermic.audioeverywheresdk.business.utils.CodecUtils
Class that shows an interface for the native methods on the application
The methods are related to the decoding process only, and the implementation is
defined on the file "codecUtils.c" located on the jni folder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
closeUDPSocket
(int sockfd) Method that closes a UDP socketstatic int
Method that reflects 'delayTime' state variable to CodecUtils methodsstatic int
openUDPSocket
(int port, int timeout) Method that opens a UDP socketstatic void
processIncomingAudio
(String userEnteredPassword, int sockfd, int max_length) Method that receives UDP/RTP packets, decodes Opus, places decoded packet on audio buffer FIFO, and manages packet receive algorithmstatic boolean
Method that reset the decoder used internallystatic void
setRunning
(boolean running) Method that reflects 'running' state variable to CodecUtils methodsstatic void
setSha1Encryption
(boolean sha1Encryption) Method that reflects 'sha1Encryption' state variable to CodecUtils methodsstatic int
Method that reflects 'SumValid' state variable to CodecUtils methods
-
Constructor Details
-
CodecUtils
public CodecUtils()
-
-
Method Details
-
resetDecoder
public static boolean resetDecoder()Method that reset the decoder used internally- Returns:
- true if the decoder was reset, false otherwise
-
openUDPSocket
public static int openUDPSocket(int port, int timeout) Method that opens a UDP socket- Parameters:
port
- UDP port numbertimeout
- timeout (msec) when receiving a packet- Returns:
- socket id
-
closeUDPSocket
public static int closeUDPSocket(int sockfd) Method that closes a UDP socket- Parameters:
sockfd
- socket id- Returns:
- return code from close()
-
processIncomingAudio
Method that receives UDP/RTP packets, decodes Opus, places decoded packet on audio buffer FIFO, and manages packet receive algorithm- Parameters:
sockfd
- socket idmax_length
- maximum size UDP packet to receive (bytes)
-
setRunning
public static void setRunning(boolean running) Method that reflects 'running' state variable to CodecUtils methods- Parameters:
running
- running state variable (false = 0, true = 1) to reflect to CodecUtils methods
-
setSha1Encryption
public static void setSha1Encryption(boolean sha1Encryption) Method that reflects 'sha1Encryption' state variable to CodecUtils methods- Parameters:
sha1Encryption
- sha1 encryption state variable (false = 0, true = 1) to reflect to CodecUtils methods
-
validateUIUpdate
public static int validateUIUpdate()Method that reflects 'SumValid' state variable to CodecUtils methods -
getDelayTime
public static int getDelayTime()Method that reflects 'delayTime' state variable to CodecUtils methods
-