// Path: sdk/src/main/java/io/kickflip/sdk/event/MuxerFinishedEvent.java
// public class MuxerFinishedEvent {
// }


import android.media.MediaCodec;
import android.media.MediaFormat;
import android.os.Build;
import android.util.Log;
import com.google.common.eventbus.EventBus;
import java.nio.ByteBuffer;
import io.kickflip.sdk.event.MuxerFinishedEvent;
import static com.google.common.base.Preconditions.checkNotNull;
     * e.g /sdcard/app/uuid/index.m3u8
     * @return
     */
    public String getOutputPath(){
        return mOutputPath;
    }

    /**
     * Adds the specified track and returns the track index
     *
     * @param trackFormat MediaFormat of the track to add. Gotten from MediaCodec#dequeueOutputBuffer
     *                    when returned status is INFO_OUTPUT_FORMAT_CHANGED
     * @return index of track in output file
     */
    public int addTrack(MediaFormat trackFormat){
        mNumTracks++;
        return mNumTracks - 1;
    }

    /**
     * Called by the hosting Encoder
     * to notify the Muxer that it should no
     * longer assume the Encoder resources are available.
     *
     */
    public void onEncoderReleased(int trackIndex){
    }

    public void release(){
        if(mEventBus != null)
// Path: sdk/src/main/java/io/kickflip/sdk/event/MuxerFinishedEvent.java
// public class MuxerFinishedEvent {
// }


// Path: sdk/src/main/java/io/kickflip/sdk/av/Muxer.java
import android.media.MediaCodec;
import android.media.MediaFormat;
import android.os.Build;
import android.util.Log;
import com.google.common.eventbus.EventBus;
import java.nio.ByteBuffer;
import io.kickflip.sdk.event.MuxerFinishedEvent;
import static com.google.common.base.Preconditions.checkNotNull;

     * e.g /sdcard/app/uuid/index.m3u8
     * @return
     */
    public String getOutputPath(){
        return mOutputPath;
    }

    /**
     * Adds the specified track and returns the track index
     *
     * @param trackFormat MediaFormat of the track to add. Gotten from MediaCodec#dequeueOutputBuffer
     *                    when returned status is INFO_OUTPUT_FORMAT_CHANGED
     * @return index of track in output file
     */
    public int addTrack(MediaFormat trackFormat){
        mNumTracks++;
        return mNumTracks - 1;
    }

    /**
     * Called by the hosting Encoder
     * to notify the Muxer that it should no
     * longer assume the Encoder resources are available.
     *
     */
    public void onEncoderReleased(int trackIndex){
    }

    public void release(){
        if(mEventBus != null)
            mEventBus.post(new MuxerFinishedEvent());