public class AudioFrame
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
audioTrackNumber
The number of the audio track
|
private int |
avsyncType
Audio-video sync type
|
private java.nio.ByteBuffer |
buffer
Audio data buffer
|
private int |
bytesPerSample
Number of bytes per sample
|
private int |
channels
Number of audio channels
|
private int |
farFiledFlag
Far field flag
|
private int |
musicProb
Probability of music presence
|
private int |
pitch
Pitch of the audio signal
|
private long |
presentationMs
Presentation timestamp in milliseconds
|
private long |
renderTimeMs
Render time in milliseconds
|
private int |
rms
Root mean square of the audio signal
|
private int |
rtpTimestamp
RTP timestamp of the first sample in the audio frame
|
private int |
samplesPerChannel
Number of samples per channel
|
private int |
samplesPerSec
Sampling rate in samples per second
|
private int |
type
Type of audio frame
|
private int |
voiceProb
Probability of voice presence
|
| Constructor and Description |
|---|
AudioFrame()
Default constructor for AudioFrame.
|
AudioFrame(int type,
int samplesPerChannel,
int bytesPerSample,
int channels,
int samplesPerSec,
java.nio.ByteBuffer buffer,
long renderTimeMs,
long presentationMs,
int avsyncType,
int audioTrackNumber,
int rtpTimestamp,
int farFiledFlag,
int rms,
int voiceProb,
int musicProb,
int pitch)
Constructs an AudioFrame with all parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAudioTrackNumber()
Gets the number of the audio track.
|
int |
getAvsyncType()
Gets the audio-video sync type.
|
java.nio.ByteBuffer |
getBuffer()
Gets the audio data buffer.
|
int |
getBytesPerSample()
Gets the number of bytes per sample.
|
int |
getChannels()
Gets the number of audio channels.
|
int |
getFarFiledFlag()
Gets the far field flag.
|
int |
getMusicProb()
Gets the probability of music presence.
|
int |
getPitch()
Gets the pitch of the audio signal.
|
long |
getPresentationMs()
Gets the presentation timestamp in milliseconds.
|
long |
getRenderTimeMs()
Gets the render time in milliseconds.
|
int |
getRms()
Gets the root mean square of the audio signal.
|
int |
getRtpTimestamp()
Gets the RTP timestamp of the first sample in the audio frame.
|
int |
getSamplesPerChannel()
Gets the number of samples per channel.
|
int |
getSamplesPerSec()
Gets the sampling rate in samples per second.
|
int |
getType()
Gets the type of audio frame.
|
int |
getVoiceProb()
Gets the probability of voice presence.
|
void |
setAudioTrackNumber(int audioTrackNumber)
Sets the number of the audio track.
|
void |
setAvsyncType(int avsyncType)
Sets the audio-video sync type.
|
void |
setBuffer(java.nio.ByteBuffer buffer)
Sets the audio data buffer.
|
void |
setBytesPerSample(int bytesPerSample)
Sets the number of bytes per sample.
|
void |
setChannels(int channels)
Sets the number of audio channels.
|
void |
setFarFiledFlag(int farFiledFlag)
Sets the far field flag.
|
void |
setMusicProb(int musicProb)
Sets the probability of music presence.
|
void |
setPitch(int pitch)
Sets the pitch of the audio signal.
|
void |
setPresentationMs(long presentationMs)
Sets the presentation timestamp in milliseconds.
|
void |
setRenderTimeMs(long renderTimeMs)
Sets the render time in milliseconds.
|
void |
setRms(int rms)
Sets the root mean square of the audio signal.
|
void |
setRtpTimestamp(int rtpTimestamp)
Sets the RTP timestamp of the first sample in the audio frame.
|
void |
setSamplesPerChannel(int samplesPerChannel)
Sets the number of samples per channel.
|
void |
setSamplesPerSec(int samplesPerSec)
Sets the sampling rate in samples per second.
|
void |
setType(int type)
Sets the type of audio frame.
|
void |
setVoiceProb(int voiceProb)
Sets the probability of voice presence.
|
java.lang.String |
toString() |
private int type
private int samplesPerChannel
private int bytesPerSample
private int channels
private int samplesPerSec
private java.nio.ByteBuffer buffer
private long renderTimeMs
private long presentationMs
private int avsyncType
private int audioTrackNumber
private int rtpTimestamp
private int farFiledFlag
private int rms
private int voiceProb
private int musicProb
private int pitch
public AudioFrame()
public AudioFrame(int type,
int samplesPerChannel,
int bytesPerSample,
int channels,
int samplesPerSec,
java.nio.ByteBuffer buffer,
long renderTimeMs,
long presentationMs,
int avsyncType,
int audioTrackNumber,
int rtpTimestamp,
int farFiledFlag,
int rms,
int voiceProb,
int musicProb,
int pitch)
type - Type of audio framesamplesPerChannel - Number of samples per channelbytesPerSample - Number of bytes per samplechannels - Number of audio channelssamplesPerSec - Sampling rate in samples per secondbuffer - Audio data bufferrenderTimeMs - Render time in millisecondspresentationMs - Presentation timestamp in millisecondsavsyncType - Audio-video sync typeaudioTrackNumber - The number of the audio trackrtpTimestamp - RTP timestamp of the first samplefarFiledFlag - Far field flagrms - Root mean square of the audio signalvoiceProb - Probability of voice presencemusicProb - Probability of music presencepitch - Pitch of the audio signalpublic int getType()
public void setType(int type)
type - Type of audio framepublic int getSamplesPerChannel()
public void setSamplesPerChannel(int samplesPerChannel)
samplesPerChannel - Number of samples per channelpublic int getBytesPerSample()
public void setBytesPerSample(int bytesPerSample)
bytesPerSample - Number of bytes per samplepublic int getChannels()
public void setChannels(int channels)
channels - Number of audio channelspublic int getSamplesPerSec()
public void setSamplesPerSec(int samplesPerSec)
samplesPerSec - Sampling rate in samples per secondpublic java.nio.ByteBuffer getBuffer()
public void setBuffer(java.nio.ByteBuffer buffer)
buffer - Audio data bufferpublic long getRenderTimeMs()
public void setRenderTimeMs(long renderTimeMs)
renderTimeMs - Render time in millisecondspublic long getPresentationMs()
public void setPresentationMs(long presentationMs)
presentationMs - Presentation timestamp in millisecondspublic int getAvsyncType()
public void setAvsyncType(int avsyncType)
avsyncType - Audio-video sync typepublic int getAudioTrackNumber()
public void setAudioTrackNumber(int audioTrackNumber)
audioTrackNumber - The number of the audio trackpublic int getRtpTimestamp()
public void setRtpTimestamp(int rtpTimestamp)
rtpTimestamp - RTP timestamppublic int getFarFiledFlag()
public void setFarFiledFlag(int farFiledFlag)
farFiledFlag - Far field flagpublic int getRms()
public void setRms(int rms)
rms - Root mean square valuepublic int getVoiceProb()
public void setVoiceProb(int voiceProb)
voiceProb - Probability of voice presencepublic int getMusicProb()
public void setMusicProb(int musicProb)
musicProb - Probability of music presencepublic int getPitch()
public void setPitch(int pitch)
pitch - Pitch of the audio signalpublic java.lang.String toString()
toString in class java.lang.Object