本文整理了Java中android.media.MediaMuxer.release()
方法的一些代码示例,展示了MediaMuxer.release()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MediaMuxer.release()
方法的具体详情如下:
包路径:android.media.MediaMuxer
类名称:MediaMuxer
方法名:release
暂无
代码示例来源:origin: TeamNewPipe/NewPipe
if (muxer != null) {
muxer.stop();
muxer.release();
代码示例来源:origin: guardianproject/haven
mMuxer.release();
代码示例来源:origin: guoxiaoxing/phoenix
mMuxer.release();
mMuxer = null;
代码示例来源:origin: saki4510t/libcommon
@Override
public void release() {
mIsStarted = false;
if (!mReleased) {
mReleased = true;
try {
mMuxer.release();
} catch (final Exception e) {
Log.w(TAG, e);
}
}
}
代码示例来源:origin: ChillingVan/AndroidInstantVideo
@Override
public void close() {
isStart = false;
if (mMuxer != null) {
mMuxer.stop();
mMuxer.release();
mMuxer = null;
}
}
});
代码示例来源:origin: windrunnerlihuan/DogCamera
@TargetApi(18)
public boolean release() {
synchronized (mMuxer) {
if (++mNumReleases == mNumTracks) {
mMuxer.stop();
mMuxer.release();
return true;
}
}
return false;
}
}
代码示例来源:origin: WangShuo1143368701/WSLiveDemo
/**
* request stop recording from encoder when encoder received EOS
*/
/*package*/ synchronized void stop() {
if (DEBUG) Log.v(TAG, "stop:mStatredCount=" + mStatredCount);
mStatredCount--;
if ((mEncoderCount > 0) && (mStatredCount <= 0)) {
mMediaMuxer.stop();
mMediaMuxer.release();
mIsStarted = false;
if (DEBUG) Log.v(TAG, "MediaMuxer stopped:");
}
}
代码示例来源:origin: dingjikerbo/Android-RTSP
public boolean release() {
synchronized (mMuxer) {
if (++mNumReleases == mNumTracks) {
mMuxer.stop();
mMuxer.release();
return true;
}
}
return false;
}
}
代码示例来源:origin: saki4510t/AudioVideoRecordingSample
/**
* request stop recording from encoder when encoder received EOS
*/
/*package*/ synchronized void stop() {
if (DEBUG) Log.v(TAG, "stop:mStatredCount=" + mStatredCount);
mStatredCount--;
if ((mEncoderCount > 0) && (mStatredCount <= 0)) {
mMediaMuxer.stop();
mMediaMuxer.release();
mIsStarted = false;
if (DEBUG) Log.v(TAG, "MediaMuxer stopped:");
}
}
代码示例来源:origin: FacePlusPlus/MegviiFacepp-Android-SDK
/**
* request stop recording from encoder when encoder received EOS
*/
/*package*/ synchronized void stop() {
if (DEBUG) Log.v(TAG, "stop:mStatredCount=" + mStatredCount);
mStatredCount--;
if ((mEncoderCount > 0) && (mStatredCount <= 0)) {
mMediaMuxer.stop();
mMediaMuxer.release();
mIsStarted = false;
if (DEBUG) Log.v(TAG, "MediaMuxer stopped:");
}
}
代码示例来源:origin: saki4510t/ScreenRecordingSample
/**
* request stop recording from encoder when encoder received EOS
*/
/*package*/ synchronized void stop() {
if (DEBUG) Log.v(TAG, "stop:mStatredCount=" + mStatredCount);
mStatredCount--;
if ((mEncoderCount > 0) && (mStatredCount <= 0)) {
mMediaMuxer.stop();
mMediaMuxer.release();
mIsStarted = false;
if (DEBUG) Log.v(TAG, "MediaMuxer stopped:");
}
}
代码示例来源:origin: MasayukiSuda/GPUVideo-android
/**
* request stop recording from encoder when encoder received EOS
*/
/*package*/
synchronized void stop() {
Log.v(TAG, "stop:startedCount=" + startedCount);
startedCount--;
if ((encoderCount > 0) && (startedCount <= 0)) {
mediaMuxer.stop();
mediaMuxer.release();
isStarted = false;
Log.v(TAG, "MediaMuxer stopped:");
}
}
代码示例来源:origin: aserbao/AndroidCamera
private void readyStop() {
if (mediaMuxer != null) {
try {
mediaMuxer.stop();
} catch (Exception e) {
Log.e(TAG, "mediaMuxer.stop() 异常:" + e.toString());
}
try {
mediaMuxer.release();
} catch (Exception e) {
Log.e(TAG, "mediaMuxer.release() 异常:" + e.toString());
}
mediaMuxer = null;
}
}
代码示例来源:origin: MasayukiSuda/CameraRecorder-android
/**
* request stop recording from encoder when encoder received EOS
*/
/*package*/
synchronized void stop() {
Log.v(TAG, "stop:startedCount=" + startedCount);
startedCount--;
if ((encoderCount > 0) && (startedCount <= 0)) {
mediaMuxer.stop();
mediaMuxer.release();
isStarted = false;
Log.v(TAG, "MediaMuxer stopped:");
}
}
代码示例来源:origin: pedroSG94/rtmp-rtsp-stream-client-java
/**
* Stop record MP4 video started with @startRecord. If you don't call it file will be unreadable.
*/
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
public void stopRecord() {
recording = false;
if (mediaMuxer != null) {
if (canRecord) {
mediaMuxer.stop();
mediaMuxer.release();
canRecord = false;
}
mediaMuxer = null;
}
videoTrack = -1;
audioTrack = -1;
if (!streaming) stopStream();
}
代码示例来源:origin: pedroSG94/rtmp-rtsp-stream-client-java
/**
* Stop record MP4 video started with @startRecord. If you don't call it file will be unreadable.
*/
public void stopRecord() {
recording = false;
if (mediaMuxer != null) {
if (canRecord) {
mediaMuxer.stop();
mediaMuxer.release();
canRecord = false;
}
mediaMuxer = null;
}
videoTrack = -1;
audioTrack = -1;
if (!streaming) stopStream();
}
代码示例来源:origin: pedroSG94/rtmp-rtsp-stream-client-java
/**
* Stop record MP4 video started with @startRecord. If you don't call it file will be unreadable.
*/
public void stopRecord() {
recording = false;
if (mediaMuxer != null) {
if (canRecord) {
mediaMuxer.stop();
mediaMuxer.release();
canRecord = false;
}
mediaMuxer = null;
}
videoTrack = -1;
audioTrack = -1;
if (!streaming) stopStream();
}
代码示例来源:origin: pedroSG94/rtmp-rtsp-stream-client-java
/**
* Stop record MP4 video started with @startRecord. If you don't call it file will be unreadable.
*/
public void stopRecord() {
recording = false;
if (mediaMuxer != null) {
if (canRecord) {
mediaMuxer.stop();
mediaMuxer.release();
canRecord = false;
}
mediaMuxer = null;
}
videoTrack = -1;
audioTrack = -1;
if (!streaming) stopStream();
}
代码示例来源:origin: aserbao/AndroidCamera
private void releaseEncoder() {
if (mMediaCodec != null) {
mMediaCodec.stop();
mMediaCodec.release();
mMediaCodec = null;
}
if (mInputSurface != null) {
mInputSurface.release();
mInputSurface = null;
}
if (mMuxer != null) {
mMuxer.stop();
mMuxer.release();
mMuxer = null;
}
}
代码示例来源:origin: aserbao/AndroidCamera
private void releaseEncoder() {
if (mVideoMediaCodec != null) {
mVideoMediaCodec.stop();
mVideoMediaCodec.release();
mVideoMediaCodec = null;
}
if (mInputSurface != null) {
mInputSurface.release();
mInputSurface = null;
}
if (mediaMuxer != null) {
mediaMuxer.stop();
mediaMuxer.release();
mediaMuxer = null;
}
}
内容来源于网络,如有侵权,请联系作者删除!