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 Object
implements com.banuba.sdk.internal.encoding.EncoderHandlerThreadVideo.EncoderListener
-
Field Summary
Modifier and TypeFieldDescriptionprotected long
protected int
protected final android.media.MediaMuxer
protected int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionMediaMuxerWrapper
(RenderHandler handler, RecordingListenerHandler recordingListenerHandler, String fileName, int recordAudioType, IEncoderSync encoderSync, long timeBase, float speed, int w, int h) MediaMuxerWrapper
(RenderHandler handler, RecordingListenerHandler recordingListenerHandler, String fileName, int recordAudioType, IEncoderSync encoderSync, long timeBase, float speed, int w, int h, android.media.MediaFormat formatVideo, android.media.MediaFormat formatAudio) -
Method Summary
Modifier and TypeMethodDescriptionvoid
android.view.Surface
void
void
onAudioStarted
(long startTimeNano) void
void
onVideoEncodingFinished
(long duration) void
prepare()
void
setPause
(boolean pause) void
void
void
-
Field Details
-
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:
-
RECORD_MIC_AUDIO
public static final int RECORD_MIC_AUDIO- See Also:
-
RECORD_BUFFER_AUDIO
public static final int RECORD_BUFFER_AUDIO- See Also:
-
RECORD_EXTERNAL_AUDIO_CODEC
public static final int RECORD_EXTERNAL_AUDIO_CODEC- See Also:
-
-
Constructor Details
-
MediaMuxerWrapper
public MediaMuxerWrapper(@Nullable RenderHandler handler, @Nullable RecordingListenerHandler recordingListenerHandler, @NonNull String fileName, int recordAudioType, @Nullable IEncoderSync encoderSync, long timeBase, float speed, int w, int h) throws IOException - Throws:
IOException
-
MediaMuxerWrapper
public MediaMuxerWrapper(@Nullable RenderHandler handler, @Nullable RecordingListenerHandler recordingListenerHandler, @NonNull 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 IOException - Throws:
IOException
-
-
Method Details
-
getAudioSender
-
setPause
public void setPause(boolean pause) -
prepare
- Throws:
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)
-