Search in sources :

Example 1 with StereoView

use of com.example.advanceDemo.view.StereoView in project LanSoEditor_advance by LanSoSdk.

the class VViewImage3DDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.vview_image3d_demo_layout);
    mVideoPath = getIntent().getStringExtra("videopath");
    mInfo = new MediaInfo(mVideoPath, false);
    if (mInfo.prepare() == false) {
        Toast.makeText(this, "传递过来的视频文件错误", Toast.LENGTH_SHORT).show();
        this.finish();
    }
    drawpadView = (DrawPadView) findViewById(R.id.id_image3d_drawpadview);
    mGLRelativeLayout = (ViewLayerRelativeLayout) findViewById(R.id.id_image3d_viewlayout);
    mStereoView = (StereoView) findViewById(R.id.id_image3d_stereoView);
    mStereoView.setVisibility(View.INVISIBLE);
    findViewById(R.id.id_image3d_saveplay).setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            if (SDKFileUtils.fileExist(dstPath)) {
                Intent intent = new Intent(VViewImage3DDemoActivity.this, VideoPlayerActivity.class);
                intent.putExtra("videopath", dstPath);
                startActivity(intent);
            } else {
                Toast.makeText(VViewImage3DDemoActivity.this, "目标文件不存在", Toast.LENGTH_SHORT).show();
            }
        }
    });
    findViewById(R.id.id_image3d_saveplay).setVisibility(View.GONE);
    editTmpPath = SDKFileUtils.newMp4PathInBox();
    dstPath = SDKFileUtils.newMp4PathInBox();
    new Handler().postDelayed(new Runnable() {

        @Override
        public void run() {
            startPlayVideo();
        }
    }, 300);
}
Also used : MediaInfo(com.lansosdk.videoeditor.MediaInfo) OnClickListener(android.view.View.OnClickListener) Handler(android.os.Handler) Intent(android.content.Intent) GLSurfaceView(android.opengl.GLSurfaceView) ImageView(android.widget.ImageView) View(android.view.View) StereoView(com.example.advanceDemo.view.StereoView) TextView(android.widget.TextView) DrawPadView(com.lansosdk.videoeditor.DrawPadView) VideoPlayerActivity(com.example.advanceDemo.VideoPlayerActivity)

Aggregations

Intent (android.content.Intent)1 GLSurfaceView (android.opengl.GLSurfaceView)1 Handler (android.os.Handler)1 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 VideoPlayerActivity (com.example.advanceDemo.VideoPlayerActivity)1 StereoView (com.example.advanceDemo.view.StereoView)1 DrawPadView (com.lansosdk.videoeditor.DrawPadView)1 MediaInfo (com.lansosdk.videoeditor.MediaInfo)1