Android的前置摄像头录制视频播放,但倒挂...! [英] Android Front Camera recording video but plays upside down...!

查看:702
本文介绍了Android的前置摄像头录制视频播放,但倒挂...!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法创建一个Android应用程序来记录视频,但问题是有前置摄像头视频的方向。输出不是按要求。它就会自动旋转。

I have managed to create an android application to record videos but the problem is with the orientation of front camera video . The output is not the as per requirements . It gets automatically rotated .

应用方向为横向。所以,我需要在横向模式下使用凸轮前录制。

Application orientation is landscape . So, I need to record using front cam in landscape mode.

没有什么工作了。

推荐答案

您可能想怎么看待AOSP <一个href=\"http://omapzoom.org/?p=platform/packages/apps/Camera.git;a=blob;f=src/com/android/camera/VideoCamera.java;hb=HEAD#l1149\"相对=nofollow>摄影机活动正在实施这样的:

You might want to look at how the AOSP VideoCamera activity is implementing this:

    if (info.facing == CameraInfo.CAMERA_FACING_FRONT) {
        rotation = (info.orientation - mOrientation + 360) % 360;
    } else {  // back-facing camera
        rotation = (info.orientation + mOrientation) % 360;
    }

我的答案在这里的另一个问题。

这篇关于Android的前置摄像头录制视频播放,但倒挂...!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