Browse Source

更新到2.2.8

更新到2.2.8
main
蒋东国 7 years ago
committed by GitHub
parent
commit
b1cefd829c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      README.md

9
README.md

@ -21,7 +21,7 @@ allprojects {
Step 2. Add the dependency
```java
dependencies {
implementation 'com.github.jiangdongguo:AndroidUSBCamera:2.1.0'
implementation 'com.github.jiangdongguo:AndroidUSBCamera:2.2.8'
}
```
### 2. APIs Introduction
@ -33,7 +33,7 @@ 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(version 2.1.0 do not support)
// if using mpeg can not record mp4,please try yuv
// mCameraHelper.setDefaultFrameFormat(UVCCameraHelper.FRAME_FORMAT_YUYV);
mCameraHelper.initUSBMonitor(this, mUVCCameraView, mDevConnectListener);
```
@ -113,7 +113,7 @@ RecordParams params = new RecordParams();
params.setRecordPath(videoPath);
params.setRecordDuration(0); // 0,do not cut save
params.setVoiceClose(mSwitchVoice.isChecked()); // is close voice
mCameraHelper.startRecording(params, new AbstractUVCCameraHandler.OnEncodeResultListener() {
mCameraHelper.startPusher(params, new AbstractUVCCameraHandler.OnEncodeResultListener() {
@Override
public void onEncodeResult(byte[] data, int offset, int length, long timestamp, int type) {
// type = 1,h264 video stream
@ -131,6 +131,9 @@ RecordParams params = new RecordParams();
Log.i(TAG,"videoPath = "+videoPath);
}
});
// of course,if you only want to getting h.264 and aac stream
// you can do like this
mCameraHelper.startPusher(listener);
```
(4) setting camera's brightness and contrast.
```java

Loading…
Cancel
Save