Browse Source

support yuv and mpeg

support yuv and mpeg
main 2.1.1
蒋东国 7 years ago
committed by GitHub
parent
commit
fb43197f4e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      README.md

7
README.md

@ -21,7 +21,7 @@ allprojects {
Step 2. Add the dependency
```java
dependencies {
compile 'com.github.jiangdongguo:AndroidUSBCamera:2.1.0'
compile 'com.github.jiangdongguo:AndroidUSBCamera:2.1.1'
}
```
### 2. APIs Introduction
@ -30,6 +30,11 @@ dependencies {
mUVCCameraView = (CameraViewInterface) mTextureView;
mUVCCameraView.setCallback(mCallback);
mCameraHelper = UVCCameraHelper.getInstance();
// set default preview size
mCameraHelper.setDefaultPreviewSize(1280,720);
// set default frame format,defalut is UVCCameraHelper.Frame_FORMAT_MPEG
// if using mpeg can not record mp4,please try yuv
mCameraHelper.setDefaultFrameFormat(UVCCameraHelper.FRAME_FORMAT_YUYV);
mCameraHelper.initUSBMonitor(this, mUVCCameraView, mDevConnectListener);
```
To be attention,mCallback is a object of interface CameraViewInterface.Callback,and it's used to be listenering surfaceView

Loading…
Cancel
Save