// STL includes #include #include #include // QT includes #include // blackborder includes #include // grabber includes #include "grabber/V4L2Grabber.h" // proto includes #include "protoserver/ProtoConnection.h" #include "protoserver/ProtoConnectionWrapper.h" // hyperion-v4l2 includes #include "ScreenshotHandler.h" #include "HyperionConfig.h" #include using namespace commandline; // save the image as screenshot void saveScreenshot(QString filename, const Image & image) { // store as PNG QImage pngImage((const uint8_t *) image.memptr(), image.width(), image.height(), 3*image.width(), QImage::Format_RGB888); pngImage.save(filename); } int main(int argc, char** argv) { std::cout << "hyperion-v4l2:" << std::endl << "\tVersion : " << HYPERION_VERSION << " (" << HYPERION_BUILD_ID << ")" << std::endl << "\tbuild time: " << __DATE__ << " " << __TIME__ << std::endl; QCoreApplication app(argc, argv); // force the locale setlocale(LC_ALL, "C"); QLocale::setDefault(QLocale::c()); // register the image type to use in signals qRegisterMetaType>("Image"); try { // create the option parser and initialize all parameters Parser parser("V4L capture application for Hyperion"); Option & argDevice = parser.add