2013-08-13 11:10:45 +02:00
|
|
|
|
|
|
|
// QT includes
|
|
|
|
#include <QCoreApplication>
|
|
|
|
|
2013-08-14 10:54:49 +02:00
|
|
|
// Json-Schema includes
|
|
|
|
#include <utils/jsonschema/JsonFactory.h>
|
|
|
|
|
2013-08-13 11:10:45 +02:00
|
|
|
// Hyperion includes
|
|
|
|
#include <hyperion/DispmanxWrapper.h>
|
2013-08-14 10:54:49 +02:00
|
|
|
#include <hyperion/Hyperion.h>
|
2013-08-13 11:10:45 +02:00
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
QCoreApplication app(argc, argv);
|
|
|
|
|
2013-08-14 10:54:49 +02:00
|
|
|
// Select config and schema file
|
|
|
|
const std::string homeDir = getenv("RASPILIGHT_HOME");
|
|
|
|
const std::string schemaFile = homeDir + "/hyperion.schema.json";
|
|
|
|
const std::string configFile = homeDir + "/hyperion.config.json";
|
|
|
|
|
|
|
|
// Load configuration and check against the schema at the same time
|
|
|
|
Json::Value config;
|
|
|
|
if (JsonFactory::load(schemaFile, configFile, config) < 0)
|
|
|
|
{
|
|
|
|
std::cerr << "UNABLE TO LOAD CONFIGURATION" << std::endl;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
Hyperion hyperion(config);
|
2013-08-13 11:10:45 +02:00
|
|
|
|
2013-08-14 10:54:49 +02:00
|
|
|
DispmanxWrapper dispmanx(64, 64, 10, &hyperion);
|
2013-08-13 11:10:45 +02:00
|
|
|
dispmanx.start();
|
|
|
|
|
|
|
|
app.exec();
|
|
|
|
}
|