12 #ifndef ROC_AUDIO_PACKETIZER_H_
13 #define ROC_AUDIO_PACKETIZER_H_
91 void pad_packet_(
size_t written_payload_size);
103 size_t samples_per_packet_;
104 size_t payload_size_;
Audio frame encoder interface.
size_t sample_rate() const
Get sample rate.
bool is_valid() const
Check if object is successfully constructed.
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.
virtual void write(Frame &frame)
Write audio frame.
void flush()
Flush buffered packet, if any.
const PacketizerMetrics & metrics() const
Get metrics.
Sample specification. Describes sample rate and channels.
Base class for non-copyable objects.
Packet composer interface.
Packet sequencer. Fills protocol-specific packet headers to form a continous sequence....
Packet composer interface.
Audio frame encoder interface.
int64_t nanoseconds_t
Nanoseconds.
uint64_t payload_count
Cumulative count of produced payload bytes. This excludes packet headers and padding.
uint64_t packet_count
Cumulative count of produced packets.
Various units used in packets.