Compare commits

..
2 Commits
Author SHA1 Message Date
RarDog 54b77726cb fix: remove preview image overlay from video player and restore clean black background (v3.6.5)
Build and Release / Build Windows x64 (push) Has been cancelled
Build and Release / Build macOS (push) Has been cancelled
2026-09-05 18:56:49 +03:00
RarDog 8ad36e2f6b fix: eliminate video player blue screen on desktop with software rendering default and decoder toggle (v3.6.4)
Build and Release / Build Windows x64 (push) Has been cancelled
Build and Release / Build macOS (push) Has been cancelled
2026-09-05 18:48:33 +03:00
5 changed files with 90 additions and 7 deletions
+18
View File
@@ -1,4 +1,22 @@
const prismaChangelog = [
PrismaChange(
version: '3.6.5',
title: 'Исправление наложения превью на видеоплеер',
bullets: [
'Устранение наложения превью-картинки на воспроизводимое видео: убран фоновый слой постера под видеоплеером и восстановлен классический черный бэкграунд для правильного отображения границ и леттербоксинга видео любого формата.',
'Чистый рендеринг видео в карточках ленты: предпросмотр видео в ленте также изолирован от просвечивания подложки.',
],
),
PrismaChange(
version: '3.6.4',
title: 'Полное исправление воспроизведения видео на ПК (устранение синего экрана)',
bullets: [
'Программный рендеринг (S/W) по умолчанию для ПК: на десктопных платформах отключен проблемный OpenGL FBO мост аппаратного ускорения, вызывавший синий экран из-за отсутствия или конфликтов драйверов VAAPI/VDPAU в Linux/AppImage.',
'Переключатель декодера H/W / S/W в плеере: на верхней панели управления видеоплеером добавлена кнопка быстрого переключения между аппаратным (H/W) и программным (S/W) декодированием на лету.',
'Отображение постера-превью: под видеоплеером теперь отображается превью-постер на время буферизации, исключая появление пустых областей.',
'Безопасное превью в ленте: предпросмотр видео в карточках постов на ПК также переведен на надежный программный рендерер.',
],
),
PrismaChange(
version: '3.6.3',
title: 'Горизонтальный скролл колесиком мыши на ПК и исправление синего экрана в видеоплеере',
@@ -78,6 +78,8 @@ class _PostMediaViewerState extends State<PostMediaViewer>
String? _videoError;
bool _retriedFormatError = false;
bool _softwareDecodingFallback = false;
late bool _useSoftwareDecoding =
Platform.isLinux || Platform.isWindows || Platform.isMacOS;
Timer? _hideTimer;
StreamSubscription<String>? _errorSubscription;
StreamSubscription<Duration>? _positionSubscription;
@@ -109,6 +111,8 @@ class _PostMediaViewerState extends State<PostMediaViewer>
_videoError = null;
_retriedFormatError = false;
_softwareDecodingFallback = false;
_useSoftwareDecoding =
Platform.isLinux || Platform.isWindows || Platform.isMacOS;
_imageUrls = _buildImageUrls(widget.post);
_videoUrls = _buildVideoUrls(widget.post);
if (_isPlayableMedia(widget.post) && _videoUrls.isNotEmpty) {
@@ -226,6 +230,8 @@ class _PostMediaViewerState extends State<PostMediaViewer>
aspectRatio: widget.post.width > 0 && widget.post.height > 0
? widget.post.width / widget.post.height
: 16 / 9,
isSoftwareDecoding: _useSoftwareDecoding,
onToggleDecoder: _toggleDecoderMode,
controlsVisible: _controlsVisible,
coverVideo: _coverVideo,
muted: _muted,
@@ -444,13 +450,12 @@ class _PostMediaViewerState extends State<PostMediaViewer>
void _initializeVideo() {
MediaKit.ensureInitialized();
_player = Player();
final bool enableHw = !_useSoftwareDecoding && !_softwareDecodingFallback;
_controller = VideoController(
_player!,
configuration: VideoControllerConfiguration(
enableHardwareAcceleration: !_softwareDecodingFallback,
hwdec: _softwareDecodingFallback
? 'no'
: (Platform.isAndroid ? 'auto-safe' : 'auto'),
enableHardwareAcceleration: enableHw,
hwdec: enableHw ? (Platform.isAndroid ? 'auto-safe' : 'auto') : 'no',
),
);
_applyVolume();
@@ -525,6 +530,7 @@ class _PostMediaViewerState extends State<PostMediaViewer>
lower.contains('failed to recognize file format'))) {
_retriedFormatError = true;
_softwareDecodingFallback = true;
_useSoftwareDecoding = true;
_disposeVideo();
await Future<void>.delayed(const Duration(milliseconds: 250));
if (mounted) {
@@ -542,6 +548,7 @@ class _PostMediaViewerState extends State<PostMediaViewer>
_videoIndex = 0;
_retriedFormatError = false;
_softwareDecodingFallback = true;
_useSoftwareDecoding = true;
_disposeVideo();
await Future<void>.delayed(const Duration(milliseconds: 150));
if (mounted) {
@@ -549,6 +556,26 @@ class _PostMediaViewerState extends State<PostMediaViewer>
}
}
void _toggleDecoderMode() {
setState(() {
_useSoftwareDecoding = !_useSoftwareDecoding;
_softwareDecodingFallback = false;
_retriedFormatError = false;
});
_disposeVideo();
_initializeVideo();
ScaffoldMessenger.maybeOf(context)?.showSnackBar(
SnackBar(
content: Text(
_useSoftwareDecoding
? 'Включено программное декодирование (S/W)'
: 'Включено аппаратное декодирование (H/W)',
),
duration: const Duration(seconds: 2),
),
);
}
void _disposeVideo() {
_hideTimer?.cancel();
_errorSubscription?.cancel();
@@ -690,6 +717,8 @@ class _PostMediaViewerState extends State<PostMediaViewer>
halfVolume: _halfVolume,
coverVideo: _coverVideo,
initialVolume: _currentVolume,
isSoftwareDecoding: _useSoftwareDecoding,
onToggleDecoder: _toggleDecoderMode,
errorMessage: _videoError,
onRetry: _retryVideo,
onChanged: (snapshot) {
@@ -886,6 +915,8 @@ class _FullscreenVideoPage extends StatefulWidget {
required this.halfVolume,
required this.coverVideo,
this.initialVolume = 100.0,
required this.isSoftwareDecoding,
required this.onToggleDecoder,
required this.errorMessage,
required this.onRetry,
required this.onChanged,
@@ -900,6 +931,8 @@ class _FullscreenVideoPage extends StatefulWidget {
final bool halfVolume;
final bool coverVideo;
final double initialVolume;
final bool isSoftwareDecoding;
final VoidCallback onToggleDecoder;
final String? errorMessage;
final VoidCallback onRetry;
final ValueChanged<VideoPlaybackSnapshot> onChanged;
@@ -1024,6 +1057,8 @@ class _FullscreenVideoPageState extends State<_FullscreenVideoPage> {
player: widget.player,
controller: widget.controller,
aspectRatio: widget.aspectRatio,
isSoftwareDecoding: widget.isSoftwareDecoding,
onToggleDecoder: widget.onToggleDecoder,
controlsVisible: _controlsVisible,
coverVideo: _coverVideo,
muted: _muted,
@@ -1575,6 +1610,8 @@ class _VideoSurface extends StatefulWidget {
required this.player,
required this.controller,
required this.aspectRatio,
required this.isSoftwareDecoding,
required this.onToggleDecoder,
required this.controlsVisible,
required this.coverVideo,
required this.muted,
@@ -1599,6 +1636,8 @@ class _VideoSurface extends StatefulWidget {
final Player player;
final VideoController controller;
final double aspectRatio;
final bool isSoftwareDecoding;
final VoidCallback onToggleDecoder;
final bool controlsVisible;
final bool coverVideo;
final bool muted;
@@ -1844,6 +1883,8 @@ class _VideoSurfaceState extends State<_VideoSurface> {
fullscreen: widget.fullscreen,
isLocked: _isLocked,
isLandscape: widget.isLandscape,
isSoftwareDecoding: widget.isSoftwareDecoding,
onToggleDecoder: widget.onToggleDecoder,
onToggleOrientation: widget.onToggleOrientation,
onToggleLock: () => setState(() => _isLocked = !_isLocked),
onToggleFit: widget.onToggleFit,
@@ -2655,6 +2696,8 @@ class _VideoControls extends StatefulWidget {
required this.fullscreen,
required this.isLocked,
this.isLandscape,
required this.isSoftwareDecoding,
required this.onToggleDecoder,
this.onToggleOrientation,
required this.onToggleLock,
required this.onToggleFit,
@@ -2674,6 +2717,8 @@ class _VideoControls extends StatefulWidget {
final bool fullscreen;
final bool isLocked;
final bool? isLandscape;
final bool isSoftwareDecoding;
final VoidCallback onToggleDecoder;
final VoidCallback? onToggleOrientation;
final VoidCallback onToggleLock;
final VoidCallback onToggleFit;
@@ -2773,6 +2818,17 @@ class _VideoControlsState extends State<_VideoControls> {
onPressed: widget.onToggleLock,
),
const Spacer(),
_RoundControlButton(
tooltip: widget.isSoftwareDecoding
? 'Декодер: S/W (программный). Нажмите для переключения на H/W'
: 'Декодер: H/W (аппаратный). Нажмите для переключения на S/W',
selected: !widget.isSoftwareDecoding,
icon: widget.isSoftwareDecoding
? Icons.memory_rounded
: Icons.speed_rounded,
onPressed: widget.onToggleDecoder,
),
const SizedBox(width: 8),
_SpeedBadgeButton(
currentRate: currentRate,
onSelected: (newRate) => widget.player.setRate(newRate),
+1 -1
View File
@@ -580,7 +580,7 @@ class _DesktopShellState extends State<_DesktopShell>
),
),
child: Text(
'v3.6.3',
'v3.6.5',
style: TextStyle(
fontSize: 10,
fontWeight:
+10 -1
View File
@@ -1,5 +1,6 @@
import 'dart:async';
import 'dart:collection';
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
@@ -590,7 +591,15 @@ class _FeedVideoPreviewState extends State<_FeedVideoPreview> {
super.initState();
MediaKit.ensureInitialized();
_player = Player();
_controller = VideoController(_player);
final isDesktop =
Platform.isLinux || Platform.isWindows || Platform.isMacOS;
_controller = VideoController(
_player,
configuration: VideoControllerConfiguration(
enableHardwareAcceleration: !isDesktop,
hwdec: isDesktop ? 'no' : 'auto-safe',
),
);
_player.stream.error.listen((_) {
if (mounted) setState(() => _failed = true);
});
+1 -1
View File
@@ -1,7 +1,7 @@
name: gel_rule_app
description: Local backend/core layer for a Flutter booru browser app.
publish_to: "none"
version: 3.6.3+85
version: 3.6.5+87
environment:
sdk: ">=3.3.0 <4.0.0"