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++

Pause and resume capture cards and streams

Veyra Goal Agent4b3a31b5cfff
diff --git a/scripts/ui-check/live-pause.qml b/scripts/ui-check/live-pause.qml
new file mode 100644
index 00000000..55029a9e
--- /dev/null
+++ b/scripts/ui-check/live-pause.qml
@@ -0,0 +1,16 @@
+
+ // ---- capture card: pause stops processing, play resumes ----
+ Timer { interval: 150; running: true; repeat: true; onTriggered: veyra.logUi("uitest-tick", "") }
+ Timer {
+ interval: 1000; running: true; repeat: true
+ property int ticks: 0
+ onTriggered: {
+ ++ticks
+ if (ticks === 2) dialogs.open("capture")
+ if (ticks === 4) { veyra.nrEnabled = true; veyra.startCaptureSession(); dialogs.close() }
+ if (ticks === 10) { veyra.logUi("uitest", "UITEST_NOTE pause"); veyra.togglePlayPause() }
+ if (ticks === 12) veyra.logUi("uitest", "UITEST_SHOT paused")
+ if (ticks === 16) { veyra.logUi("uitest", "UITEST_NOTE resume paused=" + veyra.paused); veyra.togglePlayPause() }
+ if (ticks === 21) { veyra.logUi("uitest", "UITEST_NOTE end paused=" + veyra.paused); veyra.logUi("uitest", "UITEST_DONE"); running = false }
+ }
+ }
diff --git a/src/ui/QmlPlayerBridge.cpp b/src/ui/QmlPlayerBridge.cpp
index 1c566847..b7e155fd 100644
--- a/src/ui/QmlPlayerBridge.cpp
+++ b/src/ui/QmlPlayerBridge.cpp
@@ -4104,7 +4104,17 @@ void QmlPlayerBridge::togglePlayPause() {
// stays alive), so the decision must come from the transport state.
const auto& s = impl_->snapshot;
using T = engine::TransportState;
- if (s.capture || s.image || s.transport == T::Opening || s.transport == T::Stopping) return;
+ if (s.image || s.transport == T::Opening || s.transport == T::Stopping) return;
+ // Capture cards and streams pause too (field request 2026-10-02): the engine stops
+ // reading and enhancing, keeps the last picture and resets the source's queue, so
+ // play resumes with the newest frame rather than a backlog. The connection stays up.
+ if (s.capture && s.running) {
+ const bool pause = s.transport == T::Playing;
+ impl_->engine.pause(pause);
+ veyra::log::info("ui-transport", pause ? "live pause" : "live resume");
+ emit notice(pause ? tr("已暂停:画面停在当前帧,不再处理新画面;点播放继续") : tr("已继续"), false);
+ return;
+ }
if (!s.running || s.transport == T::Ended) {
// Only a real file is reopened; device/stream labels are not paths.
const QString file = QString::fromStdWString(impl_->sourceLabel);