Class 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 Detail

      • mMediaMuxer

        protected final android.media.MediaMuxer mMediaMuxer
      • mStartedCount

        protected int mStartedCount
      • mExternalAudioTrackIndex

        protected int mExternalAudioTrackIndex
      • mAudioPresentationTimeUsLast

        protected long mAudioPresentationTimeUsLast
      • 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

      • 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 interface com.banuba.sdk.internal.encoding.EncoderHandlerThreadVideo.EncoderListener
      • onAudioEncodingFinished

        public void onAudioEncodingFinished()
      • onAudioStopped

        public void onAudioStopped()
      • onAudioStarted

        public void onAudioStarted​(long startTimeNano)