Definition at line 2430 of file dvbs2.h.
void leansdr::s2_framer::run |
( |
| ) |
|
|
inlinevirtual |
Reimplemented from leansdr::runnable_common.
Definition at line 2444 of file dvbs2.h.
References leansdr::bbframe::bytes, leansdr::check_modcod(), leansdr::tspacket::data, leansdr::fail(), leansdr::s2_pls::modcod, leansdr::bbframe::pls, leansdr::modcod_info::rate, leansdr::pipereader< T >::rd(), leansdr::pipereader< T >::read(), leansdr::pipereader< T >::readable(), leansdr::s2_pls::sf, leansdr::tspacket::SIZE, leansdr::pipewriter< T >::wr(), leansdr::pipewriter< T >::writable(), and leansdr::pipewriter< T >::written().
2446 while (
out.writable() >= 1)
2449 const fec_info *fi = &fec_infos[
pls.
sf][mcinfo->rate];
2450 int framebytes = fi->Kbch / 8;
2452 fail(
"MODCOD/framesize combination not allowed");
2453 if (10 +
nremain + 188 *
in.readable() < framebytes)
2455 bbframe *pout =
out.wr();
2458 uint8_t *end = buf + framebytes;
2466 uint16_t dfl = (framebytes - 10) * 8;
2471 *buf++ = syncd >> 8;
2479 tspacket *tsp =
in.rd();
2480 if (tsp->data[0] != MPEG_SYNC)
2484 int nused = end - buf;
2487 memcpy(buf, tsp->data + 1, nused);
2497 fail(
"Bug: s2_framer");
uint8_t rembuf[tspacket::SIZE]
pipewriter< bbframe > out
pipereader< tspacket > in
const modcod_info * check_modcod(int m)
uint8_t compute(const uint8_t *buf, int len)