2014-02-23 21:36:39 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
};
|
|
|
|
|
2017-03-04 22:17:42 +01:00
|
|
|
inline VideoStandard parseVideoStandard(QString videoStandard)
|
2014-02-23 21:36:39 +01:00
|
|
|
{
|
|
|
|
// convert to lower case
|
2017-03-04 22:17:42 +01:00
|
|
|
videoStandard = videoStandard.toLower();
|
2014-02-23 21:36:39 +01:00
|
|
|
|
|
|
|
if (videoStandard == "pal")
|
|
|
|
{
|
2020-06-28 23:05:32 +02:00
|
|
|
return VideoStandard::PAL;
|
2014-02-23 21:36:39 +01:00
|
|
|
}
|
|
|
|
else if (videoStandard == "ntsc")
|
|
|
|
{
|
2020-06-28 23:05:32 +02:00
|
|
|
return VideoStandard::NTSC;
|
2014-02-23 21:36:39 +01:00
|
|
|
}
|
2017-10-04 21:23:45 +02:00
|
|
|
else if (videoStandard == "secam")
|
|
|
|
{
|
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
|
|
|
}
|