/** * Sets a Surface to show a preview of recorded media (video). <br /> * You can call this method at any time and changes will take * effect next time you call {@link #start()} or {@link #startPreview()}. */ public void setSurfaceView(SurfaceView view) { mHandler.Post(new Runnable(() => { void Run() { if (mVideoStream != null) { mVideoStream.setSurfaceView(view); } } })); }
/** * Sets a Surface to show a preview of recorded media (video). * You can call this method at any time and changes will take effect next time you call {@link #start()}. */ public void setSurfaceView(SurfaceView view) { lock(this) { mSurfaceView = view; if (mObjectCallBack != null && mSurfaceView != null && mSurfaceView.Holder != null) { mSurfaceView.Holder.RemoveCallback(this); } if (mSurfaceView != null && mSurfaceView.Holder != null) mObjectCallBack = this; mSurfaceView.Holder.AddCallback(mObjectCallBack); mSurfaceReady = true; } }