/* generic interactive controller Copyright (C) 1998 Martin Vogt This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation. For more information look at the file COPYRIGHT in this package */ // Set for local include #define DIRECT_INCLUDE #include "../yafcore/yaf_control.h" #include "../yafxplayer/inputDecoderYAF.h" #include using namespace std; #include // we include our plugin here #include "../../../lib/yuv/yuvPlugin.h" #if defined(HAVE_GETOPT_H) #include #endif void control_yuv(InputInterface* input,OutputInterface* output, InputDecoder* decoder) { cout<< "Command:0 Msg:protocol yaf-0.1" << endl; cout<< "Command:0 Msg:implements xplayer" << endl; cout<< "Command:0 Msg:decoder yuv Version:0.0.2" << endl; cout<< "Command:0 Msg:mimetypes vide/yuv1;" << endl; cout<< "Command:0 Msg:comment yuv Plugin by Martin Vogt" << endl; cout<< "Command:0 Msg:comment yaf port by mvogt@rhrk.uni-kl.de"< [url]"<setOutputPlugin(yafOutput); InputDecoderYAF decoder(plugin,yafOutput); while(1) { c = getopt (argc, argv, "w:g:y:hf:"); if (c == -1) break; switch(c) { case 'a': { lInternalAudio=false; break; } case 'h': { cout << "query for help"< 0"<config("imageType",optarg,NULL); break; } default: printf ("?? getopt returned character code 0%o ??\n", c); usage(); exit(-1); } } if (optind < argc ) { Buffer buffer(300); buffer.append("open "); buffer.append(argv[optind]); buffer.append("\n"); input->addInputLine(&buffer); } if ((width == NULL) || (height == NULL)) { int w; int h; cout << "automatic try to read a .format file"<config("picPerSec",picPerSec,NULL); plugin->config("height",height,NULL); plugin->config("width",width,NULL); yafOutput->internalDevice(lInternalAudio); control_yuv(input,&output,&decoder); delete plugin; delete yafOutput; delete input; }