|
|
|
@ -972,17 +972,19 @@ public class EasyPlayerClient implements Client.SourceCallBack {
|
|
|
|
|
System.arraycopy(in, 0, nv12Data, 0, in.length);
|
|
|
|
|
// nv12
|
|
|
|
|
i420callback.onI420Data(nv12Data);
|
|
|
|
|
// yuvuv_to_yuv
|
|
|
|
|
JNIUtil.yuvConvert(in, realWidth, realHeight, 4);
|
|
|
|
|
if (!mClient.isPaused()) {
|
|
|
|
|
// yuvuv_to_yuv
|
|
|
|
|
JNIUtil.yuvConvert(in, realWidth, realHeight, 4);
|
|
|
|
|
// // 旋转90或180或270度
|
|
|
|
|
// yuvRotate(in, 0, realWidth, realHeight, 90);
|
|
|
|
|
if (displayTmp == null) {
|
|
|
|
|
displayTmp = ByteBuffer.allocateDirect(realWidth * realHeight * 3 / 2);
|
|
|
|
|
if (displayTmp == null) {
|
|
|
|
|
displayTmp = ByteBuffer.allocateDirect(realWidth * realHeight * 3 / 2);
|
|
|
|
|
}
|
|
|
|
|
displayTmp.clear();
|
|
|
|
|
displayTmp.put(in);
|
|
|
|
|
// 旋转90或270度,则宽高需要互换
|
|
|
|
|
displayer.decoder_decodeBuffer(displayTmp, realWidth, realHeight);
|
|
|
|
|
}
|
|
|
|
|
displayTmp.clear();
|
|
|
|
|
displayTmp.put(in);
|
|
|
|
|
// 旋转90或270度,则宽高需要互换
|
|
|
|
|
displayer.decoder_decodeBuffer(displayTmp, realWidth, realHeight);
|
|
|
|
|
} else {
|
|
|
|
|
mIndex = 0;
|
|
|
|
|
}
|
|
|
|
|