Projects
Extra
vlc-beta
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 117
View file
_service:obs_scm:vlc-beta-20250922.d9f6f6a50.obscpio/extras/tools/SHA512SUMS -> _service:obs_scm:vlc-beta-20250922.298d10606.obscpio/extras/tools/SHA512SUMS
Changed
@@ -14,7 +14,7 @@ d24849b93de58b20f518c071687e7bfa653a96600382f36c4cf7fc1047656458f75f093b911b786b18b6931b2453cb60868ecbe07cc7d2984e5981a874b34942 help2man-1.47.6.tar.xz 8d23dde18525dccaa648ca01df40151e7f00cec4846bd611c8970dbcfc1fb57a453facfe4d41462e7c3c8bb548d44b961a04e4fc3073ab6b65063e53f42bf6fd nasm-2.14.tar.gz 37b3a421419b16930e53181c431fe3b4afd55ac54733a5df08376641fd2fb88eeb73ee7abe3788f3e491e7c1b215c7f35aefa66f44b09008ad22b76ab2998830 ninja-1.11.1.tar.gz -bad913c59f540b701a0d234a868bd88615ccfcdc09931f8dea7b4da48bcc3a3c3c7e9cdeeff5abfcd48c6b2b25e5c60590811125b7156da36b714e00b35813c6 meson-1.7.1.tar.gz +62e633e07e7e8be1bf4f62f9e5a2df9535750fc0047ee5c21b17bc851d190cc0cf8e6696614692091013dc72e68aa23d2c1fe04500e146f56876591250474d04 meson-1.9.0.tar.gz 27acef46d9eb67203d708b57d80b853f76fa4b9c2720ff36ec161e6cdf702249e7982214ddf60bae75511aa79bc7d92aa27e3eab7ef9c0f5c040e8e42e76a385 libtool-2.4.7.tar.gz 60599f5c3168a287fe3a35062fd2e32e0b73433fce820bfd18d28b0e3bd7a8fefde6d6f0505fbbc2d664119ab7c539269184993843289932c895847ea1ab9f04 libtool-2.5.4.tar.gz 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4 gperf-3.1.tar.gz
View file
_service:obs_scm:vlc-beta-20250922.d9f6f6a50.obscpio/extras/tools/packages.mak -> _service:obs_scm:vlc-beta-20250922.298d10606.obscpio/extras/tools/packages.mak
Changed
@@ -49,7 +49,7 @@ HELP2MAN_VERSION=1.47.6 HELP2MAN_URL=$(GNU)/help2man/help2man-$(HELP2MAN_VERSION).tar.xz -MESON_VERSION=1.7.1 +MESON_VERSION=1.9.0 MESON_URL=https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION)/meson-$(MESON_VERSION).tar.gz NINJA_VERSION=1.11.1
View file
_service:obs_scm:vlc-beta-20250922.d9f6f6a50.obscpio/modules/codec/opus_header.c -> _service:obs_scm:vlc-beta-20250922.298d10606.obscpio/modules/codec/opus_header.c
Changed
@@ -140,7 +140,8 @@ p.pos = 0; str8 = 0; if (len<19)return 0; - read_chars(&p, (unsigned char*)str, 8); + if (!read_chars(&p, (unsigned char*)str, 8)) + return 0; if (memcmp(str, "OpusHead", 8)!=0) return 0;
View file
_service:obs_scm:vlc-beta-20250922.d9f6f6a50.obscpio/modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml -> _service:obs_scm:vlc-beta-20250922.298d10606.obscpio/modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml
Changed
@@ -95,7 +95,7 @@ anchors.left: parent.left anchors.right: parent.right - // TODO: Disable `live`, consider asynchronous loading and size changes. + // NOTE: No need to disable `live`, as this uses two pass mode so there is no video memory saving benefit. // If source image is tiled, layering is necessary: readonly property bool sourceNeedsLayering: (background.fillMode === Image.Tile)
View file
_service:obs_scm:vlc-beta-20250922.d9f6f6a50.obscpio/modules/gui/qt/player/qml/Player.qml -> _service:obs_scm:vlc-beta-20250922.298d10606.obscpio/modules/gui/qt/player/qml/Player.qml
Changed
@@ -290,7 +290,7 @@ radius: 3 - // TODO: Disable `live`, consider asynchronous loading. + live: false //destination aspect ratio readonly property real dar: parent.width / parent.height @@ -322,6 +322,33 @@ mode: bgtheme.palette.isDark ? Widgets.FastBlend.Mode.Multiply // multiply makes darker : Widgets.FastBlend.Mode.Screen // screen (inverse multiply) makes lighter } + + Component.onCompleted: { + // Blur layers are effect-size dependent, so once the user starts resizing the window (hence the effect), + // we should either momentarily turn on live, or repeatedly call `scheduleUpdate()`. Due to the optimization, + // calling `scheduleUpdate()` would continuously create and release intermediate layers, which would be a + // really bad idea. So instead, we turn on live and after some time passes turn it off again. + widthChanged.connect(liveTimer, liveTimer.transientTurnOnLive) + heightChanged.connect(liveTimer, liveTimer.transientTurnOnLive) + } + + Timer { + id: liveTimer + + repeat: false + interval: VLCStyle.duration_humanMoment + + function transientTurnOnLive() { + if (!blurredBackground.sourceTextureIsValid) + return + blurredBackground.live = true + liveTimer.restart() + } + + onTriggered: { + blurredBackground.live = false + } + } } } @@ -385,18 +412,46 @@ cache: false asynchronous: true - sourceSize: Qt.size(maximumSize, maximumSize) - - Accessible.role: Accessible.Graphic - Accessible.name: qsTr("Cover") - onTargetSourceChanged: { cover.source = targetSource } onStatusChanged: { - if (status === Image.Error) + if (status === Image.Ready) { + // This also covers source (and other parameters) change and not only initial loading + if (blurredBackground.sourceTextureIsValid) { + // Possible image switch and stale texture (especially old Qt without patch c871a52), we + // should wait one frame for the texture to be updated to avoid applying blur on stale one. + blurredBackground.scheduleUpdate(true) + } else { + // If not valid, the blur effect is going to wait appropriately until valid itself: + // Initial case (such as switching to player page), or switching images with recent Qt. + blurredBackground.scheduleUpdate(false) + } + } else if (status === Image.Error) { cover.source = VLCStyle.noArtAlbumCover + } + } + + sourceSize: Qt.size(maximumSize, maximumSize) + + Accessible.role: Accessible.Graphic + Accessible.name: qsTr("Cover") + + Component.onCompleted: { + // After the update on source change, there can be another update when the mipmaps are generated. + // We intentionally do not wait for this, initially using non-mipmapped source should be okay. As + // the user should not be greeted with a black background until the mipmaps are ready, let alone + // the possibility of knowing if the mipmaps are actually going to be ready as expected. + // If the texture is not valid yet (which is signalled the latest), blur effect is going to queue + // an update itself similar to the case when the source itself changes, so we do not check validity + // of the texture here. + blurredBackground.sourceTextureProviderObserver.hasMipmapsChanged.connect(blurredBackground, + (hasMipmaps /*: bool */) => { + if (hasMipmaps) { + blurredBackground.scheduleUpdate() + } + }) } Widgets.RoundedRectangleShadow {
View file
_service:obs_scm:vlc-beta-20250922.d9f6f6a50.obscpio/modules/gui/qt/widgets/qml/DualKawaseBlur.qml -> _service:obs_scm:vlc-beta-20250922.298d10606.obscpio/modules/gui/qt/widgets/qml/DualKawaseBlur.qml
Changed
@@ -41,10 +41,12 @@ property int configuration: DualKawaseBlur.Configuration.FourPass - // NOTE: This property is an optimization hint. When it is false, the result - // may be cached, and the intermediate buffers for the blur passes may - // be released. - // TODO: This is pending implementation. + // NOTE: This property is also an optimization hint. When it is false, the + // intermediate buffers for the blur passes may be released (only + // the two intermediate layers in four pass mode, we must have one + // layer regardless of the mode, so optimization-wise it has no + // benefit in two pass mode thus should be used solely as behavior + // instead): property bool live: true // Do not hesitate to use an odd number for the radius, there is virtually @@ -56,7 +58,7 @@ // used even if it is set false here. For that reason, it should not be // necessary to check for opacity (well, accumulated opacity can not be // checked directly in QML anyway). - property bool blending: (!ds1SourceObserver.isValid || ds1SourceObserver.hasAlphaChannel) + property bool blending: (!sourceTextureIsValid || sourceTextureProviderObserver.hasAlphaChannel) // source must be a texture provider item. Some items such as `Image` and // `ShaderEffectSource` are inherently texture provider. Other items needs @@ -72,6 +74,62 @@ // `QSGTextureView` can also be used instead of sub-texturing here. property rect sourceRect + property alias sourceTextureProviderObserver: ds1SourceObserver // for accessory + + readonly property bool sourceTextureIsValid: sourceTextureProviderObserver.isValid + + onSourceTextureIsValidChanged: { + if (root.sourceTextureIsValid) { + if (root._queuedScheduledUpdate) { + root._queuedScheduledUpdate = false + + // Normally it should be fine to call `scheduleUpdate()` directly for + // the initial layer, even though the subsequent layers must be chained + // for update scheduling regardless, but old Qt seems to want it: + root.scheduleUpdate(true) + } + } + } + + property var /*QtWindow*/ _window: null // captured window used for chaining through `afterAnimating()` + + property bool _queuedScheduledUpdate: false + + function scheduleUpdate(onNextAfterAnimating /* : bool */ = false) { + if (live) + return // no-op + + if (!root.sourceTextureIsValid) { + root._queuedScheduledUpdate = true // if source texture is not valid, delay the update until valid + return + } + + if (root._window) { + // One possible case for this is that the mipmaps for the source texture were generated too fast, and + // the consumer wants to update the blur to make use of the mipmaps before the blur finished chained + // updates for the previous source texture which is the non-mipmapped version of the same texture. + console.debug(root, "scheduleUpdate(): There is an already ongoing chained update, re-scheduling...") + root._queuedScheduledUpdate = true + return + } + + root._window = root.Window.window + if (onNextAfterAnimating) { + root._window.afterAnimating.connect(ds1layer, ds1layer.scheduleChainedUpdate) + } else { + ds1layer.scheduleChainedUpdate() + } + } + + onLiveChanged: { + if (live) { + ds1layer.parent = root + ds2layer.inhibitParent = false + } else { + root.scheduleUpdate(false) // this triggers releasing intermediate layers (when applicable) + } + } + // TODO: Get rid of this in favor of GLSL 1.30's `textureSize()` Connections { target: root.Window.window @@ -166,6 +224,32 @@ sourceItem: ds1 visible: false smooth: true + + live: root.live + + function scheduleChainedUpdate() { + if (!ds1layer) // context is lost, Qt bug (reproduced with 6.2) + return + + // Common for both four and two pass mode: + ds1layer.parent = root + ds1layer.scheduleUpdate() + + if (root._window) { + root._window.afterAnimating.disconnect(ds1layer, ds1layer.scheduleChainedUpdate) + + // In four pass mode, we can release the two intermediate layers: + if (root.configuration === DualKawaseBlur.Configuration.FourPass) { + // Scheduling update must be done sequentially for each layer in + // a chain. It seems that each layer needs one frame for it to be + // used as a source in another layer, so we can not schedule + // update for each layer at the same time: + root._window.afterAnimating.connect(ds2layer, ds2layer.scheduleChainedUpdate) + } else { + root._window = null + } + } + } } ShaderEffect { @@ -175,7 +259,8 @@ width: ds1.width / 2 height: ds1.height / 2 - readonly property Item source: ds1layer + // Qt uses reference counting, otherwise ds1layer may not be released, even if it has no parent (see `QQuickItemPrivate::derefWindow()`): + readonly property Item source: ((root.configuration === DualKawaseBlur.Configuration.TwoPass) || !ds1layer.parent) ? null : ds1layer property rect normalRect // not necessary here, added because of the warning readonly property int radius: root.radius @@ -193,7 +278,7 @@ visible: false - fragmentShader: "qrc:///shaders/DualKawaseBlur_downsample.frag.qsb" + fragmentShader: source ? "qrc:///shaders/DualKawaseBlur_downsample.frag.qsb" : "" // to prevent warning if source becomes null supportsAtlasTextures: true @@ -208,9 +293,27 @@ // never visible and was never used as texture provider, it should have never allocated // resources to begin with. sourceItem: (root.configuration === DualKawaseBlur.Configuration.FourPass) ? ds2 : null + parent: (!inhibitParent && sourceItem) ? root : null // this seems necessary to release resources even if sourceItem becomes null (non-live case) visible: false smooth: true + + live: root.live + + property bool inhibitParent: false + + function scheduleChainedUpdate() { + if (!ds2layer) // context is lost, Qt bug (reproduced with 6.2) + return + + ds2layer.inhibitParent = false + ds2layer.scheduleUpdate() + + if (root._window) { + root._window.afterAnimating.disconnect(ds2layer, ds2layer.scheduleChainedUpdate) + root._window.afterAnimating.connect(us1layer, us1layer.scheduleChainedUpdate) + } + } } ShaderEffect { @@ -219,7 +322,8 @@ width: ds2.width * 2 height: ds2.height * 2 - readonly property Item source: ds2layer + // Qt uses reference counting, otherwise ds2layer may not be released, even if it has no parent (see `QQuickItemPrivate::derefWindow()`): + readonly property Item source: ((root.configuration === DualKawaseBlur.Configuration.TwoPass) || !ds2layer.parent) ? null : ds2layer property rect normalRect // not necessary here, added because of the warning readonly property int radius: root.radius @@ -237,7 +341,7 @@ visible: false - fragmentShader: "qrc:///shaders/DualKawaseBlur_upsample.frag.qsb" + fragmentShader: source ? "qrc:///shaders/DualKawaseBlur_upsample.frag.qsb" : "" // to prevent warning if source becomes null supportsAtlasTextures: true @@ -252,9 +356,47 @@ // never visible and was never used as texture provider, it should have never allocated // resources to begin with. sourceItem: (root.configuration === DualKawaseBlur.Configuration.FourPass) ? us1 : null + parent: sourceItem ? root : null // this seems necessary to release resources even if sourceItem becomes null (non-live case) visible: false smooth: true + + live: root.live + + function scheduleChainedUpdate() { + if (!us1layer) // context is lost, Qt bug (reproduced with 6.2) + return + + us1layer.scheduleUpdate() + + if (root._window) { + root._window.afterAnimating.disconnect(us1layer, us1layer.scheduleChainedUpdate) + root._window.afterAnimating.connect(us1layer, us1layer.releaseResourcesOfIntermediateLayers) + } + } + + function releaseResourcesOfIntermediateLayers() { + if (!ds1layer || !ds2layer) // context is lost, Qt bug (reproduced with 6.2) + return + + // Last layer is updated, now it is time to release the intermediate buffers: + console.debug(root, ": releasing intermediate layers, expect the video memory consumption to drop.") + + // https://doc.qt.io/qt-6/qquickitem.html#graphics-resource-handling + ds1layer.parent = null + ds2layer.inhibitParent = true + + if (root._window) { + root._window.afterAnimating.disconnect(us1layer, us1layer.releaseResourcesOfIntermediateLayers) + root._window = null + } + + if (root._queuedScheduledUpdate) { + // Tried calling `scheduleUpdate()` before the ongoing chained updates completed. + root._queuedScheduledUpdate = false + root.scheduleUpdate(false) + } + } } ShaderEffect {
View file
_service:obs_scm:vlc-beta.obsinfo
Changed
@@ -1,4 +1,4 @@ name: vlc-beta -version: 20250922.d9f6f6a50 -mtime: 1758542481 -commit: d9f6f6a500e4394c194ab4dde7f5d5ba3c1e9d74 +version: 20250922.298d10606 +mtime: 1758553840 +commit: 298d10606b1a476ed97b42ff96dd429f13761918
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.