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++
finish(remoteplay): complete setup controls and document PS5 acceptance
Veyra Goal Agent9bd30baef82c
diff --git a/README.md b/README.mdindex 5e838fab..713ec812 100644--- a/README.md+++ b/README.md@@ -30,6 +30,10 @@ Windows 视频播放器与采集卡增强工具。支持视频、图片和采集0.0.4 修复增强处理造成的音画不同步,以及 NR 耗时轻微波动时的音频卡顿;同时修正 XeSS 补帧下的音频播放时序。+### 开发分支:PS5 串流++当前开发分支接入了 PS5 局域网串流、配对、加密保存与手柄输入,复用原有增强链路,等待实机验收。**现有0.0.4 Release不包含此功能。** [本机测试步骤与范围](docs/REMOTEPLAY_PS5_ACCEPTANCE_2026-09-11.md)。+## 下载与运行1. 在 [Releases](https://github.com/Likely7/Veyra-NRVideo/releases) 下载 **Veyra-0.0.4-win64-portable.zip**,不要下载 Source code。diff --git a/README_EN.md b/README_EN.mdindex 579451c8..e72bbc4c 100644--- a/README_EN.md+++ b/README_EN.md@@ -30,6 +30,10 @@ Daily mode focuses on watching. Professional mode expands the controls, diagnostVersion 0.0.4 fixes audio/video drift caused by enhancement processing, audio interruptions during small NR timing fluctuations, and audio scheduling with XeSS frame generation.+### Development branch: PS5 Remote Play++The development branch adds LAN PS5 streaming, pairing, encrypted profiles and gamepad input through the existing enhancement pipeline. Console acceptance is pending. **This is not included in the published 0.0.4 Release.** See the [local test guide and scope](docs/REMOTEPLAY_PS5_ACCEPTANCE_2026-09-11.md).+## Download and Run1. Download **Veyra-0.0.4-win64-portable.zip** from [Releases](https://github.com/Likely7/Veyra-NRVideo/releases). The Source code archives are for developers.diff --git a/apps/veyra/ui/AppShell.cpp b/apps/veyra/ui/AppShell.cppindex 76ed7658..16745a8d 100644--- a/apps/veyra/ui/AppShell.cpp+++ b/apps/veyra/ui/AppShell.cpp@@ -320,7 +320,10 @@ case Split:compareMode=compareMode==2?0:2;updateComparison();break;case Reference:referenceBase=SendDlgItemMessageW(hwnd,Reference,CB_GETCURSEL,0,0)==1;updateComparison();break;case Settings:if(uiState.mode==veyra::ui::Mode::Daily)switchMode();selectInspector(0);break;#ifdef VEYRA_ENABLE_REMOTEPLAY-case RemotePlay:veyra::ui::showRemotePlayPanel(hwnd,[](veyra::source::RemotePlayConnectDesc desc){cancelProtection();if(!remoteController.start())veyra::log::warn("remoteplay-input","SDL gamepad initialization failed");SetTimer(mainWindow,2,8,nullptr);currentFile=L"remoteplay:";subtitles.clear();paused=false;engine.previewView({});engine.openRemotePlay(video,std::move(desc),options());SetWindowTextW(mainWindow,L"Veyra — PS5 Remote Play");layout();},[](std::string pin){engine.remotePlayLoginPin(std::move(pin));});break;+case RemotePlay:veyra::ui::showRemotePlayPanel(hwnd,[](veyra::source::RemotePlayConnectDesc desc){cancelProtection();if(!remoteController.start())veyra::log::warn("remoteplay-input","SDL gamepad initialization failed");SetTimer(mainWindow,2,8,nullptr);currentFile=L"remoteplay:";subtitles.clear();paused=false;engine.previewView({});engine.openRemotePlay(video,std::move(desc),options());SetWindowTextW(mainWindow,L"Veyra — PS5 Remote Play");layout();},[](std::string pin){engine.remotePlayLoginPin(std::move(pin));},[]{auto s=engine.snapshot();veyra::ui::RemotePlayPanelStatus result;+ result.active=s.remotePlay&&(s.running||s.transport==veyra::engine::TransportState::Opening||s.transport==veyra::engine::TransportState::Stopping);+ result.message=s.failed?s.status:s.remotePlay&&s.running?L"PS5 画面已进入播放。点击播放器窗口后手柄生效;关闭此面板不停止串流。":result.active?s.status:L"PS5 串流已停止,可以重新连接。";return result;+},[]{engine.stop();});break;#endifcase Capture:case ProRailCapture:veyra::ui::showCapturePanel(hwnd,[](const std::wstring& path){openFile(path);layout();});break;case Export:if(uiState.mode==veyra::ui::Mode::Professional)startVideoExport(false);break;diff --git a/apps/veyra/ui/RemotePlayPanel.cpp b/apps/veyra/ui/RemotePlayPanel.cppindex a2b0bdae..566a144e 100644--- a/apps/veyra/ui/RemotePlayPanel.cpp+++ b/apps/veyra/ui/RemotePlayPanel.cpp@@ -10,21 +10,57 @@namespace veyra::ui {namespace {HWND window=nullptr;HFONT font=nullptr;-enum {Host=1,Account,PairPin,Quality,CodecChoice,Pair,Connect,Cancel,Scan,Wake,LoginPin,SendPin,StatusText,Help};+enum {Host=1,Account,PairPin,Quality,CodecChoice,Pair,Connect,Cancel,Scan,Wake,LoginPin,SendPin,StatusText,Help,Bitrate,Forget};std::function<void(source::RemotePlayConnectDesc)> connect;std::function<void(std::string)> login;+std::function<RemotePlayPanelStatus()> connectionStatus;std::function<void()> disconnect;bool watching=false;std::jthread worker;std::atomic<bool> done=false;bool busy=false,closing=false;-struct Outcome {std::wstring message;std::vector<remoteplay::DiscoveredConsole> hosts;};+struct Outcome {std::wstring message;std::vector<remoteplay::DiscoveredConsole> hosts;std::filesystem::path savedPath;};std::mutex mutex;Outcome outcome;-auto profilePath(){return runtime::localDataDirectory()/"remoteplay-profile.dat";}+struct SavedProfile {std::string host;std::filesystem::path path;};+std::vector<SavedProfile> profiles;std::filesystem::path currentProfile;+constexpr uint32_t bitrates[]={5000,10000,15000,20000,30000,50000,80000,100000};+auto profilePath(){return currentProfile;}+std::filesystem::path pathForHost(std::string_view host){+ for(const auto& profile:profiles)if(profile.host==host)return profile.path;+ GUID guid{};if(FAILED(CoCreateGuid(&guid)))return {};+ std::string id;const auto* bytes=reinterpret_cast<const unsigned char*>(&guid);+ for(size_t i=0;i<sizeof(guid);++i)id+=std::format("{:02x}",bytes[i]);+ return runtime::localDataDirectory()/"remoteplay"/(id+".dat");+}+void loadSelection(){+ if(auto saved=remoteplay::loadProfile(currentProfile)){+ SetDlgItemTextW(window,Host,std::wstring(saved->host.begin(),saved->host.end()).c_str());+ auto id=remoteplay::accountIdToBase64(saved->credentials.accountId);SetDlgItemTextW(window,Account,std::wstring(id.begin(),id.end()).c_str());+ SendDlgItemMessageW(window,Quality,CB_SETCURSEL,(saved->video.height==1080?2:0)+(saved->video.fps==60?1:0),0);+ SendDlgItemMessageW(window,CodecChoice,CB_SETCURSEL,saved->video.codec==remoteplay::Codec::H265?1:0,0);+ const auto found=std::find(std::begin(bitrates),std::end(bitrates),saved->video.bitrateKbps);+ SendDlgItemMessageW(window,Bitrate,CB_SETCURSEL,found==std::end(bitrates)?2:found-std::begin(bitrates),0);+ }+}+void refreshProfiles(){+ profiles.clear();SendDlgItemMessageW(window,Host,CB_RESETCONTENT,0,0);+ auto add=[](const std::filesystem::path& path){if(auto saved=remoteplay::loadProfile(path))profiles.push_back({saved->host,path});};+ add(runtime::localDataDirectory()/"remoteplay-profile.dat");+ std::error_code ec;const auto directory=runtime::localDataDirectory()/"remoteplay";+ size_t scanned=0;+ for(std::filesystem::directory_iterator it(directory,ec),end;!ec&&it!=end&&profiles.size()<64&&scanned<256;it.increment(ec),++scanned){+ const auto id=it->path().stem().wstring();+ if(it->path().extension()==".dat"&&id.size()==32&&std::all_of(id.begin(),id.end(),[](wchar_t c){return (c>=L'0'&&c<=L'9')||(c>=L'a'&&c<=L'f');}))add(it->path());+ }+ int selected=-1;for(size_t i=0;i<profiles.size();++i){auto& p=profiles[i];SendDlgItemMessageW(window,Host,CB_ADDSTRING,0,LPARAM(std::wstring(p.host.begin(),p.host.end()).c_str()));if(p.path==currentProfile)selected=int(i);}+ if(selected<0&&!profiles.empty()){selected=0;currentProfile=profiles[0].path;}+ if(selected>=0){SendDlgItemMessageW(window,Host,CB_SETCURSEL,selected,0);loadSelection();}+ else currentProfile.clear();+}std::wstring text(int id){auto h=GetDlgItem(window,id);std::wstring s(size_t(GetWindowTextLengthW(h))+1,L'\0');GetWindowTextW(h,s.data(),int(s.size()));s.resize(wcslen(s.c_str()));return s;}std::string ascii(int id){auto s=text(id);if(std::any_of(s.begin(),s.end(),[](wchar_t c){return c>127;}))return {};std::string result;result.reserve(s.size());for(auto c:s)result.push_back(static_cast<char>(c));return result;}remoteplay::VideoProfile video(){remoteplay::VideoProfile p;const auto q=SendDlgItemMessageW(window,Quality,CB_GETCURSEL,0,0);p.width=q<2?1280:1920;p.height=q<2?720:1080;p.fps=(q==0||q==2)?30:60;- p.codec=SendDlgItemMessageW(window,CodecChoice,CB_GETCURSEL,0,0)==1?remoteplay::Codec::H265:remoteplay::Codec::H264;return p;+ p.codec=SendDlgItemMessageW(window,CodecChoice,CB_GETCURSEL,0,0)==1?remoteplay::Codec::H265:remoteplay::Codec::H264;const auto rate=SendDlgItemMessageW(window,Bitrate,CB_GETCURSEL,0,0);p.bitrateKbps=bitrates[std::clamp<int>(int(rate),0,7)];return p;}-void buttons(){for(int id:{Pair,Connect,Scan,Wake,Host,Account,PairPin,Quality,CodecChoice})EnableWindow(GetDlgItem(window,id),!busy);EnableWindow(GetDlgItem(window,Cancel),busy);}+void buttons(){for(int id:{Pair,Connect,Scan,Wake,Host,Account,PairPin,Quality,CodecChoice,Bitrate,Forget})EnableWindow(GetDlgItem(window,id),!busy);EnableWindow(GetDlgItem(window,Cancel),busy);}template<class Work> void launch(Work work){if(busy)return;if(worker.joinable())worker.join();busy=true;done=false;buttons();SetDlgItemTextW(window,StatusText,L"正在处理…可随时取消");worker=std::jthread([work=std::move(work)](std::stop_token stop)mutable{@@ -35,12 +71,12 @@ template<class Work> void launch(Work work){}void arrange(){auto move=[](int id,int x,int y,int w,int h){MoveWindow(GetDlgItem(window,id),dip(window,x),dip(window,y),dip(window,w),dip(window,h),TRUE);};- move(Host,160,18,270,28);move(Scan,440,18,112,28);+ move(Host,160,18,270,180);move(Scan,440,18,112,28);move(Account,160,62,392,28);move(PairPin,160,106,180,28);move(Pair,352,106,200,30);move(Quality,160,150,220,150);move(CodecChoice,392,150,160,150);move(Connect,160,199,180,36);move(Wake,352,199,200,36);move(LoginPin,160,250,180,28);move(SendPin,352,250,200,30);- move(Cancel,440,295,112,32);move(StatusText,20,341,530,64);move(Help,20,414,530,116);+ move(Bitrate,160,295,180,180);move(Forget,352,295,80,32);move(Cancel,440,295,112,32);move(StatusText,20,341,530,64);move(Help,20,414,530,116);}LRESULT CALLBACK proc(HWND h,UINT msg,WPARAM wp,LPARAM lp){switch(msg){case WM_CREATE:{window=h;closing=false;font=makeFont(h);titleTheme(h);@@ -50,26 +86,32 @@ case WM_CREATE:{window=h;closing=false;font=makeFont(h);titleTheme(h);};add(L"STATIC",L"PS5 地址",100,0,20,21,130,25);add(L"STATIC",L"PSN Account ID",101,0,20,65,130,25);add(L"STATIC",L"8 位配对码",102,0,20,109,130,25);add(L"STATIC",L"串流格式",103,0,20,153,130,25);add(L"STATIC",L"登录 PIN(可选)",104,0,20,253,135,25);- for(int id:{Host,Account,PairPin,LoginPin}){add(L"EDIT",L"",id,WS_TABSTOP|ES_AUTOHSCROLL|((id==PairPin||id==LoginPin)?ES_PASSWORD:0));SendDlgItemMessageW(h,id,EM_SETLIMITTEXT,id==Host?253:id==Account?24:8,0);}+ add(L"STATIC",L"码率",105,0,20,298,130,25);add(L"COMBOBOX",L"",Host,CBS_DROPDOWN|CBS_AUTOHSCROLL|WS_TABSTOP);SendDlgItemMessageW(h,Host,CB_LIMITTEXT,253,0);+ for(int id:{Account,PairPin,LoginPin}){add(L"EDIT",L"",id,WS_TABSTOP|ES_AUTOHSCROLL|((id==PairPin||id==LoginPin)?ES_PASSWORD:0));SendDlgItemMessageW(h,id,EM_SETLIMITTEXT,id==Host?253:id==Account?24:8,0);}add(L"COMBOBOX",L"",Quality,CBS_DROPDOWNLIST|WS_TABSTOP);for(auto label:{L"720p · 30 fps",L"720p · 60 fps",L"1080p · 30 fps",L"1080p · 60 fps"})SendDlgItemMessageW(h,Quality,CB_ADDSTRING,0,LPARAM(label));SendDlgItemMessageW(h,Quality,CB_SETCURSEL,3,0);add(L"COMBOBOX",L"",CodecChoice,CBS_DROPDOWNLIST|WS_TABSTOP);for(auto label:{L"H.264 · SDR",L"H.265 · SDR"})SendDlgItemMessageW(h,CodecChoice,CB_ADDSTRING,0,LPARAM(label));SendDlgItemMessageW(h,CodecChoice,CB_SETCURSEL,0,0);+ add(L"COMBOBOX",L"",Bitrate,CBS_DROPDOWNLIST|WS_TABSTOP);for(auto rate:bitrates){auto label=std::format(L"{} Mbps",rate/1000);SendDlgItemMessageW(h,Bitrate,CB_ADDSTRING,0,LPARAM(label.c_str()));}SendDlgItemMessageW(h,Bitrate,CB_SETCURSEL,2,0);+ add(L"BUTTON",L"删除配对",Forget,BS_PUSHBUTTON|WS_TABSTOP);for(auto [id,label]:{std::pair{Pair,L"配对并保存"},{Connect,L"连接并观看"},{Cancel,L"取消操作"},{Scan,L"查找主机"},{Wake,L"唤醒已配对 PS5"},{SendPin,L"提交登录 PIN"}})add(L"BUTTON",label,id,BS_PUSHBUTTON|WS_TABSTOP);marked(GetDlgItem(h,Connect));add(L"STATIC",L"首次使用先配对,之后直接连接。",StatusText,0);add(L"STATIC",L"PS5:设置 → 系统 → 远程游玩 → 启用远程游玩 → 关联设备。\nAccount ID 填账号数字 ID 或对应 8 字节 Base64,不是昵称或密码。\n电脑与 PS5 先连接同一局域网。配对信息仅在本机加密保存。\n登录 PIN 仅在 PS5 提示时填写;取消操作不会关闭当前视频。",Help,0);- if(auto saved=remoteplay::loadProfile(profilePath())){SetDlgItemTextW(h,Host,std::wstring(saved->host.begin(),saved->host.end()).c_str());auto id=remoteplay::accountIdToBase64(saved->credentials.accountId);SetDlgItemTextW(h,Account,std::wstring(id.begin(),id.end()).c_str());SendDlgItemMessageW(h,Quality,CB_SETCURSEL,(saved->video.height==1080?2:0)+(saved->video.fps==60?1:0),0);SendDlgItemMessageW(h,CodecChoice,CB_SETCURSEL,saved->video.codec==remoteplay::Codec::H265?1:0,0);}+ refreshProfiles();buttons();arrange();SetTimer(h,1,100,nullptr);return 0;}-case WM_TIMER:if(busy&&done){if(worker.joinable())worker.join();busy=false;Outcome result;{std::lock_guard lock(mutex);result=std::move(outcome);}buttons();SetDlgItemTextW(h,StatusText,result.message.c_str());if(!result.hosts.empty())SetDlgItemTextW(h,Host,std::wstring(result.hosts[0].host.begin(),result.hosts[0].host.end()).c_str());if(closing)DestroyWindow(h);}return 0;+case WM_TIMER:if(busy&&done){if(worker.joinable())worker.join();busy=false;Outcome result;{std::lock_guard lock(mutex);result=std::move(outcome);}if(!result.savedPath.empty()){currentProfile=result.savedPath;refreshProfiles();}buttons();SetDlgItemTextW(h,StatusText,result.message.c_str());if(!result.hosts.empty())SetDlgItemTextW(h,Host,std::wstring(result.hosts[0].host.begin(),result.hosts[0].host.end()).c_str());if(closing)DestroyWindow(h);}+ if(window&&watching&&!busy){auto state=connectionStatus();SetDlgItemTextW(h,StatusText,state.message.c_str());SetDlgItemTextW(h,Cancel,state.active?L"断开连接":L"取消操作");EnableWindow(GetDlgItem(h,Cancel),state.active);if(!state.active)watching=false;}return 0;case WM_COMMAND:switch(LOWORD(wp)){+ case Host:if(HIWORD(wp)==CBN_SELCHANGE&&!busy){const auto index=SendDlgItemMessageW(h,Host,CB_GETCURSEL,0,0);if(index>=0&&size_t(index)<profiles.size()){currentProfile=profiles[size_t(index)].path;loadSelection();}}break;+ case Forget:if(!busy&&!currentProfile.empty()){std::error_code ec;const bool removed=std::filesystem::remove(currentProfile,ec);if(removed){currentProfile.clear();refreshProfiles();if(profiles.empty()){SetDlgItemTextW(h,Account,L"");SetDlgItemTextW(h,Host,L"");}SetDlgItemTextW(h,StatusText,L"配对已删除。现有串流会保留;下次连接需选择其他主机或重新配对。");}else SetDlgItemTextW(h,StatusText,L"删除失败,请检查文件权限。");}break;case Pair:{if(busy)break;auto host=ascii(Host),id=ascii(Account),pin=ascii(PairPin);auto account=remoteplay::accountIdFromBase64(id);if(!account)account=remoteplay::accountIdFromDecimal(id);if(!remoteplay::validHost(host)||!account||!remoteplay::parsePairingPin(pin)){SetDlgItemTextW(h,StatusText,L"请填写有效主机地址、Account ID 和 8 位配对码。");break;}- auto format=video();SetDlgItemTextW(h,PairPin,L"");- launch([host=std::move(host),account=*account,pin=std::move(pin),format](std::stop_token stop)mutable{+ auto targetPath=pathForHost(host);if(targetPath.empty()){SetDlgItemTextW(h,StatusText,L"无法分配配对存档,请重试。");break;}auto format=video();SetDlgItemTextW(h,PairPin,L"");+ launch([host=std::move(host),account=*account,pin=std::move(pin),format,targetPath](std::stop_token stop)mutable{auto result=remoteplay::pairLocalPs5(host,account,pin,stop);SecureZeroMemory(pin.data(),pin.size());Outcome out;- if(result.result.ok&&!stop.stop_requested()){remoteplay::NativeConnectRequest request;request.host=host;request.video=format;request.credentials=std::move(result.credentials);out.message=remoteplay::saveProfile(profilePath(),request)?L"配对成功并已加密保存,可以连接。":L"配对成功,但保存失败。请检查目录权限后重试。";}+ if(result.result.ok&&!stop.stop_requested()){remoteplay::NativeConnectRequest request;request.host=host;request.video=format;request.credentials=std::move(result.credentials);if(remoteplay::saveProfile(targetPath,request)){out.savedPath=targetPath;out.message=L"配对成功并已加密保存,可以连接。";}else out.message=L"配对成功,但保存失败。请检查目录权限后重试。";}else out.message=result.canceled||stop.stop_requested()?L"已取消配对":std::format(L"配对失败({}),检查 PS5 配对码、Account ID 与网络。",result.result.code);return out;});break;}- case Connect:{if(busy)break;auto saved=remoteplay::loadProfile(profilePath());auto host=ascii(Host);if(!saved||!remoteplay::validHost(host)){SetDlgItemTextW(h,StatusText,L"请先完成配对,并填写有效主机地址。");break;}saved->host=host;saved->video=video();source::RemotePlayConnectDesc desc;desc.request=std::move(*saved);connect(std::move(desc));SetDlgItemTextW(h,StatusText,L"连接已开始。需要登录 PIN 时在下方提交。关闭面板不停止串流。");break;}- case Cancel:if(worker.joinable())worker.request_stop();break;+ case Connect:{if(busy)break;auto saved=remoteplay::loadProfile(profilePath());auto host=ascii(Host);if(!saved||!remoteplay::validHost(host)){SetDlgItemTextW(h,StatusText,L"请先完成配对,并填写有效主机地址。");break;}saved->host=host;saved->video=video();if(!remoteplay::saveProfile(currentProfile,*saved)){SetDlgItemTextW(h,StatusText,L"保存连接设置失败,请检查目录权限。");break;}source::RemotePlayConnectDesc desc;desc.request=std::move(*saved);connect(std::move(desc));watching=true;EnableWindow(GetDlgItem(h,Cancel),TRUE);SetDlgItemTextW(h,StatusText,L"连接已开始。需要登录 PIN 时在下方提交。关闭面板不停止串流。");break;}+ case Cancel:if(busy&&worker.joinable())worker.request_stop();else if(watching)disconnect();break;case Scan:launch([](std::stop_token stop){Outcome out;out.hosts=remoteplay::discoverLocalPs5(stop);out.message=stop.stop_requested()?L"已取消查找":out.hosts.empty()?L"未找到 PS5,可手工填写主机 IP;请检查防火墙和局域网。":L"已填入发现的 PS5 地址。多台主机可手工输入目标 IP。";return out;});break;case Wake:{if(busy)break;auto saved=remoteplay::loadProfile(profilePath());if(!saved){SetDlgItemTextW(h,StatusText,L"需要先配对才能唤醒。");break;}saved->host=ascii(Host);launch([request=std::move(*saved)](std::stop_token stop){Outcome out;if(stop.stop_requested()){out.message=L"已取消唤醒";return out;}auto r=remoteplay::wakeLocalPs5(request);out.message=r.ok?L"已发送唤醒请求,等待 PS5 启动后点击连接。":std::format(L"唤醒请求失败({})",r.code);return out;});break;}case SendPin:{auto pin=ascii(LoginPin);if(pin.empty()||!std::all_of(pin.begin(),pin.end(),[](char c){return c>='0'&&c<='9';})){SetDlgItemTextW(h,StatusText,L"登录 PIN 必须为数字。");break;}login(std::move(pin));SetDlgItemTextW(h,LoginPin,L"");break;}@@ -80,8 +122,8 @@ case WM_DESTROY:if(worker.joinable()){worker.request_stop();worker.join();}KillTcase WM_SIZE:arrange();return 0;}return DefWindowProcW(h,msg,wp,lp);}}-void showRemotePlayPanel(HWND parent,std::function<void(source::RemotePlayConnectDesc)> start,std::function<void(std::string)> pin){- connect=std::move(start);login=std::move(pin);if(window){SetForegroundWindow(window);return;}+void showRemotePlayPanel(HWND parent,std::function<void(source::RemotePlayConnectDesc)> start,std::function<void(std::string)> pin,std::function<RemotePlayPanelStatus()> status,std::function<void()> stop){+ connect=std::move(start);login=std::move(pin);connectionStatus=std::move(status);disconnect=std::move(stop);if(window){SetForegroundWindow(window);return;}WNDCLASSW wc{};wc.lpfnWndProc=proc;wc.hInstance=GetModuleHandleW(nullptr);wc.lpszClassName=L"VeyraRemotePlaySetup";wc.hbrBackground=panelBrush();wc.hCursor=LoadCursorW(nullptr,IDC_ARROW);RegisterClassW(&wc);CreateWindowExW(WS_EX_TOOLWINDOW,wc.lpszClassName,L"PS5 · Remote Play",WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_VISIBLE,CW_USEDEFAULT,CW_USEDEFAULT,dip(parent,590),dip(parent,580),parent,nullptr,wc.hInstance,nullptr);}diff --git a/apps/veyra/ui/RemotePlayPanel.h b/apps/veyra/ui/RemotePlayPanel.hindex d31d6420..80ea98ee 100644--- a/apps/veyra/ui/RemotePlayPanel.h+++ b/apps/veyra/ui/RemotePlayPanel.h@@ -3,6 +3,8 @@#include <functional>#include "veyra/source/RemotePlaySource.h"namespace veyra::ui {+struct RemotePlayPanelStatus {std::wstring message;bool active=false;};void showRemotePlayPanel(HWND,- std::function<void(source::RemotePlayConnectDesc)>,std::function<void(std::string)>);+ std::function<void(source::RemotePlayConnectDesc)>,std::function<void(std::string)>,+ std::function<RemotePlayPanelStatus()>,std::function<void()>);}diff --git a/docs/REMOTEPLAY_INTEGRATION_HANDOFF_2026-09-11.md b/docs/REMOTEPLAY_INTEGRATION_HANDOFF_2026-09-11.mdindex 7047d77b..68409457 100644--- a/docs/REMOTEPLAY_INTEGRATION_HANDOFF_2026-09-11.md+++ b/docs/REMOTEPLAY_INTEGRATION_HANDOFF_2026-09-11.md@@ -1,5 +1,7 @@# Veyra PS5 Remote Play 集成交接+> 施工已继续并形成可执行本机测试版。**当前结果、Git节点、证据与剩余实机项以 [执行记录最终节](REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.md#最终交付状态等待用户-ps5-实机连接) 和 [PS5验收步骤](REMOTEPLAY_PS5_ACCEPTANCE_2026-09-11.md) 为准。** 下文尤其第18节保留修复前事实,不是当前缺陷清单。+> 二次审计后用户授权当前 Agent 继续施工,节点状态改由 [修复执行记录](REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.md) 维护。本文第18节保留修复前证据,不应据旧缺陷表断言新代码仍未修。日期:2026-09-11diff --git a/docs/REMOTEPLAY_PS5_ACCEPTANCE_2026-09-11.md b/docs/REMOTEPLAY_PS5_ACCEPTANCE_2026-09-11.mdnew file mode 100644index 00000000..d0707fb6--- /dev/null+++ b/docs/REMOTEPLAY_PS5_ACCEPTANCE_2026-09-11.md@@ -0,0 +1,41 @@+# PS5 串流实机验收++开发分支 `agent/remoteplay-integration` 的本机测试版;不是已发布的0.0.4便携包。++## 打开哪个程序++直接打开 `out/remoteplay/product-repair/veyra.exe`。该目录已有FFmpeg运行依赖和shader,NR/SR/FG沿用项目现有本机运行组件。不要把exe单独拖到别的目录。也可使用桌面的 **Veyra PS5 测试版** 快捷方式,它从空白画面启动并关闭初始NR/SR/FG,便于先验收原始串流。++日常模式底栏时间信息旁有 **PS5** 按钮;专业模式左侧也有PS5入口。++## 第一次配对++1. 电脑与PS5在同一局域网,优先有线。PS5进入“设置 → 系统 → 远程游玩”,启用远程游玩。+2. 在“关联设备”取得8位配对码。Veyra点击PS5,输入主机IP,或点击“查找主机”。+3. 输入 **PSN Account ID**(数字ID,或对应8字节的Base64)与配对码。Account ID不是PSN昵称;不清楚时参考 [chiaki-ng官方配置说明](https://streetpea.github.io/chiaki-ng/setup/configuration/#registering-your-playstation) 中的 PSN Login / Public Lookup 获取方式。本版没有内置PSN账号登录或公网中继。已配对主机可从地址下拉框选择,删除配对不会停止当前串流。+4. 初次选 **1080p · 60 fps / H.264 · SDR / 15 Mbps**,点击“配对并保存”。成功后点击“连接并观看”。+5. 若主机要求登录PIN,填写单独的登录PIN栏;它与8位配对码不同。+6. 连接状态/错误显示在面板内;“断开连接”或播放器“停止”可结束串流。关闭设置面板会保留播放。++配对资料以当前Windows用户DPAPI加密保存在 `runtime_local/remoteplay/*.dat`(兼容此前单profile的 `runtime_local/remoteplay-profile.dat`)。同一台电脑下次直接连接;复制该文件到另一台电脑/另一个Windows用户不能代替重新配对。该文件不要作为日志附件。++## 建议按这个顺序测++| 项目 | 操作 | 观察 |+| --- | --- | --- |+| 基础连接 | 全关增强,H.264 1080p60,播放有运动与声音的内容 | 首帧、持续画面、声音连续、处理FPS |+| 手柄 | USB连接DualSense,点击Veyra主窗口使其在前台 | 按钮、双摇杆、双扳机、PS与触摸板点击;切去别的窗口应归零 |+| 编码格式 | 断开后分别连接H.265、720p、30fps | 不黑屏、不错误显示尺寸,声音速度正常 |+| 增强 | 基础通过后依次开启NR、超分、2X补帧,再组合开启 | UI显示真实处理/提交指标;增强欠速时声音仍独立播放,不积压压缩帧 |+| 操作 | 全屏、窗口缩放、专业模式、参数重建、停止后重连 | 不崩溃,历史正确重置,无持续按键 |+| 网络恢复 | 临时断开网络再恢复,必要时手动重连 | 出错提示/恢复请求,不无限缓存或无响应 |+| 唤醒 | PS5允许待机联网和网络唤醒后,待机时点“唤醒已配对PS5” | 只说明请求发出,等主机启动后再连接 |+| 录制 | 使用WGC窗口捕获Veyra | 有视频,不仅有UI;捕获节奏需实测 |++每次定位问题先保持单个场景不超过5分钟。出错请给出:H264/H265、720/1080、30/60、NR/SR/FG状态、发生操作,以及 `logs/veyra-app.log`(本机普通启动)。不要仅以目标FPS判断实际处理性能。++## 已验证和仍未知++已验证源码构建、离线真H264/H265解码、PCM与PTS、帧序号回绕、DPAPI、latest解码帧mailbox、SDL初始化/失焦neutral、真实面板本地校验及既有播放器软件gate。没有连接PS5,不能据此宣称配对/网络/真实码流/实际手柄/真实声音同步已经通过。++本版Remote Play为 **局域网PS5、SDR、720p/1080p、30/60fps、FFmpeg软件解码**。增强仍走现有D3D12图。没有把接收时间当成PS5原生PTS:相对时间和音画固定偏移为本地估计,实机需校对。尚无HDR、公网PSN穿透、触摸板坐标、陀螺仪、麦克风或震动/自适应扳机回传承诺。罕见Chiaki join失败目前为拒绝复用/隔离清理路径,未做真实join失败注入。diff --git a/docs/REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.md b/docs/REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.mdindex 53352b6b..644fe038 100644--- a/docs/REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.md+++ b/docs/REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.md@@ -40,7 +40,7 @@没有关闭用户播放器、占用采集卡、连接PS5、执行NVIDIA runtime或完整产品测试。节点一测试只证明上述真实FFmpeg与离线行为,不证明串流可用。原交接第18节是修复前缺陷账本,当前实现状态以本文节点证据更新。-## 节点二:真实 metadata、共享产品入口与独立 owner(进行中)+## 节点二:真实 metadata、共享产品入口与独立 owner(代码与离线验收已完成)已接入代码并在 `out/remoteplay/product-repair` 链接完整 `veyra.exe`;仍等待最终 UI / delivery 检查和用户 PS5 验收。@@ -73,3 +73,41 @@- `product-mailbox-build.log` 增量8步成功;`boundary-final.stdout.log` 实际调用产品 `publishDecoded`:容量一覆盖计数、交付最新帧、历史断点与消费后不重播通过,连同invalid连接重开和SDL失焦测试全部exit0。- `scripts/remoteplay/test-ui.ps1` 实际启动新exe的隔离empty smoke:查找PS5按钮、打开/关闭面板2次、空参数配对被本地拒绝、正常退出,`ui-panel-test.log` PASS;未发送网络请求。截图 `ui-panel/remoteplay-panel.png` 已人工查看,文字/输入/按钮完整、无白底旧控件遮挡;截图前清空Account ID和PIN。- 以官方SDK/运行时执行的delivery尚未运行。Remote Play OFF全新目录构建正在执行。上述截图/自动行为不证明PS5连接。+++## 最终交付状态:等待用户 PS5 实机连接++- 产品集成存档:`9e5c034`,标签 `checkpoint/remoteplay-product-integrated-2026-09-11`;之后收口补连接状态/断开、码率5–100Mbps、多个已配对地址选择/删除/重配、保存最后连接格式,文档收口另一个commit。+- 当前可执行文件:`out/remoteplay/product-repair/veyra.exe`,SHA256 `E66D01B3E5060EAAB508F35E4DE16FDBF1A08CE179290121EDAEF30B43C41203`。FFmpeg五个DLL和shaders已位于同目录,SDL/Chiaki静态链接;继续使用现有本机NR/SR/FG运行组件,未新增/替换NVIDIA文件。+- 桌面快捷方式“Veyra PS5 测试版”指向该exe,空白启动、初始NR/SR/FG关闭,用户可配对后逐项开启。+- `product-off-build.log`:全新Remote Play OFF目录全目标176步链接成功,正式build.ps1 exit0。ON的正式全目标build亦exit0。root CMake没有悬空source/backend变量。+- `native-ctest-final.log`:69/69 PASS(67 core+真实native初始化+实际DPAPI)。`hevc-source-fixed`是真FFmpeg source回归,单独运行而非冒充CTest覆盖。+- `boundary-final`:真实decoded mailbox / invalid connect→close→reopen / SDL初始化与失焦归零PASS。+- `ui-profiles-final-test.log`:最终exe实际面板打开关闭两轮、本地无效配对拒绝、码率与profile控件存在PASS;`ui-profiles-final/remoteplay-panel.png`已查看,全部控件与文字可见。没有通过测试脚本登录/连接真实主机,也没有删除用户配对。+- `scripts/gates/delivery.ps1` 第一次PASS,47.53秒,`logs/delivery/bec2ca6893d84738a4111be1b4c580e9/result.json`;补连接状态后再跑PASS,46.76秒,`logs/delivery/d8b637d3d5c247dea1fd3a39f420e684/result.json`。实际覆盖NR/NVOF、4K播放、暂停/seek、图片保存、H264/HEVC NVENC含音轨导出、取消导出。第二次对应exe哈希`0BD67E3D...`,此后改PS5面板的码率/profile管理并完成最终UI回归,再为RemotePlay解码增加分配上限并重跑source与boundary回归,未重跑第三次整套GPU gate;不得声称两个hash相同。+- 最后原有文件source23/23与UI384布局组合PASS;RemotePlay GUI是独立实际UI短测。+- 原始交接审计账本作为历史保留,下一条任务是用户按 `docs/REMOTEPLAY_PS5_ACCEPTANCE_2026-09-11.md` 连接PS5验证真实网络/声音/手柄/NR-SR-FG/重连。并不宣称已完成真实PS5验收。++### 可续接命令++```powershell+# 从项目根运行,依赖在本机项目外受控目录+./scripts/build.ps1 -Root $PWD -Preset x64-release -BuildDirectory "$PWD/out/remoteplay/product-repair" -RemotePlay `+ -ChiakiCheckout C:/veyra-deps/chiaki-source `+ -ChiakiStage "$PWD/out/remoteplay/chiaki-msvc-stage" `+ -RemotePlayPrefixPath C:/veyra-deps/remoteplay-installed/x64-windows-static `+ -ProtocPath C:/veyra-deps/remoteplay-installed/x64-windows/tools/protobuf/protoc.exe `+ -PkgConfigPath C:/veyra-deps/vcpkg/downloads/tools/msys2/3e71d1f8e22ab23f/mingw64/bin/pkg-config.exe+./scripts/remoteplay/test-ui.ps1 -PlayerExe ./out/remoteplay/product-repair/veyra.exe -OutputDirectory ./logs/remoteplay-ui-recheck+./scripts/gates/delivery.ps1 -Root $PWD -BuildDirectory ./out/remoteplay/product-repair -PlayerExe ./out/remoteplay/product-repair/veyra.exe+```++Native/source独立构建入口与fixture命令见上文;每个run-short-test限制30秒、fixture encoder各60秒、delivery整套约47秒。SDL通过项目外vcpkg安装`sdl3[core]:x64-windows-static`,源码版本/归档摘要写在dependency-lock.json,所有第三方二进制仍不在Git。++### 实机前明确边界++局域网PS5、SDR720/1080、30/60、软件H264/H265解码是本轮范围。时间基于本地到达与连续样本估计,不是主机原生PTS;音画固定偏差/网络抖动需要实机核对。公网PSN、HDR、硬解零拷贝、触摸坐标/陀螺仪/震动/自适应扳机回传不在本轮交付范围。罕见Chiaki join失败隔离路径没有真实失败注入证据;没有把其代码存在当测试通过。++本轮仅本地Git和本机测试,没有push、Release或SDK/runtime上传。源码格式检查排除原样保留的上游许可证和unified patch上下文;暂存列表无DLL/LIB/EXE/模型/凭据。++最后源层收口:FFmpeg max_pixels约束为1920×1088,允许1080p编码填充行,避免仅在解码后检查尺寸;open失败记录实际错误码。product-bounded-build.log/source-bounded-build.log链接成功;source-final-bounded.stdout.log和boundary-bounded.stdout.log均exit0,覆盖真实H264/H265首帧、重排PTS、PCM及owner边界。没有改文件/采集GPU路径。diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex ce1870d1..329ad849 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -1631,3 +1631,10 @@ FRUC候选bSkipWarp/延后重建/时间归零/首对预热均未通过新增rese## 2026-09-11 Remote Play 目标模式节点二施工用户授权继续至可执行交付,重大节点本地Git存档,实机PS5由用户验收;本轮没有push/release授权。已恢复metadata、严格依赖验证,共享生产CMake、独立网络/解码owner及PCM/WASAPI、DPAPI、配对连接UI和SDL手柄输入。源码编译/正式完整产品build成功;H264/H265/回绕、PCM/PTS、DPAPI、原source23与UI384组合回归通过。当前最终UI、OFF build、delivery及最新mailbox测试继续进行,不能据此称PS5完成实测。详情与真实失败修复记录见 `docs/REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.md` 节点二。+++## 2026-09-11 Remote Play 本机测试版收口++节点 `9e5c034` 已存档,追加连接状态/断开、码率与多主机配对管理、中文实机教程和中英文README开发分支说明。ON/OFF正式构建通过;69项native/core/DPAPI、真H264/H265 source/回绕/PCM/PTS、decoded mailbox与SDL边界、原source23项、UI384组合和实际PS5面板本地操作均通过。完整delivery两次PASS(47.53/46.76秒),后续只调整PS5面板并重新实测UI;证据与exe哈希边界详见修复执行记录最终节。用户尚未连接PS5,下一步由用户验收真实串流;没有宣称真实音画同步、网络恢复或手柄硬件已通过。创建桌面本机测试快捷方式,无远端发布。++最终源层加FFmpeg解码分配上限(允许1080p的1088编码填充行)与open错误码,重新构建产品/source并运行source-final-bounded、boundary-bounded均exit0;最终exe SHA256:E66D01B3E5060EAAB508F35E4DE16FDBF1A08CE179290121EDAEF30B43C41203。实机连接仍交用户验证。diff --git a/docs/remoteplay/NEXT_AGENT.md b/docs/remoteplay/NEXT_AGENT.mdindex bdbf67ea..ce3f2d06 100644--- a/docs/remoteplay/NEXT_AGENT.md+++ b/docs/remoteplay/NEXT_AGENT.md@@ -1,11 +1,11 @@-# 交给下一位 Agent 的接续指令+# Remote Play 接续入口-> 用户已改为由当前 Agent 继续施工。修复前审计保留;最新完成项与下一步见 [执行记录](../REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.md),不要把下文修复前状态当作最新代码结论。+最新实现与测试证据见 [修复执行记录](../REMOTEPLAY_REPAIR_EXECUTION_2026-09-11.md),用户操作见 [PS5实机验收](../REMOTEPLAY_PS5_ACCEPTANCE_2026-09-11.md)。-唯一交接入口:[`../REMOTEPLAY_INTEGRATION_HANDOFF_2026-09-11.md`](../REMOTEPLAY_INTEGRATION_HANDOFF_2026-09-11.md)。先完整阅读该文档和工作区最新 `AGENTS.md`,保护当前未提交改动,不要 reset、checkout 或重新运行用户包中的 `apply.py`,也不要自动 push 或发布。+本机分支 `agent/remoteplay-integration`。修复前存档 `bf21bef`;源层修复 `8827721`;产品集成节点 `9e5c034` / `checkpoint/remoteplay-product-integrated-2026-09-11`。最终验收文档提交之后以 `git log -5` 为准。-**先读交接文档第 18 节二次审计。** Windows/MSVC 原生 Chiaki 初始化已通过,但新审计真实复现了 H.264 配置头导致首帧失败、PCM 截断、音频时间轴错误和解码重排 PTS 错配;同时发现移植删去了原包的元数据回调。不能拿67项 core测试通过当作 source 正确。+已接入真实metadata、共享CMake、网络/解码与GPU解耦、独立音频owner、DPAPI、配对/连接/取消/PIN/发现/唤醒、SDL基础手柄输入。不要重新套用用户Code01的apply.py,也不要reset当前分支。-当前唯一任务:按第 17 节先建立会失败的 H.264 config/AU 真解码 source 回归,再修第6、18节的数据适配问题。音频必须用固定段锚点加样本偏移,旧交接逐块使用当前 arrival 的建议已撤回;元数据、实际尺寸、IDR/解码恢复、音频重启和停止失败都需覆盖。原始错误与审计工具在忽略的 `logs/remoteplay-audit-20260911/`、`out/remoteplay/audit-20260911/`。+下一步由用户连接PS5实机验收。收到问题后结合`logs/veyra-app.log`、实际参数和复现步骤排查;没有真实PS5数据时不得把离线probe或软件gate当成串流成功。源码构建、source测试和UI测试命令见执行记录。当前源码禁止SDK/DLL/模型/凭据;本轮无push/release授权。-完成上述闭环后,按交接文档第 12 节继续生产 CMake、统一引擎路径、Remote Play 音频、DPAPI/UI、手柄和 PS5 实机验收。不能因为离线测试或 native 初始化通过就声称串流功能已经完成。+[原交接第18节](../REMOTEPLAY_INTEGRATION_HANDOFF_2026-09-11.md#18-2026-09-11-二次代码审计用户要求交给其他-agent-修) 是修复前审计证据,保留供追溯,不是当前未完成清单。diff --git a/scripts/remoteplay/test-ui.ps1 b/scripts/remoteplay/test-ui.ps1index 741767ce..183d6e3f 100644--- a/scripts/remoteplay/test-ui.ps1+++ b/scripts/remoteplay/test-ui.ps1@@ -40,6 +40,7 @@ try {$deadline=[DateTime]::UtcNow.AddSeconds(3)do {$panel=[RpUi]::Find($process.Id,'VeyraRemotePlaySetup');if($panel -eq [IntPtr]::Zero){Start-Sleep -Milliseconds 25}}while($panel -eq [IntPtr]::Zero -and [DateTime]::UtcNow -lt $deadline)if($panel -eq [IntPtr]::Zero){throw 'Remote Play panel missing'}+ foreach($control in @(15,16)){if([RpUi]::GetDlgItem($panel,$control) -eq [IntPtr]::Zero){throw 'Bitrate/profile management missing'}}# Invalid local validation only; never contact a console or use a real key.foreach($field in @(1,2,3,11)){[RpUi]::SetWindowText([RpUi]::GetDlgItem($panel,$field),'')|Out-Null}[RpUi]::PostMessage($panel,0x111,[IntPtr]6,[IntPtr]::Zero)|Out-Nulldiff --git a/src/source/RemotePlaySource.cpp b/src/source/RemotePlaySource.cppindex 445de7b0..5513a9ff 100644--- a/src/source/RemotePlaySource.cpp+++ b/src/source/RemotePlaySource.cpp@@ -163,10 +163,13 @@ bool RemotePlaySource::openDecoder(remoteplay::Codec codec, std::uint32_t width,codecContext_->height = static_cast<int>(height);codecContext_->time_base = AVRational{1, static_cast<int>(request_.video.fps)};codecContext_->pkt_timebase = codecContext_->time_base;+ // Allow the 1088-line coded padding of 1080p H.264; bound allocation before decode.+ codecContext_->max_pixels = 1920LL * 1088;codecContext_->thread_count = 1;codecContext_->thread_type = FF_THREAD_FRAME | FF_THREAD_SLICE;- if (avcodec_open2(codecContext_, decoder, nullptr) < 0) {- veyra::log::error("remoteplay", "FFmpeg remote decoder open failed");+ const int opened = avcodec_open2(codecContext_, decoder, nullptr);+ if (opened < 0) {+ veyra::log::error("remoteplay", std::format("FFmpeg remote decoder open failed code={}", opened));avcodec_free_context(&codecContext_);return false;}