The anychat platform core SDK supports loading external audio and video encoding and decoding modules (hereinafter referred to as the anychat codec Library) to enhance the scalability of the system and meet special requirements of some specific application environments, for example, when integrated with a specific hardware platform (Android and pad), you can call the hardware codecs to implement more efficient instant messaging applications.
The anychat platform core SDK kernel has implemented some common audio and video encoding and decoding modules, such as H. 264 video encoding and decoding algorithms, including arm-WB, AAC, speex, and Celt audio encoding and decoding algorithms. Upper-layer applications can customize new audio/video encoding and decoding algorithms. When the anychat platform is initialized, new encoding and decoding modules can be loaded through related API interfaces, at the same time, upper-layer applications can re-implement the SDK's built-in encoding and decoding algorithms. When the anychat platform is initialized, it is found that the loaded audio and video encoding and decoding algorithms are the same as the built-in algorithms, the algorithms provided by upper-layer applications are used to replace kernel algorithms.
A single audio/video encoding and decoding module (anychat codec Library) can contain at most one Audio Encoder, one audio decoder, one video encoder, and one video decoder. When Upper-layer applications need to implement multiple encoders or multiple decoders, they can be implemented in multiple libraries and then registered to the anychat kernel respectively.
The anychat platform core SDK uses the predefined codec number (codecid) To differentiate different codec. When the CODEC to be implemented is not in the defined codec list, you can customize a new codec number. When the anychat kernel receives data using the new codec encoding, It queries the registered new Decoder Based on the codec number and calls the new codec for decoding.
When the codec number implemented by the upper-layer application is the same as the preset codec of the anychat kernel and the input (or output) is a standard code stream, it can work with the built-in codec of anychat (for example, using the anychat codec library for encoding and decoding using the built-in library of anychat ).
When the codec number implemented by the upper-layer application does not exist in the built-in codec list of anychat, you must register a new codec at the encoding and decoding ends. Otherwise, decoding may fail.
Click to download the full version of anychat external decoder programming guide.