Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
#include <packetizer.h>
Public Member Functions | |
Packetizer (packet::IWriter &writer, packet::IComposer &composer, packet::ISequencer &sequencer, IFrameEncoder &payload_encoder, packet::PacketFactory &packet_factory, core::nanoseconds_t packet_length, const SampleSpec &sample_spec) | |
Initialization. More... | |
bool | is_valid () const |
Check if object is successfully constructed. More... | |
size_t | sample_rate () const |
Get sample rate. More... | |
const PacketizerMetrics & | metrics () const |
Get metrics. More... | |
virtual void | write (Frame &frame) |
Write audio frame. More... | |
void | flush () |
Flush buffered packet, if any. More... | |
Public Member Functions inherited from roc::core::ListNode< Tag > | |
ListData * | list_data () const |
Get pointer to internal data. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from roc::core::ListNode< Tag > | |
static ListNode * | list_node (ListData *data) |
Get pointer to parent node from pointer to internal data. More... | |
Definition at line 49 of file packetizer.h.
roc::audio::Packetizer::Packetizer | ( | packet::IWriter & | writer, |
packet::IComposer & | composer, | ||
packet::ISequencer & | sequencer, | ||
IFrameEncoder & | payload_encoder, | ||
packet::PacketFactory & | packet_factory, | ||
core::nanoseconds_t | packet_length, | ||
const SampleSpec & | sample_spec | ||
) |
Initialization.
Parameters
writer
is used to write generated packetscomposer
is used to initialize new packetssequencer
is used to put packets in sequencepayload_encoder
is used to write samples to packetspacket_factory
is used to allocate packetsbuffer_factory
is used to allocate buffers for packetspacket_length
defines packet length in nanosecondssample_spec
describes input frames void roc::audio::Packetizer::flush | ( | ) |
Flush buffered packet, if any.
bool roc::audio::Packetizer::is_valid | ( | ) | const |
Check if object is successfully constructed.
const PacketizerMetrics& roc::audio::Packetizer::metrics | ( | ) | const |
Get metrics.
size_t roc::audio::Packetizer::sample_rate | ( | ) | const |
Get sample rate.
|
virtual |
Write audio frame.
Implements roc::audio::IFrameWriter.