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