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
|
|
|
};
|
|
|
|
|
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
|
2020-08-08 23:12:43 +02:00
|
|
|
QString standard = videoStandard.toLower();
|
2014-02-23 21:36:39 +01:00
|
|
|
|
2020-08-08 23:12:43 +02: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
|
|
|
}
|
2020-08-08 23:12:43 +02: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
|
|
|
}
|
2020-08-08 23:12:43 +02: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
|
|
|
}
|