Package com.banuba.sdk.internal.encoding
Class MediaMuxerWrapper
- java.lang.Object
-
- com.banuba.sdk.internal.encoding.MediaMuxerWrapper
-
- All Implemented Interfaces:
com.banuba.sdk.internal.encoding.EncoderHandlerThreadVideo.EncoderListener
- Direct Known Subclasses:
MediaMuxerWrapperExternalAudio
public class MediaMuxerWrapper extends java.lang.Object implements com.banuba.sdk.internal.encoding.EncoderHandlerThreadVideo.EncoderListener
-
-
Field Summary
Fields Modifier and Type Field Description protected long
mAudioPresentationTimeUsLast
protected int
mExternalAudioTrackIndex
protected android.media.MediaMuxer
mMediaMuxer
protected int
mStartedCount
static int
RECORD_BUFFER_AUDIO
static int
RECORD_EXTERNAL_AUDIO_CODEC
static int
RECORD_MIC_AUDIO
static int
RECORD_NO_AUDIO
-
Constructor Summary
Constructors Constructor Description MediaMuxerWrapper(RenderHandler handler, RecordingListenerHandler recordingListenerHandler, java.lang.String fileName, int recordAudioType, IEncoderSync encoderSync, long timeBase, float speed, int w, int h)
MediaMuxerWrapper(RenderHandler handler, RecordingListenerHandler recordingListenerHandler, java.lang.String fileName, int recordAudioType, IEncoderSync encoderSync, long timeBase, float speed, int w, int h, android.media.MediaFormat formatVideo, android.media.MediaFormat formatAudio)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
frameAvailableSoon()
IAudioDataSender
getAudioSender()
android.view.Surface
getInputSurface()
void
onAudioEncodingFinished()
void
onAudioStarted(long startTimeNano)
void
onAudioStopped()
void
onVideoEncodingFinished(long duration)
void
prepare()
void
setPause(boolean pause)
void
startRecording()
void
stopRecording()
void
waitForFinish()
-
-
-
Field Detail
-
mMediaMuxer
protected final android.media.MediaMuxer mMediaMuxer
-
mStartedCount
protected int mStartedCount
-
mExternalAudioTrackIndex
protected int mExternalAudioTrackIndex
-
mAudioPresentationTimeUsLast
protected long mAudioPresentationTimeUsLast
-
RECORD_NO_AUDIO
public static final int RECORD_NO_AUDIO
- See Also:
- Constant Field Values
-
RECORD_MIC_AUDIO
public static final int RECORD_MIC_AUDIO
- See Also:
- Constant Field Values
-
RECORD_BUFFER_AUDIO
public static final int RECORD_BUFFER_AUDIO
- See Also:
- Constant Field Values
-
RECORD_EXTERNAL_AUDIO_CODEC
public static final int RECORD_EXTERNAL_AUDIO_CODEC
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MediaMuxerWrapper
public MediaMuxerWrapper(@Nullable RenderHandler handler, @Nullable RecordingListenerHandler recordingListenerHandler, @NonNull java.lang.String fileName, int recordAudioType, @Nullable IEncoderSync encoderSync, long timeBase, float speed, int w, int h) throws java.io.IOException
- Throws:
java.io.IOException
-
MediaMuxerWrapper
public MediaMuxerWrapper(@Nullable RenderHandler handler, @Nullable RecordingListenerHandler recordingListenerHandler, @NonNull java.lang.String fileName, int recordAudioType, @Nullable IEncoderSync encoderSync, long timeBase, float speed, int w, int h, @Nullable android.media.MediaFormat formatVideo, @Nullable android.media.MediaFormat formatAudio) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getAudioSender
@Nullable public IAudioDataSender getAudioSender()
-
setPause
public void setPause(boolean pause)
-
prepare
public void prepare() throws java.io.IOException
- Throws:
java.io.IOException
-
startRecording
public void startRecording()
-
stopRecording
public void stopRecording()
-
getInputSurface
public android.view.Surface getInputSurface()
-
frameAvailableSoon
public void frameAvailableSoon()
-
waitForFinish
public void waitForFinish()
-
onVideoEncodingFinished
public void onVideoEncodingFinished(long duration)
- Specified by:
onVideoEncodingFinished
in interfacecom.banuba.sdk.internal.encoding.EncoderHandlerThreadVideo.EncoderListener
-
onAudioEncodingFinished
public void onAudioEncodingFinished()
-
onAudioStopped
public void onAudioStopped()
-
onAudioStarted
public void onAudioStarted(long startTimeNano)
-
-