Debian Codegraph @

tests/examples/qt6/qmlmixer/mixer.qml

raw
1 import QtQuick 6.0
2
3 import org.freedesktop.gstreamer.Qt6GLVideoItem 1.0
4
5 Item {
6 /* render upside down for GStreamer */
7 transform: Scale { origin.x : 0; origin.y : height / 2.; yScale : -1 }
8
9 GstGLQt6VideoItem {
10 id: video0
11 objectName: "inputVideoItem0"
12 anchors.left: parent.left
13 anchors.right: parent.horizontalCenter
14 width: parent.width / 2
15 height: parent.height
16 }
17
18 GstGLQt6VideoItem {
19 id: video1
20 objectName: "inputVideoItem1"
21 anchors.left: parent.horizontalCenter
22 anchors.right: parent.right
23 width: parent.width / 2
24 height: parent.height
25 }
26
27 Text {
28 id: rotatingText
29 anchors.centerIn: parent
30 text: "Qt Quick\nrendered to\na texture"
31 font.pointSize: 20
32 color: "black"
33 style: Text.Outline
34 styleColor: "white"
35
36 RotationAnimator {
37 target: rotatingText;
38 from: 0;
39 to: 360;
40 duration: 5000
41 running: true
42 loops: Animation.Infinite
43 }
44 }
45
46 Text {
47 property int elapsedTime: 0
48
49 id: time
50 anchors.top: rotatingText.bottom
51 anchors.horizontalCenter: rotatingText.horizontalCenter
52 font.pointSize: 12
53 style: Text.Outline
54 styleColor: "black"
55 color: "white"
56
57 Timer {
58 interval: 1000
59 running: true
60 repeat: true
61 onTriggered: {
62 parent.elapsedTime += interval / 1000
63 parent.text = "overlay: " + parent.elapsedTime.toString() + " seconds"
64 }
65 }
66 }
67 }