1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-04 15:45:29 +02:00

settings: make fps option in av settings respond correctly

Gitlab: #97
Change-Id: I6419f8eca7d38a1816c684d106f72129ea26cdab
This commit is contained in:
Ming Rui Zhang 2020-09-21 11:47:59 -04:00 committed by Andreas Traczyk
parent 95146f97b3
commit 5d4e69ef09

View file

@ -106,18 +106,28 @@ ColumnLayout {
var resolution var resolution
var rate var rate
if(isResolutionIndex) { 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.comboModel.currentResolution = resolution
fpsComboBoxSetting.setCurrentIndex(fpsComboBoxSetting.comboModel.getCurrentSettingIndex()) 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 { } 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 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 { 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) updatePreviewRatio(resolution)
} catch(error){ console.warn(error.message) } } catch(error){ console.warn(error.message) }
} }
@ -255,4 +265,4 @@ ColumnLayout {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
} }