4
* Example program for mpegplay library.
10
#include "../../lib/decoder/cddaPlugin.h"
11
#include "../../lib/input/inputPlugin.h"
13
int main(int argc, char** argv) {
18
printf("%s \"cdda://dev/<device> track:<nr>.cdda\n\n",argv[0]);
22
// The order is important !!!!
28
// you cannot set the input _before_ the output
29
// in fact you can, but this gives you a segfault!
31
CDDAPlugin* plugin=new CDDAPlugin();
32
OutputStream* out=OutPlugin::createOutputStream(_OUTPUT_LOCAL);
33
InputStream* in= InputPlugin::createInputStream(argv[1]);
37
// The plugin does not do "open"
45
plugin->setOutputPlugin(out);
46
plugin->setInputPlugin(in);
48
cout << "hello 1 -s"<<endl;
52
cout << "hello 1 -e"<<endl;
56
if (plugin->getStreamState() != _STREAM_STATE_EOF) {
57
cout << "******* plugin->getStreamState() continue"<<endl;
63
cout << "********************plugin eof"<<endl;