/** 开始直播 */ public void startLive() { Log.d(TAG, " start live record "); if (mStreamSource == null) { mStreamSource = StreamSourceFactory.create(StreamSource.DEFAULT_STREAM_SOURCE, mSurfaceView); mStreamSource.start(); } }
public void stopRecord() { if (mStreamSource != null) { mStreamSource.stop(); mStreamSource = null; } if (mRecorderHelper != null) { new Thread( new Runnable() { @Override public void run() { mRecorderHelper.release(); mRecorderHelper = null; } }) .start(); } }