java.lang.Object
com.exxothermic.audioeverywheresdk.business.utils.CodecUtils

public class CodecUtils extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    closeUDPSocket(int sockfd)
    Method that closes a UDP socket
    static int
    Method that reflects 'delayTime' state variable to CodecUtils methods
    static int
    openUDPSocket(int port, int timeout)
    Method that opens a UDP socket
    static 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 algorithm
    static boolean
    Method that reset the decoder used internally
    static void
    setRunning(boolean running)
    Method that reflects 'running' state variable to CodecUtils methods
    static void
    setSha1Encryption(boolean sha1Encryption)
    Method that reflects 'sha1Encryption' state variable to CodecUtils methods
    static int
    Method that reflects 'SumValid' state variable to CodecUtils methods

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 number
      timeout - 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

      public static 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 algorithm
      Parameters:
      sockfd - socket id
      max_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