Kaynağa Gözat

屏蔽3.4.5相关功能,版本提升为3.4.4

zengjiebin 7 yıl önce
ebeveyn
işleme
3aa842c289

+ 1 - 1
app/build.gradle

@@ -429,7 +429,7 @@ dependencies {
         exclude group: 'com.squareup.okhttp3', module: 'okhttp'
     }
     //All arch: armeabi, armeabi-v7a, arm64-v8a, mips, x86
-    implementation 'org.wysaid:gpuimage-plus:2.5.1'
+//    implementation 'org.wysaid:gpuimage-plus:2.5.1'
     //Pure graphics lib without ffmpeg. (all arch for branch 'min')
 //    implementation 'org.wysaid:gpuimage-plus:2.5.1-min'
 //    implementation project(':library')

+ 5 - 5
app/src/main/AndroidManifest.xml

@@ -453,11 +453,11 @@
             android:configChanges="orientation|keyboardHidden|navigation|screenSize"
             android:screenOrientation="portrait"
             android:theme="@style/AppTheme.noTitleBar" />
-        <activity
-            android:name="com.sheep.gamegroup.module.find.activity.ActEditVideo"
-            android:configChanges="orientation|keyboardHidden|navigation|screenSize"
-            android:screenOrientation="user"
-            android:theme="@style/AppTheme.noTitleBar" />
+        <!--<activity-->
+            <!--android:name="com.sheep.gamegroup.module.find.activity.ActEditVideo"-->
+            <!--android:configChanges="orientation|keyboardHidden|navigation|screenSize"-->
+            <!--android:screenOrientation="user"-->
+            <!--android:theme="@style/AppTheme.noTitleBar" />-->
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActInputAndPickerImg"
             android:theme="@style/AppTheme.translucent" />

+ 15 - 15
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoMaster.java

@@ -21,26 +21,26 @@ public class DaoMaster extends AbstractDaoMaster {
 
     /** Creates underlying database table using DAOs. */
     public static void createAllTables(Database db, boolean ifNotExists) {
-        ProcessRecordDao.createTable(db, ifNotExists);
-        AppdownloadBeanDao.createTable(db, ifNotExists);
-        SdkLoginUserDao.createTable(db, ifNotExists);
-        ScreenShotRecordDao.createTable(db, ifNotExists);
         AcceptTaskRecordDao.createTable(db, ifNotExists);
         AccountDao.createTable(db, ifNotExists);
-        SearchRecordDao.createTable(db, ifNotExists);
+        AppdownloadBeanDao.createTable(db, ifNotExists);
         DownLoadInfoDao.createTable(db, ifNotExists);
+        ProcessRecordDao.createTable(db, ifNotExists);
+        ScreenShotRecordDao.createTable(db, ifNotExists);
+        SdkLoginUserDao.createTable(db, ifNotExists);
+        SearchRecordDao.createTable(db, ifNotExists);
     }
 
     /** Drops underlying database table using DAOs. */
     public static void dropAllTables(Database db, boolean ifExists) {
-        ProcessRecordDao.dropTable(db, ifExists);
-        AppdownloadBeanDao.dropTable(db, ifExists);
-        SdkLoginUserDao.dropTable(db, ifExists);
-        ScreenShotRecordDao.dropTable(db, ifExists);
         AcceptTaskRecordDao.dropTable(db, ifExists);
         AccountDao.dropTable(db, ifExists);
-        SearchRecordDao.dropTable(db, ifExists);
+        AppdownloadBeanDao.dropTable(db, ifExists);
         DownLoadInfoDao.dropTable(db, ifExists);
+        ProcessRecordDao.dropTable(db, ifExists);
+        ScreenShotRecordDao.dropTable(db, ifExists);
+        SdkLoginUserDao.dropTable(db, ifExists);
+        SearchRecordDao.dropTable(db, ifExists);
     }
 
     /**
@@ -59,14 +59,14 @@ public class DaoMaster extends AbstractDaoMaster {
 
     public DaoMaster(Database db) {
         super(db, SCHEMA_VERSION);
-        registerDaoClass(ProcessRecordDao.class);
-        registerDaoClass(AppdownloadBeanDao.class);
-        registerDaoClass(SdkLoginUserDao.class);
-        registerDaoClass(ScreenShotRecordDao.class);
         registerDaoClass(AcceptTaskRecordDao.class);
         registerDaoClass(AccountDao.class);
-        registerDaoClass(SearchRecordDao.class);
+        registerDaoClass(AppdownloadBeanDao.class);
         registerDaoClass(DownLoadInfoDao.class);
+        registerDaoClass(ProcessRecordDao.class);
+        registerDaoClass(ScreenShotRecordDao.class);
+        registerDaoClass(SdkLoginUserDao.class);
+        registerDaoClass(SearchRecordDao.class);
     }
 
     public DaoSession newSession() {

+ 52 - 70
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoSession.java

@@ -1,30 +1,12 @@
 package com.sheep.gamegroup.greendao.download;
 
-import java.util.Map;
-
 import org.greenrobot.greendao.AbstractDao;
 import org.greenrobot.greendao.AbstractDaoSession;
 import org.greenrobot.greendao.database.Database;
 import org.greenrobot.greendao.identityscope.IdentityScopeType;
 import org.greenrobot.greendao.internal.DaoConfig;
 
-import com.sheep.gamegroup.greendao.download.ProcessRecord;
-import com.sheep.gamegroup.greendao.download.AppdownloadBean;
-import com.sheep.gamegroup.greendao.download.SdkLoginUser;
-import com.sheep.gamegroup.greendao.download.ScreenShotRecord;
-import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
-import com.sheep.gamegroup.greendao.download.Account;
-import com.sheep.gamegroup.greendao.download.SearchRecord;
-import com.sheep.gamegroup.greendao.download.DownLoadInfo;
-
-import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
-import com.sheep.gamegroup.greendao.download.AppdownloadBeanDao;
-import com.sheep.gamegroup.greendao.download.SdkLoginUserDao;
-import com.sheep.gamegroup.greendao.download.ScreenShotRecordDao;
-import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
-import com.sheep.gamegroup.greendao.download.AccountDao;
-import com.sheep.gamegroup.greendao.download.SearchRecordDao;
-import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
+import java.util.Map;
 
 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
 
@@ -35,112 +17,112 @@ import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
  */
 public class DaoSession extends AbstractDaoSession {
 
-    private final DaoConfig processRecordDaoConfig;
-    private final DaoConfig appdownloadBeanDaoConfig;
-    private final DaoConfig sdkLoginUserDaoConfig;
-    private final DaoConfig screenShotRecordDaoConfig;
     private final DaoConfig acceptTaskRecordDaoConfig;
     private final DaoConfig accountDaoConfig;
-    private final DaoConfig searchRecordDaoConfig;
+    private final DaoConfig appdownloadBeanDaoConfig;
     private final DaoConfig downLoadInfoDaoConfig;
+    private final DaoConfig processRecordDaoConfig;
+    private final DaoConfig screenShotRecordDaoConfig;
+    private final DaoConfig sdkLoginUserDaoConfig;
+    private final DaoConfig searchRecordDaoConfig;
 
-    private final ProcessRecordDao processRecordDao;
-    private final AppdownloadBeanDao appdownloadBeanDao;
-    private final SdkLoginUserDao sdkLoginUserDao;
-    private final ScreenShotRecordDao screenShotRecordDao;
     private final AcceptTaskRecordDao acceptTaskRecordDao;
     private final AccountDao accountDao;
-    private final SearchRecordDao searchRecordDao;
+    private final AppdownloadBeanDao appdownloadBeanDao;
     private final DownLoadInfoDao downLoadInfoDao;
+    private final ProcessRecordDao processRecordDao;
+    private final ScreenShotRecordDao screenShotRecordDao;
+    private final SdkLoginUserDao sdkLoginUserDao;
+    private final SearchRecordDao searchRecordDao;
 
     public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
             daoConfigMap) {
         super(db);
 
-        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
-        processRecordDaoConfig.initIdentityScope(type);
+        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
+        acceptTaskRecordDaoConfig.initIdentityScope(type);
+
+        accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
+        accountDaoConfig.initIdentityScope(type);
 
         appdownloadBeanDaoConfig = daoConfigMap.get(AppdownloadBeanDao.class).clone();
         appdownloadBeanDaoConfig.initIdentityScope(type);
 
-        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
-        sdkLoginUserDaoConfig.initIdentityScope(type);
+        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
+        downLoadInfoDaoConfig.initIdentityScope(type);
+
+        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
+        processRecordDaoConfig.initIdentityScope(type);
 
         screenShotRecordDaoConfig = daoConfigMap.get(ScreenShotRecordDao.class).clone();
         screenShotRecordDaoConfig.initIdentityScope(type);
 
-        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
-        acceptTaskRecordDaoConfig.initIdentityScope(type);
-
-        accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
-        accountDaoConfig.initIdentityScope(type);
+        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
+        sdkLoginUserDaoConfig.initIdentityScope(type);
 
         searchRecordDaoConfig = daoConfigMap.get(SearchRecordDao.class).clone();
         searchRecordDaoConfig.initIdentityScope(type);
 
-        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
-        downLoadInfoDaoConfig.initIdentityScope(type);
-
-        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
-        appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
-        sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
-        screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);
         acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
         accountDao = new AccountDao(accountDaoConfig, this);
-        searchRecordDao = new SearchRecordDao(searchRecordDaoConfig, this);
+        appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
         downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
+        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
+        screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);
+        sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
+        searchRecordDao = new SearchRecordDao(searchRecordDaoConfig, this);
 
