From b1cefd829c3484589700a5c65371ad70ea15bb5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E4=B8=9C=E5=9B=BD?= <765067602@qq.com> Date: Fri, 8 Jun 2018 15:02:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B02.2.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新到2.2.8 --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f02fb4..f87f32c 100644 --- a/README.md +++ b/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