diff --git a/plugins/channelrx/demoddatv/datvconstellation.h b/plugins/channelrx/demoddatv/datvconstellation.h index dc97744e8..091bed139 100644 --- a/plugins/channelrx/demoddatv/datvconstellation.h +++ b/plugins/channelrx/demoddatv/datvconstellation.h @@ -19,7 +19,6 @@ #ifndef DATVCONSTELLATION_H #define DATVCONSTELLATION_H -#include #include #include "leansdr/framework.h" diff --git a/plugins/channelrx/demoddatv/datvideostream.cpp b/plugins/channelrx/demoddatv/datvideostream.cpp index fc89f6d1c..fbe644ed5 100644 --- a/plugins/channelrx/demoddatv/datvideostream.cpp +++ b/plugins/channelrx/demoddatv/datvideostream.cpp @@ -49,8 +49,6 @@ void DATVideostream::cleanUp() m_objeventLoop.exit(); } - m_objMutex.unlock(); - m_intBytesAvailable=0; m_intBytesWaiting=0; m_intQueueWaiting=0; diff --git a/plugins/channelrx/demoddatv/leansdr/dvb.h b/plugins/channelrx/demoddatv/leansdr/dvb.h index 3bd9a624a..474eab072 100644 --- a/plugins/channelrx/demoddatv/leansdr/dvb.h +++ b/plugins/channelrx/demoddatv/leansdr/dvb.h @@ -668,16 +668,17 @@ static struct fec_spec int bits_in; // Entering the convolutional coder int bits_out; // Exiting the convolutional coder const uint16_t *polys; // [bits_out] -} fec_specs[FEC_MAX] = -{ [FEC12] = -{ 1, 2, polys_fec12 }, [FEC23] = -{ 2, 3, polys_fec23 }, [FEC46] = -{ 4, 6, polys_fec46 }, [FEC34] = -{ 3, 4, polys_fec34 }, [FEC56] = -{ 5, 6, polys_fec56 }, [FEC78] = -{ 7, 8, polys_fec78 }, [FEC45] = -{ 4, 5, polys_fec45 }, // Non-standard - }; +} + +fec_specs[FEC_MAX] = { + [FEC12] = { 1, 2, polys_fec12 }, + [FEC23] = { 2, 3, polys_fec23 }, + [FEC46] = { 4, 6, polys_fec46 }, + [FEC34] = { 3, 4, polys_fec34 }, + [FEC56] = { 5, 6, polys_fec56 }, + [FEC78] = { 7, 8, polys_fec78 }, + [FEC45] = { 4, 5, polys_fec45 }, // Non-standard +}; struct dvb_convol: runnable { diff --git a/plugins/channelrx/demoddatv/leansdr/generic.h b/plugins/channelrx/demoddatv/leansdr/generic.h index 206b15473..d7e541d28 100644 --- a/plugins/channelrx/demoddatv/leansdr/generic.h +++ b/plugins/channelrx/demoddatv/leansdr/generic.h @@ -2,7 +2,13 @@ #define LEANSDR_GENERIC_H #include + +#ifdef _MSC_VER +#include +#include +#else #include +#endif #include "leansdr/math.h" @@ -29,7 +35,11 @@ struct file_reader: runnable if (!size) return; +#ifdef _MSC_VER + again: ssize_t nr = _read(fdin, out.wr(), size); +#else again: ssize_t nr = read(fdin, out.wr(), size); +#endif if (nr < 0) { fatal("leansdr::file_reader::run: read"); @@ -41,7 +51,11 @@ struct file_reader: runnable return; if (sch->debug) fprintf(stderr, "leansdr::file_reader::run: %s looping\n", name); +#ifdef _MSC_VER + off_t res = _lseek(fdin, 0, SEEK_SET); +#else off_t res = lseek(fdin, 0, SEEK_SET); +#endif if (res == (off_t) -1) { fatal("leansdr::file_reader::run: lseek"); @@ -57,7 +71,11 @@ struct file_reader: runnable { if (sch->debug) fprintf(stderr, "+"); +#ifdef _MSC_VER + ssize_t nr2 = _read(fdin, (char*) out.wr() + nr, remain); +#else ssize_t nr2 = read(fdin, (char*) out.wr() + nr, remain); +#endif if (nr2 <= 0) { fatal("leansdr::file_reader::run: partial read"); @@ -89,7 +107,11 @@ struct file_writer: runnable int size = in.readable() * sizeof(T); if (!size) return; +#ifdef _MSC_VER + int nw = _write(fdout, in.rd(), size); +#else int nw = write(fdout, in.rd(), size); +#endif if (!nw) { fatal("leansdr::file_writer::run: pipe"); @@ -138,7 +160,11 @@ struct file_printer: runnable fatal("leansdr::file_printer::run: obsolete glibc"); return; } +#ifdef _MSC_VER + int nw = _write(fdout, buf, len); +#else int nw = write(fdout, buf, len); +#endif if (nw != len) { fatal("leansdr::file_printer::run: partial write");