-        registerDao(ProcessRecord.class, processRecordDao);
-        registerDao(AppdownloadBean.class, appdownloadBeanDao);
-        registerDao(SdkLoginUser.class, sdkLoginUserDao);
-        registerDao(ScreenShotRecord.class, screenShotRecordDao);
         registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
         registerDao(Account.class, accountDao);
-        registerDao(SearchRecord.class, searchRecordDao);
+        registerDao(AppdownloadBean.class, appdownloadBeanDao);
         registerDao(DownLoadInfo.class, downLoadInfoDao);
+        registerDao(ProcessRecord.class, processRecordDao);
+        registerDao(ScreenShotRecord.class, screenShotRecordDao);
+        registerDao(SdkLoginUser.class, sdkLoginUserDao);
+        registerDao(SearchRecord.class, searchRecordDao);
     }
     
     public void clear() {
-        processRecordDaoConfig.clearIdentityScope();
-        appdownloadBeanDaoConfig.clearIdentityScope();
-        sdkLoginUserDaoConfig.clearIdentityScope();
-        screenShotRecordDaoConfig.clearIdentityScope();
         acceptTaskRecordDaoConfig.clearIdentityScope();
         accountDaoConfig.clearIdentityScope();
-        searchRecordDaoConfig.clearIdentityScope();
+        appdownloadBeanDaoConfig.clearIdentityScope();
         downLoadInfoDaoConfig.clearIdentityScope();
+        processRecordDaoConfig.clearIdentityScope();
+        screenShotRecordDaoConfig.clearIdentityScope();
+        sdkLoginUserDaoConfig.clearIdentityScope();
+        searchRecordDaoConfig.clearIdentityScope();
     }
 
-    public ProcessRecordDao getProcessRecordDao() {
-        return processRecordDao;
+    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
+        return acceptTaskRecordDao;
+    }
+
+    public AccountDao getAccountDao() {
+        return accountDao;
     }
 
     public AppdownloadBeanDao getAppdownloadBeanDao() {
         return appdownloadBeanDao;
     }
 
