mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
- Set Mediastreamer plugin folder. - CameraGui component to manage video. - Sticker component to switch between initials/avatar and video. - Remote video detection on Call. - Fix binary shader files to support at least Qt 6.4. - Use MSQOgl Mediatsreamer2 filter and activate video capabilities. - Add a preview on Call view.
57 lines
1.3 KiB
QML
57 lines
1.3 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls as Control
|
|
import Linphone
|
|
import UtilsCpp 1.0
|
|
|
|
// Display a sticker from a call or from an account.
|
|
// The Avatar is shown while the camera become available.
|
|
// The loader restart in case of resetting the renderer. This allow to display the avatar while loading.
|
|
|
|
// TODO: sizes, colors, decorations
|
|
Rectangle{
|
|
id: mainItem
|
|
height: 300
|
|
width: 200
|
|
property CallGui call: null
|
|
property AccountGui account: null
|
|
color: 'gray'
|
|
Avatar{
|
|
anchors.centerIn: parent
|
|
height: 100
|
|
width: height
|
|
account: mainItem.account
|
|
call: mainItem.call
|
|
visible: !cameraLoader.active || cameraLoader.status != Loader.Ready || !cameraLoader.item.isReady
|
|
}
|
|
Loader{
|
|
id: cameraLoader
|
|
anchors.fill: parent
|
|
Timer{
|
|
id: resetTimer
|
|
interval: 1
|
|
onTriggered: {cameraLoader.active=false; cameraLoader.active=true;}
|
|
}
|
|
active: mainItem.visible && (!call || call.core.remoteVideoEnabled)
|
|
sourceComponent: cameraComponent
|
|
}
|
|
Component{
|
|
id: cameraComponent
|
|
Item{
|
|
height: cameraLoader.height
|
|
width: cameraLoader.width
|
|
property bool isReady: cameraItem.visible
|
|
CameraGui{
|
|
id: cameraItem
|
|
anchors.fill: parent
|
|
visible: isReady
|
|
call: mainItem.call
|
|
|
|
onRequestNewRenderer: {
|
|
console.log("Request new renderer")
|
|
resetTimer.restart()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|