Conversation
|
Development builds of 2f4e4d8: The links work without a GitHub account. Artifacts expire after 90 days, and this comment follows the latest successful build. |
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.
The seek origin used to ride in the
Bufferparameter as an integer cast to a pointer,so every handler decoded it with
(int)(intptr_t)bufferand compared it against bare0,1and2. It was never data: it says which operation is wanted, andactionalready dispatches, so it belongs in the command.
Buffernow means nothing for a seek, which is what the original comment always said.The set becomes
enum VQACommandType : int32_t, matchingVQAErrorType.VQACMD_SEEKis deleted rather than redefined, so the compiler had to find all 15 callsites and 5 handlers.
Verification
Behaviour checked differentially, not by inspection: the loop cache seek modelled under
both protocols over 84 combinations of origin, offset and cache position, comparing error
code and resulting offset. All 84 match.
No harness reaches these sources, so
dstream.cpp,loader.cpp,task.cppandbuffer_.cppwere compiled here against a stubbedio.h: no errors, warning countsunchanged from baseline.
vqa.cppandaudiomovie.cpprest on Windows CI. The seek pathhas no runtime coverage, since that needs a real VQA file.
One guard worth naming: the loop cache handler gets an explicit
VQACMD_SEEK_ENDerrorcase, because its outer
default:falls through witherror = 0and would otherwise havestarted reporting success for a seek it cannot do.
Not done here
actionstayslong. The audio handler sharesVQA_H_FUNCwith the stream handlers butcarries the
VQAAUDIO_set through the same slot, and those values overlapVQACMD_one for one, so typing the parameter needs the typedef split per role first.
Known, pre-existing and left alone
VQACMD_SEEK_ENDis implemented inconsistently and no caller uses it. Fornbytes = 10,VQAClass::CacheHandlerlands atfile_size - 11(counting back from the end) while thedisk and file handlers land at
file_size + 10(a POSIX signed offset, past the end), andthe loop cache handler errors. That divergence predates this PR; naming the command at
least makes it visible instead of hiding behind a decoded
2.