mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 00:16:59 +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
55 lines
1.9 KiB
Markdown
55 lines
1.9 KiB
Markdown
# Flathub packaging for Amethyst Desktop
|
|
|
|
This directory contains the Flatpak manifest and associated metadata for
|
|
publishing Amethyst Desktop on Flathub.
|
|
|
|
## Files
|
|
|
|
- `com.vitorpamplona.amethyst.Desktop.yml` — Flatpak manifest
|
|
- `com.vitorpamplona.amethyst.Desktop.metainfo.xml` — AppStream metadata
|
|
(categories, license, screenshots — needs screenshots added before
|
|
submission)
|
|
- `com.vitorpamplona.amethyst.Desktop.desktop` — XDG desktop entry
|
|
- `icons/256/com.vitorpamplona.amethyst.Desktop.png` — TODO: copy a 256x256
|
|
PNG icon from `desktopApp/src/jvmMain/resources/icon.png` before
|
|
submission
|
|
|
|
## Build prerequisites
|
|
|
|
- `./gradlew :desktopApp:createReleaseDistributable` — produces
|
|
`desktopApp/build/compose/binaries/main-release/app/Amethyst/`
|
|
- `flatpak install org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08 org.freedesktop.Sdk.Extension.openjdk21//24.08`
|
|
|
|
## Local build
|
|
|
|
```bash
|
|
cd desktopApp/packaging/flatpak
|
|
flatpak-builder --user --install --force-clean build-dir com.vitorpamplona.amethyst.Desktop.yml
|
|
flatpak run com.vitorpamplona.amethyst.Desktop
|
|
```
|
|
|
|
## Submission to Flathub
|
|
|
|
Follow https://docs.flathub.org/docs/for-app-authors/submission
|
|
|
|
1. Fork `flathub/flathub` on GitHub.
|
|
2. Branch from `new-pr` (NOT `master`).
|
|
3. Copy this manifest + AppStream + desktop into a new directory matching
|
|
the app id.
|
|
4. Open a PR titled "Add com.vitorpamplona.amethyst.Desktop".
|
|
5. After merge, a per-app repo is created with write access for ongoing
|
|
updates.
|
|
|
|
## Codec coverage
|
|
|
|
- HEVC / VP9 / AV1: covered via `org.freedesktop.Platform.ffmpeg-full`
|
|
add-extension declared in the manifest. Flatpak downloads it on install.
|
|
- HLS, H.264, AAC, MP3, Opus: covered by the GStreamer plugin set in
|
|
`org.freedesktop.Platform 24.08` itself.
|
|
|
|
## License metadata
|
|
|
|
The manifest declares the binary as
|
|
`MIT AND LGPL-2.1-or-later AND BSD-2-Clause AND Apache-2.0`. This SPDX
|
|
expression validates via `appstreamcli validate`.
|