forked from marcogulino/AndroidUsbCamera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
21 lines (20 loc) · 772 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <QCoreApplication>
#include "androidusbcamera.h"
#include <qstringlist.h>
#include <qtextstream.h>
#include <QFileInfo>
#include <QDebug>
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
app.setApplicationName("AndroidUsbCamera");
QString filename=app.arguments().first();
if( app.arguments().size() != 2 || ! QFileInfo(app.arguments()[1]).isWritable()) {
QTextStream(stdout) << "Usage: " << app.applicationName() << " <video device>\n";
QTextStream(stdout) << "Usually video device is one of /dev/videoN files\n";
QTextStream(stdout) << "Best match finding the \"output\" device for vloopback running \"dmesg | grep vloopback\"\n";
return 1;
}
AndroidUsbCamera camera;
return app.exec();
}