diff options
Diffstat (limited to 'src/inputs/Test.cpp')
| -rw-r--r-- | src/inputs/Test.cpp | 38 | 
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(); +} + + | 
