Camera App write with API 2
-
Can open two camera at the same time (if you phone support)
-
Can get yuv format picture(if support, can be seen in Settings), if is yuv file, no thumbnail will generated, file save path: "/sdcard/DCIM/Camera2/"
Camera App write with api 2
请问一下,如何把横向拍摄或者前置拍摄的图片设置成正方向,问下相关代码
大佬,我如果想全屏预览怎么能让预览图形不变形呢,初学者望回复
IllegalArgumentException while invoking public abstract void android.hardware.camera2.CameraCaptureSession$StateCallback.onConfigured(android.hardware.camera2.CameraCaptureSession)
java.lang.IllegalArgumentException: CaptureRequest contains unconfigured Input/Output Surface!
at android.hardware.camera2.CaptureRequest.convertSurfaceToStreamId(CaptureRequest.java:582)
at android.hardware.camera2.impl.CameraDeviceImpl.submitCaptureRequest(CameraDeviceImpl.java:938)
at android.hardware.camera2.impl.CameraDeviceImpl.setRepeatingRequest(CameraDeviceImpl.java:984)
at android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:238)
at com.zoneyet.gaga.me.transmachine.photorecognition.camera2.manager.Session.sendRepeatingRequest(Session.java:111)
at com.zoneyet.gaga.me.transmachine.photorecognition.camera2.manager.CameraSession.sendPreviewRequest(CameraSession.java:184)
at com.zoneyet.gaga.me.transmachine.photorecognition.camera2.manager.CameraSession.access$300(CameraSession.java:30)
at com.zoneyet.gaga.me.transmachine.photorecognition.camera2.manager.CameraSession$2.onConfigured(CameraSession.java:306)
at java.lang.reflect.Method.invoke(Native Method)
at android.hardware.camera2.dispatch.InvokeDispatcher.dispatch(InvokeDispatcher.java:39)
at android.hardware.camera2.dispatch.HandlerDispatcher$1.run(HandlerDispatcher.java:65)
我想问你一些Camera2的问题
VideoModule下写入摄像头id,记录的键值不对,和拍照混了。
private void switchCamera() {
int currentId = Integer.parseInt(mDeviceMgr.getCameraId());
int cameraCount = mDeviceMgr.getCameraIdList().length;
currentId++;
if (cameraCount < 2) {
// only one camera, just return
return;
} else if (currentId >= cameraCount) {
currentId = 0;
}
String switchId = String.valueOf(currentId);
mDeviceMgr.setCameraId(switchId);
// 这里应该是CameraSettings.KEY_VIDEO_ID
boolean ret = getSettings().setGlobalPref(CameraSettings.KEY_CAMERA_ID, switchId);
if (ret) {
stopModule();
startModule();
} else {
Log.e(TAG, "set camera id pref fail");
}
}
Activity manifest screenOrientation设置成landscape,预览不正常
您好,请问如果要实现预闪+主闪的功能要怎么做呢?十分感谢!
send capture request error:CAMERA_ERROR (3): submitRequestList:283: Camera 0: Got error Invalid argument (-22) after trying to submit capture request
需要在客户端做,不用FFmeg,太重了,还用mediaRecorder来做有什么办法吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.