Skip to content
Snippets Groups Projects
Commit 5d4e69ef authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk
Browse files

settings: make fps option in av settings respond correctly

Gitlab: #97
Change-Id: I6419f8eca7d38a1816c684d106f72129ea26cdab
parent 95146f97
No related branches found
No related tags found
No related merge requests found
......@@ -106,18 +106,28 @@ ColumnLayout {
var resolution
var rate
if(isResolutionIndex) {
resolution = resolutionComboBoxSetting.comboModel.data(resolutionComboBoxSetting.comboModel.index(index, 0), VideoFormatResolutionModel.Resolution)
resolution = resolutionComboBoxSetting.comboModel.data(
resolutionComboBoxSetting.comboModel.index(index, 0),
VideoFormatResolutionModel.Resolution)
fpsComboBoxSetting.comboModel.currentResolution = resolution
fpsComboBoxSetting.setCurrentIndex(fpsComboBoxSetting.comboModel.getCurrentSettingIndex())
rate = fpsComboBoxSetting.comboModel.data(fpsComboBoxSetting.comboModel.index(index, 0), VideoFormatFpsModel.FPS)
rate = fpsComboBoxSetting.comboModel.data(
fpsComboBoxSetting.comboModel.index(0, 0),
VideoFormatFpsModel.FPS)
} else {
resolution = resolutionComboBoxSetting.comboModel.data(resolutionComboBoxSetting.comboModel.index(index, 0), VideoFormatResolutionModel.Resolution)
resolution = resolutionComboBoxSetting.comboModel.data(
resolutionComboBoxSetting.comboModel.index(
resolutionComboBoxSetting.modelIndex, 0),
VideoFormatResolutionModel.Resolution)
fpsComboBoxSetting.comboModel.currentResolution = resolution
rate = fpsComboBoxSetting.comboModel.data(fpsComboBoxSetting.comboModel.model.index(index, 0), VideoFormatFpsModel.FPS)
rate = fpsComboBoxSetting.comboModel.data(
fpsComboBoxSetting.comboModel.index(index, 0),
VideoFormatFpsModel.FPS)
}
try {
SettingsAdapter.set_Video_Settings_Rate_And_Resolution(AVModel.getCurrentVideoCaptureDevice(),rate,resolution)
SettingsAdapter.set_Video_Settings_Rate_And_Resolution(
AVModel.getCurrentVideoCaptureDevice(),rate, resolution)
updatePreviewRatio(resolution)
} catch(error){ console.warn(error.message) }
}
......@@ -255,4 +265,4 @@ ColumnLayout {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment