Replace the desktop video path with OWE
The desktop background no longer plays videos. OWE owns video backgrounds, and the shell layer stays empty behind one. The shell keeps stills, which OWE hands back to it. Remove the desktop video pause plumbing that only existed to stop an unseen player: the lock, idle, and battery service lookups, the per-output fullscreen check, the first-screen audio opt-in, and the audio output in BackgroundVideo. The lock screen keeps its own silent playback. Update the background tests, the manual, and the package note.
This commit is contained in:
6 files changed
+37
-119
No files matched your search
@@ -1,15 +1,15 @@
|
||||
import QtQuick
|
||||
import QtMultimedia
|
||||
|
||||
// Deliberately a bare MediaPlayer and VideoOutput rather than the Video
|
||||
// convenience type: Video always builds an AudioOutput, and a muted sink still
|
||||
// decodes the audio stream and opens an audio client on every output.
|
||||
// The lock screen is the only user. Playback is always silent, so this is a
|
||||
// bare MediaPlayer and VideoOutput rather than the Video convenience type:
|
||||
// Video always builds an AudioOutput, and a muted sink still decodes the audio
|
||||
// stream and opens an audio client.
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property url mediaSource: ""
|
||||
property bool playbackEnabled: true
|
||||
property bool audioEnabled: false
|
||||
property int mediaGeneration: 0
|
||||
property bool priming: false
|
||||
property int primingGeneration: -1
|
||||
@@ -74,23 +74,12 @@ Item {
|
||||
fillMode: VideoOutput.PreserveAspectCrop
|
||||
}
|
||||
|
||||
// Sound is opted into per output: with a player per monitor, every output
|
||||
// playing the track would layer copies of it. The sink is only built once
|
||||
// the media reports a sound track, so a silent file never opens an audio
|
||||
// client or its threads. Priming a paused player must not be heard.
|
||||
Loader {
|
||||
id: audioLoader
|
||||
active: root.audioEnabled && player.hasAudio
|
||||
sourceComponent: AudioOutput {
|
||||
muted: root.priming || !root.playbackEnabled
|
||||
}
|
||||
}
|
||||
|
||||
// No audio output is built, so the lock never decodes an audio stream or
|
||||
// opens an audio client.
|
||||
MediaPlayer {
|
||||
id: player
|
||||
source: root.mediaSource
|
||||
videoOutput: output
|
||||
audioOutput: audioLoader.item
|
||||
loops: MediaPlayer.Infinite
|
||||
autoPlay: root.playbackEnabled
|
||||
onMediaStatusChanged: {
|
||||
|
||||
Reference in new issue
Block a user