Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::audio::Depacketizer Class Reference

Depacketizer. More...

#include <depacketizer.h>

Inheritance diagram for roc::audio::Depacketizer:
Collaboration diagram for roc::audio::Depacketizer:

Public Member Functions

 Depacketizer (packet::IReader &reader, IFrameDecoder &payload_decoder, const SampleSpec &sample_spec, bool beep)
 Initialization. More...
 
bool is_valid () const
 Was depacketizer constructed without errors? More...
 
bool is_started () const
 Did depacketizer catch first packet? More...
 
virtual bool read (Frame &frame)
 Read audio frame. More...
 
packet::stream_timestamp_t next_timestamp () const
 Get next timestamp to be rendered. More...
 
- Public Member Functions inherited from roc::core::ListNode< Tag >
ListDatalist_data () const
 Get pointer to internal data. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from roc::core::ListNode< Tag >
static ListNodelist_node (ListData *data)
 Get pointer to parent node from pointer to internal data. More...
 

Detailed Description

Depacketizer.

Remarks
Reads packets from a packet reader, decodes samples from packets using a decoder, and produces an audio stream.

Definition at line 30 of file depacketizer.h.

Constructor & Destructor Documentation

◆ Depacketizer()

roc::audio::Depacketizer::Depacketizer ( packet::IReader reader,
IFrameDecoder payload_decoder,
const SampleSpec sample_spec,
bool  beep 
)

Initialization.

Parameters

  • reader is used to read packets
  • payload_decoder is used to extract samples from packets
  • sample_spec describes output frames
  • beep enables weird beeps instead of silence on packet loss

Member Function Documentation

◆ is_started()

bool roc::audio::Depacketizer::is_started ( ) const

Did depacketizer catch first packet?

◆ is_valid()

bool roc::audio::Depacketizer::is_valid ( ) const

Was depacketizer constructed without errors?

◆ next_timestamp()

packet::stream_timestamp_t roc::audio::Depacketizer::next_timestamp ( ) const

Get next timestamp to be rendered.

Precondition
is_started() should return true

◆ read()

virtual bool roc::audio::Depacketizer::read ( Frame frame)
virtual

Read audio frame.

Implements roc::audio::IFrameReader.


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