-    public SdkLoginUserDao getSdkLoginUserDao() {
-        return sdkLoginUserDao;
+    public DownLoadInfoDao getDownLoadInfoDao() {
+        return downLoadInfoDao;
     }
 
-    public ScreenShotRecordDao getScreenShotRecordDao() {
-        return screenShotRecordDao;
+    public ProcessRecordDao getProcessRecordDao() {
+        return processRecordDao;
     }
 
-    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
-        return acceptTaskRecordDao;
+    public ScreenShotRecordDao getScreenShotRecordDao() {
+        return screenShotRecordDao;
     }
 
-    public AccountDao getAccountDao() {
-        return accountDao;
+    public SdkLoginUserDao getSdkLoginUserDao() {
+        return sdkLoginUserDao;
     }
 
     public SearchRecordDao getSearchRecordDao() {
         return searchRecordDao;
     }
 
-    public DownLoadInfoDao getDownLoadInfoDao() {
-        return downLoadInfoDao;
-    }
-
 }

+ 489 - 489
app/src/main/java/com/sheep/gamegroup/module/find/activity/ActEditVideo.java

@@ -1,489 +1,489 @@
-package com.sheep.gamegroup.module.find.activity;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.AppCompatButton;
-import android.util.Log;
-import android.view.View;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.SeekBar;
-
-import com.kfzs.duanduan.utils.StatusBarUtils;
-import com.sheep.gamegroup.absBase.AbsObserver;
-import com.sheep.gamegroup.absBase.BaseContainerActivity;
-import com.sheep.gamegroup.module.find.util.Filterble;
-import com.sheep.gamegroup.module.find.util.IFilter;
-import com.sheep.gamegroup.module.find.bean.Size;
-import com.sheep.gamegroup.module.find.fragment.FgtChooseEditList;
-import com.sheep.gamegroup.model.entity.Video;
-import com.sheep.gamegroup.util.BitmapUtil;
-import com.sheep.gamegroup.util.DataUtil;
-import com.sheep.gamegroup.util.LogUtil;
-import com.sheep.gamegroup.util.TestUtil;
-import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.util.viewHelper.CacheImageUtil;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
-
-import org.greenrobot.eventbus.EventBus;
-import org.wysaid.common.Common;
-import org.wysaid.myUtils.ImageUtil;
-import org.wysaid.nativePort.CGEFFmpegNativeLibrary;
-import org.wysaid.nativePort.CGEFrameRenderer;
-import org.wysaid.nativePort.CGENativeLibrary;
-import org.wysaid.view.VideoPlayerGLSurfaceView;
-
-import java.io.File;
-import java.util.Locale;
-
-import butterknife.BindView;
-import io.reactivex.Observable;
-import io.reactivex.ObservableEmitter;
-import io.reactivex.ObservableOnSubscribe;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.schedulers.Schedulers;
-import rx.functions.Action1;
-
-/**
- * Created by realicing on 2018/11/9.
- * realicing@sina.com
- * 编辑视频
- */
-public class ActEditVideo extends BaseContainerActivity implements Filterble {
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        StatusBarUtils.setTranslucent(this);
-        super.onCreate(savedInstanceState);
-    }
-
-    @Override
-    protected int getLayoutId() {
-        return R.layout.act_edit_video;
-    }
-
-    @BindView(R.id.videoGLSurfaceView)
-    VideoPlayerGLSurfaceView mPlayerView;
-
-    private Video data;
-
-    private String mCurrentConfig;
-    private float mIntensity = 1.0f;
-
-    public static final int REQUEST_CODE_PICK_VIDEO = 1;
-
-    private VideoPlayerGLSurfaceView.PlayCompletionCallback playCompletionCallback = new VideoPlayerGLSurfaceView.PlayCompletionCallback() {
-        @Override
-        public void playComplete(MediaPlayer player) {
-            Log.i(Common.LOG_TAG, "The video playing is over, restart...");
-            player.start();
-        }
-
-        @Override
-        public boolean playFailed(MediaPlayer player, final int what, final int extra) {
-            if (TestUtil.isDev())
-                G.showToast(String.format(Locale.CHINA, "播放出错!错误码: %d, %d", what, extra));
-            else
-                G.showToast("播放出错,请稍候重试");
-            return true;
-        }
-    };
-
-    @Override
-    public void initView() {
-        if (this instanceof BaseContainerActivity) {
-            super.initView();
-        }
-        data = DataUtil.getObject(getIntent(), Video.class);
-        mPlayerView.setZOrderOnTop(false);
-        mPlayerView.setZOrderMediaOverlay(true);
-
-
-        mPlayerView.setPlayerInitializeCallback(new VideoPlayerGLSurfaceView.PlayerInitializeCallback() {
-            @Override
-            public void initPlayer(final MediaPlayer player) {
-                //针对网络视频进行进度检查
-                player.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() {
-                    @Override
-                    public void onBufferingUpdate(MediaPlayer mp, int percent) {
-                        Log.i(Common.LOG_TAG, "Buffer update: " + percent);
-                        if (percent == 100) {
-                            Log.i(Common.LOG_TAG, "缓冲完毕!");
-                            player.setOnBufferingUpdateListener(null);
-                        }
-                    }
-                });
-            }
-        });
-
-        mPlayerView.setVideoUri(Uri.parse(data.getFilePath()), new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
-            @Override
-            public void playPrepared(MediaPlayer player) {
-                Log.i(Common.LOG_TAG, "The video is prepared to play");
-                player.start();
-            }
-        }, playCompletionCallback);
-
-        LinearLayout menuLayout = findViewById(R.id.menuLinearLayout);
-        if (ViewUtil.isVisible(menuLayout)) {
-            loadTest(menuLayout);
-        }
-    }
-
-    //点击完成
-    public void onClickCommit(View view) {
-        showProgress(false);
-        CacheImageUtil.cacheAndLoadImg(ViewUtil.getNetImgByName("sheep_logo_3"), new Action1<File>() {
-            @Override
-            public void call(final File file) {
-                Observable.create(new ObservableOnSubscribe<String>() {
-                    @Override
-                    public void subscribe(ObservableEmitter<String> emitter) throws Exception {
-                        String srcFilPath = data.getFilePath();
-                        String outputFilename = String.format(Locale.CHINA, "%s_%d_%f.mp4", srcFilPath.substring(0, srcFilPath.lastIndexOf(".")), mCurrentConfig.hashCode(), mIntensity);
-                        Bitmap bmp = BitmapFactory.decodeFile(file.getAbsolutePath());
-                        //left 30px top 60px width 750
-                        Bitmap logo = BitmapUtil.createBigLogo(bmp, new Size().setWidth(G.WIDTH).setHeight(G.HEIGHT).setX(G.WIDTH * 30 / 750).setY(G.WIDTH * 60 / 750));
-                        bmp.recycle();
-                        CGEFFmpegNativeLibrary.generateVideoWithFilter(outputFilename, srcFilPath, mCurrentConfig, mIntensity, logo, CGENativeLibrary.TextureBlendMode.CGE_BLEND_ADDREV, 1.0f, false);
-
-                        LogUtil.println(ActEditVideo.class.getSimpleName(), "Done! The file is generated at: " + outputFilename);
-                        emitter.onNext(outputFilename);
-                    }
-                }).subscribeOn(Schedulers.io())
-                        .observeOn(AndroidSchedulers.mainThread())
-                        .subscribe(new AbsObserver<String>() {
-                            @Override
-                            public void onNext(String filePath) {
-                                sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + filePath)));
-                                data.setFilePath(filePath);
-                                EventBus.getDefault().post(data);
-                                ActEditVideo.this.finish();
-                            }
-
-                            @Override
-                            public void onError(Throwable e) {
-                                G.showToast(e.getMessage());
-                            }
-
-                            @Override
-                            public void onComplete() {
-                                hideProgress();
-                            }
-                        });
-            }
-        });
-    }
-
-    //设置滤镜
-    @Override
-    public void setFilter(IFilter filter) {
-        if (mPlayerView != null && filter != null && filter.getConfig() != null) {
-            mCurrentConfig = filter.getConfig();
-            mPlayerView.setFilterWithConfig(mCurrentConfig);
-        }
-    }
-
-    @Override
-    public void setFilterIntensity(float intensity) {
-        if (mPlayerView != null) {
-            mIntensity = intensity;
-            mPlayerView.setFilterIntensity(mIntensity);
-        }
-    }
-
-    //下面为测试代码
-
-    private void loadTest(LinearLayout menuLayout) {
-
-        mShapeBtn = findViewById(R.id.switchShapeBtn);
-
-        mShapeBtn.setOnClickListener(new View.OnClickListener() {
-
-            private boolean useMask = false;
-            Bitmap bmp;
-
-            @Override
-            public void onClick(View v) {
-                useMask = !useMask;
-                if (useMask) {
-                    if (bmp == null)
-                        bmp = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
-
-                    if (bmp != null) {
-                        mPlayerView.setMaskBitmap(bmp, false, new VideoPlayerGLSurfaceView.SetMaskBitmapCallback() {
-                            @Override
-                            public void setMaskOK(CGEFrameRenderer renderer) {
-//                                if(mPlayerView.isUsingMask()) {
-//                                    renderer.setMaskFlipScale(1.0f, -1.0f);
-//                                }
-                                Log.i(Common.LOG_TAG, "enable mask!");
-                            }
-                        });
-                    }
-                } else {
-                    mPlayerView.setMaskBitmap(null, false);
-                }
-
-            }
-        });
-
-        mTakeshotBtn = findViewById(R.id.takeShotBtn);
-
-        mTakeshotBtn.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                mPlayerView.takeShot(new VideoPlayerGLSurfaceView.TakeShotCallback() {
-                    @Override
-                    public void takeShotOK(Bitmap bmp) {
-                        if (bmp != null) {
-                            String s = ImageUtil.saveBitmap(bmp);
-                            ActEditVideo.this.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + s)));
-                        } else {
-                            Log.e(Common.LOG_TAG, "take shot failed!");
-                        }
-                    }
-                });
-            }
-        });
-
-
-        {
-            Button btn = new Button(this);
-            menuLayout.addView(btn);
-            btn.setAllCaps(false);
-            btn.setText("Last Recorded Video");
-            btn.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-
-                    Uri lastVideoUri = Uri.parse(data.getFilePath());
-                    mPlayerView.setVideoUri(lastVideoUri, new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
-                        @Override
-                        public void playPrepared(MediaPlayer player) {
-                            Log.i(Common.LOG_TAG, "The video is prepared to play");
-                            player.start();
-                        }
-                    }, playCompletionCallback);
-                }
-            });
-        }
-
-        String[] filePaths = {
-                data.getFilePath(),
-                "http://wge.wysaid.org/res/video/1.mp4",
-                "http://wysaid.org/p/test.mp4",
-        };
-
-        for (int i = 0; i != filePaths.length; ++i) {
-            MyVideoButton btn = new MyVideoButton(this);
-            btn.setText("Video" + i);
-            btn.videoUri = Uri.parse(filePaths[i]);
-            btn.videoView = mPlayerView;
-            btn.setOnClickListener(btn);
-            menuLayout.addView(btn);
-        }
-
-        mGalleryBtn = findViewById(R.id.galleryBtn);
-        mGalleryBtn.setOnClickListener(galleryBtnClickListener);
-
-        Button fitViewBtn = findViewById(R.id.fitViewBtn);
-        fitViewBtn.setOnClickListener(new View.OnClickListener() {
-            boolean shouldFit = false;
-
-            @Override
-            public void onClick(View v) {
-                shouldFit = !shouldFit;
-                mPlayerView.setFitFullView(shouldFit);
-            }
-        });
-
-        seekBarLl = findViewById(R.id.seekBarLl);
-        for (int i = 0; i < 6; i++) {
-            SeekBar sb = new SeekBar(SheepApp.getInstance());
-            sb.setMax(100);
-            sb.setProgress(50);
-            seekBarLl.addView(sb);
-            final int finalI = i;
-            sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
-                @Override
-                public void onProgressChanged(SeekBar seekBar, int progress, boolean b) {
-                    onSeek(finalI, progress);
-                }
-
-                @Override
-                public void onStartTrackingTouch(SeekBar seekBar) {
-
-                }
-
-                @Override
-                public void onStopTrackingTouch(SeekBar seekBar) {
-
-                }
-            });
-        }
-    }
-
-    Button mShapeBtn;
-    Button mTakeshotBtn;
-    Button mGalleryBtn;
-    LinearLayout seekBarLl;
-
-    class MyVideoButton extends AppCompatButton implements View.OnClickListener {
-
-        Uri videoUri;
-        VideoPlayerGLSurfaceView videoView;
-
-        public MyVideoButton(Context context) {
-            super(context);
-        }
-
-        @Override
-        public void onClick(View v) {
-
-            G.showToast("loading video: " + videoUri.getHost() + videoUri.getPath() + " If the video is from the internet, you may wait a while...");
-
-            videoView.setVideoUri(videoUri, new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
-                @Override
-                public void playPrepared(MediaPlayer player) {
-                    mPlayerView.post(new Runnable() {
-                        @Override
-                        public void run() {
-                            G.showToast("Start playing " + videoUri.getHost() + videoUri.getPath());
-                        }
-                    });
-
-                    player.start();
-                }
-            }, playCompletionCallback);
-        }
-    }
-
-    private int[] progresses = {50, 50, 50, 50, 50, 50};
-
-    private float getPercent(int index) {
-        return (progresses[index] - 50) / 50.0f;
-    }
-
-    private int getPercent(int index, int max) {
-        return progresses[index] * max / 100;
-    }
-
-    private void onSeekHsv(int index, int progress) {
-        progresses[index] = progress;//色调(H),饱和度(S),明度(V)
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust hsv %.2f %.2f %.2f %.2f %.2f %.2f", getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i)));
-    }
-
-    private void onSeekHsl(int index, int progress) {
-        progresses[index] = progress;//0,0,0 色相(H)、饱和度(S)、明度(L)
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust hsl %.2f %.2f %.2f", getPercent(i++), getPercent(i++), getPercent(i)));
-    }
-
-    private void onSeekRgb(int index, int progress) {
-        progresses[index] = progress;//0,0,255,255 黑<白、反光<亮度
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@curve RGB(%d, %d)(%d, %d)", getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i, 255)));
-    }
-
-    private void onSeekLevel(int index, int progress) {
-        progresses[index] = progress;//0,1,1
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust level %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i)));
-    }
-
-    private void onSeekSaturation(int index, int progress) {
-        progresses[index] = progress;//1 饱和度
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust saturation %.2f ", getPercent(0)));
-    }
-
-    private void onSeek/*ColorBalance*/(int index, int progress) {
-        progresses[index] = progress;//0,0,0 红绿蓝
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust colorbalance %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i)));
-    }
-
-    private void onSeekHaze(int index, int progress) {
-        progresses[index] = progress;
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@style haze %.2f %.2f %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i)));
-    }
-
-    private static String[] TYPES = {"overlay", "colordodge", "pinlight", "ol", "screen"};
-
-    private void onSeekPixBlend(int index, int progress) {
-        progresses[index] = progress;
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust saturation %.2f @pixblend %s %.2f %.2f %.2f %d ", getPercent(i++), TYPES[progresses[1] / 20 % TYPES.length], getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i, 40)));
-    }
-
-    private void onSeekCurve(int index, int progress) {
-        progresses[index] = progress;
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@curve R(%d, %d)(%d, %d)(%d, %d) ", getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255)));
-    }
-
-    private void onSeekBeautify(int index, int progress) {
-        progresses[index] = progress;
-        int i = 0;
-        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@beautify face %d %d, %d ", getPercent(i++, 2), getPercent(i++, 1000), getPercent(i++, 1000)));
-    }
-
-    android.view.View.OnClickListener galleryBtnClickListener = new android.view.View.OnClickListener() {
-
-        @Override
-        public void onClick(final android.view.View view) {
-            Intent videoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
-            videoPickerIntent.setType("video/*");
-            startActivityForResult(videoPickerIntent, REQUEST_CODE_PICK_VIDEO);
-        }
-    };
-
-    public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
-        switch (requestCode) {
-            case REQUEST_CODE_PICK_VIDEO:
-                if (resultCode == RESULT_OK) {
-
-                    mPlayerView.setVideoUri(data.getData(), new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
-                        @Override
-                        public void playPrepared(MediaPlayer player) {
-                            Log.i(Common.LOG_TAG, "The video is prepared to play");
-                            player.start();
-                        }
-                    }, playCompletionCallback);
-                }
-            default:
-                break;
-        }
-    }
-
-    @Override
-    public void onPause() {
-        super.onPause();
-        Log.i(VideoPlayerGLSurfaceView.LOG_TAG, "activity onPause...");
-        mPlayerView.release();
-        mPlayerView.onPause();
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-
-        mPlayerView.onResume();
-    }
-
-    @Override
-    protected Fragment initFragment() {
-        return new FgtChooseEditList();
-    }
-}
+//package com.sheep.gamegroup.module.find.activity;
+//
+//import android.content.Context;
+//import android.content.Intent;
+//import android.graphics.Bitmap;
+//import android.graphics.BitmapFactory;
+//import android.media.MediaPlayer;
+//import android.net.Uri;
+//import android.os.Bundle;
+//import android.support.annotation.Nullable;
+//import android.support.v4.app.Fragment;
+//import android.support.v7.widget.AppCompatButton;
+//import android.util.Log;
+//import android.view.View;
+//import android.widget.Button;
+//import android.widget.LinearLayout;
+//import android.widget.SeekBar;
+//
+//import com.kfzs.duanduan.utils.StatusBarUtils;
+//import com.sheep.gamegroup.absBase.AbsObserver;
+//import com.sheep.gamegroup.absBase.BaseContainerActivity;
+//import com.sheep.gamegroup.module.find.util.Filterble;
+//import com.sheep.gamegroup.module.find.util.IFilter;
+//import com.sheep.gamegroup.module.find.bean.Size;
+//import com.sheep.gamegroup.module.find.fragment.FgtChooseEditList;
+//import com.sheep.gamegroup.model.entity.Video;
+//import com.sheep.gamegroup.util.BitmapUtil;
+//import com.sheep.gamegroup.util.DataUtil;
+//import com.sheep.gamegroup.util.LogUtil;
+//import com.sheep.gamegroup.util.TestUtil;
+//import com.sheep.gamegroup.util.ViewUtil;
+//import com.sheep.gamegroup.util.viewHelper.CacheImageUtil;
+//import com.sheep.jiuyan.samllsheep.R;
+//import com.sheep.jiuyan.samllsheep.SheepApp;
+//import com.sheep.jiuyan.samllsheep.utils.G;
+//
+//import org.greenrobot.eventbus.EventBus;
+//import org.wysaid.common.Common;
+//import org.wysaid.myUtils.ImageUtil;
+//import org.wysaid.nativePort.CGEFFmpegNativeLibrary;
+//import org.wysaid.nativePort.CGEFrameRenderer;
+//import org.wysaid.nativePort.CGENativeLibrary;
+//import org.wysaid.view.VideoPlayerGLSurfaceView;
+//
+//import java.io.File;
+//import java.util.Locale;
+//
+//import butterknife.BindView;
+//import io.reactivex.Observable;
+//import io.reactivex.ObservableEmitter;
+//import io.reactivex.ObservableOnSubscribe;
+//import io.reactivex.android.schedulers.AndroidSchedulers;
+//import io.reactivex.schedulers.Schedulers;
+//import rx.functions.Action1;
+//
+///**
+// * Created by realicing on 2018/11/9.
+// * realicing@sina.com
+// * 编辑视频
+// */
+//public class ActEditVideo extends BaseContainerActivity implements Filterble {
+//
+//    @Override
+//    protected void onCreate(@Nullable Bundle savedInstanceState) {
+//        StatusBarUtils.setTranslucent(this);
+//        super.onCreate(savedInstanceState);
+//    }
+//
+//    @Override
+//    protected int getLayoutId() {
+//        return R.layout.act_edit_video;
+//    }
+//
+//    @BindView(R.id.videoGLSurfaceView)
+//    VideoPlayerGLSurfaceView mPlayerView;
+//
+//    private Video data;
+//
+//    private String mCurrentConfig;
+//    private float mIntensity = 1.0f;
+//
+//    public static final int REQUEST_CODE_PICK_VIDEO = 1;
+//
+//    private VideoPlayerGLSurfaceView.PlayCompletionCallback playCompletionCallback = new VideoPlayerGLSurfaceView.PlayCompletionCallback() {
+//        @Override
+//        public void playComplete(MediaPlayer player) {
+//            Log.i(Common.LOG_TAG, "The video playing is over, restart...");
+//            player.start();
+//        }
+//
+//        @Override
+//        public boolean playFailed(MediaPlayer player, final int what, final int extra) {
+//            if (TestUtil.isDev())
+//                G.showToast(String.format(Locale.CHINA, "播放出错!错误码: %d, %d", what, extra));
+//            else
+//                G.showToast("播放出错,请稍候重试");
+//            return true;
+//        }
+//    };
+//
+//    @Override
+//    public void initView() {
+//        if (this instanceof BaseContainerActivity) {
+//            super.initView();
+//        }
+//        data = DataUtil.getObject(getIntent(), Video.class);
+//        mPlayerView.setZOrderOnTop(false);
+//        mPlayerView.setZOrderMediaOverlay(true);
+//
+//
+//        mPlayerView.setPlayerInitializeCallback(new VideoPlayerGLSurfaceView.PlayerInitializeCallback() {
+//            @Override
+//            public void initPlayer(final MediaPlayer player) {
+//                //针对网络视频进行进度检查
+//                player.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() {
+//                    @Override
+//                    public void onBufferingUpdate(MediaPlayer mp, int percent) {
+//                        Log.i(Common.LOG_TAG, "Buffer update: " + percent);
+//                        if (percent == 100) {
+//                            Log.i(Common.LOG_TAG, "缓冲完毕!");
+//                            player.setOnBufferingUpdateListener(null);
+//                        }
+//                    }
+//                });
+//            }
+//        });
+//
+//        mPlayerView.setVideoUri(Uri.parse(data.getFilePath()), new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
+//            @Override
+//            public void playPrepared(MediaPlayer player) {
+//                Log.i(Common.LOG_TAG, "The video is prepared to play");
+//                player.start();
+//            }
+//        }, playCompletionCallback);
+//
+//        LinearLayout menuLayout = findViewById(R.id.menuLinearLayout);
+//        if (ViewUtil.isVisible(menuLayout)) {
+//            loadTest(menuLayout);
+//        }
+//    }
+//
+//    //点击完成
+//    public void onClickCommit(View view) {
+//        showProgress(false);
+//        CacheImageUtil.cacheAndLoadImg(ViewUtil.getNetImgByName("sheep_logo_3"), new Action1<File>() {
+//            @Override
+//            public void call(final File file) {
+//                Observable.create(new ObservableOnSubscribe<String>() {
+//                    @Override
+//                    public void subscribe(ObservableEmitter<String> emitter) throws Exception {
+//                        String srcFilPath = data.getFilePath();
+//                        String outputFilename = String.format(Locale.CHINA, "%s_%d_%f.mp4", srcFilPath.substring(0, srcFilPath.lastIndexOf(".")), mCurrentConfig.hashCode(), mIntensity);
+//                        Bitmap bmp = BitmapFactory.decodeFile(file.getAbsolutePath());
+//                        //left 30px top 60px width 750
+//                        Bitmap logo = BitmapUtil.createBigLogo(bmp, new Size().setWidth(G.WIDTH).setHeight(G.HEIGHT).setX(G.WIDTH * 30 / 750).setY(G.WIDTH * 60 / 750));
+//                        bmp.recycle();
+//                        CGEFFmpegNativeLibrary.generateVideoWithFilter(outputFilename, srcFilPath, mCurrentConfig, mIntensity, logo, CGENativeLibrary.TextureBlendMode.CGE_BLEND_ADDREV, 1.0f, false);
+//
+//                        LogUtil.println(ActEditVideo.class.getSimpleName(), "Done! The file is generated at: " + outputFilename);
+//                        emitter.onNext(outputFilename);
+//                    }
+//                }).subscribeOn(Schedulers.io())
+//                        .observeOn(AndroidSchedulers.mainThread())
+//                        .subscribe(new AbsObserver<String>() {
+//                            @Override
+//                            public void onNext(String filePath) {
+//                                sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + filePath)));
+//                                data.setFilePath(filePath);
+//                                EventBus.getDefault().post(data);
+//                                ActEditVideo.this.finish();
+//                            }
+//
+//                            @Override
+//                            public void onError(Throwable e) {
+//                                G.showToast(e.getMessage());
+//                            }
+//
+//                            @Override
+//                            public void onComplete() {
+//                                hideProgress();
+//                            }
+//                        });
+//            }
+//        });
+//    }
+//
+//    //设置滤镜
+//    @Override
+//    public void setFilter(IFilter filter) {
+//        if (mPlayerView != null && filter != null && filter.getConfig() != null) {
+//            mCurrentConfig = filter.getConfig();
+//            mPlayerView.setFilterWithConfig(mCurrentConfig);
+//        }
+//    }
+//
+//    @Override
+//    public void setFilterIntensity(float intensity) {
+//        if (mPlayerView != null) {
+//            mIntensity = intensity;
+//            mPlayerView.setFilterIntensity(mIntensity);
+//        }
+//    }
+//
+//    //下面为测试代码
+//
+//    private void loadTest(LinearLayout menuLayout) {
+//
+//        mShapeBtn = findViewById(R.id.switchShapeBtn);
+//
+//        mShapeBtn.setOnClickListener(new View.OnClickListener() {
+//
+//            private boolean useMask = false;
+//            Bitmap bmp;
+//
+//            @Override
+//            public void onClick(View v) {
+//                useMask = !useMask;
+//                if (useMask) {
+//                    if (bmp == null)
+//                        bmp = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
+//
+//                    if (bmp != null) {
+//                        mPlayerView.setMaskBitmap(bmp, false, new VideoPlayerGLSurfaceView.SetMaskBitmapCallback() {
+//                            @Override
+//                            public void setMaskOK(CGEFrameRenderer renderer) {
+////                                if(mPlayerView.isUsingMask()) {
+////                                    renderer.setMaskFlipScale(1.0f, -1.0f);
+////                                }
+//                                Log.i(Common.LOG_TAG, "enable mask!");
+//                            }
+//                        });
+//                    }
+//                } else {
+//                    mPlayerView.setMaskBitmap(null, false);
+//                }
+//
+//            }
+//        });
+//
+//        mTakeshotBtn = findViewById(R.id.takeShotBtn);
+//
+//        mTakeshotBtn.setOnClickListener(new View.OnClickListener() {
+//            @Override
+//            public void onClick(View v) {
+//                mPlayerView.takeShot(new VideoPlayerGLSurfaceView.TakeShotCallback() {
+//                    @Override
+//                    public void takeShotOK(Bitmap bmp) {
+//                        if (bmp != null) {
+//                            String s = ImageUtil.saveBitmap(bmp);
+//                            ActEditVideo.this.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + s)));
+//                        } else {
+//                            Log.e(Common.LOG_TAG, "take shot failed!");
+//                        }
+//                    }
+//                });
+//            }
+//        });
+//
+//
+//        {
+//            Button btn = new Button(this);
+//            menuLayout.addView(btn);
+//            btn.setAllCaps(false);
+//            btn.setText("Last Recorded Video");
+//            btn.setOnClickListener(new View.OnClickListener() {
+//                @Override
+//                public void onClick(View v) {
+//
+//                    Uri lastVideoUri = Uri.parse(data.getFilePath());
+//                    mPlayerView.setVideoUri(lastVideoUri, new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
+//                        @Override
+//                        public void playPrepared(MediaPlayer player) {
+//                            Log.i(Common.LOG_TAG, "The video is prepared to play");
+//                            player.start();
+//                        }
+//                    }, playCompletionCallback);
+//                }
+//            });
+//        }
+//
+//        String[] filePaths = {
+//                data.getFilePath(),
+//                "http://wge.wysaid.org/res/video/1.mp4",
+//                "http://wysaid.org/p/test.mp4",
+//        };
+//
+//        for (int i = 0; i != filePaths.length; ++i) {
+//            MyVideoButton btn = new MyVideoButton(this);
+//            btn.setText("Video" + i);
+//            btn.videoUri = Uri.parse(filePaths[i]);
+//            btn.videoView = mPlayerView;
+//            btn.setOnClickListener(btn);
+//            menuLayout.addView(btn);
+//        }
+//
+//        mGalleryBtn = findViewById(R.id.galleryBtn);
+//        mGalleryBtn.setOnClickListener(galleryBtnClickListener);
+//
+//        Button fitViewBtn = findViewById(R.id.fitViewBtn);
+//        fitViewBtn.setOnClickListener(new View.OnClickListener() {
+//            boolean shouldFit = false;
+//
+//            @Override
+//            public void onClick(View v) {
+//                shouldFit = !shouldFit;
+//                mPlayerView.setFitFullView(shouldFit);
+//            }
+//        });
+//
+//        seekBarLl = findViewById(R.id.seekBarLl);
+//        for (int i = 0; i < 6; i++) {
+//            SeekBar sb = new SeekBar(SheepApp.getInstance());
+//            sb.setMax(100);
+//            sb.setProgress(50);
+//            seekBarLl.addView(sb);
+//            final int finalI = i;
+//            sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
+//                @Override
+//                public void onProgressChanged(SeekBar seekBar, int progress, boolean b) {
+//                    onSeek(finalI, progress);
+//                }
+//
+//                @Override
+//                public void onStartTrackingTouch(SeekBar seekBar) {
+//
+//                }
+//
+//                @Override
+//                public void onStopTrackingTouch(SeekBar seekBar) {
+//
+//                }
+//            });
+//        }
+//    }
+//
+//    Button mShapeBtn;
+//    Button mTakeshotBtn;
+//    Button mGalleryBtn;
+//    LinearLayout seekBarLl;
+//
+//    class MyVideoButton extends AppCompatButton implements View.OnClickListener {
+//
+//        Uri videoUri;
+//        VideoPlayerGLSurfaceView videoView;
+//
+//        public MyVideoButton(Context context) {
+//            super(context);
+//        }
+//
+//        @Override
+//        public void onClick(View v) {
+//
+//            G.showToast("loading video: " + videoUri.getHost() + videoUri.getPath() + " If the video is from the internet, you may wait a while...");
+//
+//            videoView.setVideoUri(videoUri, new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
+//                @Override
+//                public void playPrepared(MediaPlayer player) {
+//                    mPlayerView.post(new Runnable() {
+//                        @Override
+//                        public void run() {
+//                            G.showToast("Start playing " + videoUri.getHost() + videoUri.getPath());
+//                        }
+//                    });
+//
+//                    player.start();
+//                }
+//            }, playCompletionCallback);
+//        }
+//    }
+//
+//    private int[] progresses = {50, 50, 50, 50, 50, 50};
+//
+//    private float getPercent(int index) {
+//        return (progresses[index] - 50) / 50.0f;
+//    }
+//
+//    private int getPercent(int index, int max) {
+//        return progresses[index] * max / 100;
+//    }
+//
+//    private void onSeekHsv(int index, int progress) {
+//        progresses[index] = progress;//色调(H),饱和度(S),明度(V)
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust hsv %.2f %.2f %.2f %.2f %.2f %.2f", getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i)));
+//    }
+//
+//    private void onSeekHsl(int index, int progress) {
+//        progresses[index] = progress;//0,0,0 色相(H)、饱和度(S)、明度(L)
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust hsl %.2f %.2f %.2f", getPercent(i++), getPercent(i++), getPercent(i)));
+//    }
+//
+//    private void onSeekRgb(int index, int progress) {
+//        progresses[index] = progress;//0,0,255,255 黑<白、反光<亮度
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@curve RGB(%d, %d)(%d, %d)", getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i, 255)));
+//    }
+//
+//    private void onSeekLevel(int index, int progress) {
+//        progresses[index] = progress;//0,1,1
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust level %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i)));
+//    }
+//
+//    private void onSeekSaturation(int index, int progress) {
+//        progresses[index] = progress;//1 饱和度
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust saturation %.2f ", getPercent(0)));
+//    }
+//
+//    private void onSeek/*ColorBalance*/(int index, int progress) {
+//        progresses[index] = progress;//0,0,0 红绿蓝
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust colorbalance %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i)));
+//    }
+//
+//    private void onSeekHaze(int index, int progress) {
+//        progresses[index] = progress;
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@style haze %.2f %.2f %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i)));
+//    }
+//
+//    private static String[] TYPES = {"overlay", "colordodge", "pinlight", "ol", "screen"};
+//
+//    private void onSeekPixBlend(int index, int progress) {
+//        progresses[index] = progress;
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust saturation %.2f @pixblend %s %.2f %.2f %.2f %d ", getPercent(i++), TYPES[progresses[1] / 20 % TYPES.length], getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i, 40)));
+//    }
+//
+//    private void onSeekCurve(int index, int progress) {
+//        progresses[index] = progress;
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@curve R(%d, %d)(%d, %d)(%d, %d) ", getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255)));
+//    }
+//
+//    private void onSeekBeautify(int index, int progress) {
+//        progresses[index] = progress;
+//        int i = 0;
+//        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@beautify face %d %d, %d ", getPercent(i++, 2), getPercent(i++, 1000), getPercent(i++, 1000)));
+//    }
+//
+//    android.view.View.OnClickListener galleryBtnClickListener = new android.view.View.OnClickListener() {
+//
+//        @Override
+//        public void onClick(final android.view.View view) {
+//            Intent videoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
+//            videoPickerIntent.setType("video/*");
+//            startActivityForResult(videoPickerIntent, REQUEST_CODE_PICK_VIDEO);
+//        }
+//    };
+//
+//    public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
+//        switch (requestCode) {
+//            case REQUEST_CODE_PICK_VIDEO:
+//                if (resultCode == RESULT_OK) {
+//
+//                    mPlayerView.setVideoUri(data.getData(), new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
+//                        @Override
+//                        public void playPrepared(MediaPlayer player) {
+//                            Log.i(Common.LOG_TAG, "The video is prepared to play");
+//                            player.start();
+//                        }
+//                    }, playCompletionCallback);
+//                }
+//            default:
+//                break;
+//        }
+//    }
+//
+//    @Override
+//    public void onPause() {
+//        super.onPause();
+//        Log.i(VideoPlayerGLSurfaceView.LOG_TAG, "activity onPause...");
+//        mPlayerView.release();
+//        mPlayerView.onPause();
+//    }
+//
+//    @Override
+//    public void onResume() {
+//        super.onResume();
+//
+//        mPlayerView.onResume();
+//    }
+//
+//    @Override
+//    protected Fragment initFragment() {
+//        return new FgtChooseEditList();
+//    }
+//}

+ 4 - 5
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -57,7 +57,6 @@ import com.sheep.gamegroup.view.activity.ActCreditCardTaskList;
 import com.sheep.gamegroup.view.activity.ActCreditCardWeb;
 import com.sheep.gamegroup.view.activity.ActCutVideo;
 import com.sheep.gamegroup.view.activity.ActDownloadWelfareList;
-import com.sheep.gamegroup.module.find.activity.ActEditVideo;
 import com.sheep.gamegroup.view.activity.ActEntertainmentLuckDraw;
 import com.sheep.gamegroup.view.activity.ActEveryDayShare;
 import com.sheep.gamegroup.view.activity.ActExchangeCMCC;
@@ -2292,10 +2291,10 @@ public class Jump2View {
      * @param data 视频数据,包括地址与时长,宽高等
      */
     public void goActEditVideo(Video data) {
-        Activity activity = ActivityManager.getInstance().currentActivity();
-        Intent intent = new Intent(activity, ActEditVideo.class);
-        DataUtil.putObject(intent, data);
-        activity.startActivity(intent);
+//        Activity activity = ActivityManager.getInstance().currentActivity();
+//        Intent intent = new Intent(activity, ActEditVideo.class);
+//        DataUtil.putObject(intent, data);
+//        activity.startActivity(intent);
     }
 
     /**

+ 4 - 4
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -69,7 +69,7 @@ import com.zhy.http.okhttp.OkHttpUtils;
 import com.zhy.http.okhttp.callback.FileCallBack;
 import com.zhy.http.okhttp.callback.StringCallback;
 
-import org.wysaid.nativePort.CGENativeLibrary;
+//import org.wysaid.nativePort.CGENativeLibrary;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -652,9 +652,9 @@ public class TestUtil {
                                 ListUtil.forEach(list, new Action1<IFilter>() {
                                     @Override
                                     public void call(IFilter filter) {
-                                        Bitmap dstImage = CGENativeLibrary.filterImage_MultipleEffects(src, filter.getConfig(), 1.0f);
-                                        ViewUtil.saveImage(dstImage, ClassFileHelper.DIR, String.valueOf(System.currentTimeMillis()) + ".png");
-                                        dstImage.recycle();
+//                                        Bitmap dstImage = CGENativeLibrary.filterImage_MultipleEffects(src, filter.getConfig(), 1.0f);
+//                                        ViewUtil.saveImage(dstImage, ClassFileHelper.DIR, String.valueOf(System.currentTimeMillis()) + ".png");
+//                                        dstImage.recycle();
                                     }
                                 });
                                 src.recycle();

+ 4 - 5
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -72,7 +72,6 @@ import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.model.entity.PayEntity;
 import com.sheep.gamegroup.model.entity.RobTask;
 import com.sheep.gamegroup.model.entity.TaskEty;
-import com.sheep.gamegroup.util.glide.FilterTransform;
 import com.sheep.gamegroup.util.glide.RoundedCornersTransformation;
 import com.sheep.gamegroup.util.share.ShareLinkConfig;
 import com.sheep.gamegroup.util.viewHelper.LayoutParamsUtil;
@@ -1587,10 +1586,10 @@ public class ViewUtil {
                 setImage(imageView, url);
                 return;
             }
-            Glide.with(SheepApp.getInstance())
-                    .load(url)
-                    .apply(new RequestOptions().transform(new FilterTransform(filter)))
-                    .into(imageView);
+//            Glide.with(SheepApp.getInstance())
+//                    .load(url)
+//                    .apply(new RequestOptions().transform(new FilterTransform(filter)))
+//                    .into(imageView);
         }
     }
 

+ 38 - 38
app/src/main/java/com/sheep/gamegroup/util/glide/FilterTransform.java

@@ -1,38 +1,38 @@
-package com.sheep.gamegroup.util.glide;
-
-import android.graphics.Bitmap;
-import android.support.annotation.NonNull;
-
-import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
-import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
-import com.sheep.gamegroup.module.find.util.IFilter;
-
-import org.wysaid.nativePort.CGENativeLibrary;
-
-import java.security.MessageDigest;
-
-/**
- * Created by realicing on 2018/12/4.
- * realicing@sina.com
- * 图片滤镜转化
- */
-public class FilterTransform extends BitmapTransformation {
-
-    private IFilter filter;
-
-    public FilterTransform(IFilter filter) {
-        super();
-        this.filter = filter;
-    }
-
-    @Override
-    protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) {
-//        Bitmap dstImage = CGENativeLibrary.filterImage_MultipleEffects(toTransform, filter.getConfig(), 1.0f);
-        return CGENativeLibrary.filterImage_MultipleEffects(toTransform, filter.getConfig(), 1.0f);
-    }
-
-    @Override
-    public void updateDiskCacheKey(MessageDigest messageDigest) {
-        messageDigest.update((filter.getConfig().hashCode() + filter.getName()).getBytes(CHARSET));
-    }
-}
+//package com.sheep.gamegroup.util.glide;
+//
+//import android.graphics.Bitmap;
+//import android.support.annotation.NonNull;
+//
+//import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
+//import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
+//import com.sheep.gamegroup.module.find.util.IFilter;
+//
+//import org.wysaid.nativePort.CGENativeLibrary;
+//
+//import java.security.MessageDigest;
+//
+///**
+// * Created by realicing on 2018/12/4.
+// * realicing@sina.com
+// * 图片滤镜转化
+// */
+//public class FilterTransform extends BitmapTransformation {
+//
+//    private IFilter filter;
+//
+//    public FilterTransform(IFilter filter) {
+//        super();
+//        this.filter = filter;
+//    }
+//
+//    @Override
+//    protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) {
+////        Bitmap dstImage = CGENativeLibrary.filterImage_MultipleEffects(toTransform, filter.getConfig(), 1.0f);
+//        return CGENativeLibrary.filterImage_MultipleEffects(toTransform, filter.getConfig(), 1.0f);
+//    }
+//
+//    @Override
+//    public void updateDiskCacheKey(MessageDigest messageDigest) {
+//        messageDigest.update((filter.getConfig().hashCode() + filter.getName()).getBytes(CHARSET));
+//    }
+//}

