summaryrefslogtreecommitdiffstats
path: root/src/dabInputPrbs.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-29 22:09:31 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-29 22:09:31 +0200
commit5132756f09c7a0dafe4644db92718ee3d1a58d6c (patch)
tree094343cedcd9fe8bacb3380e98d96e952b7115ea /src/dabInputPrbs.h
parent5c3c6d734ff0c57fd3d45746df23b96e0e7fc99e (diff)
parente7ad2e1fab9c51189fdc8b4f2d81f625da9dd422 (diff)
downloaddabmux-5132756f09c7a0dafe4644db92718ee3d1a58d6c.tar.gz
dabmux-5132756f09c7a0dafe4644db92718ee3d1a58d6c.tar.bz2
dabmux-5132756f09c7a0dafe4644db92718ee3d1a58d6c.zip
Merge branch 'next' into servicelinking
Diffstat (limited to 'src/dabInputPrbs.h')
-rw-r--r--src/dabInputPrbs.h48
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