StreamerPtr ImageFileStreamerService::createStreamer(QDomElement root) { // std::cout << "filecontent create streamer\n" << root.ownerDocument().toString().toStdString() << std::endl; StringMap args = ImageStreamerDummyArguments().convertToCommandLineArguments(root); StreamerPtr localServerStreamer = LocalServerStreamer::createStreamerIfEnabled(root, args); if (localServerStreamer) { return localServerStreamer; } else { boost::shared_ptr<DummyImageStreamer> streamer(new DummyImageStreamer()); QString filename = ImageStreamerDummyArguments().getFilenameOption(root)->getValue(); bool secondary = ImageStreamerDummyArguments().getSecondaryOption(root)->getValue(); streamer->initialize(filename, secondary); return streamer; } }
std::vector<PropertyPtr> ImageFileStreamerService::getSettings(QDomElement root) { std::vector<PropertyPtr> retval; std::vector<PropertyPtr> opencvArgs = ImageStreamerDummyArguments().getSettings(root); std::copy(opencvArgs.begin(), opencvArgs.end(), back_inserter(retval)); std::vector<PropertyPtr> localsvrArgs = LocalServerStreamerArguments().getSettings(root); std::copy(localsvrArgs.begin(), localsvrArgs.end(), back_inserter(retval)); return retval; }
QStringList DummyImageStreamer::getArgumentDescription() { return ImageStreamerDummyArguments().getArgumentDescription(); }