+ 29 - 41
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -3,9 +3,6 @@ package com.sheep.jiuyan.samllsheep;
 import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
-import android.content.res.AssetManager;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.StrictMode;
@@ -13,7 +10,6 @@ import android.support.multidex.MultiDex;
 import android.support.multidex.MultiDexApplication;
 import android.text.TextUtils;
 import android.util.DisplayMetrics;
-import android.util.Log;
 
 import com.baidu.location.BDAbstractLocationListener;
 import com.baidu.location.BDLocation;
@@ -23,7 +19,6 @@ import com.bumptech.glide.Glide;
 import com.danikula.videocache.HttpProxyCacheServer;
 import com.liulishuo.okdownload.OkDownload;
 import com.liulishuo.okdownload.core.dispatcher.DownloadDispatcher;
-import com.qiniu.android.storage.UploadManager;
 import com.sheep.gamegroup.di.components.DaggerNetComponent;
 import com.sheep.gamegroup.di.components.NetComponent;
 import com.sheep.gamegroup.di.modules.NetModule;
@@ -44,8 +39,6 @@ import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.UMConfigUtils;
-import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.util.viewHelper.CacheImageUtil;
 import com.sheep.gamegroup.view.activity.GameCertificationActivity;
 import com.sheep.jiuyan.samllsheep.service.AutoCheckService;
 import com.sheep.jiuyan.samllsheep.service.DownloadService;
