注册

android pad 集成,视频通话图像上下颠倒。

在集成环信到pad app上时,进行视频通话前置摄像头获取到的图像是上下颠倒的。QQ视频通话也有同样的问题。求助怎么解决?
已邀请:
在CameraHelper这个类中

 public void onPreviewFrame(byte[] data, Camera camera) {
        if (start_flag == true) {
            // 根据屏幕方向写入及传输数据
            if (isScreenOriatationPortrait()) {
                if (cameraInfo.orientation == 90 || cameraInfo.orientation == 0 || cameraInfo.orientation == 180){
                    YUV420spRotate90(yuv_Rotate90, yuv_frame, mwidth, mheight);
                    YUV42left2right(yuv_frame,yuv_Rotate90,mheight,mwidth);
                }else if (cameraInfo.orientation == 270){
                    YUV420spRotate270(yuv_Rotate90,yuv_frame,  mwidth,mheight);
                    YUV42left2right(yuv_frame,yuv_Rotate90,mheight,mwidth);
                }
                callHelper.processPreviewData(mheight, mwidth, yuv_frame);
            } else {
                if (cameraInfo.orientation == 90 || cameraInfo.orientation == 0 || cameraInfo.orientation == 180) {
                    YUV420spRotate180(yuv_Rotate90, yuv_frame, mwidth, mheight);
                    YUV42left2right(yuv_frame, yuv_Rotate90, mwidth, mheight);
                    callHelper.processPreviewData(mheight, mwidth, yuv_frame);
                } else {
                    YUV42left2right(yuv_Rotate90, yuv_frame, mwidth, mheight);
                    callHelper.processPreviewData(mheight, mwidth, yuv_Rotate90);
                }

            }
        }
        camera.addCallbackBuffer(yuv_frame);
    } 调YUV420spRotate90、YUV420spRotate180或YUV420spRotate270看看

要回复问题请先登录注册