diff options
Diffstat (limited to 'src/dabInputPrbs.h')
-rw-r--r-- | src/dabInputPrbs.h | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/src/dabInputPrbs.h b/src/dabInputPrbs.h index 22c088c..9cde7e2 100644 --- a/src/dabInputPrbs.h +++ b/src/dabInputPrbs.h @@ -1,6 +1,13 @@ /* Copyright (C) 2009 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) + + Copyright (C) 2016 + Matthias P. Braendli, matthias.braendli@mpb.li + + http://www.opendigitalradio.org + + Pseudo-Random Bit Sequence generator for test purposes. */ /* This file is part of ODR-DabMux. @@ -19,38 +26,27 @@ along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DAB_INPUT_PRBS_H -#define DAB_INPUT_PRBS_H - +#pragma once #ifdef HAVE_CONFIG_H -# include "config.h" +# include "config.h" #endif -#include "dabInput.h" -#include "prbs.h" - -#include <errno.h> +#include <string> -#ifdef HAVE_FORMAT_RAW -# ifdef HAVE_INPUT_PRBS - - -extern struct dabInputOperations dabInputPrbsOperations; - -int dabInputPrbsInit(void** args); -int dabInputPrbsOpen(void* args, const char* name); -int dabInputPrbsRead(void* args, void* buffer, int size); -int dabInputPrbsReadFrame(dabInputOperations* ops, void* args, - void* buffer, int size); -int dabInputPrbsBitrate(dabInputOperations* ops, void* args, int bitrate); -int dabInputPrbsClose(void* args); -int dabInputPrbsClean(void** args); -int dabInputPrbsRewind(void* args); +#include "dabInput.h" +#include "prbs.h" +class DabInputPrbs : public DabInputBase { + public: + virtual int open(const std::string name); + virtual int readFrame(void* buffer, int size); + virtual int setBitrate(int bitrate); + virtual int close(); -# endif -#endif + private: + virtual int rewind(); + PrbsGenerator m_prbs; +}; -#endif // DAB_INPUT_PRBS_H |