Repository navigation
MuMu 外壳在第一帧发布前照旧交出尺寸和黑图 - #9
Merged
Merged
Conversation
ModAVD#8 让截图在第一帧发布前返回未就绪,外壳也跟着给 MaaCore 返回 -2。 MaaCore 连上时马上要尺寸,失败就放弃这条路;截图失败会重新测速。 外壳改用内部标志照旧拷贝,和它替换掉的 DLL 一样;公开接口不受影响。 README 补上 Linux、macOS 打开时先经控制台开流、第一帧前要重试。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为什么
#8 让
mx_copy_frame在第一帧发布前(时间戳为 0)返回MODAVD_E_NOT_READY。这个函数 Windows 上也走,MuMu 外壳又是直接调它,所以开流以后、第一帧到之前,外壳会给 MaaCore 返回 -2,以前返回的是 0 和一张黑图。MaaCore 那边:
buffer_size = 0问尺寸,失败就认为这条路不能用;改了什么
MX_CAPTURE_UNPUBLISHED:带上它,mx_copy_frame在第一帧发布前也照常拷贝,交出尺寸和区域里现有的(黑)画面。外壳带上它,行为回到 POSIX 连接先确认开流,截图拒绝未发布首帧 #8 以前,和它替换掉的 DLL 一样。modavd_capture会清掉这个标志,公开接口照旧:第一帧前返回MODAVD_E_NOT_READY。NOT_READY,稍后再调;modavd_open默认先经控制台开流,什么时候可以带MODAVD_OPEN_NO_START。测试
test_shim:时间戳为 0 时,问尺寸返回 0 和正确的宽高,带缓冲区截图返回 0。test_core:公开的modavd_capture带上这个标志仍返回NOT_READY;mx_copy_frame带上它能拷贝。build.ps1编译,两个测试都过。