uestccokey / EZFilter

A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)
MIT License
207 stars 56 forks source link

Record bitmap from sequence image of camera TextureView #67

Open HeroSony opened 3 years ago

HeroSony commented 3 years ago

Hello, thank for amazing package.

private void changeBitmap() {
        if (mCurrentBitmap == mBitmap1) {
            mCurrentBitmap = mBitmap2;
        } else {
            mCurrentBitmap = mBitmap1;
        }

        mRenderPipeline = EZFilter.input(mCurrentBitmap)
                .addFilter(new LookupRender(RecordBitmapActivity.this, R.drawable.langman))
                .addFilter(new WobbleRender())
                .enableRecord("/sdcard/recordBitmap.mp4", true, false)
                .into(mRenderView);

        for (GLRender render : mRenderPipeline.getEndPointRenders()) {
            if (render instanceof ISupportRecord) {
                mSupportRecord = (ISupportRecord) render;
            }
        }
    }

The example above, mCurrentBitmap is getted from fix image. Currently, I have Camera TextureView and do a segmentation frame from Camera TextureView into sequence bitmaps.

So how to pip every bitmap frames into mRenderPipeline = EZFilter.input(mCurrentBitmap) and record it?