use of jp.co.cyberagent.lansongsdk.gpuimage.LanSongBlurFilter in project LanSoEditor_advance by LanSoSdk.
the class CameraSubLayerDemo2Activity method initDrawPad.
/**
* Step1: 开始运行 DrawPad 容器
*/
private void initDrawPad() {
int padWidth = 544;
int padHeight = 960;
/**
* 设置录制时的一些参数.
*/
mDrawPadCamera.setRealEncodeEnable(padWidth, padHeight, 3000 * 1024, (int) 25, dstPath);
/**
* 录制的同时,录制外面的声音.
*/
mDrawPadCamera.setRecordMic(true);
/**
* 设置录制处理进度监听.
*/
mDrawPadCamera.setOnDrawPadProgressListener(drawPadProgressListener);
/**
* 相机前后置.是否设置滤镜.
*/
mDrawPadCamera.setCameraParam(false, new LanSongBlurFilter(), true);
/**
* 当手动聚焦的时候, 返回聚焦点的位置,让focusView去显示一个聚焦的动画.
*/
mDrawPadCamera.setCameraFocusListener(new doFousEventListener() {
@Override
public void onFocus(int x, int y) {
// TODO Auto-generated method stub
focusView.startFocus(x, y);
}
});
/**
* UI界面有效后, 开始开启DrawPad线程, 来预览画面.
*/
mDrawPadCamera.setOnViewAvailable(new onViewAvailable() {
@Override
public void viewAvailable(DrawPadCameraView v) {
// TODO Auto-generated method stub
startDrawPad();
}
});
mDrawPadCamera.setOnDrawPadErrorListener(new onDrawPadErrorListener() {
@Override
public void onError(DrawPad d, int what) {
// TODO Auto-generated method stub
Log.e(TAG, "DrawPad容器线程运行出错!!!" + what);
}
});
}
Aggregations