- Log file and minor changes.
- PD Video uses noaudio option to avoid blocking the device
This commit is contained in:
parent
d7d9559e9f
commit
c2af0c91ab
12 changed files with 194 additions and 180 deletions
26
src/main.cpp
26
src/main.cpp
|
@ -19,10 +19,36 @@
|
|||
#include <QApplication>
|
||||
#include "libremediaserver.h"
|
||||
|
||||
void MessageHandler(QtMsgType type, const char *msg)
|
||||
{
|
||||
QString txt;
|
||||
switch (type) {
|
||||
case QtDebugMsg:
|
||||
txt = QString("Debug: %1").arg(msg);
|
||||
break;
|
||||
case QtWarningMsg:
|
||||
txt = QString("Warning: %1").arg(msg);
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
txt = QString("Critical: %1").arg(msg);
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
txt = QString("Fatal: %1").arg(msg);
|
||||
abort();
|
||||
}
|
||||
QFile outFile("log.txt");
|
||||
outFile.open(QIODevice::WriteOnly | QIODevice::Append);
|
||||
QTextStream ts(&outFile);
|
||||
ts << txt << endl;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
qInstallMsgHandler(MessageHandler);
|
||||
libreMediaServer libreMediaServer;
|
||||
libreMediaServer.show();
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue