File tree Expand file tree Collapse file tree 4 files changed +38
-0
lines changed
Expand file tree Collapse file tree 4 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 7070 <label >Mpv Stats</label >
7171 <default >false</default >
7272 </entry >
73+ <entry name =" MpvHwdec" type =" String" >
74+ <label >Mpv Hardware Decode</label >
75+ <default >auto</default >
76+ </entry >
7377 <entry name =" MouseInput" type =" Bool" >
7478 <label >Mouse Input</label >
7579 <default >true</default >
Original file line number Diff line number Diff line change 6565 }
6666 }
6767 }
68+ Connections {
69+ target: background
70+ function onMpvHwdecChanged () {
71+ player .setProperty (" hwdec" , background .mpvHwdec );
72+ }
73+ }
74+
6875 Component .onCompleted : {
6976 background .nowBackend = ' mpv' ;
7077 videoItem .displayModeChanged ();
78+ player .setProperty (" hwdec" , background .mpvHwdec );
7179 }
7280
7381 function play (){
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ Rectangle {
2323 property bool noRandomWhilePaused: wallpaper .configuration .NoRandomWhilePaused
2424 property bool mouseInput: wallpaper .configuration .MouseInput
2525 property bool mpvStats: wallpaper .configuration .MpvStats
26+ property string mpvHwdec: wallpaper .configuration .MpvHwdec
2627
2728 property bool pauseOnBatPower: wallpaper .configuration .PauseOnBatPower
2829 property int pauseBatPercent: wallpaper .configuration .PauseBatPercent
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Flickable {
2020 property alias cfg_Fps: sliderFps .value
2121 property alias cfg_Volume: sliderVol .value
2222 property alias cfg_MpvStats: ckbox_mpvStats .checked
23+ property string cfg_MpvHwdec
2324 property alias cfg_Speed: spin_speed .dValue
2425 property alias cfg_MuteAudio: ckbox_muteAudio .checked
2526 property alias cfg_MouseInput: ckbox_mouseInput .checked
@@ -317,6 +318,30 @@ Flickable {
317318 id: ckbox_mpvStats
318319 }
319320 }
321+
322+ OptionItem {
323+ text: ' Hardware Decode'
324+ text_color: Kirigami .Theme .textColor
325+ icon: ' ../../images/plugin.svg'
326+ visible: cfg_VideoBackend == Common .VideoBackend .Mpv
327+ actor: ComboBox {
328+ id: cbox_mpvHwdec
329+ model: [
330+ { text: " Auto" , value: " auto" },
331+ { text: " Software" , value: " no" }
332+ ]
333+ textRole: " text"
334+ onActivated: cfg_MpvHwdec = model[currentIndex].value
335+ Component .onCompleted : {
336+ for (let i = 0 ; i < model .length ; i++ ) {
337+ if (model[i].value === cfg_MpvHwdec) {
338+ currentIndex = i;
339+ break ;
340+ }
341+ }
342+ }
343+ }
344+ }
320345 }
321346 OptionGroup {
322347 Layout .fillWidth : true
You can’t perform that action at this time.
0 commit comments