2014-02-23 21:36:39 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-02-07 14:30:36 +01:00
|
|
|
#include <QString>
|
|
|
|
|
2014-02-23 21:36:39 +01:00
|
|
|
/**
|
|
|
|
* Enumeration of the possible video standards the grabber can be set to
|
|
|
|
*/
|
2020-06-28 23:05:32 +02:00
|
|
|
enum class VideoStandard {
|
|
|
|
PAL,
|
|
|
|
NTSC,
|
|
|
|
SECAM,
|
|
|
|
NO_CHANGE
|
2014-02-23 21:36:39 +01:00
|
|
|
};
|
|
|
|
|
2020-08-08 23:12:43 +02:00
|
|
|
inline VideoStandard parseVideoStandard(const QString& videoStandard)
|
2014-02-23 21:36:39 +01:00
|
|
|
{
|
|
|
|
// convert to lower case
|
2021-02-07 14:30:36 +01:00
|
|
|
QString standard = videoStandard.toUpper();
|
2014-02-23 21:36:39 +01:00
|
|
|
|
2021-02-07 14:30:36 +01:00
|
|
|
if (standard == "PAL")
|
2014-02-23 21:36:39 +01:00
|
|
|
{
|
2020-06-28 23:05:32 +02:00
|
|
|
return VideoStandard::PAL;
|
2014-02-23 21:36:39 +01:00
|
|
|
}
|
2021-02-07 14:30:36 +01:00
|
|
|
else if (standard == "NTSC")
|
2014-02-23 21:36:39 +01:00
|
|
|
{
|
2020-06-28 23:05:32 +02:00
|
|
|
return VideoStandard::NTSC;
|
2014-02-23 21:36:39 +01:00
|
|
|
}
|
2021-02-07 14:30:36 +01:00
|
|
|
else if (standard == "SECAM")
|
2017-10-04 21:23:45 +02:00
|
|
|
{
|
2020-06-28 23:05:32 +02:00
|
|
|
return VideoStandard::SECAM;
|
2017-10-04 21:23:45 +02:00
|
|
|
}
|
2014-02-23 21:36:39 +01:00
|
|
|
|
|
|
|
// return the default NO_CHANGE
|
2020-06-28 23:05:32 +02:00
|
|
|
return VideoStandard::NO_CHANGE;
|
2014-02-23 21:36:39 +01:00
|
|
|
}
|
2021-02-07 14:30:36 +01:00
|
|
|
|
|
|
|
inline QString VideoStandard2String(VideoStandard videoStandard)
|
|
|
|
{
|
|
|
|
switch (videoStandard)
|
|
|
|
{
|
|
|
|
case VideoStandard::PAL: return "PAL";
|
|
|
|
case VideoStandard::NTSC: return "NTSC";
|
|
|
|
case VideoStandard::SECAM: return "SECAM";
|
|
|
|
default: return "NO_CHANGE";
|
|
|
|
}
|
|
|
|
}
|