Search in sources :

Example 1 with LanSongBlurFilter

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);
        }
    });
}
Also used : DrawPad(com.lansosdk.box.DrawPad) DrawPadCameraView(com.lansosdk.videoeditor.DrawPadCameraView) DrawPadCameraView.doFousEventListener(com.lansosdk.videoeditor.DrawPadCameraView.doFousEventListener) DrawPadCameraView.onViewAvailable(com.lansosdk.videoeditor.DrawPadCameraView.onViewAvailable) LanSongBlurFilter(jp.co.cyberagent.lansongsdk.gpuimage.LanSongBlurFilter) com.lansosdk.box.onDrawPadErrorListener(com.lansosdk.box.onDrawPadErrorListener)

Aggregations

DrawPad (com.lansosdk.box.DrawPad)1 com.lansosdk.box.onDrawPadErrorListener (com.lansosdk.box.onDrawPadErrorListener)1 DrawPadCameraView (com.lansosdk.videoeditor.DrawPadCameraView)1 DrawPadCameraView.doFousEventListener (com.lansosdk.videoeditor.DrawPadCameraView.doFousEventListener)1 DrawPadCameraView.onViewAvailable (com.lansosdk.videoeditor.DrawPadCameraView.onViewAvailable)1 LanSongBlurFilter (jp.co.cyberagent.lansongsdk.gpuimage.LanSongBlurFilter)1