-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
49 lines (40 loc) · 1.54 KB
/
main.cpp
File metadata and controls
49 lines (40 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <QApplication>
#include <QtCore>
#include <VLCQtCore/Common.h>
#include "version.h"
#include "server.h"
#include "businesslogic.h"
#include "executer.h"
#include "resource.h"
#include "player.h"
//#include "service.h"
//extern const std::string version = "Multimedia Controller - "+versionNumber+" - "+std::string(__DATE__)+" "+std::string(__TIME__)+"\nZ. Meszaros";
int main(int argc, char *argv[])
{
/*
#if !defined(Q_OS_WIN)
// QtService stores service settings in SystemScope, which normally require root privileges.
// To allow testing this example as non-root, we change the directory of the SystemScope settings file.
QSettings::setPath(QSettings::NativeFormat, QSettings::SystemScope, QDir::tempPath());
qWarning("(Example uses dummy settings file: %s/QtSoftware.conf)", QDir::tempPath().toLatin1().constData());
#endif
Service service(argc, argv);
return service.exec();
*/
qRegisterMetaType<qintptr>("qintptr");
QApplication app(argc, argv);
VlcCommon::setPluginPath(app.applicationDirPath() + "/plugins");
Player player;
BusinessLogic bloc(new Executer(&player), new ResourceContainer(QStringList("/home/pi/Media")));
Server daemon(&bloc);
// Start listening
daemon.listen(QHostAddress::Any,61486);
if (!daemon.isListening()) {
app.exit(2);
}
// Show player in full screen
player.show();
QTimer::singleShot(0, &player, SLOT(showFullScreen()));
// Start event loop
return app.exec();
}