12 #ifndef ROC_FEC_OPENFEC_ENCODER_H_
13 #define ROC_FEC_OPENFEC_ENCODER_H_
25 #include <of_openfec_api.h>
28 #ifndef OF_USE_ENCODER
29 #error "OF_USE_ENCODER undefined"
32 #ifndef OF_USE_LDPC_STAIRCASE_CODEC
33 #error "OF_USE_LDPC_STAIRCASE_CODEC undefined"
63 virtual bool begin(
size_t sblen,
size_t rblen,
size_t payload_size);
79 bool resize_tabs_(
size_t size);
80 void reset_session_();
81 void update_session_params_(
size_t sblen,
size_t rblen,
size_t payload_size);
83 enum { Alignment = 8 };
90 of_session_t* of_sess_;
91 of_parameters_t* of_sess_params_;
93 of_codec_id_t codec_id_;
95 of_ldpc_parameters ldpc_params_;
96 of_rs_2_m_parameters_t rs_params_;
102 size_t max_block_length_;
Base class for non-copyable objects.
FEC block encoder interface.
Encoder implementation using OpenFEC library.
virtual bool begin(size_t sblen, size_t rblen, size_t payload_size)
Start block.
virtual void set(size_t index, const core::Slice< uint8_t > &buffer)
Store packet data for current block.
virtual size_t max_block_length() const
Get the maximum number of encoding symbols for the scheme being used.
bool is_valid() const
Check if object is successfully constructed.
OpenfecEncoder(const CodecConfig &config, packet::PacketFactory &packet_factory, core::IArena &arena)
Initialize.
virtual void end()
Finish block.
virtual void fill()
Fill repair packets.
virtual size_t alignment() const
Get buffer alignment requirement.
FEC block encoder interface.
Various units used in packets.