AudioEncoder

Created by pedro on 19/01/17. Encode PCM audio data to ACC and return in a callback

Constructors

Link copied to clipboard
constructor(getAudioData: GetAudioData)

Properties

Link copied to clipboard
val inputSize: Int = 8192

Functions

Link copied to clipboard
open fun forceCodecType(codecType: CodecUtil.CodecType)
Link copied to clipboard
open fun formatChanged(@NonNull mediaCodec: MediaCodec, @NonNull mediaFormat: MediaFormat)
Link copied to clipboard
open fun getType(): String
Link copied to clipboard
open fun inputAvailable(@NonNull mediaCodec: MediaCodec, inBufferIndex: Int)
abstract fun inputAvailable(mediaCodec: MediaCodec, inBufferIndex: Int)
Link copied to clipboard
open fun inputPCMData(frame: Frame)
Set custom PCM data.
Link copied to clipboard
open fun isRunning(): Boolean
Link copied to clipboard
open fun outputAvailable(@NonNull mediaCodec: MediaCodec, outBufferIndex: Int, @NonNull bufferInfo: MediaCodec.BufferInfo)
abstract fun outputAvailable(mediaCodec: MediaCodec, outBufferIndex: Int, bufferInfo: MediaCodec.BufferInfo)
Link copied to clipboard
Prepare encoder with default parameters
open fun prepareAudioEncoder(bitRate: Int, sampleRate: Int, isStereo: Boolean): Boolean
Prepare encoder with custom parameters
Link copied to clipboard
open fun reset(): Boolean
Link copied to clipboard
open fun restart()
Link copied to clipboard
open fun setEncoderErrorCallback(encoderErrorCallback: EncoderErrorCallback)
Link copied to clipboard
open fun setGetFrame(getFrame: GetFrame)
Link copied to clipboard
open fun setSampleRate(sampleRate: Int)
Link copied to clipboard
open fun setTimestampMode(timestampMode: TimestampMode)
Link copied to clipboard
open fun setType(type: String)
Link copied to clipboard
open fun start()
open fun start(startTs: Long)
open fun start(resetTs: Boolean)
Link copied to clipboard
open fun stop()
open fun stop(resetTs: Boolean)