Skip to content

Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.

C++

Expose deinterlace component availability and keep portable source references relative

Veyra Goal Agent0d7b319dee8c
diff --git a/i18n/catalog.json b/i18n/catalog.json
index 438199c5..8ef2d556 100644
--- a/i18n/catalog.json
+++ b/i18n/catalog.json
@@ -7428,6 +7428,13 @@
"en": "This device cannot run the selected NR. Select an NR runtime supported by this GPU.",
"ja": "このデバイスでは選択した NR を実行できません。この GPU に対応する NR ランタイムを選択してください。"
},
+ {
+ "zh": "当前软件包未包含去隔行组件",
+ "src": "qml/SettingsPage.qml",
+ "zh-TW": "目前軟體包未包含去隔行元件",
+ "en": "This package does not include the deinterlacing module",
+ "ja": "このパッケージにはインターレース解除モジュールが含まれていません"
+ },
{
"zh": "当前配置未启用自动 NR,保留固定 1080p 档",
"src": "src/ui/QmlPlayerBridge.cpp",
diff --git a/include/veyra/media/FFmpegDeinterlacer.h b/include/veyra/media/FFmpegDeinterlacer.h
index 633b972a..aacde8db 100644
--- a/include/veyra/media/FFmpegDeinterlacer.h
+++ b/include/veyra/media/FFmpegDeinterlacer.h
@@ -8,6 +8,7 @@ struct HardwareSurfaceView;
// decoded frames use bwdif. Sources own demux/decode/PTS and seek resets.
class FFmpegDeinterlacer {
public:
+ static bool available();
FFmpegDeinterlacer();
~FFmpegDeinterlacer();
bool open(const AVFrame*,const HardwareSurfaceView*,int tbNum,int tbDen,int fpsNum,int fpsDen);
diff --git a/include/veyra/ui/QmlPlayerBridge.h b/include/veyra/ui/QmlPlayerBridge.h
index eda5caf7..72be9525 100644
--- a/include/veyra/ui/QmlPlayerBridge.h
+++ b/include/veyra/ui/QmlPlayerBridge.h
@@ -245,6 +245,7 @@ class QmlPlayerBridge : public QObject {
Q_PROPERTY(QString version READ version CONSTANT)
// --- playback ----------------------------------------------------------
+ Q_PROPERTY(bool deinterlaceAvailable READ deinterlaceAvailable CONSTANT)
Q_PROPERTY(QString statusText READ statusText NOTIFY snapshotChanged)
Q_PROPERTY(bool running READ running NOTIFY snapshotChanged)
Q_PROPERTY(bool paused READ paused NOTIFY snapshotChanged)
@@ -770,6 +771,7 @@ public:
// --- property accessors (Q_PROPERTY READ targets) -----------------------
// Split into read-only and read-write so a reviewer can see at a glance
// which values the UI can command and which it can only display.
+ bool deinterlaceAvailable() const;
QString statusText() const;
bool running() const;
bool paused() const;
diff --git a/qml/Veyra/SettingsPage.qml b/qml/Veyra/SettingsPage.qml
index f92339de..b14a910f 100644
--- a/qml/Veyra/SettingsPage.qml
+++ b/qml/Veyra/SettingsPage.qml
@@ -358,8 +358,8 @@ VPage {
}
VRow {
label: qsTr("自动去隔行")
- hint: qsTr("只处理标记为隔行的视频,优先使用 GPU;软解使用兼容算法。下次打开视频生效。")
- VSwitch { checked: veyra.preferences.deinterlace !== false; onToggled: checked => veyra.setPreference("deinterlace",checked) }
+ hint: veyra.deinterlaceAvailable ? qsTr("只处理标记为隔行的视频,优先使用 GPU;软解使用兼容算法。下次打开视频生效。") : qsTr("当前软件包未包含去隔行组件")
+ VSwitch { enabled: veyra.deinterlaceAvailable; checked: veyra.preferences.deinterlace !== false; onToggled: checked => veyra.setPreference("deinterlace",checked) }
}
// HDR 亮度曲线: static, so the highlights are protected.
// One-click presets (same ids as the list page).
diff --git a/scripts/acceptance/test-2.0.8-package.py b/scripts/acceptance/test-2.0.8-package.py
index 3d40d1b8..5f60af39 100644
--- a/scripts/acceptance/test-2.0.8-package.py
+++ b/scripts/acceptance/test-2.0.8-package.py
@@ -155,7 +155,8 @@ def manifest(flavor,source=False):
knownIssues=['AMD/Intel enhancement, GC550 and Blackmagic field validation require affected hardware','Douyin live companion compatibility not reproduced locally (not installed); process-name simulation only; field confirmation needed','VFG synthetic async validation failed 22 checks once, then 2425 checks passed in an isolated rerun; cause unresolved; see validation record'],
correspondingSource=dict(application='../'+SOURCE.name,applicationSha256=sha(SOURCE) if source else None,
dependencies='../'+DEPSOURCE.name,dependencySha256=DEPSHA,ffmpeg='../'+FFSOURCE.name,ffmpegSha256=FFSHA,
- deinterlaceModule=pkg.audit_ffmpeg(FF)['filterModule']['correspondingSource'],
+ deinterlaceModule=dict(archive='../'+Path(pkg.audit_ffmpeg(FF)['filterModule']['correspondingSource']['archive']).name,
+ sha256=pkg.audit_ffmpeg(FF)['filterModule']['correspondingSource']['sha256']),
instructions='docs/BUILD_2.0.8_TEST.md',displayVersionOverride='-DVEYRA_DISPLAY_VERSION='+LABEL),files=payload(app))
document(app/'package-manifest.json',data);return data
def stage():
diff --git a/src/media/FFmpegDeinterlacer.cpp b/src/media/FFmpegDeinterlacer.cpp
index 12346059..a5d7174b 100644
--- a/src/media/FFmpegDeinterlacer.cpp
+++ b/src/media/FFmpegDeinterlacer.cpp
@@ -106,6 +106,13 @@ struct FFmpegDeinterlacer::Impl {
}
#endif
};
+bool FFmpegDeinterlacer::available(){
+#ifdef VEYRA_HAS_AVFILTER_HEADERS
+ auto& filters=api();return filters.ready&&filters.avfilter_get_by_name("deinterlace_d3d12")&&filters.avfilter_get_by_name("bwdif");
+#else
+ return false;
+#endif
+}
FFmpegDeinterlacer::FFmpegDeinterlacer():impl_(std::make_unique<Impl>()){}
FFmpegDeinterlacer::~FFmpegDeinterlacer(){close();}
bool FFmpegDeinterlacer::open(const AVFrame* frame,const HardwareSurfaceView* surface,int num,int den,int fpsNum,int fpsDen){
diff --git a/src/ui/QmlPlayerBridge.cpp b/src/ui/QmlPlayerBridge.cpp
index 05e9fbd6..1d598f7c 100644
--- a/src/ui/QmlPlayerBridge.cpp
+++ b/src/ui/QmlPlayerBridge.cpp
@@ -1,3 +1,4 @@
+#include "veyra/media/FFmpegDeinterlacer.h"
#include "veyra/ui/QmlPlayerBridge.h"
#include "veyra/gfx/PresentSink.h"
#include "veyra/gfx/NvidiaVrr.h"
@@ -5636,7 +5637,7 @@ void QmlPlayerBridge::openPath(const QString& path) {
auto options = impl_->options;
options.softwareDecode = impl_->prefString("decode") == QLatin1String("software");
options.hardwareDecodeOnly = impl_->prefString("decode") == QLatin1String("hardware");
- options.deinterlace=impl_->prefBool("deinterlace",true);
+ options.deinterlace=deinterlaceAvailable()&&impl_->prefBool("deinterlace",true);
impl_->engine.open(impl_->videoWindow, wide, options);
impl_->openingSessionId = impl_->engine.snapshot().sessionId;
impl_->playlistSession = network?0:impl_->openingSessionId;
@@ -5648,6 +5649,7 @@ void QmlPlayerBridge::openPath(const QString& path) {
refreshSubtitles(network?std::wstring():wide);
}
+bool QmlPlayerBridge::deinterlaceAvailable() const { return media::FFmpegDeinterlacer::available(); }
void QmlPlayerBridge::openNetworkDialog(){emit navigate(QStringLiteral("network"));}
bool QmlPlayerBridge::openNetworkAddress(const QString& address){
const QUrl url(address.trimmed(),QUrl::StrictMode);