pili-engineering / PLDroidMediaStreaming

PLDroidMediaStreaming 是七牛推出的一款适用于 Android 平台的推流 SDK,支持 RTMP 推流,h.264 和 AAC 编码,硬编、软编支持。具有丰富的数据和状态回调,方便用户根据自己的业务定制化开发。具有直播场景下的重要功能,如:美颜、背景音乐、水印等功能。PLDroidMediaStreaming 是现在目前重点维护的版本,自带采集模块也支持用户自己做采集端。
https://github.com/pili-engineering/PLDroidMediaStreaming/wiki
Apache License 2.0
1.45k stars 460 forks source link

Echo cancellation in Pili #155

Open gouravd opened 8 years ago

gouravd commented 8 years ago

I was testing PLDroidCameraStreaming for 1-1 video chat. User1 live streams and subscribes to User2's live stream and Vice versa.

Everything works fine except there is echo. Can you please implement echo cancellation?

jpxiong commented 8 years ago

v2.0.0 had been callback the PCM data to caller. You can do it on v2.0.0 if you want.

public interface AudioSourceCallback {
    void onAudioSourceAvailable(ByteBuffer srcBuffer, int size, boolean isEof);
}
gouravd commented 8 years ago

Thanks, since this is new, could you please share any kind of documentation or sample code so that I understand what I need to do.

gouravd commented 8 years ago

I am unable to figure out how to achieve this in the new V2. can you please give hints

jpxiong commented 8 years ago

AudioSourceCallback#onAudioSourceAvailable is the callback of the PCM from the microphone. If you want to do the Echo Cancellation, you should import the Echo Cancellation algorithm for the PCM.