2016-08-04 13:10:53 +02:00
|
|
|
#pragma once
|
2016-08-11 07:13:55 +02:00
|
|
|
#include <QString>
|
2016-08-04 13:10:53 +02:00
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
namespace hyperion
|
|
|
|
{
|
2016-08-04 13:10:53 +02:00
|
|
|
/**
|
|
|
|
* Enumeration of components in Hyperion.
|
|
|
|
*/
|
|
|
|
enum Components
|
|
|
|
{
|
2016-08-11 07:13:55 +02:00
|
|
|
COMP_INVALID,
|
|
|
|
COMP_SMOOTHING,
|
|
|
|
COMP_BLACKBORDER,
|
|
|
|
COMP_KODICHECKER,
|
|
|
|
COMP_FORWARDER,
|
|
|
|
COMP_UDPLISTENER,
|
|
|
|
COMP_BOBLIGHTSERVER,
|
2016-08-31 00:54:47 +02:00
|
|
|
COMP_GRABBER,
|
2016-10-10 18:29:54 +02:00
|
|
|
COMP_V4L,
|
|
|
|
COMP_COLOR,
|
|
|
|
COMP_EFFECT
|
2016-08-04 13:10:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
inline const char* componentToString(Components c)
|
|
|
|
{
|
|
|
|
switch (c)
|
|
|
|
{
|
2016-08-11 07:13:55 +02:00
|
|
|
case COMP_SMOOTHING: return "Smoothing";
|
|
|
|
case COMP_BLACKBORDER: return "Blackborder detector";
|
|
|
|
case COMP_KODICHECKER: return "KodiVideoChecker";
|
|
|
|
case COMP_FORWARDER: return "Json/Proto forwarder";
|
|
|
|
case COMP_UDPLISTENER: return "UDP listener";
|
|
|
|
case COMP_BOBLIGHTSERVER:return "Boblight server";
|
|
|
|
case COMP_GRABBER: return "Framegrabber";
|
2016-10-10 18:29:54 +02:00
|
|
|
case COMP_V4L: return "V4L capture device";
|
|
|
|
case COMP_COLOR: return "solid color";
|
|
|
|
case COMP_EFFECT: return "effect";
|
2016-08-11 07:13:55 +02:00
|
|
|
default: return "";
|
2016-08-04 13:10:53 +02:00
|
|
|
}
|
2016-08-11 07:13:55 +02:00
|
|
|
}
|
|
|
|
|
2016-09-07 20:10:37 +02:00
|
|
|
inline const char* componentToIdString(Components c)
|
|
|
|
{
|
|
|
|
switch (c)
|
|
|
|
{
|
|
|
|
case COMP_SMOOTHING: return "SMOOTHING";
|
|
|
|
case COMP_BLACKBORDER: return "BLACKBORDER";
|
|
|
|
case COMP_KODICHECKER: return "KODICHECKER";
|
|
|
|
case COMP_FORWARDER: return "FORWARDER";
|
|
|
|
case COMP_UDPLISTENER: return "UDPLISTENER";
|
|
|
|
case COMP_BOBLIGHTSERVER:return "BOBLIGHTSERVER";
|
|
|
|
case COMP_GRABBER: return "GRABBER";
|
|
|
|
case COMP_V4L: return "V4L";
|
2016-10-10 18:29:54 +02:00
|
|
|
case COMP_COLOR: return "COLOR";
|
|
|
|
case COMP_EFFECT: return "EFFECT";
|
2016-09-07 20:10:37 +02:00
|
|
|
default: return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
inline Components stringToComponent(QString component)
|
|
|
|
{
|
|
|
|
component = component.toUpper();
|
|
|
|
if (component == "SMOOTHING") return COMP_SMOOTHING;
|
|
|
|
if (component == "BLACKBORDER") return COMP_BLACKBORDER;
|
|
|
|
if (component == "KODICHECKER") return COMP_KODICHECKER;
|
|
|
|
if (component == "FORWARDER") return COMP_FORWARDER;
|
|
|
|
if (component == "UDPLISTENER") return COMP_UDPLISTENER;
|
|
|
|
if (component == "BOBLIGHTSERVER")return COMP_BOBLIGHTSERVER;
|
|
|
|
if (component == "GRABBER") return COMP_GRABBER;
|
2016-08-31 00:54:47 +02:00
|
|
|
if (component == "V4L") return COMP_V4L;
|
2016-10-10 18:29:54 +02:00
|
|
|
if (component == "COLOR") return COMP_COLOR;
|
|
|
|
if (component == "EFFECT") return COMP_EFFECT;
|
2016-08-11 07:13:55 +02:00
|
|
|
|
|
|
|
return COMP_INVALID;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|