14 #ifndef _MpJitterBuffer_h_ 15 #define _MpJitterBuffer_h_ 56 const UtlString& resourceName =
"unknown");
85 int wantedBufferSamples,
132 void setPlc(
const UtlString &plcName);
149 OsStatus
setVadParam(
const UtlString& name,
int value);
164 int wantedAdjustment);
166 OsStatus
sliceToFrames(
int decodedSamples,
int codecSampleRate,
236 #endif // _MpJitterBuffer_h_ void init(unsigned int samplesPerSec, unsigned int samplesPerFrame)
Initialize with given sample rate and frame size.
Definition: MpJitterBuffer.cpp:95
UtlBoolean mIsFirstPacket
Have we received our first packet or not.
Definition: MpJitterBuffer.h:206
MpDecoderPayloadMap * mpPayloadMap
Definition: MpJitterBuffer.h:210
Definition: MpPlcBase.h:40
int getSamplesNum() const
Get number of samples, remaining in buffer.
Definition: MpJitterBuffer.h:231
Definition: MpVadBase.h:40
MpJitterBuffer & operator=(const MpJitterBuffer &rhs)
Assignment operator.
Generic audio resampler.
Definition: MpResampler.h:34
MpAudioSample mDecodedData[DECODED_DATA_MAX_LENGTH]
temporarily store decoded data.
Definition: MpJitterBuffer.h:186
uint8_t mStreamRtpPayload
Payload type of last received RTP packet.
Definition: MpJitterBuffer.h:209
int adjustStream(MpAudioSample *pBuffer, int bufferSize, unsigned numSamples, int wantedAdjustment)
Reduce or extend audio fragment.
Definition: MpJitterBuffer.cpp:594
~MpJitterBuffer()
Destructor.
Definition: MpJitterBuffer.cpp:105
OsStatus setVadParam(const UtlString &name, int value)
Set parameter on the VAD component.
Definition: MpJitterBuffer.cpp:515
UtlString mPlcName
Packet Loss Concealer algorithm name.
Definition: MpJitterBuffer.h:216
MpAudioBufPtr mFrames[FRAMES_TO_STORE]
Buffer for decoded, resampled and sliced audio.
Definition: MpJitterBuffer.h:199
Base class for AGC algorithm.
Definition: MpAgcBase.h:35
Flow graph for coordinating the execution of media processing resources.
Definition: MpFlowGraphBase.h:91
RtpTimestamp mStreamTimestamp
Timestamp of last played RTP packet.
Definition: MpJitterBuffer.h:208
Definition: MpJitterBuffer.h:173
Smart pointer to MpRtpBuf.
Definition: MpRtpBuf.h:348
MpAgcBase * mpAgc
Automatic Gain Calculator instance.
Definition: MpJitterBuffer.h:219
int mOutputSampleRate
Definition: MpJitterBuffer.h:181
int16_t MpAudioSample
Definition: MpTypes.h:44
OsStatus pushPacket(const MpRtpBufPtr &rtpPacket, int minBufferSamples, int wantedBufferSamples, int &decodedSamples, int &adjustment, UtlBoolean &played)
Push packet into decoder buffer.
Definition: MpJitterBuffer.cpp:150
uint32_t RtpTimestamp
RTP timestamp.
Definition: MpTypes.h:60
Class for decoding of incoming RTP, resampling it to target sample rate and slicing to frames of targ...
Definition: MpJitterBuffer.h:45
MpFlowGraphBase * mpFlowGraph
Parent flowgraph for debugging.
Definition: MpJitterBuffer.h:220
Smart pointer to MpAudioBuf.
Definition: MpAudioBuf.h:168
Size of mDecodedData temporary buffer.
Definition: MpJitterBuffer.h:175
OsStatus sliceToFrames(int decodedSamples, int codecSampleRate, const MpSpeechParams &speechParams)
Definition: MpJitterBuffer.cpp:676
int mStreamSampleRate
Sample rate of incoming RTP stream.
Definition: MpJitterBuffer.h:180
int mSamplesPerFrame
Number of samples to put to output buffers.
Definition: MpJitterBuffer.h:185
MpJitterBuffer(MpDecoderPayloadMap *pPayloadMap=NULL, const UtlString &resourceName="unknown")
Constructor.
Definition: MpJitterBuffer.cpp:73
uint16_t RtpSeq
RTP sequence number.
Definition: MpTypes.h:59
unsigned mRemainingSamplesNum
Definition: MpJitterBuffer.h:197
MpPlcBase * mpPlc
Packet Loss Concealer instance.
Definition: MpJitterBuffer.h:217
Helper class for MprDecode - it maps payload types to decoder instances.
Definition: MpDecoderPayloadMap.h:27
void setFlowGraph(MpFlowGraphBase *pFlowgraph)
Set the pointer to the parent flowgraph for debug purposes.
Definition: MpJitterBuffer.cpp:509
int mOriginalSamples[FRAMES_TO_STORE]
before resampling was done.
Definition: MpJitterBuffer.h:200
unsigned mSamplesPerPacket
Number of samples in RTP packet.
Definition: MpJitterBuffer.h:213
unsigned mCurFrameNum
Definition: MpJitterBuffer.h:194
MpVadBase * mpVad
Voice Activity Detector instance.
Definition: MpJitterBuffer.h:218
void setCodecList(MpDecoderPayloadMap *pPayloadMap)
Update list of available decoders.
Definition: MpJitterBuffer.cpp:477
RtpSeq mStreamSeq
Sequence number of last played RTP packet.
Definition: MpJitterBuffer.h:207
void getFrame(MpAudioBufPtr &pFrame, int &numOriginalSamples)
Get next frame from decoder buffer.
Definition: MpJitterBuffer.cpp:450
MpResamplerBase * mpResampler
Definition: MpJitterBuffer.h:188
void reset()
Reset class to the initial state, preparing for handling new stream.
Definition: MpJitterBuffer.cpp:115
void setPlc(const UtlString &plcName)
Change PLC algorithm to one provided.
Definition: MpJitterBuffer.cpp:490