Agora Java API Reference for Android
|
Public Member Functions | |
boolean | createStreaming (String filename, int sampleRate, int channels, int quality) |
void | setChannelCount (int channels) |
void | setSampleRate (int sample_rate) |
void | releaseStreaming () |
void | encodeFrame (byte[] data) |
boolean | createAACStreaming (int sampleRate, int channels, int encodeRate) |
boolean | setAACEncodeBitrate (int bitrate) |
void | releaseAACStreaming () |
int | encodeAACFrame (byte[] data) |
Simplifies the MediaCodec interface by wrapping around the buffer processing operations.
boolean io.agora.rtc.audio.MediaCodecAudioEncoder.createStreaming | ( | String | filename, |
int | sampleRate, | ||
int | channels, | ||
int | quality | ||
) |
Open the audio file
void io.agora.rtc.audio.MediaCodecAudioEncoder.setChannelCount | ( | int | channels | ) |
channels | channels for the encoded file |
void io.agora.rtc.audio.MediaCodecAudioEncoder.setSampleRate | ( | int | sample_rate | ) |
sample_rate | sample rate for the encoded file |
void io.agora.rtc.audio.MediaCodecAudioEncoder.releaseStreaming | ( | ) |
Releases resources and ends the encoding/decoding session.
void io.agora.rtc.audio.MediaCodecAudioEncoder.encodeFrame | ( | byte [] | data | ) |
Encode a frame of audio data, return it in mOutputBuffers
boolean io.agora.rtc.audio.MediaCodecAudioEncoder.createAACStreaming | ( | int | sampleRate, |
int | channels, | ||
int | encodeRate | ||
) |
Below code is dedicated to encoding raw pcm data as bit stream instead of writing a file
sampleRate | |
encodeRate |
boolean io.agora.rtc.audio.MediaCodecAudioEncoder.setAACEncodeBitrate | ( | int | bitrate | ) |
Set bitrate for encoder
void io.agora.rtc.audio.MediaCodecAudioEncoder.releaseAACStreaming | ( | ) |
Release the aac encoder
int io.agora.rtc.audio.MediaCodecAudioEncoder.encodeAACFrame | ( | byte [] | data | ) |
data |