-
- All Implemented Interfaces:
-
java.lang.Comparable
public class AudioFrame extends RtpFrame
Represents an audio frame for RTP communication.
-
-
Field Summary
Fields Modifier and Type Field Description public booleansilencepublic intrmspublic CallConstants.AudioCodecscodec
-
Method Summary
Modifier and Type Method Description voidcopy(Array<byte> data, int len)Copies the specified data into this AudioFrame. voidcopy(Array<byte> data, int offset, int len)Copies the specified data into this AudioFrame with an offset. voidcopy(Array<byte> data)Copies the specified data into this AudioFrame. static AudioFramegetNewFrame(int len)Retrieves a new AudioFrame with the specified length. static voidfree(AudioFrame frame)Frees the specified AudioFrame for reuse. AudioFramecloneFrame()Clones this AudioFrame. intcompareTo(RtpFrame that)Compares this AudioFrame with another RtpFrame based on sequence number. voidonDestroy()Frees this AudioFrame when it is destroyed. StringtoString()Returns a string representation of this AudioFrame. -
-
Method Detail
-
copy
void copy(Array<byte> data, int len)
Copies the specified data into this AudioFrame.
- Parameters:
data- the audio data to copy.len- the length of the audio data.
-
copy
void copy(Array<byte> data, int offset, int len)
Copies the specified data into this AudioFrame with an offset.
- Parameters:
data- the audio data to copy.offset- the offset in the data array.len- the length of the audio data.
-
copy
void copy(Array<byte> data)
Copies the specified data into this AudioFrame.
- Parameters:
data- the audio data to copy.
-
getNewFrame
static AudioFrame getNewFrame(int len)
Retrieves a new AudioFrame with the specified length.
- Parameters:
len- the length of the audio data.
-
free
static void free(AudioFrame frame)
Frees the specified AudioFrame for reuse.
- Parameters:
frame- the AudioFrame to free.
-
cloneFrame
AudioFrame cloneFrame()
Clones this AudioFrame.
-
compareTo
int compareTo(RtpFrame that)
Compares this AudioFrame with another RtpFrame based on sequence number.
- Parameters:
that- the other RtpFrame to compare with.
-
onDestroy
void onDestroy()
Frees this AudioFrame when it is destroyed.
-
-
-
-