VHVideoCaptureView 视频采集器

类名

VHVideoCaptureView

方法

1、 获取实例的方式

/**
 * 获取View的布局方式,需要现在XML中定义
 */
videoCapture = (VHVideoCaptureView) this.findViewById(R.id.videoCaptureView);

/**
 * XML中定义,代码展示
 */
<com.vhall.lss.push.VHVideoCaptureView
	android:id="@+id/videoCaptureView"
	android:layout_width="match_parent"
	android:layout_height="match_parent">
</com.vhall.lss.push.VHVideoCaptureView>

2、 切换前后摄像头

/**
 * 切换摄像头
 * @return int 返回cameraID
 */
 public int switchCamera() {}

3、 切换闪光灯

/**
 * 切换摄像头
 * @Param isOpen 是否打开闪光灯
 * @return boolean 返回成功或者失败
 */
public boolean changeFlash(boolean open) {}

4、 设置摄像头预览模式

/**
 * VHLivePushFormat.DRAW_MODE_NONE 默认
 * VHLivePushFormat.DRAW_MODE_ASPECTFIT 将图像等比例缩放,适配最长边
 * VHLivePushFormat.DRAW_MODE_ASPECTFILL 将图像等比例铺满整个屏幕
 */
public void setCameraDrawMode(int mode)