@@ -62,13 +55,8 @@ import com.umeng.socialize.PlatformConfig;
 import com.umeng.socialize.UMShareAPI;
 import com.youmi.android.offer.YmConfig;
 
-import org.wysaid.common.Common;
-import org.wysaid.nativePort.CGENativeLibrary;
 import org.xutils.x;
 
-import java.io.IOException;
-import java.io.InputStream;
-
 import cn.jpush.android.api.JPushInterface;
 
 /**
@@ -278,36 +266,36 @@ public class SheepApp extends MultiDexApplication {
     private void initCgeLibrary() {
         //The second param will be passed as the second arg of the callback function.
         //第二个参数根据自身需要设置, 将作为 loadImage 第二个参数回传
-        CGENativeLibrary.setLoadImageCallback(mLoadImageCallback, null);
-        for (String name : CGE_FILTER_IMGS) {
-            CacheImageUtil.cacheImg(ViewUtil.getNetImgByNameAndSuffix(name), null);
-        }
+//        CGENativeLibrary.setLoadImageCallback(mLoadImageCallback, null);
+//        for (String name : CGE_FILTER_IMGS) {
+//            CacheImageUtil.cacheImg(ViewUtil.getNetImgByNameAndSuffix(name), null);
+//        }
     }
-    public static final String[] CGE_FILTER_IMGS = {"edgy_amber.png", "filmstock.png", "foggy_night.png", "late_sunset.png", "soft_warming.png", "wildbird.png", "hehe.jpg", "mapping0.jpg"};
-    public CGENativeLibrary.LoadImageCallback mLoadImageCallback = new CGENativeLibrary.LoadImageCallback() {
-
-        //Notice: the 'name' passed in is just what you write in the rule, e.g: 1.jpg
-        //注意, 这里回传的name不包含任何路径名, 仅为具体的图片文件名如 1.jpg
-        @Override
-        public Bitmap loadImage(String name, Object arg) {
-            String path = CacheImageUtil.getCacheImg(ViewUtil.getNetImgByNameAndSuffix(name));
-            if (path != null) {
-                return BitmapFactory.decodeFile(path);
-            }
-            return null;
-        }
-
-        @Override
-        public void loadImageOK(Bitmap bmp, Object arg) {
-            Log.i(Common.LOG_TAG, "Loading bitmap over, you can choose to recycle or cache");
-
-            //The bitmap is which you returned at 'loadImage'.
-            //You can call recycle when this function is called, or just keep it for further usage.
-            //唯一不需要马上recycle的应用场景为 多个不同的滤镜都使用到相同的bitmap
-            //那么可以选择缓存起来。
-            bmp.recycle();
-        }
-    };
+//    public static final String[] CGE_FILTER_IMGS = {"edgy_amber.png", "filmstock.png", "foggy_night.png", "late_sunset.png", "soft_warming.png", "wildbird.png", "hehe.jpg", "mapping0.jpg"};
+//    public CGENativeLibrary.LoadImageCallback mLoadImageCallback = new CGENativeLibrary.LoadImageCallback() {
+//
+//        //Notice: the 'name' passed in is just what you write in the rule, e.g: 1.jpg
+//        //注意, 这里回传的name不包含任何路径名, 仅为具体的图片文件名如 1.jpg
+//        @Override
+//        public Bitmap loadImage(String name, Object arg) {
+//            String path = CacheImageUtil.getCacheImg(ViewUtil.getNetImgByNameAndSuffix(name));
+//            if (path != null) {
+//                return BitmapFactory.decodeFile(path);
+//            }
+//            return null;
+//        }
+//
+//        @Override
+//        public void loadImageOK(Bitmap bmp, Object arg) {
+//            Log.i(Common.LOG_TAG, "Loading bitmap over, you can choose to recycle or cache");
+//
+//            //The bitmap is which you returned at 'loadImage'.
+//            //You can call recycle when this function is called, or just keep it for further usage.
+//            //唯一不需要马上recycle的应用场景为 多个不同的滤镜都使用到相同的bitmap
+//            //那么可以选择缓存起来。
+//            bmp.recycle();
+//        }
+//    };
 
     private void initBdLocationOption() {
         mLocationClient = new LocationClient(getApplicationContext());

+ 0 - 86
app/src/main/res/layout/act_edit_video.xml

@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    xmlns:tools="http://schemas.android.com/tools"
-    tools:context="com.sheep.gamegroup.module.find.activity.ActEditVideo">
-
-    <FrameLayout
-        android:id="@+id/glviewFrameLayout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <org.wysaid.view.VideoPlayerGLSurfaceView
-            android:id="@+id/videoGLSurfaceView"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-    </FrameLayout>
-
-    <HorizontalScrollView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:visibility="gone">
-
-        <LinearLayout
-            android:id="@+id/menuLinearLayout"
-            android:layout_width="wrap_content"
-            android:layout_height="50dp"
-            android:visibility="gone">
-
-            <Button
-                android:id="@+id/galleryBtn"
-                android:layout_width="100dp"
-                android:layout_height="50dp"
-                android:text="Gallery" />
-
-            <Button
-                android:id="@+id/takeShotBtn"
-                android:layout_width="100dp"
-                android:layout_height="match_parent"
-                android:text="TakeShot" />
-
-            <Button
-                android:id="@+id/switchShapeBtn"
-                android:layout_width="100dp"
-                android:layout_height="match_parent"
-                android:text="Border" />
-
-            <Button
-                android:id="@+id/fitViewBtn"
-                android:layout_width="100dp"
-                android:layout_height="match_parent"
-                android:text="FitScreen" />
-
-        </LinearLayout>
-    </HorizontalScrollView>
-
-    <FrameLayout
-        android:id="@+id/frame_container"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true" />
-
-
-    <LinearLayout
-        android:id="@+id/seekBarLl"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:layout_marginBottom="40dp"
-        android:orientation="vertical"
-        android:visibility="gone" />
-
-    <ImageView
-        android:id="@+id/act_edit_video_commit_iv"
-        android:layout_width="30dp"
-        android:layout_height="30dp"
-        android:layout_alignParentTop="true"
-        android:layout_alignParentEnd="true"
-        android:onClick="onClickCommit"
-        android:layout_marginTop="27dp"
-        android:layout_marginEnd="16dp"
-        android:background="@drawable/shape_oval_main"
-        android:padding="5dp"
-        android:src="@drawable/qiandao" />
-</RelativeLayout>

+ 2 - 2
gradle.properties

@@ -17,8 +17,8 @@
 # org.gradle.parallel=true
 #android.injected.build.model.only.versioned = 3
 
-VERSION_NAME=3.4.3
-VERSION_CODE=3004003
+VERSION_NAME=3.4.4
+VERSION_CODE=3004004
 ANDROID_COMPILE_SDK_VERSION=28
 ANDROID_BUILD_TOOLS_VERSION=28.0.3
 ANDROID_MIN_SDK_VERSION=18