group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
VoiceJitterBuffer Class Reference

#include <VoiceJitterBuffer.hpp>

Classes

struct  EncodedFrame

Public Member Functions

 VoiceJitterBuffer (std::size_t prebufferFrames=2, std::size_t maxFrames=10)
void push (std::uint16_t sequence, std::uint8_t frameMs, std::span< const std::uint8_t > opus)
std::optional< EncodedFramepop ()
std::size_t size () const noexcept
void reset ()

Private Member Functions

bool tooOld (std::uint16_t sequence) const noexcept
std::uint16_t firstSequence () const noexcept

Private Attributes

std::size_t prebufferFrames_ = 2
std::size_t maxFrames_ = 10
std::vector< EncodedFrameframes_
std::uint16_t expectedSequence_ = 0
bool hasExpected_ = false

Constructor & Destructor Documentation

◆ VoiceJitterBuffer()

VoiceJitterBuffer::VoiceJitterBuffer ( std::size_t prebufferFrames = 2,
std::size_t maxFrames = 10 )
explicit

Member Function Documentation

◆ firstSequence()

std::uint16_t VoiceJitterBuffer::firstSequence ( ) const
nodiscardprivatenoexcept
Here is the caller graph for this function:

◆ pop()

std::optional< VoiceJitterBuffer::EncodedFrame > VoiceJitterBuffer::pop ( )
nodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

◆ push()

void VoiceJitterBuffer::push ( std::uint16_t sequence,
std::uint8_t frameMs,
std::span< const std::uint8_t > opus )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void VoiceJitterBuffer::reset ( )

◆ size()

std::size_t VoiceJitterBuffer::size ( ) const
inlinenodiscardnoexcept
Here is the caller graph for this function:

◆ tooOld()

bool VoiceJitterBuffer::tooOld ( std::uint16_t sequence) const
nodiscardprivatenoexcept
Here is the caller graph for this function:

Member Data Documentation

◆ expectedSequence_

std::uint16_t VoiceJitterBuffer::expectedSequence_ = 0
private

◆ frames_

std::vector<EncodedFrame> VoiceJitterBuffer::frames_
private

◆ hasExpected_

bool VoiceJitterBuffer::hasExpected_ = false
private

◆ maxFrames_

std::size_t VoiceJitterBuffer::maxFrames_ = 10
private

◆ prebufferFrames_

std::size_t VoiceJitterBuffer::prebufferFrames_ = 2
private

The documentation for this class was generated from the following files: