Exemplo n.º 1
0
 /** 开始直播 */
 public void startLive() {
   Log.d(TAG, " start live record ");
   if (mStreamSource == null) {
     mStreamSource = StreamSourceFactory.create(StreamSource.DEFAULT_STREAM_SOURCE, mSurfaceView);
     mStreamSource.start();
   }
 }
Exemplo n.º 2
0
  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();
    }
  }