mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
Drops uk.co.caprica:vlcj 4.8.3 (GPL-3.0) from desktopApp and replaces it
with an MIT-dominant stack:
- Video / audio playback: io.github.kdroidfilter:composemediaplayer:0.10.0
(MIT) — OS-native backends (Media Foundation on Windows, AVFoundation on
macOS, GStreamer on Linux). First-class Compose VideoPlayerSurface.
- Thumbnail extraction: org.jcodec:jcodec(+javase):0.2.5 (BSD-2) primary
H.264 path, raw ProcessBuilder FFmpeg fallback for HEVC / VP9 / AV1 /
HLS / non-faststart MP4.
- Binary SPDX: MIT AND LGPL-2.1-or-later AND BSD-2-Clause AND Apache-2.0.
rpmLicenseType updated accordingly (previously misdeclared as MIT
while shipping GPLv3 vlcj).
Code changes:
- Deleted: VlcjPlayerPool, MacOsVlcDiscoverer, BundledVlcDiscoverer,
VlcResourceResolver
- Rewrote: GlobalMediaPlayer (kdroidFilter engine + snapshotFlow-based
state sync into the preserved MediaPlaybackState contract);
VideoThumbnailCache (JCodec → ProcessBuilder ffmpeg cascade, with a
hard 4 MiB download cap, Content-Type sniff to reject HTML error
pages, and cleanup of zero-byte cache entries); DesktopVideoPlayer
(mounts VideoPlayerSurface for the active URL, codec/network error
UX with "Open in default player" fallback)
- Updated: NowPlayingBar + GlobalFullscreenOverlay to render
VideoPlayerSurface directly (drops the videoFrame ImageBitmap relay)
- Main.kt: drops vlcj pre-init / shutdown calls (kdroidFilter lazy-loads
natives + registers its own shutdown hook on Windows)
Build / packaging:
- Removes ir.mahozad.vlc-setup plugin + vlcSetup{} block + the per-OS
bundled VLC tree + the -Dvlc.plugin.path JVM arg
- Adds NOTICE.md + per-component LICENSE-*.txt under appResources/common
(LGPL-2.1 license text is a placeholder — replace with verbatim FSF
text before release)
- Adds per-OS LGPL FFmpeg drop-in directories with README pointing at
the recommended LGPL binary source (osxexperts.net / Crigges Windows
LGPL build)
- Adds Flathub manifest skeleton (Gitnuro-style: org.freedesktop.Platform
24.08 + openjdk21 extension + org.freedesktop.Platform.ffmpeg-full
add-extension for patent codecs)
- AppRun: drops VLC LD_LIBRARY_PATH / VLC_PLUGIN_PATH env wiring
Verified on macOS arm64:
- ./gradlew :desktopApp:compileKotlin BUILD SUCCESSFUL
- ./gradlew :desktopApp:test BUILD SUCCESSFUL
- ./gradlew :desktopApp:spotlessApply clean
- Smoke launch: no VLC/vlcj/libvlc log lines, kdroidFilter native
library extracts to ~/.cache/composemediaplayer/native/, thumbnail
cache populates at ~/.cache/amethyst-desktop/video-thumbs/ with the
4 MiB cap enforced
- H.264 MP4 playback (active + thumbnail extraction) confirmed
- VP9-in-WebM playback fails on macOS as AVFoundation cannot decode it —
expected codec gap; surfaced via PlaybackErrorMessage + "Open in
default player" handoff in DesktopVideoPlayer
Docs:
- docs/plans/2026-06-11-feat-replace-vlcj-with-kdroidfilter-plan.md
- docs/plans/2026-06-11-vlcj-replacement-testing-sheet.md
78 lines
2.5 KiB
YAML
78 lines
2.5 KiB
YAML
# Flathub manifest for Amethyst Desktop.
|
|
#
|
|
# Pattern based on flathub/com.jetpackduba.Gitnuro (Kotlin Compose Desktop).
|
|
# Submission to Flathub is a separate operation — see
|
|
# desktopApp/packaging/flatpak/README.md for the workflow.
|
|
|
|
app-id: com.vitorpamplona.amethyst.Desktop
|
|
runtime: org.freedesktop.Platform
|
|
runtime-version: '24.08'
|
|
sdk: org.freedesktop.Sdk
|
|
sdk-extensions:
|
|
- org.freedesktop.Sdk.Extension.openjdk21
|
|
command: amethyst-desktop
|
|
|
|
add-extensions:
|
|
org.freedesktop.Platform.ffmpeg-full:
|
|
directory: lib/ffmpeg
|
|
version: '24.08'
|
|
add-ld-path: .
|
|
autodownload: true
|
|
autodelete: false
|
|
|
|
cleanup-commands:
|
|
- mkdir -p /app/lib/ffmpeg
|
|
|
|
finish-args:
|
|
- --share=network
|
|
- --share=ipc
|
|
- --socket=fallback-x11
|
|
- --socket=wayland
|
|
- --socket=pulseaudio
|
|
- --device=dri
|
|
- --filesystem=xdg-download
|
|
- --filesystem=xdg-pictures
|
|
- --talk-name=org.freedesktop.Notifications
|
|
- --talk-name=org.freedesktop.secrets
|
|
# GStreamer plugin/cache paths (org.freedesktop.Platform exposes them by default).
|
|
- --env=GST_PLUGIN_SYSTEM_PATH=/usr/lib/x86_64-linux-gnu/gstreamer-1.0
|
|
|
|
modules:
|
|
- name: openjdk
|
|
buildsystem: simple
|
|
build-commands:
|
|
- /usr/lib/sdk/openjdk21/install.sh
|
|
|
|
- name: amethyst-desktop
|
|
buildsystem: simple
|
|
build-commands:
|
|
# Drop the jpackage-emitted self-contained tree into /app/lib/Amethyst.
|
|
# Wrapper at /app/bin/amethyst-desktop forwards args.
|
|
- mkdir -p /app/lib/Amethyst
|
|
- cp -r ./Amethyst/* /app/lib/Amethyst/
|
|
- install -Dm755 amethyst-desktop.sh /app/bin/amethyst-desktop
|
|
- install -Dm644 com.vitorpamplona.amethyst.Desktop.metainfo.xml -t /app/share/metainfo/
|
|
- install -Dm644 com.vitorpamplona.amethyst.Desktop.desktop -t /app/share/applications/
|
|
- install -Dm644 icons/256/com.vitorpamplona.amethyst.Desktop.png -t /app/share/icons/hicolor/256x256/apps/
|
|
sources:
|
|
# Built artifact from `./gradlew :desktopApp:createReleaseDistributable`.
|
|
# Path matches Compose Multiplatform 1.11's output layout.
|
|
- type: dir
|
|
path: ../../build/compose/binaries/main-release/app
|
|
dest: ./
|
|
|
|
- type: script
|
|
dest-filename: amethyst-desktop.sh
|
|
commands:
|
|
- "#!/bin/sh"
|
|
- exec /app/lib/Amethyst/bin/Amethyst "$@"
|
|
|
|
- type: file
|
|
path: com.vitorpamplona.amethyst.Desktop.metainfo.xml
|
|
|
|
- type: file
|
|
path: com.vitorpamplona.amethyst.Desktop.desktop
|
|
|
|
- type: file
|
|
path: icons/256/com.vitorpamplona.amethyst.Desktop.png
|