Public Member Functions | |
| RTP_JitterBuffer (RTP_Session &session, unsigned minJitterDelay, unsigned maxJitterDelay, PINDEX stackSize=30000) | |
| ~RTP_JitterBuffer () | |
| void | SetDelay (unsigned minJitterDelay, unsigned maxJitterDelay) |
| void | UseImmediateReduction (BOOL state) |
| virtual BOOL | ReadData (DWORD timestamp, RTP_DataFrame &frame) |
| DWORD | GetJitterTime () const |
| DWORD | GetPacketsTooLate () const |
| DWORD | GetBufferOverruns () const |
| DWORD | GetMaxConsecutiveMarkerBits () const |
| void | SetMaxConsecutiveMarkerBits (DWORD max) |
| void | Resume () |
Protected Member Functions | |
| BOOL | Init (Entry *¤tReadFrame, BOOL &markerWarning) |
| BOOL | PreRead (Entry *¤tReadFrame, BOOL &markerWarning) |
| BOOL | OnRead (Entry *¤tReadFrame, BOOL &markerWarning, BOOL loop) |
| void | DeInit (Entry *¤tReadFrame, BOOL &markerWarning) |
Protected Attributes | |
| RTP_Session & | session |
| PINDEX | bufferSize |
| DWORD | minJitterTime |
| DWORD | maxJitterTime |
| DWORD | maxConsecutiveMarkerBits |
| unsigned | currentDepth |
| DWORD | currentJitterTime |
| DWORD | packetsTooLate |
| unsigned | bufferOverruns |
| unsigned | consecutiveBufferOverruns |
| DWORD | consecutiveMarkerBits |
| PTimeInterval | consecutiveEarlyPacketStartTime |
| DWORD | lastWriteTimestamp |
| PTimeInterval | lastWriteTick |
| DWORD | jitterCalc |
| DWORD | targetJitterTime |
| unsigned | jitterCalcPacketCount |
| BOOL | doJitterReductionImmediately |
| BOOL | doneFreeTrash |
| Entry * | oldestFrame |
| Entry * | newestFrame |
| Entry * | freeFrames |
| Entry * | currentWriteFrame |
| PMutex | bufferMutex |
| BOOL | shuttingDown |
| BOOL | preBuffering |
| BOOL | doneFirstWrite |
| RTP_JitterBufferAnalyser * | analyser |
| PThread * | jitterThread |
| PINDEX | jitterStackSize |
Friends | |
| class | RTP_AggregatedHandle |
Classes | |
| class | Entry |
Definition at line 102 of file jitter.h.
| RTP_JitterBuffer::RTP_JitterBuffer | ( | RTP_Session & | session, | |
| unsigned | minJitterDelay, | |||
| unsigned | maxJitterDelay, | |||
| PINDEX | stackSize = 30000 | |||
| ) |
| session | Associated RTP session tor ead data from |
| minJitterDelay | Minimum delay in RTP timestamp units |
| maxJitterDelay | Maximum delay in RTP timestamp units |
| stackSize | Stack size for jitter thread |
Definition at line 277 of file jitter.cxx.
References analyser, bufferOverruns, bufferSize, consecutiveBufferOverruns, consecutiveEarlyPacketStartTime, consecutiveMarkerBits, currentDepth, currentJitterTime, currentWriteFrame, doJitterReductionImmediately, doneFirstWrite, doneFreeTrash, freeFrames, jitterCalc, jitterCalcPacketCount, lastWriteTick, lastWriteTimestamp, maxConsecutiveMarkerBits, maxJitterTime, minJitterTime, newestFrame, RTP_JitterBuffer::Entry::next, oldestFrame, packetsTooLate, preBuffering, RTP_JitterBuffer::Entry::prev, shuttingDown, and targetJitterTime.
| void RTP_JitterBuffer::SetDelay | ( | unsigned | minJitterDelay, | |
| unsigned | maxJitterDelay | |||
| ) |
Set the maximum delay the jitter buffer will operate to.
| minJitterDelay | Minimum delay in RTP timestamp units |
| maxJitterDelay | Maximum delay in RTP timestamp units |
Definition at line 394 of file jitter.cxx.
References bufferMutex, bufferOverruns, bufferSize, consecutiveBufferOverruns, consecutiveEarlyPacketStartTime, consecutiveMarkerBits, currentJitterTime, freeFrames, jitterThread, maxJitterTime, minJitterTime, RTP_JitterBuffer::Entry::next, packetsTooLate, preBuffering, RTP_JitterBuffer::Entry::prev, shuttingDown, and targetJitterTime.
Referenced by RTP_Session::SetJitterBufferSize().
| BOOL RTP_JitterBuffer::ReadData | ( | DWORD | timestamp, | |
| RTP_DataFrame & | frame | |||
| ) | [virtual] |
Read a data frame from the RTP channel. Any control frames received are dispatched to callbacks and are not returned by this function. It will block until a data frame is available or an error occurs.
| timestamp | Timestamp to read from buffer. |
| frame | Frame read from the RTP session |
Definition at line 614 of file jitter.cxx.
References analyser, bufferMutex, consecutiveEarlyPacketStartTime, consecutiveMarkerBits, currentDepth, currentJitterTime, currentWriteFrame, doJitterReductionImmediately, doneFirstWrite, freeFrames, RTP_DataFrame::GetMarker(), RTP_DataFrame::GetTimestamp(), jitterCalc, jitterCalcPacketCount, lastWriteTick, lastWriteTimestamp, maxConsecutiveMarkerBits, maxJitterTime, minJitterTime, newestFrame, RTP_JitterBuffer::Entry::next, oldestFrame, preBuffering, RTP_JitterBuffer::Entry::prev, RTP_DataFrame::SetPayloadSize(), shuttingDown, targetJitterTime, and RTP_JitterBuffer::Entry::tick.
Referenced by RTP_Session::ReadBufferedData().
| DWORD RTP_JitterBuffer::GetJitterTime | ( | ) | const [inline] |
Get current delay for jitter buffer.
Definition at line 139 of file jitter.h.
References currentJitterTime.
Referenced by RTP_Session::GetJitterBufferSize().
| DWORD RTP_JitterBuffer::GetPacketsTooLate | ( | ) | const [inline] |
Get total number received packets too late to go into jitter buffer.
Definition at line 143 of file jitter.h.
References packetsTooLate.
Referenced by RTP_Session::GetPacketsTooLate().
| DWORD RTP_JitterBuffer::GetBufferOverruns | ( | ) | const [inline] |
Get total number received packets that overran the jitter buffer.
Definition at line 147 of file jitter.h.
References bufferOverruns.
| DWORD RTP_JitterBuffer::GetMaxConsecutiveMarkerBits | ( | ) | const [inline] |
Get maximum consecutive marker bits before buffer starts to ignore them.
Definition at line 151 of file jitter.h.
References maxConsecutiveMarkerBits.
| void RTP_JitterBuffer::SetMaxConsecutiveMarkerBits | ( | DWORD | max | ) | [inline] |
Set maximum consecutive marker bits before buffer starts to ignore them.
Definition at line 155 of file jitter.h.
References maxConsecutiveMarkerBits.
| void RTP_JitterBuffer::Resume | ( | ) |
Start seperate jitter thread
Definition at line 439 of file jitter.cxx.
References jitterStackSize, jitterThread, and RTP_AggregatedHandle.
Referenced by RTP_Session::SetJitterBufferSize().
1.5.2