mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-03 22:35:45 +02:00
Revert "misc: av settings"
This reverts commit 218aa35e1e
.
Change-Id: I78eebe04277e08776c1f299e385119c0f2e8eb35
This commit is contained in:
parent
630d1b844e
commit
89060c27f2
5 changed files with 16 additions and 45 deletions
|
@ -89,11 +89,6 @@ Rectangle {
|
|||
|
||||
visible: false
|
||||
}
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
recordBox.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
EmojiPicker {
|
||||
id: emojiPicker
|
||||
|
|
|
@ -41,6 +41,7 @@ Rectangle {
|
|||
property int duration: 0
|
||||
property int state: RecordBox.States.INIT
|
||||
property bool isVideo: false
|
||||
property bool previewAvailable: false
|
||||
property int preferredWidth: 320
|
||||
property int preferredHeight: 240
|
||||
property int btnSize: 40
|
||||
|
@ -60,6 +61,7 @@ Rectangle {
|
|||
if (isVideo) {
|
||||
previewWidget.deviceId = VideoDevices.getDefaultDevice()
|
||||
previewWidget.rendererId = VideoDevices.startDevice(previewWidget.deviceId)
|
||||
previewAvailable = true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,7 +243,7 @@ Rectangle {
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
visible: (isVideo && VideoDevices.listSize !== 0)
|
||||
visible: (isVideo && previewAvailable)
|
||||
color: JamiTheme.blackColor
|
||||
radius: 5
|
||||
|
||||
|
@ -260,13 +262,6 @@ Rectangle {
|
|||
maskSource: rectBox
|
||||
}
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
openRecorder(true)
|
||||
} else
|
||||
VideoDevices.stopDevice(previewWidget.deviceId)
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
|
@ -274,14 +269,11 @@ Rectangle {
|
|||
|
||||
width: root.width
|
||||
|
||||
visible: (isVideo && VideoDevices.listSize === 0)
|
||||
visible: (isVideo && !previewAvailable)
|
||||
|
||||
text: JamiStrings.previewUnavailable
|
||||
font.pointSize: JamiTheme.settingsFontSize
|
||||
text: qsTr("Preview unavailable")
|
||||
font.pointSize: 10
|
||||
font.kerning: true
|
||||
color: JamiTheme.primaryForegroundColor
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
|
|
@ -30,7 +30,6 @@ ColumnLayout {
|
|||
id:root
|
||||
|
||||
property int itemWidth
|
||||
property int videoDevicesListSize: VideoDevices.listSize
|
||||
|
||||
enum Setting {
|
||||
AUDIOINPUT,
|
||||
|
@ -39,19 +38,6 @@ ColumnLayout {
|
|||
AUDIOMANAGER
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible)
|
||||
populateAudioSettings()
|
||||
}
|
||||
|
||||
onVideoDevicesListSizeChanged: {
|
||||
AvAdapter.stopAudioMeter()
|
||||
var selectedAudioManager = inputComboBoxSetting.comboModel.data(
|
||||
inputComboBoxSetting.comboModel.index(inputComboBoxSetting.modelIndex, 0), AudioDeviceModel.RawDeviceName)
|
||||
AVModel.setInputDevice(selectedAudioManager)
|
||||
AvAdapter.startAudioMeter()
|
||||
}
|
||||
|
||||
function populateAudioSettings() {
|
||||
inputComboBoxSetting.modelIndex = inputComboBoxSetting.comboModel.getCurrentIndex()
|
||||
outputComboBoxSetting.modelIndex = outputComboBoxSetting.comboModel.getCurrentIndex()
|
||||
|
|
|
@ -32,6 +32,10 @@ Rectangle {
|
|||
property int contentWidth: avSettingsColumnLayout.width
|
||||
property int preferredHeight: avSettingsColumnLayout.implicitHeight
|
||||
|
||||
function populateAVSettings() {
|
||||
audioSettings.populateAudioSettings()
|
||||
}
|
||||
|
||||
color: JamiTheme.secondaryBackgroundColor
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
@ -32,12 +32,14 @@ ColumnLayout {
|
|||
id: root
|
||||
|
||||
property real aspectRatio: 0.75
|
||||
property bool previewAvailable: false
|
||||
property int itemWidth
|
||||
|
||||
function startPreviewing(force = false) {
|
||||
if (root.visible) {
|
||||
previewWidget.deviceId = VideoDevices.getDefaultDevice()
|
||||
previewWidget.rendererId = VideoDevices.startDevice(previewWidget.deviceId, force)
|
||||
previewAvailable = true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +196,7 @@ ColumnLayout {
|
|||
|
||||
onSwitchToggled: {
|
||||
AvAdapter.setHardwareAcceleration(checked)
|
||||
startPreviewing()
|
||||
startPreviewing(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,18 +230,11 @@ ColumnLayout {
|
|||
maskSource: rectBox
|
||||
}
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
VideoDevices.stopDevice(previewWidget.deviceId)
|
||||
startPreviewing(true)
|
||||
} else
|
||||
VideoDevices.stopDevice(previewWidget.deviceId)
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: VideoDevices.listSize === 0
|
||||
// TODO: proper use of previewAvailable
|
||||
visible: !previewAvailable
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||
|
@ -248,7 +243,6 @@ ColumnLayout {
|
|||
text: JamiStrings.previewUnavailable
|
||||
font.pointSize: JamiTheme.settingsFontSize
|
||||
font.kerning: true
|
||||
color: JamiTheme.primaryForegroundColor
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
Loading…
Add table
Reference in a new issue