aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputs/Test.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2013-12-22 18:04:29 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2013-12-24 18:09:27 +0100
commitd4c6a078285dda636e283413fdbd9b1adeab5ade (patch)
tree302fa3e0a6faf2184454483ec27343e8324f70bd /src/inputs/Test.cpp
parentb0183733ef4c6f08ef8c7b73155268e54ca3f152 (diff)
downloaddabmux-ooinputs.tar.gz
dabmux-ooinputs.tar.bz2
dabmux-ooinputs.zip
Test for InputMpegFileooinputs
Diffstat (limited to 'src/inputs/Test.cpp')
-rw-r--r--src/inputs/Test.cpp38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/inputs/Test.cpp b/src/inputs/Test.cpp
index 925f871..29356ed 100644
--- a/src/inputs/Test.cpp
+++ b/src/inputs/Test.cpp
@@ -8,7 +8,36 @@ using namespace std;
TcpLog etiLog;
-int main(int argc, char** argv)
+void testmpeg()
+{
+ const int bufsize = 96;
+ const int num = 30;
+ const string fname = "/home/bram/dab/mmbtools-aux/dings.mp2";
+
+ cout << "Hello" << endl;
+
+ InputMpegFile input(fname, 1, bufsize, 100);
+
+ cout << "Open " << input.Open() << endl;
+
+ cout << "Opened " << input.GetName() << endl;
+
+ std::vector<uint8_t> buffer(bufsize);
+
+ for (int i = 0; i < num; i++) {
+ int rc = input.ReadFrame(&buffer.front(), bufsize);
+
+ cout << "ReadFrame " << dec << rc << endl;
+
+ for(std::vector<uint8_t>::iterator it = buffer.begin(); it != buffer.end(); ++it) {
+ cout << hex << (unsigned int)*it << ",";
+ }
+ }
+ cout << endl;
+
+}
+
+void testdabp()
{
const int bufsize = 188;
const int num = 10;
@@ -37,3 +66,10 @@ int main(int argc, char** argv)
cout << endl;
}
+
+int main(int argc, char** argv)
+{
+ testmpeg();
+}
+
+