2014-12-09 16:47:02 +00:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Controls 1.0
|
|
|
|
|
|
|
|
import mpvtest 1.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
width: 1280
|
|
|
|
height: 720
|
|
|
|
|
|
|
|
MpvObject {
|
|
|
|
id: renderer
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
2015-01-05 14:26:57 +00:00
|
|
|
onClicked: renderer.command(["loadfile", "../../../test.mkv"])
|
2014-12-09 16:47:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: labelFrame
|
|
|
|
anchors.margins: -50
|
|
|
|
radius: 5
|
|
|
|
color: "white"
|
|
|
|
border.color: "black"
|
|
|
|
opacity: 0.8
|
2015-01-05 14:26:57 +00:00
|
|
|
anchors.fill: box
|
2014-12-09 16:47:02 +00:00
|
|
|
}
|
|
|
|
|
2015-01-05 14:26:57 +00:00
|
|
|
Row {
|
|
|
|
id: box
|
2014-12-09 16:47:02 +00:00
|
|
|
anchors.bottom: renderer.bottom
|
|
|
|
anchors.left: renderer.left
|
|
|
|
anchors.right: renderer.right
|
|
|
|
anchors.margins: 100
|
2015-01-05 14:26:57 +00:00
|
|
|
|
|
|
|
Text {
|
|
|
|
anchors.margins: 10
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: "QtQuick and mpv are both rendering stuff.\n
|
|
|
|
Click to load ../../../test.mkv"
|
|
|
|
}
|
|
|
|
|
2015-01-06 16:35:10 +00:00
|
|
|
// Don't take these controls too seriously. They're for testing.
|
|
|
|
Column {
|
|
|
|
CheckBox {
|
|
|
|
id: checkbox
|
|
|
|
anchors.margins: 10
|
|
|
|
// Heavily filtered means good, right?
|
|
|
|
text: "Make video look like on a Smart TV"
|
|
|
|
onClicked: {
|
|
|
|
if (checkbox.checked) {
|
2015-01-23 16:09:25 +00:00
|
|
|
renderer.command(["vo_cmdline", "scale=sharpen3:scale-param1=5.0"])
|
2015-01-06 16:35:10 +00:00
|
|
|
} else {
|
|
|
|
renderer.command(["vo_cmdline", ""])
|
|
|
|
}
|
2015-01-05 14:26:57 +00:00
|
|
|
}
|
|
|
|
}
|
2015-01-06 16:35:10 +00:00
|
|
|
Slider {
|
|
|
|
id: slider
|
|
|
|
anchors.margins: 10
|
|
|
|
anchors.left: checkbox.left
|
|
|
|
anchors.right: checkbox.right
|
|
|
|
minimumValue: -100
|
|
|
|
maximumValue: 100
|
|
|
|
value: 0
|
|
|
|
onValueChanged: renderer.setProperty("gamma", slider.value | 0)
|
|
|
|
}
|
2015-01-05 14:26:57 +00:00
|
|
|
}
|
2014-12-09 16:47:02 +00:00
|
|
|
}
|
|
|
|
}
|