QString name;
QSize capture;
QSize preview;
- int numerator;
- int denominator;
- int nightNumerator;
- int nightDenominator;
+ int fps;
+ int nightFps;
};
QtCamVideoSettings::QtCamVideoSettings(const QString& id, const QString& name,
const QSize& capture, const QSize& preview,
- int numerator, int denominator,
- int nightNumerator, int nightDenominator) :
+ int fps, int nightFps) :
d_ptr(new QtCamVideoSettingsPrivate) {
d_ptr->id = id;
d_ptr->name = name;
d_ptr->capture = capture;
d_ptr->preview = preview;
- d_ptr->numerator = numerator;
- d_ptr->denominator = denominator;
- d_ptr->nightNumerator = nightNumerator;
- d_ptr->nightDenominator = nightDenominator;
+ d_ptr->fps = fps;
+ d_ptr->nightFps = nightFps;
}
QtCamVideoSettings::QtCamVideoSettings(const QtCamVideoSettings& other) :
d_ptr->name = other.d_ptr->name;
d_ptr->capture = other.d_ptr->capture;
d_ptr->preview = other.d_ptr->preview;
- d_ptr->numerator = other.d_ptr->numerator;
- d_ptr->denominator = other.d_ptr->denominator;
- d_ptr->nightNumerator = other.d_ptr->nightNumerator;
- d_ptr->nightDenominator = other.d_ptr->nightDenominator;
+ d_ptr->fps = other.d_ptr->fps;
+ d_ptr->nightFps = other.d_ptr->nightFps;
}
QtCamVideoSettings::~QtCamVideoSettings() {
d_ptr->name = other.d_ptr->name;
d_ptr->capture = other.d_ptr->capture;
d_ptr->preview = other.d_ptr->preview;
- d_ptr->numerator = other.d_ptr->numerator;
- d_ptr->denominator = other.d_ptr->denominator;
- d_ptr->nightNumerator = other.d_ptr->nightNumerator;
- d_ptr->nightDenominator = other.d_ptr->nightDenominator;
+ d_ptr->fps = other.d_ptr->fps;
+ d_ptr->nightFps = other.d_ptr->nightFps;
return *this;
}
return d_ptr->preview;
}
-QPair<int, int> QtCamVideoSettings::frameRate() const {
- return qMakePair<int, int>(d_ptr->numerator, d_ptr->denominator);
+int QtCamVideoSettings::frameRate() const {
+ return d_ptr->fps;
}
-QPair<int, int> QtCamVideoSettings::nightFrameRate() const {
- return qMakePair<int, int>(d_ptr->nightNumerator, d_ptr->nightDenominator);
+int QtCamVideoSettings::nightFrameRate() const {
+ return d_ptr->nightFps;
}