Android音视频编码.

MediaCodec

inputBuffer (用于解码)

outputBuffer(用于获取编码后的数据)

录屏暂停

VideoEncoderCore

WSLiveDemo

编码相关

Libyuv

https://github.com/RyanRQ/ScreenRecoder

https://github.com/HelloHuDi/ScreenCapture

https://www.twblogs.net/a/5b8dd29b2b7177188340d7da?lang=zh-cn

https://github.com/chienpm304/Zecorder

https://zhuanlan.zhihu.com/p/268441151

https://github.com/TakuSemba/RtmpPublisher

https://www.coder.work/article/3500335

https://cloud.tencent.com/developer/article/1580199


var encoder = MediaCodec.createEncoderByType("video/aac")
while(true){
var index = encoder.dequeueOutputBuffer(info,10000);
if(index == "INFO_TRY_AGAIN_LATER"){
//TODO
}else if(index == "INFO_OUTPUT_FORMAT_CHANGED"){
//TODO
}else if(index =="INFO_OUTPUT_BUFFERS_CHANGED"){
//TODO
}
}

yuv -> h.264