|
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
#include <packetizer.h>
Public Member Functions | |
| Packetizer (packet::IWriter &writer, packet::IComposer &composer, IFrameEncoder &payload_encoder, packet::PacketFactory &packet_factory, core::BufferFactory< uint8_t > &buffer_factory, core::nanoseconds_t packet_length, const audio::SampleSpec &sample_spec, unsigned int payload_type) | |
| Initialization. | |
| virtual void | write (Frame &frame) |
| Write audio frame. | |
| void | flush () |
| Flush buffered packet, if any. | |
| bool | valid () const |
| Check if object is successfully constructed. | |
| virtual void | write (Frame &frame)=0 |
| Write audio frame. | |
Public Member Functions inherited from roc::core::ListNode | |
| ListNodeData * | list_node_data () const |
| Get list node data. | |
Definition at line 34 of file packetizer.h.
| roc::audio::Packetizer::Packetizer | ( | packet::IWriter & | writer, |
| packet::IComposer & | composer, | ||
| IFrameEncoder & | payload_encoder, | ||
| packet::PacketFactory & | packet_factory, | ||
| core::BufferFactory< uint8_t > & | buffer_factory, | ||
| core::nanoseconds_t | packet_length, | ||
| const audio::SampleSpec & | sample_spec, | ||
| unsigned int | payload_type | ||
| ) |
Initialization.
Parameters
writer is used to write generated packetscomposer is used to initialize new packetspayload_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 defines the sample specpayload_type defines packet payload type | void roc::audio::Packetizer::flush | ( | ) |
Flush buffered packet, if any.
| bool roc::audio::Packetizer::valid | ( | ) | const |
Check if object is successfully constructed.
|
virtual |
Write audio frame.
Implements roc::audio::IFrameWriter.