你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
搜索问题、话题或人...
输入关键字进行搜索
搜索:
问题
精选文章
开源项目
视频教程
活动
· · ·
帮助
登录
注册
环信_Android
android pad 集成,视频通话图像上下颠倒。
在集成环信到pad app上时,进行视频通话前置摄像头获取到的图像是上下颠倒的。QQ视频通话也有同样的问题。求助怎么解决?
没有找到相关结果
已邀请:
与内容相关的链接
提交
1 个回复
[已注销]
在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看看
要回复问题请先
登录
或
注册
发起人
mrnew
问题状态
最新活动:
2016-03-28 18:48
浏览:
5532
关注:
2
人
1 个回复
[已注销]
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看看