The WebRTC Audio Coding Module
WebRTC音频编码模块
WebRTC audio coding module can handle both audio sending and receiving. Folder acm2 contains implementations of the APIs.
WebRTC音频编码模块可以处理音频发送和接收。文件夹acm2包含API的实现。
-
Audio Sending Audio frames, each of which should always contain 10 ms worth of data, are provided to the audio coding module through Add10MsData(). The audio coding module uses a provided audio encoder to encoded audio frames and deliver the data to a pre-registered audio packetization callback, which is supposed to wrap the encoded audio into RTP packets and send them over a transport. Built-in audio codecs are included the codecs folder. The audio network adaptor provides an add-on functionality to an audio encoder (currently limited to Opus) to make the audio encoder adaptive to network conditions (bandwidth, packet loss rate, etc).
-
音频发送音频帧,每个帧应始终包含10毫秒的数据,通过Add10MsData()提供给音频编码模块。音频编码模块使用所提供的音频编码器对音频帧进行编码,并将数据传递到预先注册的音频分组回调,该回调应该将编码的音频打包成RTP分组并通过传输发送。内置音频编解码器包含在编解码器文件夹中。音频网络适配器为音频编码器(目前仅限于Opus)提供附加功能,以使音频编码器适应网络条件(带宽、丢包率等)。
-
Audio Receiving Audio packets are provided to the audio coding module through IncomingPacket(), and are processed by an audio jitter buffer (NetEq), which includes decoding of the packets. Audio decoders are provided by an audio decoder factory. Decoded audio samples should be queried by calling PlayoutData10Ms().
-
音频接收音频分组通过IncomingPacket()提供给音频编码模块,并由音频抖动缓冲器(NetEq)处理,其中包括对分组的解码。音频解码器由音频解码器工厂提供。应通过调用PlayoutData10Ms()来查询解码的音频样本。